Bugs? SOC is not zero after discharging. #2557
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
valentinsulzer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Slightly modified the code, I found that the SOC cannot go back to zero after discharging (see the figure below). Is this a bug?

below is the related code
import pybamm as pb
import matplotlib.pyplot as plt
pb.set_logging_level("NOTICE")
model = pb.lithium_ion.DFN(
{
"SEI": "ec reaction limited",
"SEI film resistance": "distributed",
"SEI porosity change": "true",
"lithium plating": "irreversible",
"lithium plating porosity change": "true",
}
)
param = pb.ParameterValues("Mohtat2020")
experiment = pb.Experiment(
[
(
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/10",
"Rest for 5 minutes",
"Discharge at 1 C until 2.8 V",
"Rest for 5 minutes",
)
]
* 2,
period = "5 seconds",
)
sim = pb.Simulation(model, experiment=experiment, parameter_values=param)
sim.solve(solver=pb.CasadiSolver(mode="safe"))
sol = sim.solution
t = sol["Time [min]"].entries
vv = sol["Terminal voltage [V]"].entries
SOC = sol["Negative electrode SOC"].entries*100
fig, axs = plt.subplots(figsize=(13,9))
axs.plot(SOC, vv, color="blue", linestyle="solid", label="Simulation")
axs.set_xlabel("SOC [%]")
axs.legend()
axs.set_ylabel("Voltage [V]")
axs.grid(True)
Beta Was this translation helpful? Give feedback.
All reactions