DFN({"thermal": "lumped"}) solves a spatially averaged cell-temperature balance. To interpret its output, check heat-source options, thermal properties, cooling geometry and initial temperature. The recorded tests below use PyBaMM 26.5.0 on eight built-in lithium-ion parameter sets; later Ai2020 corrections are stated separately.
PyBaMM battery modelling series · Silent failures, measured (part 3 of 8): Previous: Five PyBaMM Experiment Checks: Default Duration, Cycles and Output · Next: What PyBaMM’s Capacity Numbers Measure: “80% capacity”, Capacity [A.h] and Loss of Capacity to SEI · Series hub: Data pipeline (5) + Silent failures, measured (8) · RSS feed.
1. The default model is isothermal, and its heating variables are zero
pybamm.lithium_ion.DFN() uses "thermal": "isothermal". The cell temperature is set to the ambient temperature at every point and every instant; no energy balance is solved. That is a reasonable default. What is less obvious is what the heating variables contain:
| Chen2020, 1C discharge | Peak "Total heating [W]" |
|---|---|
DFN() |
0.0 W at every time point |
DFN({"calculate heat source for isothermal models": "true"}) |
1.04 W |
In the tested isothermal submodel (pybamm/models/submodels/thermal/isothermal.py), the listed heating and cooling variables are assigned 0 unless heat-source calculation is enabled. Thus sol["Total heating [W]"] returns zeros under the default option. Those zeros report a disabled calculation, not measured or predicted absence of electrochemical heat.
The second consequence: the isothermal model ignores "Initial temperature [K]". Its temperature is the ambient temperature, full stop. Setting only the initial temperature to 263.15 K gave a 1C capacity identical to the 25 °C value in all eight sets, to three decimals. Setting only the ambient temperature reproduced the full cold result.
2. Comparing isothermal and lumped predictions
It is tempting to treat the lumped model as a refinement that nudges the answer. Here is a 1C and a 3C discharge in both models:
| Set | 1C: isothermal → lumped | Rise | 3C: isothermal → lumped | Rise |
|---|---|---|---|---|
| Chen2020 | 4.992 → 5.001 A·h (+0.2%) | 13.8 K | 2.326 → 2.418 A·h (+4.0%) | 58.0 K |
| OKane2022 | 4.955 → 5.005 A·h (+1.0%) | 12.9 K | 2.333 → 5.000 A·h (+114%) | 49.6 K |
| ORegan2022 | 4.422 → 4.736 A·h (+7.1%) | 15.6 K | 1.110 → 3.506 A·h (+216%) | 43.3 K |
| Ai2020 | 2.413 → 2.414 A·h (0.0%) | 3.6 K | 2.308 → 2.319 A·h (+0.5%) | 13.8 K |
| Mohtat2020 | 4.836 → 4.852 A·h (+0.3%) | 3.0 K | 4.589 → 4.713 A·h (+2.7%) | 9.3 K |
| Marquis2019 | 0.854 → 0.854 A·h (0.0%) | 0.4 K | 0.821 → 0.823 A·h (+0.2%) | 1.2 K |
| Ecker2015 | 0.170 → 0.170 A·h (0.0%) | 0.1 K | 0.168 → 0.168 A·h (+0.1%) | 0.6 K |
| NCA_Kim2011 | 0.476 → 0.476 A·h (0.0%) | 0.0 K | 0.461 → 0.461 A·h (0.0%) | 0.1 K |
Three things are going on in this table, and each gets its own section below.
- For the three LG M50 sets at 3C, the lumped model heats the cell by 43–58 K, and whether that matters depends on the electrochemistry. OKane2022 and ORegan2022 gain 114% and 216% as the cell warms. Chen2020 heats by 58 K and gains 4%, because its electrolyte and particle transport do not depend on temperature (see the temperature table in the parameter-set article). The thermal model runs, but the electrochemical results barely respond to the temperature change.
- The rise also depends on cooling, thermal capacity and heat generation; section 3 varies the effective heat-transfer coefficient.
- Four sets have large modeled cooling-area-to-volume ratios and short cooling time constants (section 4).
Revision, 2026-10-11: the Ai2020 rows in this article use PyBaMM’s shipped electrolyte diffusivity, which returns a value in cm²/s as if it were m²/s and is 10⁴ times too large (issue #5887; see the correction in the parameter-set article). Re-run on 26.5.0 with the diffusivity multiplied by 10⁻⁴, the Ai2020 row above becomes 2.406 → 2.408 A·h (+0.1%, rise 4.1 K) at 1C and 1.989 → 2.268 A·h (+14.0%, rise 18.6 K) at 3C; its reversible share in section 5 becomes 74.1%, 40.9% and 25.7% at C/5, 1C and 3C; and zero entropy lowers its rise from 0.54 to 0.14 K (−74%) at C/5 and from 4.09 to 2.23 K (−46%) at 1C. Its τ in section 4 stays at 195 s, and thermal_audit still prints no warnings. The tables keep the values for the shipped parameters.
Update, 2026-11-07:PyBaMM 26.10.1.0 includes the Ai2020 unit fix (PR #5888). This article retains the measurements from older versions and the manually corrected comparison. In 26.10.1.0 and subsequent versions that include the fix, use the built-in function directly; multiplying by 10⁻⁴ again would apply the correction twice.
Choose the thermal model and boundary conditions for the intended test. Isothermal prescribes cell temperature; effective temperature control is one experimental approximation to it. A lumped model assumes spatial temperature differences are small enough for one temperature state. Its coefficient must represent the actual cooling setup; a default value alone does not establish still-air conditions. In the recorded high-rate comparisons, predicted capacities differ by up to about a factor of three.
3. Sensitivity to the heat-transfer coefficient
The lumped model cools the cell through "Total heat transfer coefficient [W.m-2.K-1]" times "Cell cooling surface area [m2]". The built-in sets default it to 10 (Chen2020, OKane2022, ORegan2022, Marquis2019, Ecker2015), 5 (Mohtat2020), 25 (NCA_Kim2011) or 35 (Ai2020). Sweeping it on OKane2022 at 3C:
| Heat-transfer coefficient | Temperature rise | 3C capacity |
|---|---|---|
| isothermal (infinite) | 0 K | 2.333 A·h |
| 1000 W/m²·K | 1.9 K | 2.598 A·h |
| 100 W/m²·K | 15.1 K | 4.647 A·h |
| 25 W/m²·K | 31.8 K | 4.934 A·h |
| 10 W/m²·K (default) | 49.6 K | 5.000 A·h |
| 5 W/m²·K | 62.3 K | 5.025 A·h |
| 1 W/m²·K | 78.2 K | 5.047 A·h |
Changing the cooling coefficient shifted the recorded 3C capacity from 2.3 to 5.0 A·h. The default case reached about 75 °C, so its capacity refers to a self-heating trajectory. Interpret the prediction with the parameter functions’ temperature range and the intended cell-temperature limits.
The effective heat-transfer coefficient depends on the cell surface, fixture, airflow and surroundings. Under a valid single-temperature cooling model, a transient cooling curve estimates hA/C; known heat capacity and cooling area are needed to infer h separately. Check sensor representativeness and spatial gradients, then fit or validate the coefficient for the setup.
4. Four of the eight sets describe a single sheet cooled on both faces
For constant heat capacity and cooling coefficient, the lumped cooling time constant is τ = heat capacity ÷ (h × cooling area). Temperature rise also depends on heat generation: for constant heat input and ambient temperature, the steady rise is heat input ÷ (h × cooling area). The time constants computed from the initial properties are:
| Set | Cooling area ÷ volume | Heat capacity | h | τ | Rise at 3C |
|---|---|---|---|---|---|
| NCA_Kim2011 | 12,143 m⁻¹ | 9.4 J/K | 25 | 7 s | 0.1 K |
| Ecker2015 | 11,316 m⁻¹ | 4.2 J/K | 10 | 24 s | 0.6 K |
| Marquis2019 | 7,295 m⁻¹ | 14.1 J/K | 10 | 25 s | 1.2 K |
| Mohtat2020 | 10,459 m⁻¹ | 121.1 J/K | 5 | 59 s | 9.3 K |
| Ai2020 | 394 m⁻¹ | 41.3 J/K | 35 | 195 s | 13.8 K |
| Chen2020, OKane2022 | 219 m⁻¹ | 42.8 J/K | 10 | 806 s | 58.0 / 49.6 K |
| ORegan2022 | 219 m⁻¹ | 60.6 J/K | 10 | 1141 s | 43.3 K |
For the first four sets, "Cell cooling surface area [m2]" equals twice electrode height times width within 0.5%, and "Cell volume [m3]" corresponds to one modeled stack layer. This gives a relatively large cooling-area-to-volume ratio and time constants of seconds to a minute. A short time constant means fast response, not zero temperature rise: the listed 3C rises range up to 9.3 K for Mohtat2020, whose reversible heat is large in these tests.
The LG M50 cooling area, 0.00531 m², matches the side and ends of a 21 × 70 mm cylinder; the modeled stack volume is about 85% of the can volume. For a packaged-cell thermal model, reconcile cooling area, thermal volume, heat capacity and heat-generation scaling with the physical cell. Changing only an outer dimension may leave those quantities inconsistent.
5. Four sets have no reversible heat
The heat a cell generates has three main parts: Ohmic heat in the electrolyte and solid, irreversible heat from reaction overpotentials, and reversible (entropic) heat, proportional to the temperature derivative of the open-circuit potential (Bernardi, Pawlikowski and Newman, 1985). In PyBaMM that derivative is "… electrode OCP entropic change [V.K-1]". In Chen2020, OKane2022, Ecker2015 and NCA_Kim2011 it is exactly 0.0 for both electrodes. The simulation runs with a whole heat source switched off, and nothing reports it.
How much that heat source matters, in the four sets that do include it (net share of total heat, lumped model):
| Set | C/5 | 1C | 3C |
|---|---|---|---|
| Mohtat2020 | 96.4% | 85.7% | 73.6% |
| Ai2020 | 78.5% | 46.8% | 30.7% |
| ORegan2022 | 28.9% | 19.3% | 26.8% |
| Marquis2019 | 20.8% | 5.5% | 2.8% |
| Chen2020, OKane2022, Ecker2015, NCA_Kim2011 | 0% by construction | ||
And what removing it does to the predicted temperature rise, in the same four sets:
| Set | C/5 rise: original → zero entropy | 1C rise: original → zero entropy |
|---|---|---|
| ORegan2022 | 2.46 → 0.80 K (−68%) | 15.6 → 11.0 K (−30%) |
| Ai2020 | 0.53 → 0.13 K (−75%) | 3.58 → 1.70 K (−53%) |
| Mohtat2020 | 0.63 → 0.02 K (−97%) | 3.04 → 0.25 K (−92%) |
| Marquis2019 | 0.069 → 0.011 K (−85%) | 0.37 → 0.16 K (−56%) |
At a fixed state and temperature, reversible heat is linear in reaction current; Ohmic heat is quadratic, and irreversible reaction heating is approximately quadratic near equilibrium. Over a full discharge, SOC, temperature and cutoff time change these scalings. The measured fractions therefore need not decrease monotonically with C-rate. Entropic heat can also cool the cell, so interpret a net integrated fraction with its sign and SOC range. Use chemistry- and SOC-matched entropic data.
The LG M50 sets provide a comparison for the same cell type. Chen2020 and OKane2022 use zero entropic change and 700 J/kg·K for both electrodes and the separator; ORegan2022 includes measured thermal parameters and entropic coefficients, with an initial heat capacity 42% larger (60.6 vs 42.8 J/K). It is a documented starting point for that cell; validate cooling and temperature range for the target test.
6. The cold start that starts at 25 °C
A cold-start simulation also requires checking the initial temperature. To simulate a cold discharge, the natural move is:
pv.update({"Ambient temperature [K]": 253.15})
With the isothermal model, this prescribes the cold cell temperature. With a fresh lumped-model run, it changes the surroundings while the cell starts from "Initial temperature [K]", 298.15 K in the tested sets. Their LG M50 cooling time constants are 13 to 19 minutes: one time constant removes about 63% of an initial difference only in a constant-property, no-heating cooling test. During discharge, self-heating also contributes.
| Lumped model, discharge to cut-off | Only ambient set (cell starts at 25 °C) | Ambient and initial set |
|---|---|---|
| OKane2022, −20 °C, 3C | 4.932 A·h in 19.7 min | 0.275 A·h in 1.1 min |
| ORegan2022, −10 °C, 3C | 3.170 A·h in 12.7 min | 0.232 A·h in 0.9 min |
| ORegan2022, −20 °C, 2C | 2.207 A·h in 13.2 min | 0.212 A·h in 1.3 min |
| ORegan2022, −20 °C, 3C | 3.082 A·h in 12.3 min | 0.125 A·h in 0.5 min |
The cold-initialized high-rate cases in the table reach cutoff in about 0.5–1.3 minutes. Starting them at 25 °C instead increases the recorded charge by roughly 10 to 25 times. These are initialization comparisons within the stated models, not measurements of a physical cell’s cold-start capability.
In the following 1C comparisons, final capacities are close while early voltages differ. Self-heating reduces the initial-temperature difference along these particular trajectories:
| Lumped model, 1C | Voltage at 10 s, starts at 25 °C | Voltage at 10 s, starts cold | Capacity (both) |
|---|---|---|---|
| OKane2022, −10 °C | 4.006 V | 3.886 V | 4.868 A·h |
| Mohtat2020, −20 °C | 4.105 V | 3.917 V | 2.909 / 2.906 A·h |
| ORegan2022, −20 °C | 4.108 V | 3.888 V | 3.414 / 3.384 A·h |
A 0.12–0.22 V optimistic voltage in the first seconds is exactly the quantity a cold-cranking or power-capability study is after.
For a fresh experiment in 26.5, the first step’s specified temperature is copied into "Initial temperature [K]" (see _set_up_and_parameterise_experiment in simulation.py). Either form below starts that test cold, and both reproduced the reported 0.275 A·h result. A later step temperature sets its environment; a continuation solution carries its existing temperature state.
step = pybamm.step.string("Discharge at 3C until 2.5 V", temperature="-20oC")
experiment = pybamm.Experiment([step])
experiment = pybamm.Experiment(["Discharge at 3C until 2.5 V"], temperature=253.15)
Writing the temperature inside the string — "Discharge at 3C until 2.5 V at -20oC" — raises ValueError: Temperature must be specified as a keyword argument instead of in the string, which at least fails loudly. The silent case is the one above: the ambient temperature changed in ParameterValues, the initial temperature left alone.
7. A check to run after every thermal simulation
The following historical helper checks selected scalar settings in a solved pybamm.Simulation. Its warnings are prompts to compare the setup with the intended experiment:
import numpy as np
import pybamm
def thermal_audit(sim):
"""Warnings for a solved pybamm.Simulation whose thermal set-up runs but misleads."""
opts, pv, sol = sim.model.options, sim.parameter_values, sim.solution
out = []
if opts["thermal"] == "isothermal":
if opts["calculate heat source for isothermal models"] == "false":
out.append("isothermal: every heating variable is 0 unless "
"'calculate heat source for isothermal models' is 'true'")
return out
def first(name):
return float(np.ravel(sol[name].entries)[0])
T0 = first("Volume-averaged cell temperature [K]")
T_amb = first("Volume-averaged ambient temperature [K]")
if abs(T0 - T_amb) > 0.5:
out.append(f"cell starts at {T0 - 273.15:.1f} °C but ambient is "
f"{T_amb - 273.15:.1f} °C: set 'Initial temperature [K]' too")
for electrode in ("Negative", "Positive"):
dUdT = pv[f"{electrode} electrode OCP entropic change [V.K-1]"]
if isinstance(dUdT, (int, float)) and dUdT == 0:
out.append(f"{electrode.lower()} electrode entropic change is 0: "
"no reversible heat from it")
heat_capacity = (first("Volume-averaged effective heat capacity [J.K-1.m-3]")
* pv["Cell volume [m3]"])
tau = heat_capacity / (pv["Total heat transfer coefficient [W.m-2.K-1]"]
* pv["Cell cooling surface area [m2]"])
if tau < 120:
out.append(f"thermal time constant is {tau:.0f} s: "
"this lumped cell behaves almost isothermally")
return out
Output on a 1C discharge in each configuration:
Chen2020, default DFN
isothermal: every heating variable is 0 unless 'calculate heat source for isothermal models' is 'true'
Chen2020, isothermal + heat source
(no warnings)
Chen2020, lumped
negative electrode entropic change is 0: no reversible heat from it
positive electrode entropic change is 0: no reversible heat from it
OKane2022, lumped, only ambient -20 C
cell starts at 25.0 °C but ambient is -20.0 °C: set 'Initial temperature [K]' too
negative electrode entropic change is 0: no reversible heat from it
positive electrode entropic change is 0: no reversible heat from it
OKane2022, lumped, step temperature -20 C
negative electrode entropic change is 0: no reversible heat from it
positive electrode entropic change is 0: no reversible heat from it
Marquis2019, lumped
thermal time constant is 25 s: this lumped cell behaves almost isothermally
ORegan2022, lumped, both -10 C
(no warnings)
Ai2020, lumped
(no warnings)
The helper’s 0.5 K mismatch threshold and 120 s time-constant threshold are diagnostic choices. A warm cell in cold air can be intentional, and a short time constant does not establish isothermal behavior under heat input. The helper returns early for isothermal models, only recognizes scalar-zero entropic inputs, and assumes numeric positive h, area and volume when computing τ. Evaluate functional inputs, temperature-dependent transport and spatial gradients separately; use measurements to validate the thermal boundary and model response.
8. How this was measured
- PyBaMM 26.5.0, Python 3.13, Apple M3, default
IDAKLUSolver.pybamm.lithium_ion.DFNwith{"thermal": "isothermal"}or{"thermal": "lumped"}. - Every discharge starts at
initial_soc=1.0and runs through anExperimentto the set’s ownLower voltage cut-off [V]. - Temperature rise is the maximum of
"Volume-averaged cell temperature [K]"minus its initial value. Heat is the time integral, by the trapezoid rule over the solution’s time points, of"Total heating [W]"and its reversible, irreversible and Ohmic components. - τ uses
"Volume-averaged effective heat capacity [J.K-1.m-3]"at t = 0 times"Cell volume [m3]", divided by h times the cooling area — the same terms the lumped submodel uses (lumped.py,base_thermal.py). - “Zero entropy” runs set both entropic-change parameters to 0 and change nothing else.
- The eight sets are the built-in lithium-ion sets that define the lumped thermal parameters. Prada2013 and Ramadass2004 raise
KeyErrorin lumped mode (missing current-collector thickness and cell volume respectively); that failure is loud and is not covered here. - Each set ran in its own process with a timeout. None hung.
References
- D. Bernardi, E. Pawlikowski, J. Newman, A General Energy Balance for Battery Systems, J. Electrochem. Soc. 132 (1985) 5–12.
- R. Timms, S. G. Marquis, V. Sulzer, C. P. Please, S. J. Chapman, Asymptotic Reduction of a Lithium-Ion Pouch Cell Model, SIAM J. Appl. Math. 81 (2021) 765–788.
- K. O’Regan, F. Brosa Planella, W. D. Widanage, E. Kendrick, Thermal-electrochemical parameters of a high energy lithium-ion cylindrical battery, Electrochimica Acta 425 (2022) 140700.
- C.-H. Chen et al., Development of Experimental Techniques for Parameterization of Multi-scale Lithium-ion Battery Models, J. Electrochem. Soc. (2020).
- S. E. J. O’Kane et al., Lithium-ion battery degradation: how to model it, Phys. Chem. Chem. Phys. (2022).
- PyBaMM: thermal models and thermal submodel API
Related: PyBaMM’s built-in parameter sets, measured, for why Chen2020 barely responds to temperature; PyBaMM Experiment pitfalls, for the other ways an experiment finishes and still returns the wrong thing; and PyBaMM solver convergence failures, for when a cold, high-rate run does not finish at all. How temperature enters SEI growth and lithium plating is measured in PyBaMM SEI and lithium plating pitfalls.
A tool I built
Validate your cell model on independent data
VoltSift is an online workspace I built. Upload three CSV files (a fitting record, an independent validation record and an open-circuit voltage curve), and it fits a cell model, checks voltage error and coverage on the held-out record, and produces a report. The standard workflow supports single NMC cells at 25°C and SOC 20%–100%. Register and verify your email to get one free analysis, available for seven days.
Visit VoltSift · Prepare the three CSV files · How to read the validation results
