-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
After our discussion, I thought again about what I like about this repo:
- I can treat a Simulation as a black-box that just gets parameters and returns sensor-data and plots
- Input can probably be serialized into JSON files because all inputs are dicts of
ureg.Quantity - Units are checked
- I can reuse parts of the code through a seperation of geometry-description and the actual FEM description
- Adding any sensor you want to the simulation is nice
- Reduction of boilerplate FEniCS code, like for the definition of BCs.
What I don't like:
- The classes, as they are designed don't allow me to describe a dynamic simulation and probably a lot of other problems (not flexible enough)
- It is unclear what data and methods a class has. For example, experiments sometimes have a boundary condition for temperature, but I don't know that in advance. The "simple cube" currently contains all the bcs to work with all finite element problems in order to be an actual reusable piece of code.
- The classes are normal Python classes and class properties can just be added dynamicylly in the
__init__. This is i.m.o. too flexiblebe because it encourages to "hack your way around the limitations of the design" but then your hack becomes unusable to others. There is of course no perfect design, but I would be more in favor of updating the interfaces from time to time to allow new features which then all new problems must adhere to. - Plots are defined by the finite-element problem and cannot be changed by the user like sensors
- The seperation of experiment and FEM problem is not very strict. The description of BCs currently requires knowledge about the functionspaces which should only be part of the FEM description.
What I would want (in addition to what I like):
- Seperation of the experiment and the geometry to improve reusability of code
- Describe BCs without needing to know the FEM problem
- Use plots as flexible as sensors
- A subset of all problems should be serializable as JSON files.
- Creation of problems from JSON files (Not possible for everything, but for a certain subset of problems, this would be helpful for the https://github.com/BAMresearch/NFDI4IngModelValidationPlatform)
I have some code suggestions on the branch https://github.com/BAMresearch/FenicsXConcrete/tree/sjard_suggestion.
It's all WIP, but I am currently tending to make the description of the experiment fully independent of FEniCS, because the FEniCS-objects might be different depending on the problem that is solved. All classes use pydantic.dataclasses in order to enforce the class variables that are being used and to enable serializability by default.
To be continued...
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request