OOF2: The Manual

Name

2nd order Runge-Kutta (RK2) — Second order Runge-Kutta time stepping.

Synopsis

RK2()

Details

Description

RK2 is a TimeStepper that implements the second order Runge-Kutta method for solving ordinary differential equations. The error on each step is of order \(\Delta t^3\). RK2 is also referred to as the midpoint method.

Given a vector \(\phi_n\) of unknowns (i.e. Field values in OOF2) at time \(t_n\), and the first order differential equation


      \[ \frac{d\phi}{dt} = f(\phi, t) \]
    (6.155)

the second order Runge-Kutta estimate for \(\phi_{n+1}\) is given by


      \begin{align*}
      k_1 &= \Delta t f(\phi_n, t_n) \\
      k_2 &= \Delta t f(\phi_n+\frac{k_1}{2}, t_n+\frac{\Delta t}{2}) \\
      \phi_{n+1} &= \phi_n + k_2
      \end{align*}
    (6.156)

where \(\Delta t =
  t_{n+1}-t_n\).

RK2 can be applied to second order equations by using equation (6.141).

Because the method is explicit (\(\phi_{n+1}\) doesn't appear as an argument to \(f\)), equation (6.156) doesn't require a nonlinear solver even if \(f\) is nonlinear.