Lesson 11 of 13 20 min

Verification & Validation

A CFD simulation produces numbers. But how do you know those numbers are right? The answer lies in a rigorous process called Verification and Validation (V&V). Without V&V, CFD results are just colorful pictures — potentially misleading and dangerous for engineering decisions.

The Fundamental Distinction

Verification: "Are we solving the equations right?"

Verification checks that:

  • The code correctly implements the mathematical model
  • Numerical errors are quantified and controlled
  • The solution converges to the mathematical solution as the mesh is refined
Focus: Numerical accuracy, code correctness

Validation: "Are we solving the right equations?"

Validation checks that:

  • The mathematical model represents the physical reality
  • Predictions agree with experimental data
  • The model is appropriate for the application
Focus: Physical accuracy, model appropriateness

The V&V Hierarchy

Reality (Physical World)
    ↓ ← Validation (compare to experiments)
Mathematical Model (PDEs, turbulence models)
    ↓ ← Verification (check numerics)
Discrete Solution (CFD result)

Sources of Error

Model Errors

Arise from physics assumptions:

  • Turbulence model limitations
  • Laminar vs. turbulent assumption
  • Incompressible approximation
  • Boundary condition idealizations
  • Geometry simplifications

Numerical Errors

Arise from discretization:

  • Truncation error (finite differences)
  • Iterative convergence error
  • Round-off error (floating point)
  • Grid-induced errors

Input Errors

Arise from uncertain inputs:

  • Material properties
  • Boundary condition values
  • Initial conditions
  • Geometry tolerances

Code Verification

Method of Manufactured Solutions (MMS)

The gold standard for verifying CFD codes:
  • Choose an exact solution (any smooth function)
  • Substitute into the governing equations
  • Compute the source term needed to make it exact
  • Run the code with that source term
  • Compare computed vs. manufactured solution
Example: Let $u = \sin(\pi x)\cos(\pi y)$

Substitute into the advection equation $\frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x} = S$

Compute the required source: $S = c\pi\cos(\pi x)\cos(\pi y)$

If the code is correct, refining the mesh should reduce the error at the expected rate.

Order of Accuracy Verification

For a scheme with formal order $p$:

$$\epsilon \propto h^p$$

Log-log plot of error vs. mesh size should have slope $p$.

Example: Second-order scheme ($p=2$):
  • Halving mesh size should reduce error by factor of 4
  • Observed slope $\neq$ 2 indicates a bug

Solution Verification

Perform a grid convergence study and estimate numerical error using GCI.

Grid Convergence Study

The most important verification activity:
  • Create at least 3 meshes with refinement ratio $r > 1.3$
  • Compute the solution on each mesh
  • Observe how key quantities change with mesh refinement
  • Estimate the error in the finest mesh solution

Refinement Ratio

$$r = \frac{h_{coarse}}{h_{fine}}$$

For unstructured meshes:

$$h = \left(\frac{V_{domain}}{N_{cells}}\right)^{1/3}$$

Rule of thumb: Use $r \approx 2$ (double the cells in each direction)

Observed Order of Convergence

Given solutions on three grids ($f_1$ finest, $f_3$ coarsest):

$$p = \frac{\ln\left(\frac{f_3 - f_2}{f_2 - f_1}\right)}{\ln(r)}$$

If solutions are oscillating or $p < 0$, you're not in the asymptotic range.

Richardson Extrapolation

The Concept

If we know the order of convergence, we can extrapolate to zero mesh size:

$$f_{exact} \approx f_1 + \frac{f_1 - f_2}{r^p - 1}$$

This estimate is more accurate than any individual grid solution.

Requirements

  • Solutions must be in the asymptotic range (smooth convergence)
  • Observed $p$ should be close to formal order
  • Same geometry, BCs, solver settings across grids

Limitations

  • Assumes smooth solution
  • Doesn't account for model errors
  • Can be optimistic if criteria violated

Grid Convergence Index (GCI)

The Standard Approach

Roache's GCI provides a confidence interval for the discretization error:

$$GCI_{fine} = \frac{F_s \cdot |f_2 - f_1|}{r^p - 1}$$

Where:

  • $F_s$ = safety factor (1.25 for 3+ grids, 3.0 for 2 grids)
  • $f_1, f_2$ = solutions on fine and medium grids
  • $r$ = refinement ratio
  • $p$ = observed order of convergence

Interpretation

GCI represents a 95% confidence band. The true (grid-independent) solution is expected to lie within:

$$f_1 \pm GCI_{fine}$$

Grid Convergence Check

For three grids, verify:

$$GCI_{medium} \approx r^p \cdot GCI_{fine}$$

If this ratio differs significantly from expected, you may not be in the asymptotic range.

Practical Grid Study Procedure

Step 1: Create Grids

GridRefinementCells (Example)
Coarse$r^2$100,000
Medium$r$400,000
Fine11,600,000

Use $r = 2$ for clear separation.

Step 2: Ensure Consistency

  • Same turbulence model, BCs, schemes
  • Same convergence criteria (residuals, iterations)
  • Identical post-processing

