DFN Calendar Ageing Model Try Protos
← Models · DFN Calendar Ageing
Simulates battery capacity fade during storage using the Doyle-Fuller-Newman electrochemical model.
Overview
The DFN Calendar Ageing Model simulates battery degradation during storage (calendar aging) for Li-ion batteries using the Doyle-Fuller-Newman (DFN) electrochemical model. This model predicts capacity fade and state-of-health (SoH) degradation over extended periods (days, months, years) without any charging or discharging cycles.
Input Parameters
Required Input Structure
{
"cell_design": {
// Cell design parameters (flat dictionary)
},
"simulation_parameters": {
// Simulation configuration parameters
}
}
Cell Design Parameters
The cell_design dictionary contains physical cell properties. Key required parameters include:
nominal_capacity_Ah(float, > 0): Target capacity in Ampere-hourscell_volume_L(float, > 0): Cell volume in litersupper_voltage_cutoff_V(float, > 0): Upper voltage limit [V]lower_voltage_cutoff_V(float, >= 0): Lower voltage limit [V]
Additional cell design parameters include electrode geometries, material properties, separator properties, thermal properties, and more. See the full schema for complete details.
The cell_design voltage cutoffs are required, but have no effect in this model: calibration, storage and DCIR runs all use upper_voltage_cutoff_V and lower_voltage_cutoff_V from simulation_parameters. positive_electrode_active_material_name is accepted but has no effect either; the PyBaMM parameter set is chosen only by use_model_parameters, so an LFP cathode does not switch the run to Prada2013.
Simulation Parameters
Simulation Parameters
The following parameters go under simulation_parameters. Parameters with a default are optional and fall back to that default when omitted.
| Parameter | Type | Description |
|---|---|---|
initial_soc |
float | Initial state of charge (0-1) |
upper_voltage_cutoff_V |
float | Upper voltage cutoff [V] |
lower_voltage_cutoff_V |
float | Lower voltage cutoff [V] (>= 0) |
reference_temperature_K |
float | Reference temperature [K] |
ambient_temperature_K |
float | Ambient temperature [K] |
initial_temperature_K |
float | Initial cell temperature [K] |
contact_resistance_Ohm |
float | Contact resistance [Ω] (optional; defaults to 0 Ω if omitted) |
total_heat_transfer_coefficient_W.m2.K-1 |
float | Heat transfer coefficient [W·m⁻²·K⁻¹] |
cooling_surface_area_m2 |
float | Cooling surface area [m²] (optional; defaults to 0.1 m² if omitted) |
solver_atol |
float | Absolute tolerance for solver |
solver_rtol |
float | Relative tolerance for solver |
calendar_time_days |
float (> 0) | Calendar aging duration to simulate [days]; required |
soh_threshold |
float | Optional SoH threshold [%] (0-100); the simulation stops early once SoH drops to or below this value at the end of a storage batch (stop_reason: "soh_threshold"); defaults to 0 (threshold effectively disabled) if omitted |
skip_capacity_calibration |
boolean | Optional flag to skip the capacity calibration step; if omitted, the schema default is used |
use_model_parameters |
string | Optional; one of "", "OKane2022", "Prada2013", "ORegan2022". If omitted or set to "", the model defaults to the OKane2022 parameter set. "Prada2013" and "ORegan2022" are accepted, but runs with them fail (see Parameter set defaults below) |
Optional SEI Parameters
All SEI parameters are optional (can be null). A value that is provided replaces the parameter set's value; a value left out or null keeps the parameter set's value. The seeded default parameters set every SEI parameter to the values below.
| Parameter | Type | Seeded value | Description |
|---|---|---|---|
initial_sei_thickness_m |
float | null | 2e-9 | Initial SEI thickness [m] |
sei_partial_molar_volume_m3_mol |
float | null | 9.585e-5 | SEI partial molar volume [m³·mol⁻¹] |
sei_resistivity_Ohm_m |
float | null | 200000.0 | SEI electrical resistivity [Ω·m] |
sei_growth_activation_energy_J_mol |
float | null | 4000.0 | SEI growth activation energy [J·mol⁻¹] |
sei_solvent_diffusivity_m2_s |
float | null | 4.5e-21 | Solvent diffusivity through SEI [m²·s⁻¹] |
bulk_solvent_concentration_mol_m3 |
float | null | 2636.0 | Bulk solvent concentration [mol·m⁻³] |
sei_reaction_exchange_current_density_A_m2 |
float | null | 1.5e-7 | SEI reaction exchange current density [A·m⁻²] — no effect (see below) |
sei_open_circuit_potential_V |
float | null | 0.4 | SEI open circuit potential [V] — no effect (see below) |
ec_diffusivity_m2_s |
float | null | 2e-17 | Ethylene carbonate diffusivity [m²·s⁻¹] — no effect (see below) |
ec_initial_concentration_mol_m3 |
float | null | 4541.0 | EC initial concentration [mol·m⁻³] — no effect (see below) |
No effect: the model grows SEI with the solvent-diffusion-limited mechanism, which does not use sei_reaction_exchange_current_density_A_m2, sei_open_circuit_potential_V, ec_diffusivity_m2_s or ec_initial_concentration_mol_m3. These four are accepted and echoed in config, but do not change the results. The other six SEI inputs do.
Parameter set defaults: only OKane2022 (the default, also used for "") carries SEI values, so it is the only set that can fill in SEI inputs you leave out. Prada2013 and ORegan2022 carry no SEI values: leaving any of the six effective SEI inputs out fails the run, and because these sets also lack the lithium-to-SEI mole ratio, which this model has no input for, runs with them fail even when every SEI input is supplied.
Optional Mesh Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
var_pts |
object | null | See below | Variable point distribution for mesh |
Default var_pts structure:
{
"x_n": 20,
"x_s": 20,
"x_p": 20,
"r_n": 20,
"r_p": 20
}
Output Structure
Success Response
A successful run returns success, stop_reason, data (timeseries), summary (scalars) and config (the simulation_parameters used, including any SEI overrides). Each field is described below.
{
"success": true,
"stop_reason": "completed",
"data": {
"time_days": [ /* one value per point */ ],
"capacity_Ah": [ /* ... */ ],
"soh_pct": [ /* ... */ ],
"sei_thickness_m": [ /* ... */ ],
"dcir_0_1s_Ohm": [ /* ... */ ],
"dcir_1s_Ohm": [ /* ... */ ],
"dcir_10s_Ohm": [ /* ... */ ],
"dcir_18s_Ohm": [ /* ... */ ],
"dcir_30s_Ohm": [ /* ... */ ]
},
"summary": { /* scalar values, see the summary table */ },
"config": { /* simulation_parameters as run */ }
}
Output Fields
success (boolean)
Indicates if the simulation completed successfully.
stop_reason (string)
Reason indicating why the simulation stopped:
"completed": Simulation ran for the full requested duration"soh_threshold": Simulation terminated early because SoH dropped to or belowsoh_thresholdat the end of a storage batch"solver_failure": Simulation stopped early because a storage batch failed to solve after retries (solver error, convergence issues); partial results up to that point are still returned
Note: The summary field
calendar_time_daysreflects the actual simulated duration, which may be less than the requested duration if the simulation terminates early. Comparecalendar_time_days(actual) withrequested_calendar_time_days(requested) to determine if the simulation completed fully.
data (object | null)
Minimal timeseries data with one BOL point (t=0) plus one point per storage batch (up to 10 batches, so up to 11 points total — fewer for shorter calendar_time_days):
time_days(array): Time points [days]capacity_Ah(array): Capacity calculated from LLI [A·h]soh_pct(array): State of Health calculated from LLI [%]sei_thickness_m(array): X-averaged negative SEI thickness [m] at each timeseries point; the t=0 point is always0.0, whateverinitial_sei_thickness_mis set todcir_0_1s_Ohm(array): DCIR at 0.1 s [Ω] from 2C pulse at 50% SOCdcir_1s_Ohm(array): DCIR at 1 s [Ω]dcir_10s_Ohm(array): DCIR at 10 s [Ω]dcir_18s_Ohm(array): DCIR at 18 s [Ω]dcir_30s_Ohm(array): DCIR at 30 s [Ω]
A DCIR entry is null when the pulse at that point fails to solve.
Note: Storage time is split into batches (1 year each by default, scaled up so at most 10 batches cover the full calendar_time_days); each batch's end state becomes one timeseries point, preceded by a BOL point at t=0. DCIR values are computed per point via a 2C discharge pulse simulation.
summary (object)
Scalar summary values. Fields marked optional are omitted from the result (not set to null) when they are unavailable:
| Field | Type | Description |
|---|---|---|
calendar_time_days |
float | Actual calendar aging time simulated [days] (may be less than requested if simulation terminates early) |
requested_calendar_time_days |
float | Originally requested calendar aging time [days] |
initial_capacity_Ah |
float | Initial capacity [A·h] |
final_capacity_Ah |
float | Final capacity [A·h] |
capacity_fade_Ah |
float | Capacity fade [A·h] |
capacity_fade_pct |
float | Capacity fade [%] (equal to LLI_pct) |
initial_soh_pct |
float | Initial state of health [%] |
final_soh_pct |
float | Final state of health [%] |
LLI_pct |
float | Loss of lithium inventory [%] |
Q_SEI_total_Ah |
float, optional | Total SEI capacity loss [A·h]; omitted when zero |
porosity_neg_initial |
float, optional | Initial negative electrode porosity |
porosity_neg_final |
float, optional | Final negative electrode porosity |
porosity_neg_change |
float, optional | Change in negative electrode porosity |
porosity_pos_initial |
float, optional | Initial positive electrode porosity |
porosity_pos_final |
float, optional | Final positive electrode porosity |
porosity_pos_change |
float, optional | Change in positive electrode porosity |
sei_thickness_initial_m |
float, optional | Initial X-averaged negative SEI thickness [m]; always 0.0 when present |
sei_thickness_final_m |
float, optional | Final X-averaged negative SEI thickness [m]; both SEI thickness fields are omitted when the final thickness is zero |
Error Response
Unexpected errors (invalid parameters, solver setup failures, calibration exceptions, etc.) are not returned as a {"success": false, ...} payload from the model itself — the model function raises, and the job layer catches the exception and marks the job as failed:
{
"status": "failed",
"error": "Error message describing what went wrong"
}
Note that "solver_failure" (a storage batch failing mid-run) is handled differently: it is not an exception, so the simulation still returns a normal "success": true payload with stop_reason: "solver_failure" and whatever partial data/summary were collected before the failing batch.
Model Configuration
Model Options
The model uses the following PyBaMM model options:
"calculate discharge energy": "true": Track discharge energy"cell geometry": "arbitrary": Arbitrary cell geometry"thermal": "lumped": Lumped thermal model"contact resistance": "true": Include contact resistance"SEI": "solvent-diffusion limited": SEI growth mechanism"SEI porosity change": "true": Track porosity changes due to SEI"SEI on cracks": "false": No SEI growth on cracks"lithium plating": "none": No lithium plating"lithium plating porosity change": "false": No porosity change from lithium plating"particle mechanics": "none": No particle mechanics"loss of active material": "none": No LAM mechanism
Solver
- Solver: IDAKLUSolver (Implicit Differential-Algebraic solver)
- Time Integration: Adaptive time stepping with specified tolerances
- Mesh Resolution: Configurable via
var_ptsparameter
Parameter Sets
The model supports PyBaMM parameter sets via use_model_parameters. Allowed values:
"": Empty string defaults to OKane2022"OKane2022": OKane2022 parameter set (default)"Prada2013": Prada2013 parameter set; accepted, but runs fail (no SEI values; see Optional SEI Parameters)"ORegan2022": ORegan2022 parameter set; accepted, but runs fail (no SEI values; see Optional SEI Parameters)
Usage Examples
Basic Usage
The seeded default parameters simulate eight years (2920 days) of storage at 80% SoC and 298.15 K for an 80.5 Ah NMC811 cell, stopping early if SoH falls to 80%:
{
"cell_design": {
"nominal_capacity_Ah": 80.5,
"cell_volume_L": 0.472,
"upper_voltage_cutoff_V": 4.2,
"lower_voltage_cutoff_V": 2.8,
"positive_electrode_active_material_name": "NMC811_Generic_v1",
"positive_electrode_number_of_coated_sides": 2,
"positive_electrode_count": 18,
"jelly_roll_count": 1,
"pos_electrode_height_mm": 88.971,
"pos_electrode_width_mm": 503.546,
"pos_electrode_length_mm": 503.546,
"pos_electrode_coating_thickness_um": 87.3,
"pos_electrode_coating_porosity": 0.216,
"pos_electrode_active_material_volume_fraction": 0.593,
"pos_electrode_coating_density_g.cm-3": 3.196,
"positive_electrode_specific_heat_capacity_J.kg-1.K-1": 1000.0,
"positive_current_collector_thickness": 14.0,
"positive_current_collector_electrical_conductivity_S.m-1": 37700000.0,
"positive_current_collector_density_g.cm-3": 2.7,
"positive_current_collector_specific_heat_capacity_J.kg-1.K-1": 897.0,
"positive_current_collector_thermal_conductivity_W.m-1.K-1": 237.0,
"neg_electrode_coating_thickness_um": 115.3,
"negative_electrode_porosity": 0.253,
"negative_electrode_active_material_volume_fraction": 0.629,
"negative_electrode_density_g.cm-3": 1.561,
"negative_electrode_specific_heat_capacity_J.kg-1.K-1": 1000.0,
"negative_electrode_electrical_conductivity_S.m-1": 1000000.0,
"negative_electrode_thermal_conductivity_W.m-1.K-1": 1.0,
"neg_electrode_foil_thickness": 12.0,
"negative_electrode_foil_electrical_conductivity_S.m-1": 59600000.0,
"negative_electrode_foil_density_g.cm-3": 8.96,
"negative_electrode_foil_specific_heat_capacity_J.kg-1.K-1": 1000.0,
"negative_electrode_foil_thermal_conductivity_W.m-1.K-1": 401.0,
"separator_thickness_um": 18.0,
"separator_porosity": 0.4,
"separator_density_g.cm-3": 0.95,
"separator_specific_heat_capacity_J.kg-1.K-1": 1978.0,
"separator_thermal_conductivity_W.m-1.K-1": 0.16
},
"simulation_parameters": {
"calendar_time_days": 2920,
"initial_soc": 0.8,
"upper_voltage_cutoff_V": 4.2,
"lower_voltage_cutoff_V": 2.8,
"reference_temperature_K": 298.15,
"ambient_temperature_K": 298.15,
"initial_temperature_K": 298.15,
"contact_resistance_Ohm": 1e-5,
"total_heat_transfer_coefficient_W.m2.K-1": 0.01,
"cooling_surface_area_m2": 0.1,
"solver_atol": 1e-4,
"solver_rtol": 1e-4,
"soh_threshold": 80.0,
"skip_capacity_calibration": false,
"use_model_parameters": "OKane2022",
"initial_sei_thickness_m": 2e-9,
"sei_partial_molar_volume_m3_mol": 9.585e-5,
"sei_resistivity_Ohm_m": 200000.0,
"sei_growth_activation_energy_J_mol": 4000.0,
"sei_solvent_diffusivity_m2_s": 4.5e-21,
"bulk_solvent_concentration_mol_m3": 2636.0,
"sei_reaction_exchange_current_density_A_m2": 1.5e-7,
"sei_open_circuit_potential_V": 0.4,
"ec_diffusivity_m2_s": 2e-17,
"ec_initial_concentration_mol_m3": 4541.0
}
}
Override Specific SEI Parameters
simulation_parameters = {
# ... required parameters ...
"use_model_parameters": "OKane2022",
# Override specific SEI parameters
"sei_solvent_diffusivity_m2_s": 1.0e-21,
"bulk_solvent_concentration_mol_m3": 1318.0,
# Other SEI parameters keep their OKane2022 values
}
Use All Defaults (No Overrides)
simulation_parameters = {
# ... required parameters ...
"use_model_parameters": "OKane2022",
# All SEI parameters omitted or set to None - uses parameter set defaults
}
Technical Details
Capacity Calculation
For calendar aging simulations, capacity is calculated from Loss of Lithium Inventory (LLI):
capacity_Ah = nominal_capacity_Ah × (1 - LLI_pct / 100)
State of Health Calculation
soh_pct = 100 - LLI_pct
Timeseries Sampling
The simulation runs as a sequence of storage batches rather than one continuous solve, to avoid holding a multi-year timeseries in memory:
- Total storage time is split into batches of 1 year (365 days) each by default
- If that would produce more than 10 batches (i.e.
calendar_time_days> ~10 years), the batch size is scaled up so exactly 10 equally-spaced batches cover the full duration - After each batch, the degradation state (LLI, SEI thickness, porosity) is extracted and a DCIR pulse is run at that state, then the batch's PyBaMM solution is freed before the next batch begins
- A BOL diagnostic point (t=0) is always prepended, so the output has 1 + number-of-batches points (up to 11 for long durations; fewer for shorter ones — e.g. a 30-day simulation produces only 2 points)
- Per point, DCIR values are computed via a 2C discharge pulse simulation at 50% SOC
Capacity Calibration
If skip_capacity_calibration is False, the model performs an initial capacity calibration:
- Charges the cell to the upper voltage cutoff
- Discharges at C/10 rate
- Scales cell design parameters to match the measured capacity
This ensures the simulated capacity matches the specified nominal_capacity_Ah.
Stopping Criteria
The simulation may terminate early in the following cases:
- SoH threshold: If
soh_threshold> 0 and SoH is at or below the threshold at the end of a storage batch - Failed batch: If a storage batch fails to solve after retrying with looser solver tolerances, the simulation stops with partial results
When the simulation completes (either normally or early):
calendar_time_daysin the summary reflects the actual simulated duration (matchescumulative_time_daysin logs)requested_calendar_time_daysin the summary reflects the originally requested durationstop_reasonindicates why the simulation stopped:"completed": Simulation ran for the full requested duration"soh_threshold": Simulation terminated early because SoH dropped to or below the threshold"solver_failure": Simulation stopped early because a storage batch failed after retries
Limitations
-
SEI Only: This model only includes SEI growth degradation. Other mechanisms (particle cracking, LAM) are not modeled.
-
Calendar Aging Only: The model simulates storage conditions only. No charge/discharge cycles are included.
-
Lumped Thermal Model: Uses a simplified lumped thermal model. Spatial temperature gradients are not captured.
-
Timeseries Sampling: Output timeseries has one point per storage batch (plus a BOL point), up to 11 points total for long durations, fewer for short ones. Full-resolution data is not available in the output.