Cycle ageing simulation

Simulate 100 cycles with SEI growth, lithium plating and loss of active material, and plot state of health and degradation modes.

Cycle an LG M50 cell (OKane2022) with SEI growth, lithium plating and stress-driven loss of active material, then read each cycle from sol.cycles: state of health from its discharge capacity, and the loss of lithium inventory and active material at its end.

This example uses a published PyBaMM parameter set, so you can copy it and run it as-is on Ionworks. Set IONWORKS_PYBAMM_LOCAL=1 to run the same script with PyBaMM on your own machine.

import ionworks.pybamm as pybamm
import matplotlib.pyplot as plt
import numpy as np

model = pybamm.lithium_ion.SPM(
    {
        "SEI": "solvent-diffusion limited",
        "SEI porosity change": "true",
        "lithium plating": "partially reversible",
        "lithium plating porosity change": "true",
        "particle mechanics": "swelling only",
        "loss of active material": "stress-driven",
    }
)
parameter_values = pybamm.ParameterValues("OKane2022")
# Faster SEI growth and negative-electrode active-material loss than
# OKane2022's, so the fade shows within 100 cycles.
parameter_values["SEI solvent diffusivity [m2.s-1]"] = 2.5e-20
parameter_values["Negative electrode LAM constant proportional term [s-1]"] = (
    2.7778e-6
)

cycles = 100
experiment = pybamm.Experiment(
    [
        (
            "Discharge at 1C until 2.5 V",
            "Rest for 5 minutes",
            "Charge at 0.3C until 4.2 V",
            "Hold at 4.2 V until C/100",
            "Rest for 5 minutes",
        )
    ]
    * cycles
)
modes = {
    "Loss of lithium inventory [%]": "LLI",
    "Loss of active material in negative electrode [%]": "LAM, negative",
    "Loss of active material in positive electrode [%]": "LAM, positive",
}
sim = pybamm.Simulation(
    model, parameter_values=parameter_values, experiment=experiment
)
sol = sim.solve(initial_soc=1)

# State of health: each cycle's discharge capacity relative to the first's.
discharged = np.array(
    [
        np.ptp(cycle.steps[0]["Discharge capacity [A.h]"].entries)
        for cycle in sol.cycles
    ]
)
soh = 100 * discharged / discharged[0]
summary = sol.summary_variables
number = summary["Cycle number"]

fig, (ax_soh, ax_modes) = plt.subplots(1, 2, figsize=(10, 4))
ax_soh.plot(number, soh)
ax_soh.set_xlabel("Cycle number")
ax_soh.set_ylabel("State of health [%]")
for name, label in modes.items():
    ax_modes.plot(number, summary[name], label=label)
ax_modes.set_xlabel("Cycle number")
ax_modes.set_ylabel("Loss [%]")
ax_modes.legend()
fig.tight_layout()
plt.show()

Next

To fit these degradation parameters to your own ageing data, see Cycle-ageing fit, which builds the fit with ionworks.pipeline.

On this page