-
-
Notifications
You must be signed in to change notification settings - Fork 622
[GSOC 2025] 3D FVM #5009
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
base: develop
Are you sure you want to change the base?
[GSOC 2025] 3D FVM #5009
Conversation
pyproject.toml
Outdated
@@ -42,6 +42,7 @@ dependencies = [ | |||
"posthog", | |||
"pyyaml", | |||
"platformdirs", | |||
"pygmsh>=7.1.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is GPLv3, is there a different package that can be used instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about PyMesh, can we use that? It has MIT license I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like pymesh hasn't been updated in a long time. we already use scikit-fem for 2D finite elements and meshing -- do they support 3d?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah they do, migrating to sickit-fem then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far. Next steps are:
- Add an example of solving the 3D heat eqn in a jelly and prismatic domain, with different boundary conditions and a prescribed heat souce
- Add tests for the 3d finite volume methods (make sure things are discredited as expected, check simple problems are solved correctly). To help with this you can use the "method of manufactured solutions".
Once the mesh and method are tested for simple general equations we can start on the battery-specific parts of the project in a separate PR
@@ -234,7 +242,7 @@ def __init__(self, extra_options): | |||
self.possible_options = { | |||
"calculate discharge energy": ["false", "true"], | |||
"calculate heat source for isothermal models": ["false", "true"], | |||
"cell geometry": ["arbitrary", "pouch"], | |||
"cell geometry": ["arbitrary", "pouch", "3D"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we should directly specify form factors rather than "3D", but that can come later once we have some built in geometries (pouch, jelly, prismatic)
@@ -224,6 +224,14 @@ class BatteryModelOptions(pybamm.FuzzyDict): | |||
the respective porosity change) over the x-axis in Single Particle | |||
Models, can be "false" or "true". Default is "false" for SPMe and | |||
"true" for SPM. | |||
* "geometry options" : dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be specified separately from the model (certainly mesh size, the others might be infered from cell geometry)
from pybamm.models.submodels.thermal.base_thermal import BaseThermal | ||
|
||
|
||
class FullThreeDimensional(BaseThermal): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be removed for now until everything else is set up and working?
Description
This PR will add a support for 3D FVM, 3D meshing along with a mesh generator with support for prismatic, spirally wound and cylindrical geometry
Its far away from done, drafting it for the reviews.
Fixes # (issue)
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)
Important checks:
Please confirm the following before marking the PR as ready for review:
nox -s pre-commit
nox -s tests
nox -s doctests