When I am running a program for Liionpack, it runs nice for 1st time but next time it is also running but it is not plotting anything like 1st time. the code is:
try:
import liionpack as lp
except:
!pip install -q git+https://github.com/pybamm-team/liionpack.git@main
import liionpack as lp
import pybamm
import numpy as np
I_mag = 5.0
OCV_init = 4.0 # used for intial guess
Ri_init = 5e-2 # used for intial guess
R_busbar = 1.5e-3
R_connection = 1e-2
Np = 8
Ns = 1
Nbatt = Np * Ns
netlist = lp.setup_circuit(
Np=Np, Ns=Ns, Rb=R_busbar, Rc=R_connection, Ri=Ri_init, V=OCV_init, I=I_mag
)
experiment = pybamm.Experiment(
[
“Charge at 5 A for 30 minutes”,
“Rest for 15 minutes”,
“Discharge at 5 A for 30 minutes”,
“Rest for 15 minutes”,
],
period=“10 seconds”,
)
parameter_values = pybamm.ParameterValues(“Chen2020”)
SPMe = pybamm.models.full_battery_models.lithium_ion.SPMe()
output_variables = [
“X-averaged negative particle surface concentration [mol.m-3]”,
“X-averaged positive particle surface concentration [mol.m-3]”,
]
output = lp.solve(
netlist=netlist,
parameter_values=parameter_values,
experiment=experiment,
output_variables=output_variables,
initial_soc=0.5
)
lp.plot_output(output)
after 1st time, for next every simulation, I have to restart the kernel to get the plots which seems very weird.