Skip to content

ETDRK4 time stepping

In Fourier space the KdV linear operator is L(k)=ik3L(k) = i k^3. At the highest resolved wavenumber this is enormous. An ordinary explicit scheme such as RK4 would need a time step small enough to resolve the fastest oscillation on the grid, which is far smaller than the physics requires. The equation is stiff.

Write the equation as ut=Lu+N(u)u_t = L u + N(u). The linear part alone has the exact solution eLtu0e^{L t} u_0. Exponential time differencing uses that exact solution and integrates only the nonlinear term approximately:

u(tn+1)=eLh u(tn)+∫0heL(h−τ) N(u(tn+τ)) dτ.u(t_{n+1}) = e^{L h}\, u(t_n) + \int_0^h e^{L (h - \tau)}\, N\big(u(t_n + \tau)\big)\, d\tau .

ETDRK4 (Cox & Matthews 2002) approximates the integral with a fourth-order Runge–Kutta style set of stages. The result: the time step is limited by the nonlinear dynamics, not by the grid.

The scheme needs functions like φ(z)=(ez−1)/z\varphi(z) = (e^z - 1)/z evaluated at z=hL(k)z = hL(k). For small zz these suffer catastrophic cancellation. Kassam & Trefethen (2005) evaluate them as a mean over a circle in the complex plane centred on zz, which is exact for entire functions by the mean value property and numerically stable.

Their recipe uses a half circle and takes the real part, which is valid only when LL is real. Our operators are purely imaginary, so the engine averages over the full circle. This matters: with the half-circle version the NLS solver silently loses mass.

It is the time stepper of the engine’s wave solvers. The coefficients are precomputed once per simulation, so each step costs four nonlinear evaluations, eight FFTs in total.