You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Chen2020_composite cannot run a thermal model (per-phase electrode density) #5877
Chen2020_composite cannot be used with any thermal model. It gives the negative electrode density per phase ("Primary: Negative electrode density [kg.m-3]" = 1657, "Secondary: Negative electrode density [kg.m-3]" = 2650), but ThermalParameters.rho (parameters/thermal_parameters.py) looks up a single electrode-level "Negative electrode density [kg.m-3]", so parameter processing raises a KeyError.
The same applies to any composite parameter set that gives per-phase densities. Heat capacity and thermal conductivity are also read per electrode, not per phase.
We need to decide which is right:
the parameter set gives an electrode-level (effective) density, or
the thermal parameters combine the per-phase values, e.g. weighted by each phase's active material volume fraction.
Found while working on #5769, whose tests had to supply an electrode density by hand.
KeyError: "Parameter 'Negative electrode density [kg.m-3]' not found. 'Negative electrode density [kg.m-3]' not found. If you are using a composite model, you may need to use Primary: Negative electrode density [kg.m-3] instead. ..."
Workaround for the lumped model: use "use lumped thermal capacity": "true" and give a cell-level "Cell heat capacity [J.K-1.m-3]" (volumetric). The lumped model then never reads the electrode or phase densities, so Chen2020_composite builds. The parameter set doesn't include a cell heat capacity, so you need to add one:
(2.5e6 is a placeholder; use the cell's measured volumetric heat capacity.)
So the bug remains for:
"thermal": "x-full" and the pouch-cell thermal models, which resolve temperature in space, need the per-domain densities, and reject "use lumped thermal capacity".
"thermal": "lumped" without the option (the default). It still builds the effective heat capacity from the per-domain densities and fails with the KeyError above.
Could a maintainer clarify the intended contract for composite-electrode thermal properties in #5877? Should a composite parameter set provide effective electrode-level density, heat capacity, and conductivity, or should PyBaMM derive them from per-phase properties? If deriving them, which volume fractions and constituents should the mixture include—for example, active materials only, or also binder, conductive additive, and pore electrolyte? The issue’s active-phase weighting option may not define the whole-electrode thermal properties needed by the thermal model.
Good question, @Fstarnb. The contract is that thermal properties are electrode-level effective properties. The thermal models treat each electrode as one homogenised layer, and "Negative electrode density [kg.m-3]", "... specific heat capacity [J.kg-1.K-1]" and "... thermal conductivity [W.m-1.K-1]" describe that whole layer, whatever it contains. That means active material(s), binder, conductive additive and the pore electrolyte, if the source measured or estimated it that way. PyBaMM doesn't derive them from per-phase values. A mixture rule over the active phases alone would leave out binder, carbon and electrolyte. A full rule would need volume fractions and properties PyBaMM doesn't model. So a composite parameter set should supply the electrode-level values, as it does for any other electrode, and anyone who wants a mixture rule can compute it and pass the result (optionally as a function of temperature).
The per-phase "Primary: / Secondary: Negative electrode density" entries in Chen2020_composite and Bonkile2024 are a mistake: no model reads them. #5934 gives both sets an electrode-level "Negative electrode density [kg.m-3]" (1657, the graphite electrode value from Chen2020; the silicon is 1.5% by volume) and removes the per-phase ones, so these sets run with any thermal option.
Activity
rtimms commentedon Oct 8, 2026
Workaround for the lumped model: use
"use lumped thermal capacity": "true"and give a cell-level"Cell heat capacity [J.K-1.m-3]"(volumetric). The lumped model then never reads the electrode or phase densities, soChen2020_compositebuilds. The parameter set doesn't include a cell heat capacity, so you need to add one:(
2.5e6is a placeholder; use the cell's measured volumetric heat capacity.)So the bug remains for:
"thermal": "x-full"and the pouch-cell thermal models, which resolve temperature in space, need the per-domain densities, and reject"use lumped thermal capacity"."thermal": "lumped"without the option (the default). It still builds the effective heat capacity from the per-domain densities and fails with theKeyErrorabove.Fstarnb commentedon Oct 13, 2026
Could a maintainer clarify the intended contract for composite-electrode thermal properties in #5877? Should a composite parameter set provide effective electrode-level density, heat capacity, and conductivity, or should PyBaMM derive them from per-phase properties? If deriving them, which volume fractions and constituents should the mixture include—for example, active materials only, or also binder, conductive additive, and pore electrolyte? The issue’s active-phase weighting option may not define the whole-electrode thermal properties needed by the thermal model.
rtimms commentedon Oct 20, 2026
Good question, @Fstarnb. The contract is that thermal properties are electrode-level effective properties. The thermal models treat each electrode as one homogenised layer, and
"Negative electrode density [kg.m-3]","... specific heat capacity [J.kg-1.K-1]"and"... thermal conductivity [W.m-1.K-1]"describe that whole layer, whatever it contains. That means active material(s), binder, conductive additive and the pore electrolyte, if the source measured or estimated it that way. PyBaMM doesn't derive them from per-phase values. A mixture rule over the active phases alone would leave out binder, carbon and electrolyte. A full rule would need volume fractions and properties PyBaMM doesn't model. So a composite parameter set should supply the electrode-level values, as it does for any other electrode, and anyone who wants a mixture rule can compute it and pass the result (optionally as a function of temperature).The per-phase
"Primary: / Secondary: Negative electrode density"entries inChen2020_compositeandBonkile2024are a mistake: no model reads them. #5934 gives both sets an electrode-level"Negative electrode density [kg.m-3]"(1657, the graphite electrode value from Chen2020; the silicon is 1.5% by volume) and removes the per-phase ones, so these sets run with any thermal option.