Skip to content

SEI film resistance loss is not included in heat generation #5820

Description

@sohamdange

PyBaMM version: 26.8.0.0

Description

When any SEI option is on, "SEI film resistance" defaults to "distributed". The film's voltage drop (eta_sei = -j * L_sei * R_sei) is added to the reaction overpotential in BaseKinetics (eta_r += eta_sei), so it lowers the terminal voltage. But BaseThermal computes irreversible heat as a_j * eta_r using that reduced overpotential. The energy lost across the film therefore never appears in Total heating [W] or in the cell temperature. Energy is not conserved: electrical loss rises and heat does not.

To reproduce

OKane2022, SPMe, lumped thermal, SEI: "solvent-diffusion limited", 5 A discharge for 3000 s, comparing film resistance "distributed" against "none":

Initial SEI thickness Extra electrical loss from film Extra heat End temperature difference
5 nm 22.4 J 0.0 J 0.000 K
20 nm 89.3 J 0.0 J 0.000 K
50 nm 223.2 J 0.0 J 0.000 K

Total heat is 1951 J in every case, so at 50 nm about 10% of the true heat is missing.

import numpy as np, pybamm

def run(film, L):
    m = pybamm.lithium_ion.SPMe(options={
        "thermal": "lumped",
        "SEI": "solvent-diffusion limited",
        "SEI film resistance": "distributed" if film else "none",
    })
    p = pybamm.ParameterValues("OKane2022")
    p.update({"Initial SEI thickness [m]": L, "Current function [A]": 5.0})
    s = pybamm.Simulation(m, parameter_values=p).solve([0, 3000], initial_soc=1.0)
    return s["Time [s]"].entries, s["Voltage [V]"].entries, s["Total heating [W]"].entries

t, Va, Qa = run(True, 50e-9)
_, Vb, Qb = run(False, 50e-9)
print("film loss J:", np.trapezoid(5.0 * (Vb - Va), t))
print("extra heat J:", np.trapezoid(Qa - Qb, t))

Suggested fix

Add a film heating term a_j * eta_sei (and the equivalent for SEI on cracks) to the heat source. It could be a separate "SEI film heating [W]" variable that is included in Total heating [W]. In a local patch, adding film voltage × current to the heat recovered about 95% of the missing energy.

Activity

  1. rtimms commented on Oct 12, 2026

    @rtimms
    Contributor

    Linking the open PRs for this issue:

    The same kind of gap exists for contact resistance: #5879, partly addressed in #5890.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions