-
Dear all, I wanted to set cell temperature(that varies with time) as input in a constant current discharge simulation. So I chose the isothermal model and tried to set the cell temperature through Ambient temperature and load the external temperature data as input. But I encountered an error as follows: I was wondering whether set cell temperature as input is doable in PyBaMM. Many thanks in advance. My implementation is attached as follows for your reference: import temperatures from fileos.chdir('/0Work/OneDrive - Imperial College London/0Postdoc at Imperial College/2021.11- First model') load parameter valuesos.chdir('/0Work/OneDrive - Imperial College London/0Postdoc at Imperial College/2021.11- First model/PyBaMM/Kokam 7.5 Ah') create interpolant - must be a function of dimensional timetimescale = param.evaluate(model.timescale) set temperaturesparam["Ambient temperature [K]"] = temp_interpolant set up simulation - for drive cycles we recommend using the CasadiSolver in "fast" modesolver = pybamm.CasadiSolver(mode="fast") simulatesimulation.solve([0, 3500]) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Have you tried this? param["Ambient temperature [K]"] = pybamm.InputParameter("T") If that doesn't work, try setting the CasadiSolver to safe mode to see if you're hitting any events. |
Beta Was this translation helpful? Give feedback.
-
Try
|
Beta Was this translation helpful? Give feedback.
Try