Initializing a Charging Cycle with "Current function [A]" and without the "pybamm.experiment" Function #3057
-
When solving a simulation, if there is no input in the experiment category, then the default is to start a discharge. However, I want to start a charge cycle with a current function that I have inputted, but I cannot figure out how to accomplish it. Inputting a negative current returns an error that "events ['Maximum voltage [V]'] are non-positive at initial conditions." A quick example of a simple model to solve is: import pybamm
model = pybamm.lithium_ion.DFN()
params = pybamm.ParameterValues("Chen2020")
params["Current function [A]"] = 3
solver = pybamm.CasadiSolver(mode="fast")
simulation = pybamm.Simulation(model,parameter_values=params, solver=solver)
simulation.solve([0, 300])
simulation.plot() The solution for this is given as a discharge from around 3.95V, but I would like for it to solve a charge from 2.5V. Does anyone know how to solve for a charge cycle? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try |
Beta Was this translation helpful? Give feedback.
Try
simulation.solve([0, 300], initial_soc=0)