Model architecture
All battery models inherit frompybamm.BaseBatteryModel, which provides:
- A
submodelsdictionary mapping submodel names to submodel objects - Default geometry, mesh, discretisation, and solver settings
- A
build()method that assembles the submodels into a system of equations - An
optionsdictionary that controls which submodels are active
Simulation class handles setting parameters, meshing, discretisation, and solving — so in most workflows you create a model and pass it directly to pybamm.Simulation.
Available lithium-ion models
- SPM
- SPMe
- DFN
- MPM
- MSMR
- Newman-Tobias
Single Particle Model (SPM)The simplest electrochemical model. Each electrode is represented as a single spherical particle. The electrolyte concentration is assumed uniform (constant). Fast to solve, suitable for low C-rates.Reference: Marquis et al. (2019)
Other chemistries
Lead-acid
pybamm.lead_acid.Full() — full porous-electrode lead-acid modelpybamm.lead_acid.LOQS() — leading-order quasi-static modelEquivalent circuit
pybamm.equivalent_circuit.Thevenin() — RC equivalent circuit modelInstantiating models
Basic instantiation
options dict is optional — every option has a default. You only need to supply the keys you want to change.
Model options
Options control which submodels are active and how physics is represented. The full set is documented inBatteryModelOptions. Key options are listed below.
Thermal models
Thermal models
Controls how heat generation and transfer are modelled.
| Value | Description |
|---|---|
"isothermal" (default) | No thermal effects |
"lumped" | Single lumped temperature ODE |
"x-lumped" | Lumped in through-cell direction, resolved in transverse |
"x-full" | Full thermal model (requires cell geometry: "pouch") |
Particle diffusion
Particle diffusion
Sets the submodel used to describe lithium diffusion inside electrode particles.
A 2-tuple sets different options per electrode:
| Value | Description |
|---|---|
"Fickian diffusion" (default) | Full spherical diffusion |
"uniform profile" | Uniform concentration within particle |
"quadratic profile" | Second-order polynomial approximation |
"quartic profile" | Fourth-order polynomial approximation |
"MSMR" | Multi-site multi-reaction diffusion |
SEI growth
SEI growth
Models the growth of the Solid Electrolyte Interface on the negative electrode.
| Value | Description |
|---|---|
"none" (default) | No SEI growth |
"constant" | Fixed SEI thickness |
"reaction limited" | SEI growth limited by electrochemical reaction |
"solvent-diffusion limited" | Growth limited by solvent diffusion |
"electron-migration limited" | Growth limited by electron migration |
"ec reaction limited" | Ethylene carbonate reduction |
"VonKolzenberg2020" | Multi-mechanism model |
Lithium plating
Lithium plating
Models lithium metal deposition on the negative electrode.
| Value | Description |
|---|---|
"none" (default) | No plating |
"reversible" | Reversible plating |
"partially reversible" | Partial reversibility |
"irreversible" | Irreversible plating |
Loss of active material (LAM)
Loss of active material (LAM)
Models degradation of active material over cycling.
| Value | Description |
|---|---|
"none" (default) | No LAM |
"stress-driven" | Driven by mechanical stress |
"reaction-driven" | Driven by side reactions |
"current-driven" | Driven by current |
"stress and reaction-driven" | Combined |
Intercalation kinetics
Intercalation kinetics
Sets the electrochemical kinetics model at the electrode-electrolyte interface.
| Value | Description |
|---|---|
"symmetric Butler-Volmer" (default) | Standard Butler-Volmer |
"asymmetric Butler-Volmer" | Asymmetric transfer coefficient |
"linear" | Linearised kinetics |
"Marcus" | Marcus theory |
"Marcus-Hush-Chidsey" | Asymptotic MHC |
"MSMR" | Multi-site kinetics |
Particle mechanics
Particle mechanics
Models mechanical stresses and cracking in electrode particles.
| Value | Description |
|---|---|
"none" (default) | No mechanics |
"swelling only" | Particle swelling without cracking |
"swelling and cracking" | Full mechanics with cracking |
Combining options
Multiple options can be combined in a single dict:DFN with degradation