You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to perform a simulation for a pouch cell and based on the provided example of the model i just simply run the code but it keeps on giving the following error.
I also have a problem on the other hand when i change the capacity of the cell from 5 to 65 Ah. it gives a debug and i know it's because i should also change gemetrical parameters besides concentrations and so on. So, knowing that all the parameters set are for cylindrical cells, can you please indicate to me where i can find Electrochemical model parameters of a pouch cell so i can get close and help the model perform the simulation with less excpected errors.
Thank you for your understanding,
Steps to Reproduce
import pybamm
import matplotlib.pyplot as plt
import numpy as np
)
npts = 16
var_pts = {
"x_n": npts,
"x_s": npts,
"x_p": npts,
"r_n": npts,
"r_p": npts,
"z": npts,
}
experiment = pybamm.Experiment(
[
(
"Charge at 0.5 C for 4 hours or until 4.2 V",
"Rest for 30 minutes",
"Discharge at 0.5 C for 4 hours or until 2.5 V",
"Rest for 7 hours",
),
]
* 3
+ [
(
"Charge at 26 A for 2 hours or until 4.2 V",
)
]
)
Unfortunately not all of the models are compatible with every option in PyBaMM. In this case your 2D simulation with x-lumped thermal requires the parameter: "Negative current collector surface heat transfer coefficient [W.m-2.K-1]", which is only properly defined in Ecker2015. A bunch of the other parameter sets define that variable to be zero, which effectively removes that aspect of the thermal model.
You could set those parameters to be zero with the understanding that the thermal analysis may be incomplete, or you can change the setup.
For example the following should work for a pouch cell with OKane2022:
importpybammparam=pybamm.ParameterValues("OKane2022")
dfn=pybamm.lithium_ion.DFN({"cell geometry": "pouch", "thermal": "lumped"})
experiment=pybamm.Experiment(
[
(
"Charge at 0.5 C for 4 hours or until 4.2 V",
"Rest for 30 minutes",
"Discharge at 0.5 C for 4 hours or until 2.5 V",
"Rest for 7 hours",
),
] *3+
[
(
"Charge at 26 A for 2 hours or until 4.2 V",
)
]
)
sim=pybamm.Simulation(model=dfn, experiment=experiment, parameter_values=param)
sim.solve()
This might not be the exact geometry/configuration you want, but gets you started.
PyBaMM Version
23.4.1
Python Version
3.11.5
Describe the bug
I wanted to perform a simulation for a pouch cell and based on the provided example of the model i just simply run the code but it keeps on giving the following error.
I also have a problem on the other hand when i change the capacity of the cell from 5 to 65 Ah. it gives a debug and i know it's because i should also change gemetrical parameters besides concentrations and so on. So, knowing that all the parameters set are for cylindrical cells, can you please indicate to me where i can find Electrochemical model parameters of a pouch cell so i can get close and help the model perform the simulation with less excpected errors.
Thank you for your understanding,
Steps to Reproduce
import pybamm
import matplotlib.pyplot as plt
import numpy as np
param= pybamm.ParameterValues("OKane2022")
dfn = pybamm.lithium_ion.DFN( {"current collector": "potential pair", "dimensionality": 2, "thermal": "x-lumped"},
)
npts = 16
var_pts = {
"x_n": npts,
"x_s": npts,
"x_p": npts,
"r_n": npts,
"r_p": npts,
"z": npts,
}
experiment = pybamm.Experiment(
[
(
"Charge at 0.5 C for 4 hours or until 4.2 V",
"Rest for 30 minutes",
"Discharge at 0.5 C for 4 hours or until 2.5 V",
"Rest for 7 hours",
),
]
* 3
+ [
(
"Charge at 26 A for 2 hours or until 4.2 V",
)
]
)
Create a simulation with the model and experiment
sim = pybamm.Simulation(model=dfn, experiment=experiment, parameter_values=param, var_pts=var_pts)
Solve the simulation
sim.solve()
Relevant log output
The text was updated successfully, but these errors were encountered: