Use scipy.solve_ivp to solve a mass balance, how do I use the temperature of the previous timestep for the next timestep in the solver?
I want to use the temperature at timestep t=t to use at timestep t=t+dt. I don’t want to use global, because I think it slows down the code and it is not very clean.