Replies: 1 comment
-
Try the casadi solver with other modes ("fast with events" or "safe"). |
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
-
I am currently attempting to simulate a drive cycle for a prismatic cell with a 51 Ah capacity, using PyBaMM. I have structured my simulation around specific parameters and a defined drive cycle, intending to observe the cell's performance under these conditions. However, I've encountered an infeasibility this warning during simulation,
"2024-03-29 14:47:14.561 - [WARNING] callbacks.on_experiment_infeasible(231):
Experiment is infeasible: 'event: Minimum voltage [V]' was triggered during '_Step(current, [[ 3.00038796e+03 -2.54924065e+01]
[ 3.00138804e+03 -2.54924065e+01]
[ 3.00238776e+03 -2.54924065e+01]
...
[ 1.91735460e+04 1.89407199e+01]
[ 1.91735478e+04 1.26595871e+01]
[ 1.91745461e+04 1.89387734e+01]])'. The returned solution only contains up to step 3 of cycle 1. " und then simulation ended up with this error : "MemoryError: Unable to allocate 4.26 GiB for an array with shape (9212202, 62) and data type float64". im also not sure if i should interpolate the current first and set it in the parameter list like this : current_interpolant = pybamm.Interpolant(checkup_cycle[:, 0], checkup_cycle[:, 1], pybamm.t)
param["Current function [A]"] = current_interpolant or not because i read it here before that when using a drive cycle in an experiment you don't need to create the interpolant first.
Could you offer any insights or suggestions on resolving the voltage event issue and how to properly prepare drive cycle data for simulations in PyBaMM?
Thank you for your assistance and looking forward to your advice.
my code: model = pybamm.lithium_ion.SPM({"SEI": "interstitial-diffusion limited","SEI film resistance": "distributed","SEI porosity change": "true",}) param=pybamm.ParameterValues("Chen2020")
param.update(
{
"Electrode width [m]": 5.7,
"Electrode height [m]": 0.082,
"Cell volume [m3]" : 3.676e-04,
"Negative electrode active material volume fraction": 0.945, ,
"Positive electrode active material volume fraction": 0.795,
#"Negative electrode active material volume fraction": 0.7,
#"Positive electrode active material volume fraction": 0.775,
"Negative electrode thickness [m]": 72e-06,
"Positive electrode thickness [m]": 73e-06,
"Separator thickness [m]": 1.50e-05,
"Negative particle radius [m]": 6.72e-06,
"Positive particle radius [m]": 3.28e-06,
"Cell cooling surface area [m2]": 0.040192,
"Nominal cell capacity [A.h]" : 51,
"Lower voltage cut-off [V]": 2.8,
"Cation transference number": 0.38,
"Negative current collector thickness [m]": 10e-6,
"Positive current collector thickness [m]": 2.0e-6,
"Negative electrode diffusivity [m2.s-1]": 2.9e-14,
"Positive electrode diffusivity [m2.s-1]": 6.00e-16,
"Negative electrode conductivity [S.m-1]": 14.5,
"Positive electrode conductivity [S.m-1]": 0.096,
"Negative electrode Bruggeman coefficient (electrode)": 1.5,
"Positive electrode Bruggeman coefficient (electrode)": 1.5,
"Number of electrodes connected in parallel to make a cell": 2.0,
"Maximum concentration in negative electrode [mol.m-3]": 42000,
"Maximum concentration in positive electrode [mol.m-3]": 66000,
"Negative electrode density [kg.m-3]":1720,
"Positive electrode density [kg.m-3]":4000,
"Negative electrode porosity": 0.45,
"Separator porosity": 0.68,
"Positive electrode porosity": 0.56,
}
)
param["Initial concentration in negative electrode [mol.m-3]"] = param["Maximum concentration in negative electrode [mol.m-3]"]*0.794
param["Initial concentration in positive electrode [mol.m-3]"] = param["Maximum concentration in positive electrode [mol.m-3]"]*0.344
experiment = pybamm.Experiment(
[
(
"Discharge at 1 C until 3.0 V",
"Rest for 1 hour",
pybamm.step.current(checkup_cycle),
"Charge at 1C until 4.2V",
"Hold at 4.2V until C/50"
),
]*2,
)
sim = pybamm.Simulation(
model, parameter_values=param, experiment=experiment, solver=pybamm.CasadiSolver(mode="fast"))
sol = sim.solve()
sol.plot()
The drive cycle that i trying to simulate :
Beta Was this translation helpful? Give feedback.
All reactions