Skip to content

Runge-Kutta schemes ​

The multistage classes advance the solution from tn to tn+1=tn+Δt using only Un. All of them are explicit and extend integrator_multistage_object: their integrate(U, Dt, t, new_Dt) takes the time step Dt, given by the caller, and the time t =tn. The orders stated here are the verified ones, see the catalogue and Testing.

Forward Euler ​

Class euler_explicit, scheme euler_explicit, 1st order:

Un+1=Un+ΔtR(tn,Un)

SSP Runge-Kutta ​

Class runge_kutta_ssp (integrator_runge_kutta_ssp). The schemes have the Total Variation Diminishing (TVD) or Strong Stability Preserving (SSP) property and are written in the Butcher form [19]:

Un+1=Un+Δt∑s=1NsβsKs,Ks=R(tn+γsΔt,Un+Δt∑i=1s−1αs,iKi)

where Ns is the number of stages and γs=∑iαs,i.

SchemeOrderNotes
runge_kutta_ssp_stages_1_order_11forward Euler
runge_kutta_ssp_stages_2_order_22optimal SSP(2,2) [1]
runge_kutta_ssp_stages_3_order_33optimal SSP(3,3) [1]
runge_kutta_ssp_stages_5_order_44optimal SSP(5,4) [1]

The tableaus (γ in the first column, α in the matrix, β in the last row):

SSP(2,2)0111212SSP(3,3)011121414161623

SSP(5,4):

γαs,1αs,2αs,3αs,4
0
0.391752226869250.39175222686925
0.586079689066900.217669096357830.36841059270907
0.474542363162480.082692086683090.139958502107430.25189177437196
0.935010631095790.067966283574050.115034698453670.207034898772940.54497475029514

β = 0.14681187615788, 0.24848290939132, 0.10425883027948, 0.27443890104848, 0.22600748312284.

These are the rounded values of the module documentation; the source uses more digits, refined to satisfy the order conditions in double precision (verified by scripts/audit_rk_tableaus.py).

Low storage Runge-Kutta ​

Class runge_kutta_ls (integrator_runge_kutta_ls). Following Williamson [2], the schemes use only two registers K1,K2 of the size of the state (2N storage):

K1=Un,K2=0K2=AsK2+ΔtR(tn+CsΔt,K1)K1=K1+BsK2}s=1,2,…,NsUn+1=K1

with A1=C1=0.

SchemeOrderReference
runge_kutta_ls_stages_1_order_11forward Euler (not a real low storage scheme, provided for completeness)
runge_kutta_ls_stages_5_order_44LSRK(5,4)2N, solution 3 of Carpenter and Kennedy [3]
runge_kutta_ls_stages_6_order_44RK(6,4) of Allampalli et al. [9]
runge_kutta_ls_stages_7_order_44RK(7,4) of Allampalli et al. [9]
runge_kutta_ls_stages_12_order_44RK(12,4) of Niegemann et al. [10]
runge_kutta_ls_stages_13_order_44RK(13,4) of Niegemann et al. [10]
runge_kutta_ls_stages_14_order_44RK(14,4) of Niegemann et al. [10]

The coefficients of the 5 stages scheme are rational:

StageABC
101432997174477/95750804417550
2-567301805773/13575370590875161836677717/136120682923571432997174477/9575080441755
3-2404267990393/20167466952381720146321549/20902069494982526269341429/6820363962896
4-3550918686646/20915011793853134564353537/44814673103382006345519317/3224310063776
5-1275806237668/8425704576992277821191437/148821517548192802321613138/2924317926251

The 6 and 7 stages coefficients published with 12 decimals violate the 4th order conditions by about 10−13: the source uses coefficients refined to satisfy them exactly, which reproduce the published ones once rounded. The coefficients of all the schemes are in the documentation of foodie_integrator_runge_kutta_low_storage.F90 and in the API.

Embedded Runge-Kutta (adaptive) ​

Class runge_kutta_emd (integrator_runge_kutta_emd). An embedded pair computes, with the same stages Ks, two solutions of different order:

Uhighn+1=Un+Δt∑s=1NsβhighsKs,Ulown+1=Un+Δt∑s=1NsβlowsKs

The difference between the two, measured by the .lterror. operator of the integrand, estimates the local error and drives the step size control (see Adaptive time step). In all the FOODIE pairs the solution is advanced with the higher order formula (local extrapolation):

SchemeAdvances withError estimatorReference
runge_kutta_emd_stages_2_order_22nd order1st orderHeun-Euler
runge_kutta_emd_stages_6_order_55th order4th orderCash-Karp [13]
runge_kutta_emd_stages_7_order_45th order4th orderDormand-Prince [11]
runge_kutta_emd_stages_9_order_66th order5th orderCalvo et al. [14]
runge_kutta_emd_stages_17_order_1010th order8th orderFeagin [15]

The names of the schemes give the number of stages and one order of the pair: for Dormand-Prince it is the lower one, the scheme being 5th order accurate.

Heun-Euler:

011βhigh1212βlow10

Cash-Karp:

0151531034094035310−910651−115452−702735277816315529617551257513824442751105922534096βhigh37378025062112559405121771βlow2825276480185754838413525552962771433614

Dormand-Prince:

01515310340940454445−561532989193726561−253602187644486561−212729190173168−3553346732524749176−51031865613538405001113125192−218767841184βhigh3538405001113125192−2187678411840βlow5179576000757116695393640−920973392001872100140

The Calvo (9 stages) and Feagin (17 stages) tableaus are too large to be reported here: they are in the documentation of foodie_integrator_runge_kutta_embedded.F90 and in the API.

Linear SSP Runge-Kutta ​

Class runge_kutta_lssp (integrator_runge_kutta_lssp), from Gottlieb, Ketcheson and Shu [16]: SSP schemes with any number of stages s, selected by the stages argument. With h=12 for runge_kutta_lssp_stages_s_order_s_1 (s≥2, default 2) and h=1 for runge_kutta_lssp_stages_s_order_s (s≥1, default 1):

U(1)=UnU(k)=U(k−1)+hΔtR(tn+(k−2)hΔt,U(k−1)),k=2,…,sU(s)←U(s)+hΔtR(tn+(s−1)hΔt,U(s))Un+1=∑k=1sαkU(k)

The coefficients αk are computed by recursion at initialization:

  • order_s_1: α1=0, α2=1; for i=3,…,s: αi=2iαi−1, then αj=2j−1αj−1 for j=i−1,…,2, then α1=1−∑j=2iαj;
  • order_s: α1=1; for i=2,…,s: αi=1i!, then αj=1j−1αj−1 for j=i−1,…,2, then α1=1−∑j=2iαj.

Order of accuracy

The schemes are s and s−1 order accurate only for linear autonomous problems, Ut=LU with L constant. For nonlinear or non-autonomous problems they are at most 2nd order accurate. The tests suite verifies their order on the linear constant coefficients equation.

The references are numbered as in the bibliography of the catalogue.

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause and MIT licenses.