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
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
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
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
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
| Grid | Refinement | Cells (Example) |
|---|---|---|
| Coarse | $r^2$ | 100,000 |
| Medium | $r$ | 400,000 |
| Fine | 1 | 1,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
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
| Benchmark | Physics | Key Data |
|---|---|---|
| Backward-facing step | Separation, reattachment | Reattachment length |
| Lid-driven cavity | Recirculation | Vortex positions |
| Flow over cylinder | Vortex shedding | Strouhal number, $C_D$ |
| NACA 0012 airfoil | Attached/separated | Lift, drag coefficients |
| Ahmed body | Automotive wake | Drag, wake structure |
| Turbulent pipe flow | Fully developed | Friction 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
| Situation | Action | ||
|---|---|---|---|
| $ | 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
| Mistake | Consequence |
|---|---|
| Single mesh result | Unknown numerical error |
| Ignoring GCI | Overconfidence in results |
| Wrong benchmark | Validation doesn't transfer |
| Comparing apples to oranges | Incorrect validation claim |
| Hiding failed cases | Selection 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
Methods
| Method | Description | Cost |
|---|---|---|
| Monte Carlo | Random sampling | Many runs |
| Polynomial Chaos | Spectral expansion | Moderate |
| Sensitivity analysis | Derivatives w.r.t. inputs | Few 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
| Grid | Cells | $C_L$ | $C_D$ |
|---|---|---|---|
| Coarse | 50,000 | 1.092 | 0.0134 |
| Medium | 200,000 | 1.089 | 0.0128 |
| Fine | 800,000 | 1.087 | 0.0125 |
Validation
| Quantity | CFD | Experiment | Difference |
|---|---|---|---|
| $C_L$ | 1.087 ± 0.002 | 1.09 ± 0.01 | -0.3% |
| $C_D$ | 0.0125 ± 0.0003 | 0.0118 ± 0.0005 | +5.9% |
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.