Replies: 1 comment 10 replies
-
pybamm.lithium_ion.SPM({"SEI": "ec reaction limited", "thermal : x-lumped"}) |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm simulating an experiment that's long enough to have a cycle of over 100. (https://github.com/pybamm-team/PyBaMM/blob/develop/examples/notebooks/simulating-long-experiments.ipynb)
I want to combine thermal option({"thermal : x-lumped"}) and aging option( {"SEI": "ec reaction limited"}) together.
However, looking at the plot, the battery temperature does not change.
I want to change the temperature of the battery, but what should I do?
I'd really appreciate your help.
Here's my code.
import pybamm
import matplotlib.pyplot as plt
import numpy as np
parameter_values = pybamm.ParameterValues("Mohtat2020")
parameter_values.update({"SEI kinetic rate constant [m.s-1]": 1e-14})
spm = pybamm.lithium_ion.SPM({"SEI": "ec reaction limited"}, {"thermal : x-lumped"})
Calculate stoichiometries at 100% SOC
print(parameter_values)
param = spm.param
esoh_solver = pybamm.lithium_ion.ElectrodeSOHSolver(parameter_values, param)
Vmin = 3.0
Vmax = 4.2
Cn = parameter_values.evaluate(param.n.cap_init)
Cp = parameter_values.evaluate(param.p.cap_init)
n_Li_init = parameter_values.evaluate(param.n_Li_particles_init)
inputs={ "V_min": Vmin, "V_max": Vmax, "C_n": Cn, "C_p": Cp, "n_Li": n_Li_init}
esoh_sol = esoh_solver.solve(inputs)
print(f"Initial negative electrode SOC: {esoh_sol['x_100'].data[0]:.3f}")
print(f"Initial positive electrode SOC: {esoh_sol['y_100'].data[0]:.3f}")
Update parameter values with initial conditions
c_n_max = parameter_values.evaluate(param.n.prim.c_max)
c_p_max = parameter_values.evaluate(param.p.prim.c_max)
parameter_values.update(
{
"Initial concentration in negative electrode [mol.m-3]": esoh_sol["x_100"].data[0] * c_n_max,
"Initial concentration in positive electrode [mol.m-3]": esoh_sol["y_100"].data[0] * c_p_max,
}
)
pybamm.set_logging_level("NOTICE")
experiment = pybamm.Experiment([
(f"Discharge at 4C until 3.0 V",
#"Hold at 3.0 V until C/50",
"Rest for 1 hour",
f"Charge at 3 C until 4.1 V",
f"Hold at 4.1 V until C/50")
]*800 ,
termination="20% capacity"
)
sim = pybamm.Simulation(spm, experiment=experiment, parameter_values=parameter_values)
sol = sim.solve()
#sol.plot(["Current [A]", "Terminal voltage [V]"])
pybamm.plot_summary_variables(sol)
sol_list = sim.solve(save_at_cycles=[30,45,55])
sol_list.cycles[44].plot(["Current [A]","Terminal voltage [V]","X-averaged cell temperature [K]","Discharge capacity [A.h]"])
Beta Was this translation helpful? Give feedback.
All reactions