0

I am making a dynamic a dynamic model of a solar collector to find its oultet Temperature. The equation I am usin is the following:

Collector equation for the dynamic model:

For this equation, Tm is defined by the following equation

Tm = (TFin + TFout)/2

At the end, I need to plot TFout as a function of time. TFin is a known constant. I have to do the solution using the Runge-Kutta method.

I have been trying to follow some youtube tutorials for Runge-Kutta in Python, but I can't figure out how to properly define the function given that time is not an explicit variable in the equation.

davidl8a
  • 3
  • 1
  • 1
    In a general way. Ordinary diferential equation could be expressed as: dX/dt = f(X,t). first of all you need to define wich values are constants and wich not. Then create a function that represents "f" that takes as input the actual state X, and the variable t, then just use it to apply runge-kutta as the tutorial (if there's no explicit dependence of t in f then just do nothing with t in the function) – Ulises Bussi Nov 29 '21 at 14:54
  • Can you use `scipy.integrate.solve_ivp`? Check out the documentation and the examples there. – Lutz Lehmann Nov 29 '21 at 15:19

0 Answers0