"Rest" ignored in experiment #1531
-
Hello, I noticed that when using a parameter set with the experiment class the "Rest" command does not work. It keeps discharging the battery by the set "current function" value. Is this a mistake or am I doing something wrong? Thanks in advance! import pybamm experiment = pybamm.Experiment( model = pybamm.lithium_ion.DFN() param = model.default_parameter_values sim = pybamm.Simulation(model, experiment=experiment) solution = sim.solution fig = plt.figure("Time") |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi Siri! I think the issue is that you processed the model with the parameters. Try instead running this: import pybamm
import matplotlib.pyplot as plt
experiment = pybamm.Experiment(
[("Rest for 50 minutes")] * 1,
)
model = pybamm.lithium_ion.DFN()
param = model.default_parameter_values
sim = pybamm.Simulation(model, parameter_values=param, experiment=experiment)
sim.solve()
solution = sim.solution Note that because you are using the default parameter values you could just not define them and run the simulation as sim = pybamm.Simulation(model, experiment=experiment) (if not specified it uses the default parameters). |
Beta Was this translation helpful? Give feedback.
-
Thanks! Now it works. I didn't realise you don't need to process the model after updating the parameters. |
Beta Was this translation helpful? Give feedback.
Hi Siri! I think the issue is that you processed the model with the parameters. Try instead running this:
Note that because you are using the default parameter values you could just not define them and run the simulation as
(if not specified it uses the default parameters).