I wish to configure experiments in pybamm to commence under different SOH conditions, but there are no variables pertaining to SOH within the available variables.There is also no direct option to set SOH within the solver.

As the discharge capacity [Ah] fluctuates during recycling with charging and discharging cycles, it is not feasible to establish the SOH by setting the model’s initial variables. How might one establish the initial SOH for the battery model?
My model code is like this
import pybamm
import numpy as np
import matplotlib.pyplot as plt
model = pybamm.lithium_ion.SPMe(
options={
"thermal": "lumped",
"loss of active material": "stress-driven",
"particle mechanics": ("swelling and cracking", "swelling only"),
"SEI": "solvent-diffusion limited",
"SEI on cracks": "true",
"lithium plating": "partially reversible",
}
)
parameter_values = pybamm.ParameterValues("OKane2022")
Hi,
Yes, you are right — there is no direct method to set the initial state to a particular SOH. But you can try this:
-
Set up your BoL model, validate it at BoL, and then depending on the conditions under which a particular SOH was reached (for example, if your use case involved high temperatures and moderate C-rates you might expect mostly LLI; whereas with high C-rates and moderate temperature you’d expect more LAM with some LLI — this also depends strongly on the cell chemistry and anode/cathode materials), you can modify the BoL model with pybamm.update to reflect that SOH. This will likely take some trial and error, or you can start from reasonable estimates.
-
Things you can adjust include:
-
Active material volume fraction of NE and PE → indirectly reflects LAM.
-
Initial SEI thickness (higher values reflect more SEI formation) and reducing maximum surface concentrations → indirectly reflect LLI.
-
NE porosity → to capture porosity loss/clogging from SEI or plating.
-
Particle size, particle diffusivities, and electronic/ionic conductivities → lower values indirectly reflect particle cracking and transport limitations.
If you are a developer, there are more sophisticated ways to handle this. But if you are just a PyBaMM user, the above is the most practical approach. Please note it’s not 100% exact, but it should help you model the scenarios you’re looking at. Do share back whether this worked, so the PyBaMM community can also benefit.
Thanks,
Sunil