lowEBMs.Packages.RK4

Runge-Kutta 4th order scheme

The lowEBMs.Packages.RK4 provides the numerical scheme to iteratively solve differential equations, hence the model equation which is parsed by lowEBMs.Packages.ModelEquation, initialized with the configuration provided by lowEBMs.Packages.Configuration.

For an example see How to use.

The increments \(k_1,..,k_4\) are obtained by solving the model equation, as defined in the physical background for the dynamical term \(\frac{dT}{dt}\). The increments differ in their choice of inital conditions (point of evaluation of the model equation). One iterative step always goes through a cycle of evaluating the model equation four times. It starts with the calculation of \(k_1\) at point \(y_0(t_0)\) with:

\[k_1= f(t_0,y_0),\]

where \(f(t,y(t))\) is given by the deviation of \(y(t)\), hence \(\frac{dT}{dt} = \frac{1}{C}\cdot(R_{in}+R_{out}+...)\) at \(T_0 (t_0)\).

Now the scheme continues the following procedure:

\[\begin{split}k_2 &= f(t_0+\frac{h}{2},y_0+ \frac{h}{2}\cdot k1) \\ k_3 &= f(t_0+\frac{h}{2},y_0+ \frac{h}{2}\cdot k2) \\ k_4 &= f(t_0+h,y_0+ h\cdot k3).\end{split}\]

As final step of one iterative step the weighted increment \(\phi\) is calculated by through:

\[\phi = \frac{1}{6}\cdot k_1+\frac{1}{3}\cdot k_2+\frac{1}{3}\cdot k_3+\frac{1}{6}\cdot k_4\]

to estimate \(y_1\) as final step of one iteration step:

\[y_1=y_0+\phi(t_0,y_0)\cdot h . \]
lowEBMs.Packages.RK4.rk4alg(func, eqparam, rk4input, funccomp, progressbar=True, monthly=False)[source]