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
Hello, I am trying to define initial_soc by using it in the sim.solve() function, but I am unable to get it to work. Either I get the error that it is outside of feasibility bounds (I tested from like .1 to .9 initial_soc) or it gives me the following error with this code.
How can I define initial_soc?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to define initial_soc by using it in the sim.solve() function, but I am unable to get it to work. Either I get the error that it is outside of feasibility bounds (I tested from like .1 to .9 initial_soc) or it gives me the following error with this code.
How can I define initial_soc?
`import pybamm
param1 = pybamm.ParameterValues(
chemistry={
**pybamm.parameter_sets.Ai2020,
"negative electrode": "graphite_Ai2020",
"separator": "separator_Ai2020",
"positive electrode": "lico2_Ai2020",
"electrolyte": "lipf6_Enertech_Ai2020",
"experiment": "1C_discharge_from_full_Ai2020",
}
)
pybamm.set_logging_level("INFO")
safe_solver = pybamm.CasadiSolver(atol=1e-3, rtol=1e-3, mode="safe")
fast_solver = pybamm.CasadiSolver(atol=1e-3, rtol=1e-3, mode="fast")
load models
model = pybamm.lithium_ion.DFN(build = False)
model.submodels["electrolyte transport efficiency"] = pybamm.transport_efficiency.MacMullin(
model.param, "Electrolyte"
)
model.build_model()
initial_soc = 1.0
create and run simulations with various C_rates
sims = []
sim1 = pybamm.Simulation(model, parameter_values=param1, solver=safe_solver, C_rate = 1/20)
sim1.solve(t_eval=[0, 72000],initial_soc = initial_soc)
sims.append(sim1)
sim2 = pybamm.Simulation(model, parameter_values=param1, solver=safe_solver, C_rate = 1)
sim2.solve([0, 3600])
sims.append(sim2)
sim3 = pybamm.Simulation(model, parameter_values=param1, solver=safe_solver, C_rate = 2)
sim3.solve([0, 3600])
sims.append(sim3)
sim4 = pybamm.Simulation(model, parameter_values=param1, solver=safe_solver, C_rate = 3)
sim4.solve([0, 3600])
sims.append(sim4)
plot
pybamm.dynamic_plot(sims);`










Beta Was this translation helpful? Give feedback.
All reactions