Hi, I have seen this entry on GitHub where PyBamm is used to solve the electrical problem, while the thermal problem is handled in Simulink (GitHub - FaradayInstitution/pybamm_simulink_example: An example of how to run pybamm in simulink)
I am having a problem in understanding how PyBamm should be setup for this. I want to solve the electrical problem in PyBamm at a given “isothermal” condition, the heat generated in a solution step will then be handled by a external thermal model, that will then loop back the temperature as an input for the next step in PyBamm.
I have tried a minimal example. Where I setup two “Initial temperature [K]” values using the ORegan2022 parameter set (which includes temperature dependencies on transport). But there is no differences in the voltage response. Am I doing something wrong?
import pybamm
import matplotlib.pyplot as plt
model = pybamm.lithium_ion.DFN()
parameters = pybamm.ParameterValues(“ORegan2022”)
parameters[“Initial temperature [K]”] = “[input]”
solver = pybamm.IDAKLUSolver()
sim = pybamm.Simulation(model=model, solver=solver, parameter_values=parameters)
solamb = sim.solve([0, 2000], inputs={“Initial temperature [K]”: 298.0})
solamb1 = sim.solve([0, 2000], inputs={“Initial temperature [K]”: 215.0})
time = solamb[“Time [s]”].entries
time1 = solamb1[“Time [s]”].entries
voltage = solamb[‘Voltage [V]’]
voltage1 = solamb1[‘Voltage [V]’]
y_model = voltage(time)
y_model1 = voltage1(time1)
fig = plt.figure()
plt.plot(time, y_model, label=“pSOC”)
plt.plot(time1, y_model1, label=“pSOC”)
plt.show()