Step 3: Extract Quantities

Focus on integral quantities (drag, mass flow) rather than local values.

Step 4: Calculate GCI

  • Compute observed order $p$
  • Apply Richardson extrapolation
  • Calculate GCI for uncertainty band
  • Verify grid convergence check

Step 5: Report Results

Example:
  • Fine grid drag: $C_D = 0.285$
  • GCI: 2.3%
  • Reported result: $C_D = 0.285 \pm 0.007$

Validation

Compare CFD results against established benchmark cases and experimental data.

Validation Hierarchy

Start with simple cases, progress to complex:

  • Unit problems — Single physics (e.g., laminar channel flow)
  • Benchmark cases — Well-documented experiments
  • Subsystem tests — Component-level validation
  • System validation — Full application

Classic CFD Benchmarks

BenchmarkPhysicsKey Data
Backward-facing stepSeparation, reattachmentReattachment length
Lid-driven cavityRecirculationVortex positions
Flow over cylinderVortex sheddingStrouhal number, $C_D$
NACA 0012 airfoilAttached/separatedLift, drag coefficients
Ahmed bodyAutomotive wakeDrag, wake structure
Turbulent pipe flowFully developedFriction factor

Experimental Uncertainty

Experiments have errors too:

$$E_{model} = S - D$$

Where:

  • $E_{model}$ = model error (what we want to know)
  • $S$ = simulation result
  • $D$ = experimental data

The validation uncertainty is:

$$U_{val}^2 = U_{num}^2 + U_{input}^2 + U_{exp}^2$$

Only if $|S - D| < U_{val}$ can we claim the model is validated.

When Validation Fails

SituationAction
$S - D> U_{val}$Model inadequate for this application
Large $U_{num}$Refine mesh further
Large $U_{input}$Improve boundary data
Unknown $U_{exp}$Question experimental quality

Best Practices

Documentation Requirements

A credible CFD study should report:

  • Grid details — Cell counts, types, y+, quality metrics
  • Numerical schemes — Spatial, temporal discretization
  • Convergence evidence — Residual plots, monitors
  • Grid study results — GCI, Richardson extrapolate
  • Validation comparison — Against relevant experiments
  • Uncertainty statement — Confidence interval on results

Common Mistakes

MistakeConsequence
Single mesh resultUnknown numerical error
Ignoring GCIOverconfidence in results
Wrong benchmarkValidation doesn't transfer
Comparing apples to orangesIncorrect validation claim
Hiding failed casesSelection bias

ASME V&V Standards

The ASME V&V 20-2009 standard provides formal procedures:

  • Defines error and uncertainty terminology
  • Specifies validation metrics
  • Recommends hierarchical validation
  • Required for nuclear and safety-critical applications

Uncertainty Quantification (UQ)

Beyond Deterministic CFD

Real-world inputs have uncertainty:

  • Inlet velocity: $U = 10 \pm 0.5$ m/s
  • Material properties: $\mu = 0.001 \pm 0.0001$ Pa·s
  • Geometry: Manufacturing tolerances
UQ propagates input uncertainties through the simulation to output uncertainties.

Methods

MethodDescriptionCost
Monte CarloRandom samplingMany runs
Polynomial ChaosSpectral expansionModerate
Sensitivity analysisDerivatives w.r.t. inputsFew runs

Why UQ Matters

A drag coefficient of $C_D = 0.30$ is meaningless without context:

  • Is it $0.30 \pm 0.03$ (10% uncertainty)?
  • Or $0.30 \pm 0.001$ (0.3% uncertainty)?

The decision-making changes dramatically.

Case Study: Airfoil Validation

Setup

  • NACA 0012 at $\alpha = 10°$, $Re = 6 \times 10^6$
  • k-omega SST turbulence model
  • Three grids: 50k, 200k, 800k cells

Grid Study Results

GridCells$C_L$$C_D$
Coarse50,0001.0920.0134
Medium200,0001.0890.0128
Fine800,0001.0870.0125
Observed order: $p = 1.8$ for $C_L$ Richardson extrapolate: $C_L = 1.086$ GCI (fine): 0.2%

Validation

QuantityCFDExperimentDifference
$C_L$1.087 ± 0.0021.09 ± 0.01-0.3%
$C_D$0.0125 ± 0.00030.0118 ± 0.0005+5.9%
Conclusion: $C_L$ validated; $C_D$ shows model limitations (drag prediction harder).

Key Takeaways

  • Verification ≠ Validation — Verification checks numerics; validation checks physics
  • Grid convergence studies are mandatory for credible CFD
  • GCI provides a quantified uncertainty band for discretization error
  • Richardson extrapolation estimates the grid-independent solution
  • Observed order near formal order confirms asymptotic convergence
  • Validation requires experimental data with known uncertainty
  • Hierarchical validation builds confidence from simple to complex
  • Report uncertainties — numbers without error bars are meaningless

What's Next

With a solid foundation in CFD theory and practice, the final lesson brings it all together: Practical CFD Workflow — a complete guide to running successful simulations, common pitfalls to avoid, and career paths in CFD.

Turbulence Modeling