Simulating long degradation experiments by using Okane 2022 dataset #4344
Unanswered
benshang1997
asked this question in
Q&A
Replies: 2 comments 9 replies
-
The easiest way to speed it up is to use SPMe instead of DFN. At 1C there should not be much difference. |
Beta Was this translation helpful? Give feedback.
9 replies
-
Hi, l saw your termination condition is a threshold of capacity. l am wondering how to get the capacity in each cycle? l also want to know the capacity change in the ageing cycles. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I am doing some research about fast charging optimization. I need save pybamm models in different degradation stages from a long degradation experiments.
I create a DFN Model coupled degradation mechanisms using Okane2022, it is just as same as the pybamm document.
However I find that the degradation speed is very slow. According to the result, the original capacity of battery is 5.109Ah, and the capacity after 200 cycles is 5.04, with just 0.06 reduced, but it cost nearly 3 hours to simulate. And my final aim is to save the model under 80% soc ( 3Ah). and obviously, the time cost would be too expensive
so I want to ask: 1. Is the degradation model correct? Is the degradation speed so slow under Okane2022 set?
2.how should i do if i want to speed the simulation?
3. Is there any other way to get the pybamm models in different degradation stages except run and save a long degradation experiment.
please find my code attached. thank you very much!
import pybamm
import matplotlib as mpl
mpl.use('tkagg')
import multiprocessing
pybamm.set_logging_level("NOTICE")
model = pybamm.lithium_ion.DFN(
{
"thermal": "lumped",
"SEI": "solvent-diffusion limited",
"SEI porosity change": "false",
"lithium plating": "partially reversible",
"lithium plating porosity change": "false", # alias for "SEI porosity change"
"particle mechanics": ("swelling and cracking", "swelling only"),
"SEI on cracks": "true",
"loss of active material": "stress-driven",
"calculate discharge energy": "true",
})
parameter_values = pybamm.ParameterValues("OKane2022")
Calculate stoichiometries at 100% SOC
parameter_values.update({
"Initial temperature [K]": 298.15,
"Ambient temperature [K]": 298.15,
"Total heat transfer coefficient [W.m-2.K-1]": 5,
"Upper voltage cut-off [V]": 4.5, },
check_already_exists=False, )
def train(age_stage):
print("Training started with age_stage: ", age_stage)
experiment = pybamm.Experiment(
[
"Discharge at 1C until 3.0 V",
"Rest for 1 hour",
"Charge at 1 C until 4.1 V",
"Hold at 4.1 V until 50 mA",
"Rest for 1 hour",
] * 100000, termination=f"{age_stage} Ah capacity"
)
sim = pybamm.Simulation(model, parameter_values=parameter_values, experiment=experiment)
safe_solver = pybamm.CasadiSolver(extra_options_setup={"max_step_size": "1e-3"}, atol=1e-8, rtol=1e-8)
sim.solve(solver=safe_solver, initial_soc=0.2)
if name == "main":
# Parallel computing
age_stage = [4.75, 4.5,4.25,4.0,3.75,3.5]
cpu_cnt = multiprocessing.cpu_count()
print(f"CPU Count: {cpu_cnt}")
pool = multiprocessing.Pool()
pool.map(train,age_stage)
Beta Was this translation helpful? Give feedback.
All reactions