Numerical Schemes for CFD
#+CATEGORY: cfd
Numerical Schemes for CFD :: Discretization of Convective and Diffusive Terms
Numerical schemes convert continuous PDEs into algebraic equations on a discrete grid, determining accuracy, stability, and computational cost. The key trade-off is between high formal order of accuracy and boundedness with positivity preservation. A high-order scheme that oscillates at discontinuities is worse than a reliable low-order one.
This note catalogs the principal classes of schemes. It covers their formal accuracy and stability properties. It also gives practical recommendations for CFD.
Classification of Discretization Schemes
Schemes are classified by three properties: 1. Order of accuracy is first-order, second-order, or higher. 2. Boundedness (or monotonicity preservation) determines whether a bounded input produces a bounded output. 3. Conservativeness ensures the discrete scheme satisfies global conservation.
Conservativeness is non-negotiable in CFD. A non-conservative scheme will not converge to the weak solution of the conservation law.
Spatial Discretization: Convective Terms
Upwind Scheme (First-Order Upwind, FOU)
Basic principle: the value at a cell face is taken from the upstream cell:
Properties:
- First-order accurate in space
- Bounded (monotone) - no oscillations occur
- Highly diffusive - this property smears gradients
- Never use this scheme in production for resolution-sensitive cases
FOU is a starter scheme. Use it to get convergence going. Switch to a higher-order scheme before trusting results.
Central Differencing (Second-Order Upwind, SOU)
Central differencing uses:
Properties:
- Second-order accurate
Not bounded, producing oscillations near steep gradients. Stable only when convective dominance is mild, requiring Peclet number less than or equal to 2, where the Peclet number is u delta x over Gamma and Gamma is the diffusion coefficient.
Second-order upwind blends upwind bias with central differencing for convection-dominated flows. It resolves the exact 1D steady convection-diffusion solution. Bounded high-order schemes use limited reconstruction to prevent new extrema, similar to TVD methods. See the TVD limiters note for details.
Temporal Discretization
Backward Differencing (Implicit)
Second-order implicit backward differencing (BDF2):
BDF2 is unconditionally stable for linear problems, second-order accurate, and can exhibit excessive damping at high Courant numbers. Consider switching to first-order implicit backward Euler at high CFL, then back to BDF2.
Crank-Nicolson
Crank-Nicolson is second-order accurate and A-stable but not L-stable. It can oscillate when CFL exceeds 1. Do not use for transient flows with shocks or sharp gradients.
First-Order Implicit (Backward Euler)
Backward Euler is first-order accurate, unconditionally and L-stable with no oscillations, but has excessive numerical diffusion in time. Use it when robustness matters more than transient accuracy.
Recommendation Hierarchy
| Application | Spatial | Temporal |
| ------------- | --------- | ---------- |
| Initial convergence ramp | First-order upwind | Implicit backward first-order |
| Steady RANS | Second-order upwind or limitedLinear | Backward first-order is sufficient |
| Transient LES/DNS | Bounded high-order (van Leer, Smart) | BDF2 or Crank-Nicolson with CFL less than or equal to 1 |
| Interface capturing | Bounded compression (HRIC, Geometric) | First or second-order as appropriate |
| Shock-capturing (compressible flow) | TVD with appropriate limiter | Implicit second-order or explicit Runge-Kutta |
Connection to the Lax Equivalence Theorem
The Lax Equivalence Theorem states that consistency plus stability implies convergence. This holds for a well-posed linear initial-value problem. In CFD practice:
Consistency is guaranteed by high formal order. Stability requires boundedness for non-linear problems, or von Neumann analysis for linear ones. Convergence to the correct weak solution requires conservativeness in addition to consistency and stability.
The theorem is necessary but insufficient for non-linear hyperbolic problems. TVD and entropy-satisfying schemes may converge to the correct weak solution. Monotone schemes may converge to an incorrect one at shocks. Limiters address this issue.
Summary
Choose accuracy only after ensuring boundedness and conservativeness. First-order upwind is a stepping stone, not a complete solution. Bounded second-order (limited) is standard for production RANS. TVD limiters are essential for shock-capturing and interface tracking. For temporal schemes, use implicit backward first-order for robustness, BDF2 or Crank-Nicolson for accuracy when CFL is controlled.
See Also
- Numerical Dispersion
- Numerical Dissipation
- TVD Limiters
- Compression Schemes
- Stability Analysis
- Governing Equations
- ANSYS Fluent OverviewAnsys
- Conservation Laws and the Reynolds Transport TheoremCFD
- Governing Equations of Fluid MechanicsCFD
- Numerical Anisotropy in Unstructured MeshesCFD
- Numerical DissipationCFD
- Stability Analysis for CFDCFD
- CFD Training Roadmap -- Learning Sequence and Progression GuideCFD
- OpenFOAM Case Setup — Dictionaries, BCs, and Turbulence ConfigurationOpenFOAM
- OpenFOAM Mesh Generation — blockMesh and snappyHexMeshOpenFOAM
- OpenFOAM Numerical Schemes — fvSchemes Deep DiveOpenFOAM
- OpenFOAM Numerics and DiscretizationOpenFOAM
- OpenFOAM OverviewOpenFOAM
- OpenFOAM Shock-Capturing and Density-Based SolversOpenFOAM