Numerics
Numerical stability
Explore how an integration method, time step, and grid spacing affect the growth of numerical errors.
Absolute stability
For , a step of size Δt amplifies a mode by . The shaded region satisfies . Its boundary has unit amplification.
Amplification factors and assumptions
- Forward Euler
- Heun (explicit RK2)
- Classical RK4
- Backward Euler
- Crank–Nicolson
This is a scalar or modal test for a linearized system. Check each relevant eigenvalue of the spatial discretization. Non-normal operators can exhibit transient growth even when their eigenvalues satisfy this test.
Courant and diffusion limits
Check a one-dimensional, constant-coefficient advection–diffusion equation on a uniform grid. This diagram applies to forward Euler with first-order upwind advection and centered second-order diffusion.
Derivation and applicability
For positive velocity, the three coefficients of the update are C+F, 1−C−2F, and F. They are nonnegative and sum to one inside the triangle. The wavenumber at the grid’s Nyquist limit has amplification 1−2C−4F, so outside the triangle its magnitude exceeds one in the Fourier analysis. For negative velocity, the upwind stencil reverses.
The intersections are C ≤ 1 for pure advection and F ≤ 0.5 for pure diffusion. Other spatial schemes, boundary treatments, and multidimensional grids require their own analysis. A stable step can still be too large for the accuracy you need.
TU Delft notes on upwind advection · NASA CFD verification and validation tutorial