OOF2: The Manual

Name

4th order Runge-Kutta (RK4) — Fourth order Runge-Kutta time stepping.

Synopsis

RK4()

Details

Description

RK4 is a TimeStepper that implements the classic fourth order Runge-Kutta method for solving ordinary differential equations. The error on each step is of order (Δ⁢t)5 .

Given a vector ϕn of unknowns (i.e. Field values in OOF2) at time tn , and the first order differential equation

d⁢ϕd⁢t=f⁢(ϕ,t)
(6.158)

the fourth order Runge-Kutta estimate for ϕn+1 is given by

k1 =Δ⁢t⁢f⁢(ϕn,tn)
k2 =Δ⁢t⁢f⁢(ϕn+k12,tn+Δ⁢t2)
k3 =Δ⁢t⁢f⁢(ϕn+k22,tn+Δ⁢t2)
k4 =Δ⁢t⁢f⁢(ϕn+k3,tn+Δ⁢t)
ϕn+1 =ϕn+k16+k23+k33+k46
(6.159)

where Δ⁢t=tn+1−tn .

RK4 can be applied to second order equations by using equation (6.142).

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

See Also