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ϕdt=f(ϕ,t)
(6.158)

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

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

where Δt=tn+1tn .

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