How cidetec-energy-storage/cidemod works
cideMOD is a finite-element battery-cell simulation package implementing pseudo-X-dimensional electrochemical models, with optional thermal and degradation physics, configurable cell geometry and simulation conditions. The principal workflow configures a cell and model, builds the problem and mesh, assembles and solves the coupled equations over time, and exposes simulation results. The README documents the main physics capabilities; sampled excerpts and the source index support the core wiring. Several subsystem internals were not sampled, so links to them are limited to documented capabilities or omitted where call ownership is unclear.
Main entry points: main.py Problem runtime · base_model.py PXD model base · fem_handler.py FEM handler · parser.py Cell parser
Components 24
Simulation interface
- Battery system API
src/cideMOD/simulation_interface/battery_system.py - Run inputs
src/cideMOD/simulation_interface/inputs.py - Problem runtime
src/cideMOD/main.py - Result plotting
src/cideMOD/helpers/plotview.py
Cell and geometry
- Cell parser
src/cideMOD/cell/parser.py - Cell components
src/cideMOD/cell/components.py - Cell parameters
src/cideMOD/cell/parameters.py - Dimensional analysis
src/cideMOD/cell/dimensional_analysis.py - State warehouse
src/cideMOD/cell/warehouse.py - Mesh construction
src/cideMOD/mesh/base_mesher.py - Gmsh generation
src/cideMOD/mesh/gmsh_generator.py
Battery physics
- Model registry
src/cideMOD/models/__init__.py - Model handler
src/cideMOD/models/model_handler.py - PXD model base
src/cideMOD/models/PXD/base_model.py - Electrochemistry
src/cideMOD/models/PXD/electrochemical - Thermal model
src/cideMOD/models/PXD/thermal - Degradation models
src/cideMOD/models/PXD/degradation - Particle models
src/cideMOD/models/particle_models
Numerical runtime
- FEM handler
src/cideMOD/numerics/fem_handler.py - Time schemes
src/cideMOD/numerics/time_scheme.py - Nonlinear solver
src/cideMOD/numerics/solver.py - Time stepping
src/cideMOD/numerics/time_stepper.py - Simulation triggers
src/cideMOD/numerics/triggers.py
Other components
- Simulation user
Connections 29
- Simulation user → Battery system API: configures runs
- Battery system API → Problem runtime: creates simulations
src/cideMOD/simulation_interface/battery_system.py - Battery system API → Run inputs: uses inputs
src/cideMOD/simulation_interface/battery_system.py - Problem runtime → Cell parser: parses cell
src/cideMOD/main.py - Problem runtime → Cell components: builds variables
src/cideMOD/main.py - Problem runtime → State warehouse: sets up state
src/cideMOD/main.py - Problem runtime → Mesh construction: builds mesh
src/cideMOD/main.py - Problem runtime → Model handler: delegates models
src/cideMOD/main.py - Problem runtime → FEM handler: uses FEM
src/cideMOD/main.py - Problem runtime → Time schemes: sets time scheme
src/cideMOD/main.py - Problem runtime → Nonlinear solver: solves equations
src/cideMOD/main.py - Problem runtime → Time stepping: advances time
src/cideMOD/main.py - Problem runtime → Simulation triggers: checks triggers
src/cideMOD/main.py - Cell parser → Cell parameters: parses parameters
src/cideMOD/cell/parser.py - Cell components → Cell parser: uses parsed structure
src/cideMOD/cell/components.py - Cell components → Model handler: computes properties
src/cideMOD/cell/components.py - Cell parser → Dimensional analysis: supports scaling
src/cideMOD/cell/dimensional_analysis.py - Mesh construction → Gmsh generation: adapts Gmsh mesh
src/cideMOD/mesh/gmsh_adapter.py - Model handler → Model registry: discovers models
src/cideMOD/models/model_handler.py - Model handler → PXD model base: runs model hierarchy
- PXD model base → Electrochemistry: extends with physics
src/cideMOD/models/PXD/electrochemical/preprocessing.py - PXD model base → Thermal model: adds heat balance
src/cideMOD/models/PXD/thermal/equations.py - PXD model base → Degradation models: adds degradation
src/cideMOD/models/PXD/degradation/SEI/base_SEI.py - PXD model base → Particle models: supports particle models
- Electrochemistry → FEM handler: forms FEM equations
src/cideMOD/models/PXD/electrochemical/preprocessing.py - Thermal model → FEM handler: uses FEM equations
src/cideMOD/models/PXD/thermal/equations.py - Degradation models → FEM handler: preprocesses FEM fields
src/cideMOD/models/PXD/degradation/SEI/electron_migration/preprocessing.py - Particle models → FEM handler: preprocesses FEM fields
src/cideMOD/models/particle_models/SGM_basic/preprocessing.py - Problem runtime → Result plotting: exposes plots