# Unreasonable capacity loss of long life modeling

**URL:** <https://pybamm.discourse.group/t/unreasonable-capacity-loss-of-long-life-modeling/219>\
**Category:** General\
**Created:** [6 March 2025 01:43 UTC](https://pybamm.discourse.group/t/unreasonable-capacity-loss-of-long-life-modeling/219 "2025-03-06T01:43:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nuanyuan](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@nuanyuan](https://pybamm.discourse.group/u/nuanyuan)\
**Post date:** [6 March 2025 01:43 UTC](https://pybamm.discourse.group/t/unreasonable-capacity-loss-of-long-life-modeling/219/1 "2025-03-06T01:43:56Z")

</div>

hello,  
can someone help me with figuring out the unreasonable capacity loss of long life modeling.  
I am doing long cycle life modeling on my own cell with relatively large capacity. The parameters were based on Mohtat2020, with some modifications in accordance with measuring and fitting results.

The code is like this:

```auto
model = pybamm.lithium_ion.DFN({
        "SEI": "reaction limited",
        "SEI porosity change": "true",
        "lithium plating": "partially reversible",
        "lithium plating porosity change": "true",  
        "particle mechanics": "swelling and cracking",
        "SEI on cracks": "true",
        "loss of active material": "stress-driven",
    })
var_pts = {
    "x_n": 5, # negative electrode
    "x_s": 5, # separator
    "x_p": 5, # positive electrode
    "r_n": 10, # negative particle
    "r_p": 10, # positive particle
}

sim = pybamm.Simulation(model, var_pts=var_pts)

param = pybamm.ParameterValues("Mohtat2020")
experiment = pybamm.Experiment(
    [
    "Discharge at 1 C until 2.8V (10 minute period)",
    "Rest for 0.5 hour",  
    "Charge at 2 C until 4.4 V (10 minute period)",
    "Rest for 0.5 hour"
    ] * 2000
)

```

The discharge capacity simulation result matches very well with the experiment value after several rounds of parameters fitting. In details, the discharge\_capacity decreased from 115Ah to nearly 104Ah. However, the LLI loss is unseasonably low, less than 0.2Ah, as following picture.

 ![img_v3_02k3_275feb77-cb15-4014-b1f5-92a8ed768d4g](https://global.discourse-cdn.com/free1/uploads/pybamm/original/1X/66a16554240d1db3f5c0acf0745d377cfe2e48f3.jpeg)

**Why is that?**

And during simulation, I faced several kinds of errors as following:  
1)t = 528.534 and h = 8.75955e-15, the corrector convergence failed repeatedly or with |h| = hmin.  
2)538.078, , mxstep steps taken before reaching tout.  
3)t = 75.9756, repeated recoverable residual errors.  
4)[ERROR] solution.check\_ys\_are\_not\_too\_large(397): Solution for ‘y[1:2]’ exceeds the maximum allowed value of `100000.0. This could be due to incorrect scaling, model formulation, or parameter values. The maximum allowed value is set by 'pybammm.settings.max\_y\_value

By the way, my pybamm version is 25.1.1

---

<div class="post-metadata">

**Author:** ![DrSOKane](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@DrSOKane](https://pybamm.discourse.group/u/DrSOKane)\
**Post date:** [25 March 2025 16:33 UTC](https://pybamm.discourse.group/t/unreasonable-capacity-loss-of-long-life-modeling/219/2 "2025-03-25T16:33:10Z")

</div>

Hi Nuan, it’s interesting that you get the discharge capacity drop you expected but not the LLI. There are two possible causes:

1. The discharge capacity loss is due to resistance caused by porosity change. To test this, try setting both `"SEI porosity change"` and `"lithium plating porosity change"` to `"false"`. (They both change the same internal variable in PyBaMM.)

2. The discharge capacity loss is due to loss of active material. To test this, set `{"loss of active material": "none"}`. (But keep `"particle mechanics"` unchanged, because that also changes the diffusivity.)

If neither of those work, please let me know.
