Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-spherical particles #1072

Open
DrSOKane opened this issue Jun 23, 2020 · 17 comments · May be fixed by #4827
Open

Non-spherical particles #1072

DrSOKane opened this issue Jun 23, 2020 · 17 comments · May be fixed by #4827
Labels
difficulty: easy A good issue for someone new. Can be done in a few hours priority: low No existing plans to resolve

Comments

@DrSOKane
Copy link
Contributor

Summary
Include other geometries for electrode particles

Motivation
Tomography and SEM experiments agree that graphite particles are not spherical.

Additional context
I have devised a model for graphite particles that are coin-shaped, with (de)intercalation at the edge
of the coin, as opposed to spherical, but have not had a chance to test it yet.

@valentinsulzer
Copy link
Member

This should be ok to implement. Mainly requires adding cylindrical operators for grad, div and integral. How do you define surface area to volume ratio in this case?

@DrSOKane
Copy link
Contributor Author

DrSOKane commented Jun 23, 2020

Circumference divided by area, i.e. 2eps_s/r_p, as opposed to the 3eps_s/r_p for spherical particles

@DrSOKane
Copy link
Contributor Author

I was actually proposing non-spherical particles as a summer project for an undergraduate student. I mainly just wanted to check it wasn't already being done.

@valentinsulzer
Copy link
Member

Sounds good. Not being done as far as I'm aware. Would "cylindrical particles" be a better name for the issue? Since "non-spherical" can mean anything.

I can't tell if you are proposing to do this in your fork of pybamm, or somewhere else first, but in pybamm it should be quite simple:

  1. define a new SpatialVariable whose coordinate system is "cylindrical polar" instead of "spherical polar"
  2. add an option to the battery_geometry function to use this "cylindrical polar" variable instead of the existing spherical polar one when defining the mesh
  3. add a case to finite volumes for how to define grad, div, integral when the coordinate system is "cylindrical polar"

then you can just replace the default geometry with the cylindrical one and it should work

@DrSOKane
Copy link
Contributor Author

Thanks Tino. My proposed geometry is actually circular (2-D) as opposed to cylindrical, as I'm assuming the thickness of the coin to be negligible. I chose the title "Non-spherical particles" as others may want to implement different geometries; circular graphite just happens to be what interests me.

@DrSOKane
Copy link
Contributor Author

DrSOKane commented Jul 10, 2020

The student and I have started coding the cylindrical geometry, but there's the line in the function integral in finite_volume.py corresponding to the normal spherical geometry that's confusing us:

out = 4 * np.pi ** 2 * integration_vector @ (discretised_child * r)

We don't understand why it's not

out = 4 * np.pi * integration_vector @ (discretised_child * r ** 2)

Until we understand how the normal spherical integral works, we can't implement the cylindrical one.

@valentinsulzer
Copy link
Member

Oooops, that looks like a typo, right @Scottmar93 @rtimms ?

@rtimms
Copy link
Contributor

rtimms commented Jul 10, 2020

yep looks like a typo to me

@rtimms
Copy link
Contributor

rtimms commented Jul 10, 2020

presumably there is a typo in the tests too, as this should’ve been picked up?

@valentinsulzer
Copy link
Member

Yes the tests are wrong too. I am an idiot, as beautifully documented in #293 . Thanks very much for picking this up @DrSOKane !

@DrSOKane
Copy link
Contributor Author

So what is the correct formulation? Mathematically, the integral is

\int_0^1 4 \pi r^2 ,\mathrm{d}r

using LaTeX notation. Does this translate to

out = 4 * np.pi * integration_vector @ (discretised_child * r ** 2)

in PyBaMM?

@valentinsulzer
Copy link
Member

Yes, that should be correct

@DrSOKane
Copy link
Contributor Author

What is the integral used for anyway? I ask because we're treating the height of the cylinder as infinitesimally small, but I don't imagine your code will like that...

@valentinsulzer
Copy link
Member

The spherical integral only comes into the model through the r_average function (here), which returns
Integral(symbol, r) / Integral(1, r).
So the height of the cylinder would cancel out anyway, and it should be fine to just do
out = 2 * np.pi * integration_vector @ (discretised_child * r)

@katiezzzzz
Copy link

Hi Pybamm team and thanks @tinosulzer for your help!
I am the undergraduate student who is working with @DrSOKane on adding the geometry. I have made a few modifications to battery_geometry, standard_spatial_vars and finite_volume files locally in order to add this geometry. Will it be ok to push these changes after testing?

@valentinsulzer
Copy link
Member

Yep, sounds great, thanks! Just open a pull request when you are ready

@valentinsulzer
Copy link
Member

The issue with the spherical integral has now be fixed separately and merged into develop. Thanks again for pointing it out

@valentinsulzer valentinsulzer added the difficulty: easy A good issue for someone new. Can be done in a few hours label Feb 4, 2021
@valentinsulzer valentinsulzer added the priority: low No existing plans to resolve label May 8, 2023
@d-cogswell d-cogswell linked a pull request Feb 7, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy A good issue for someone new. Can be done in a few hours priority: low No existing plans to resolve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants