grokkingstuff Home Blog Projects Wiki Calculators About

Stability Analysis for CFD

#+CATEGORY: cfd

Stability Analysis for CFD :: Von Neumann, CFL, and Non-Linear Considerations

Numerical stability determines whether a discretized PDE solver will diverge or converge. Divergence produces NaNs or unbounded values. Convergence produces a physically meaningful solution. Stability analysis classifies whether errors grow or decay, and if they grow, at what rate. These criteria govern timestep selection, timestep-grid coupling (CFL number), and the choice of implicit versus explicit time integration.

This note covers stability analysis tools, their application to common CFD discretizations, and the relationship between linear stability and non-linear convergence.

The Concept of Numerical Stability

Consider the linear test equation dy/dt = lambda y with Re(lambda) less than 0. The exact solution decays. A discrete scheme with amplification factor A(theta) yields y^{n+1} = A(theta) y^n. The scheme is stable if |A(theta)| is less than or equal to 1 for all Fourier modes theta—this is the Von Neumann stability condition, also called the Fourier method or harmonic analysis.

Von Neumann (Fourier) Stability Analysis

The procedure: discretize the linear PDE in space and time, substitute a single Fourier mode phi_j^n equals hat{phi}^n exp(i k j Delta x) which equals hat{phi}^n exp(i theta j) where theta equals k Delta x is the phase angle, extract the amplification factor A(theta) which equals hat{phi}^{n+1} over hat{phi}^n, and require |A(theta)| is less than or equal to 1 for all theta in range [0, 2 pi].

For 1D advection with upwind scheme and explicit Euler in time, the amplification factor gives |A|^2 = 1 - 2 CFL(1-CFL)(1-cos theta), which requires 0 is less than or equal to CFL is less than or equal to 1. Explicit upwind is stable for CFL is less than or equal to 1.

Stability Regions for Common Schemes

Forward difference (FTCS) with central spatial differencing and Euler explicit time requires Diffusive CFL squared is less than nu Delta t over Delta x squared and convective CFL is less than or equal to 1. Upwind with Euler explicit requires CFL is less than or equal to 1. Upwind with Crank-Nicolson and backward Euler are unconditionally stable. Leapfrog with central spatial and forward Euler time requires Delta t is less than or equal to Delta x squared over 2 nu (diffusion-limited). BDF2 is unconditionally stable for linear problems.

The CFL Condition

The Courant-Friedrichs-Lewy (CFL) condition is the most cited stability criterion in CFD. Physical interpretation: information traveling at speed |u| during one timestep delta_t must not cross more than one cell. If it does, the numerical domain of dependence does not contain the physical domain of dependence, and the scheme cannot be stable. For diffusion, the Diffusive CFL is nu delta_t / delta_x^2 less than or equal to 1/2 (FTCS). For explicit compressible flow with both convection and diffusion, delta_t is bounded by the minimum of delta_x over |u plus a| (acoustic limit, bottleneck at high Mach), delta_x squared over 2 nu (viscous limit), and delta_x squared over 2 alpha (thermal diffusivity limit, where alpha equals k over (rho c_p)).

Implicit vs Explicit: Stability vs Efficiency

Implicit schemes are unconditionally stable for linear problems, marching with arbitrarily large CFL without diverging. Large CFL gives large timesteps and large truncation errors in time, making unsteady solutions inaccurate. Implicit solves require matrix inversions, so they are more work per timestep. Optimal CFL for implicit is typically 5 to 50 for steady-state and 1 to 10 for transient. Explicit is conditionally stable but cheap per step. Implicit is unconditionally stable but expensive per step. For steady-state, implicit with CFL about 100 often wins. For transient with resolved physics, explicit or implicit with CFL 1 to 5 wins.

Non-Linear Stability and TVD

Von Neumann analysis is a linear theory that does not apply directly to non-linear PDEs governing real CFD. For non-linear stability, the Total Variation Diminishing (TVD) condition is the correct generalization. A TVD scheme guarantees that the total variation (sum of absolute differences) does not increase, implying boundedness and absence of new extrema. This condition is sufficient but not necessary for non-linear stability. See TVD Limiters for implementation.

Stiffness and Multi-Scale Problems

CFD systems are often stiff, with regions of vastly different time scales: chemical reactions (milliseconds for reaction, microseconds for induction), boundary layers (tiny Delta x gives small viscous CFL) versus free-stream (large Delta x), multiphase flows with surface tension (capillary timestep). Mitigation strategies include implicit treatment of stiff source terms with operator splitting, local mesh refinement to balance time scales, subcycling on fine regions, and preconditioning to equalize eigenvalue ratios.

Stability and Convergence: The Distinction

Convergence to the true solution is different from stability. Stability means the numerical solution does not blow up. Convergence means it approaches the true solution as discretization parameters go to zero. The Lax Equivalence Theorem states consistency plus stability implies convergence for linear, well-posed problems. But a stable scheme may not converge to the correct weak solution (monotone schemes at shocks converge to entropy-violating solutions). A consistent scheme may be unstable (FTCS for advection). A consistent and stable scheme may violate global conservation.

Practical Stability Guidelines

Practical stability guidelines: start with implicit time stepping and a modest CFL (1 to 5 for transient, 10 to 50 for steady). Monitor residuals—monotonic decrease indicates stability; oscillations mean smaller CFL or better linear solver tolerances. Transition from first-order to higher-order schemes once converged. For transient flows with sharp features, reduce CFL to maintain temporal accuracy (CFL less than or equal to 1 for Crank-Nicolson, CFL less than or equal to 5 for BDF2). In multiphase flows, monitor both surface tension CFL and velocity CFL—the smaller controls stability.

See Also