Module 9: Verification, Validation, and Numerical Quality
Learn how to determine whether a CFD simulation is numerically correct, sufficiently resolved, physically credible, and reproducible through verification, validation, conservation checks, and uncertainty analysis.
1. Introduction: When Can You Trust a CFD Simulation?
A CFD solver can finish running, produce smooth contours, and report small residuals without producing an accurate solution.
A converged calculation is not automatically a correct calculation.
For example, a simulation of flow past a cylinder might produce a plausible vortex street. However, the predicted drag coefficient, vortex-shedding frequency, or pressure distribution could still be inaccurate because of:
- An incorrect physical model.
- Incorrect boundary conditions.
- A programming or implementation error.
- An insufficiently refined mesh.
- An excessively large time step.
- An unsuitable discretization scheme.
- An unconverged iterative solution.
- An inappropriate comparison with experimental measurements.
This module introduces the methods used to assess CFD calculations systematically.
The central question is:
What evidence demonstrates that a numerical result is sufficiently accurate for its intended purpose?
Three related activities help answer this question:
- Verification: Are the equations being solved correctly?
- Validation: Do the mathematical and physical models adequately represent reality?
- Uncertainty quantification: How uncertain is the reported result?
These activities complement one another. None can replace the others.
2. Learning Objectives
By the end of this module, you should be able to:
- Distinguish numerical verification from physical validation.
- Explain why solver convergence alone is insufficient.
- Check mass, momentum, and energy conservation.
- Perform mesh-refinement and time-step-refinement studies.
- Understand observed order of accuracy and Richardson extrapolation.
- Interpret the Grid Convergence Index (GCI) and its limitations.
- Compare CFD predictions with analytical solutions and experiments.
- Distinguish numerical error from modelling and measurement uncertainty.
- Develop a reproducible verification and validation workflow.
- Apply these principles to OpenFOAM and your own CFD projects.
3. The Main Sources of Error in CFD
A useful first step is to recognize that a CFD result contains several different types of error and uncertainty.
3.1 Modelling error
Modelling error arises when the mathematical model does not fully represent the physical process.
Examples include:
- Assuming incompressible flow when density variations matter.
- Using a turbulence model that is unsuitable for the flow regime.
- Neglecting radiation in a thermal system where it is important.
- Treating a multiphase flow as a single-phase flow when phase interactions dominate.
- Ignoring fluid–structure interaction when structural deformation significantly affects the flow.
Even a perfectly solved set of equations can give an inaccurate prediction if those equations do not represent the relevant physics.
3.2 Discretization error
The governing equations describe continuous fields. A numerical method approximates these equations on a finite mesh and, for transient problems, at discrete time levels.
This introduces discretization error.
For example, a continuous derivative may be approximated using a finite difference:
The approximation has a truncation error that generally decreases as the mesh is refined, provided the solution is sufficiently smooth and the numerical method is operating in its expected regime.
For a second-order central difference, the leading error is proportional to .
3.3 Iterative or algebraic error
Many CFD methods solve a sequence of algebraic systems rather than obtaining the final discrete solution in one operation.
The iterative solver may stop before the algebraic equations are sufficiently well satisfied.
This introduces iterative error.
Examples include:
- Stopping SIMPLE iterations too early.
- Using an excessively loose linear-solver tolerance.
- Stopping a transient calculation before its statistical quantities are stable.
- Failing to converge a nonlinear material or turbulence model.
3.4 Time-integration error
Transient simulations approximate continuous evolution using a finite time step.
For example, the forward Euler method approximates the time derivative as
This approximation is first-order accurate in time under the usual smoothness assumptions.
A smaller time step can reduce temporal discretization error, but it also increases computational cost.
3.5 Input and parameter uncertainty
Some inputs are not known exactly.
Examples include:
- Inlet velocity.
- Fluid viscosity.
- Thermal conductivity.
- Surface roughness.
- Particle size distribution.
- Experimental geometry.
- Initial and boundary conditions.
Uncertainty in these quantities can propagate into the predicted engineering result.
3.6 Experimental uncertainty
Measurements used for validation also have uncertainty.
Sources may include sensor accuracy, calibration, spatial resolution, measurement repeatability, and uncertainty in the experimental operating conditions.
A difference between simulation and experiment cannot be interpreted properly without considering these uncertainties.
3.7 A practical error classification
| Source | Main question | Typical assessment method |
|---|---|---|
| Modelling | Are the governing assumptions appropriate? | Model assessment, sensitivity studies, experimental comparison |
| Spatial discretization | Is the mesh sufficiently refined? | Mesh-refinement study |
| Temporal discretization | Is the time step sufficiently small? | Time-step-refinement study |
| Iterative | Are the discrete equations sufficiently converged? | Residuals, conservation, monitored quantities |
| Input parameters | Are the inputs known accurately enough? | Sensitivity and uncertainty analysis |
| Measurement | How reliable is the reference data? | Calibration and experimental uncertainty analysis |
These sources interact, so the total error is not always a simple sum of independent contributions.
4. Verification and Validation
Verification and validation answer different questions.
4.1 Verification: Are we solving the equations correctly?
Verification evaluates whether the numerical implementation and calculation correctly solve the intended mathematical model.
It includes two closely related activities.
Code verification asks whether the numerical implementation correctly represents the intended algorithms and equations.
Solution verification estimates the numerical error in a particular calculation.
For example, suppose the governing equation is the one-dimensional steady heat-conduction equation with constant thermal conductivity and no internal heat generation:
The analytical solution between two prescribed temperatures is linear:
A numerical implementation can be tested against this exact solution.
If the numerical temperatures do not approach the analytical solution as the grid is refined, the problem may involve a coding error, incorrect boundary treatment, an incorrect equation, or an unexpected property of the numerical method.
Verification is not limited to comparing final field plots. It should examine the quantities the calculation is intended to predict.
4.2 Validation: Are we solving the right equations?
Validation evaluates how accurately the mathematical model represents the real physical system for a specified purpose.
For example, consider a simulation of forced convection through a heated channel.
Even if the discrete equations are solved accurately, the prediction may disagree with measurements because of:
- An unsuitable turbulence model.
- Incorrect inlet turbulence conditions.
- Neglected wall roughness.
- Incorrect thermal boundary conditions.
- Unmodelled heat losses.
- Differences between the simulated and experimental geometry.
Validation requires relevant physical reference data, such as measurements from a carefully characterized experiment.
4.3 Verification versus validation
| Aspect | Verification | Validation |
|---|---|---|
| Main question | Are the equations solved correctly? | Do the model predictions represent reality adequately? |
| Reference | Analytical solutions, manufactured solutions, numerical estimates | Experimental measurements or other credible physical evidence |
| Typical tests | Grid convergence, time-step refinement, code tests | Comparison of predicted and measured quantities |
| Main focus | Numerical implementation and solution error | Physical model adequacy |
| Can it prove everything? | No | No |
A validated result is not automatically numerically accurate if the mesh is inadequate. A numerically verified result is not automatically physically accurate if the model assumptions are wrong.
A trustworthy simulation needs both activities.
5. Start with Simple Analytical Benchmarks
Before evaluating a complex CFD case, test the numerical method using a problem with a known solution.
Simple problems make it easier to identify errors because fewer physical effects are present.
5.1 One-dimensional steady heat conduction
Consider a slab of thickness , with constant thermal conductivity , prescribed temperatures at both boundaries, and no internal heat generation.
The governing equation is
For constant ,
With boundary conditions
the exact temperature field is
The temperature gradient is constant:
Using Fourier’s law, the heat flux is
Therefore,
The magnitude of the heat flux should be the same at every location in the steady, source-free slab.
5.2 What should be tested?
For a numerical solution, examine:
- The temperature field against the analytical solution.
- The temperature gradient.
- The heat flux through both boundaries.
- The effect of mesh refinement.
- The error introduced by the boundary treatment.
This problem is especially useful because a linear temperature field can be represented exactly by many standard one-dimensional discretizations, apart from implementation and boundary-related effects.
If the result is incorrect, investigate the equation assembly, geometry, boundary conditions, and units before changing solver settings.
5.3 Other useful benchmark problems
| Benchmark | What it helps assess |
|---|---|
| One-dimensional diffusion | Diffusion discretization and boundary conditions |
| Transient heat conduction | Time integration and transient boundary treatment |
| Couette flow | Viscous momentum transport and wall conditions |
| Poiseuille flow | Pressure gradient, viscous forces, and velocity profiles |
| Lid-driven cavity | Incompressible flow and pressure–velocity coupling |
| Flow past a cylinder | Separation, vortex shedding, drag, and lift |
| Natural convection cavity | Coupled momentum and energy transport |
| Manufactured solution | Formal order of accuracy and implementation verification |
Choose benchmarks appropriate to the physics and numerical methods in your code.
6. Manufactured Solutions
An analytical solution is not always available for the governing equations you want to test.
The Method of Manufactured Solutions (MMS) provides another way to verify numerical implementations.
The idea is to choose a smooth field, substitute it into the governing equation, and construct a source term that makes the chosen field an exact solution.
6.1 Example: A manufactured diffusion solution
Consider the one-dimensional equation
Choose the manufactured solution
Its derivatives are
and
Therefore, the required source term is
The boundary conditions are
The chosen function is now the exact solution of the manufactured problem.
6.2 How to use it
- Implement the governing equation and its source term.
- Apply the manufactured boundary conditions.
- Solve on a sequence of increasingly refined meshes.
- Compare the numerical field with the exact field.
- Calculate the error norm on each mesh.
- Estimate the observed convergence order.
- Check whether the observed order agrees with the expected order.
Manufactured solutions are particularly useful for checking code because the reference solution is known exactly by construction.
However, they do not establish that a physical model is appropriate for a real experiment. That is a validation question.
7. Quantify the Error
Visual inspection is useful, but it cannot replace quantitative comparison.
Suppose the exact or reference value at location is and the numerical value is .
The error is
7.1 Maximum absolute error
This measures the largest absolute discrepancy at the sampled locations.
It is useful when local errors or extreme values matter.
7.2 Mean absolute error
For equally weighted samples,
This measures the average absolute discrepancy.
7.3 Root-mean-square error
Squaring the errors gives larger discrepancies greater influence.
7.4 Relative error
When the reference value is nonzero, the relative error can be written as
The relative error becomes misleading when the reference value is zero or very small. In those cases, report absolute errors or use an explicitly justified normalization scale.
7.5 Error norms require care
Comparisons are only meaningful when the sampling, weighting, and normalization are appropriate.
For example, a simple average over cell centres gives equal weight to every cell. On a nonuniform mesh, that is not necessarily equivalent to a volume-weighted error measure.
For a three-dimensional domain with volume , one possible volume-weighted root-mean-square error is
The discrete version should use the cell volumes as weights.
Also distinguish the error in a field from the error in an engineering quantity of interest. A small average velocity error does not guarantee an accurate pressure drop, drag coefficient, or heat-transfer rate.
8. Conservation Checks
Conservation is a central requirement in CFD.
The finite volume method is particularly useful because it expresses conservation through fluxes across control-volume boundaries.
8.1 Mass conservation
For a steady control volume, mass conservation requires
Here, the face mass flow rates are defined using a consistent sign convention, such as positive outward flow.
For a simple system with one inlet and one outlet,
For a compressible flow, the mass flow rate is generally
where is the outward-facing unit normal for the chosen control volume.
A useful normalized mass imbalance is
where is a small positive reference value used to avoid division by zero.
The denominator should be selected carefully when the net flow rates are close to zero.
8.2 Local versus global conservation
Global conservation means that the total imbalance across the full domain is small.
Local conservation means that the discrete balance is satisfied in individual control volumes.
A small global imbalance does not guarantee a small local imbalance. Positive and negative local errors can cancel.
For a cell , a discrete steady conservation equation has the general form
where is the outward flux through face , is the source per unit volume, and is the cell volume.
The exact definitions depend on the transported quantity and the governing equation.
8.3 Energy conservation
For a thermal calculation, compare energy entering and leaving the control volume with internal generation and energy storage.
For a steady control volume with no energy storage,
This simplified expression assumes the relevant energy transfers have been represented consistently. In a full energy balance, convection, conduction, work, and other energy-transfer mechanisms may also need to be included.
8.4 Why conservation matters
Conservation checks can reveal:
- Incorrect boundary conditions.
- Incorrect source terms.
- Inconsistent flux calculations.
- Incorrect density or unit conversions.
- Insufficient pressure–velocity convergence.
- Errors in post-processing.
- A mismatch between the reported control volume and the calculated fluxes.
A conservative numerical method can still produce an inaccurate solution, so conservation is necessary but not sufficient for accuracy.
9. Residuals and Iterative Convergence
Most practical CFD solvers use iterative methods to solve the discretized equations.
A residual measures how closely the current solution satisfies an algebraic system.
For a linear system,
the residual vector is
A small residual indicates that the current solution nearly satisfies the algebraic equations under the chosen residual definition and scaling.
9.1 Initial and final residuals
A normalized residual may be reported as
where is an initial or reference residual vector.
The exact normalization varies between solvers. Therefore, residual values should not be compared blindly across different software packages or equations.
9.2 Why residual reduction is not enough
Small residuals do not guarantee:
- Small discretization error.
- Correct boundary conditions.
- Correct physical models.
- Accurate force or heat-transfer predictions.
- Adequate temporal resolution.
- Sufficient convergence of a statistically averaged turbulent quantity.
For example, a steady solver may converge to a steady numerical solution even when the real physical flow is unsteady.
9.3 Monitor quantities of interest
In addition to residuals, monitor quantities directly relevant to the engineering problem.
Examples include:
- Pressure drop across a component.
- Drag and lift coefficients.
- Heat-transfer rate.
- Area-averaged outlet temperature.
- Maximum temperature.
- Mass flow rate.
- Vortex-shedding frequency.
- Particle concentration or pressure drop in a packed bed.
For a transient simulation, monitor whether the relevant time-dependent or statistically averaged quantities have stabilized appropriately.
9.4 Practical convergence criteria
A calculation should be assessed using several complementary checks:
- Residual reduction.
- Stability of relevant monitored quantities.
- Mass and energy conservation.
- Adequate convergence of the iterative solution.
- Appropriate spatial and temporal resolution.
No single residual threshold is universally appropriate for every CFD problem.
10. Mesh-Refinement Studies
A mesh-refinement study estimates how sensitive a numerical result is to spatial resolution.
Suppose the engineering quantity of interest is , such as drag coefficient or pressure drop.
Calculate it on three systematically refined meshes:
- Coarse mesh: .
- Medium mesh: .
- Fine mesh: .
Assume the fine mesh has the smallest characteristic cell size and that the refinement ratio is approximately constant:
where is the refinement ratio.
For a uniform one-dimensional mesh, the characteristic cell size can be represented by
where is the domain length and is the number of cells.
For a three-dimensional unstructured mesh, a global characteristic length is sometimes estimated using
where is the domain volume.
This global measure does not describe local resolution or anisotropy. For boundary layers, wakes, shocks, and other localized structures, the actual refinement strategy must reflect the relevant physics.
10.1 Why use three meshes?
Two meshes can show whether the answer changes, but three systematically refined meshes provide more information about the convergence trend.
For example:
| Mesh | Cell count | Drag coefficient |
|---|---|---|
| Coarse | 20,000 | 1.12 |
| Medium | 80,000 | 1.08 |
| Fine | 320,000 | 1.07 |
These numbers are illustrative only.
The result changes substantially from the coarse to the medium mesh and less from the medium to the fine mesh. This suggests that the result may be approaching a grid-independent value, but the table alone does not establish the convergence order or the remaining error.
A proper study should also confirm that the physical models, boundary conditions, solver settings, and monitored quantity are comparable between meshes.
10.2 What should remain consistent?
During a mesh study, keep the following consistent wherever appropriate:
- Physical model and material properties.
- Geometry and domain extent.
- Boundary and initial conditions.
- Numerical schemes.
- Convergence criteria.
- Definition of the quantity of interest.
- Transient sampling interval and averaging procedure, where applicable.
The mesh resolution should be the principal changed variable.
If the domain extent, turbulence model, or numerical scheme also changes, the observed difference cannot be attributed to mesh refinement alone.
10.3 Mesh independence is not a binary property
The phrase mesh-independent can be misleading.
A numerical result may change very little between two meshes while still having significant systematic error. All meshes may also be too coarse to capture the important physics.
A better practice is to report:
- The mesh sizes and refinement strategy.
- The quantities monitored.
- The change between mesh levels.
- The estimated discretization uncertainty, where justified.
- Any limitations of the study.
11. Observed Order of Accuracy
Suppose a numerical method has an asymptotic error model
where:
- is the computed result at characteristic mesh size .
- is the extrapolated value as .
- is an error coefficient.
- is the observed convergence order under the assumed error model.
For a method operating in its expected asymptotic regime, a smaller should reduce the leading discretization error.
If the method is second-order accurate, then is expected to approach under suitable conditions.
However, the observed order can differ from the formal order when the mesh is too coarse, the solution is insufficiently smooth, boundary treatment reduces the order, or other errors dominate.
11.1 Estimate the order using three meshes
For three solutions with a constant refinement ratio , define
If the solutions are monotonically convergent and follow the assumed power-law error model, then
Therefore,
This expression is useful only when the differences are nonzero and the solutions follow the assumed convergence pattern.
If the ratio is negative before taking the absolute value, the sequence may be oscillatory. Oscillatory convergence requires additional care, and the simple monotonic convergence assumptions may not apply.
11.2 Interpreting the observed order
Suppose a spatial discretization is formally second-order accurate, but the observed order is approximately .
Possible explanations include:
- The mesh is not sufficiently fine.
- Boundary treatment reduces the overall order.
- The solution has steep gradients or discontinuities.
- Iterative error is contaminating the comparison.
- The meshes are not systematically refined.
- Time-step error dominates the measured quantity.
- The flow has not reached a comparable physical or statistical state.
The correct response is to investigate these causes, not to assume that the numerical method has automatically failed.
12. Richardson Extrapolation
Richardson extrapolation estimates the limiting solution using results from multiple mesh resolutions.
Assume the leading discretization error follows
For a fine mesh with size and a coarser mesh with size , the computed values are
Subtracting the two equations gives
Rearranging provides the extrapolated value:
Here, is the fine-grid result and is the coarse-grid result.
12.1 Example
Suppose a calculation gives the following drag coefficients:
| Mesh | Drag coefficient |
|---|---|
| Fine | 1.070 |
| Coarse | 1.080 |
Assume a refinement ratio of and a justified observed order of .
Then
The extrapolated value is approximately .
This estimate depends on the assumed convergence order and error model. It is not automatically a more accurate result if the meshes are outside the asymptotic regime or other errors dominate.
13. Grid Convergence Index (GCI)
The Grid Convergence Index provides a structured way to report an estimate of spatial discretization uncertainty from a mesh-refinement study.
It is commonly based on Richardson extrapolation and an assumed or estimated convergence order.
For a fine mesh with result , a medium mesh with result , and refinement ratio , one common fine-grid GCI expression is
where:
- is the fine-grid result.
- is the medium-grid result.
- is the refinement ratio.
- is the observed or justified convergence order.
- is a safety factor chosen according to the reporting procedure and number of grids.
A commonly used safety factor for a three-grid study is , under the relevant GCI procedure and assumptions.
The exact implementation and reporting convention should be stated when publishing a GCI result.
13.1 Example
Using the previous illustrative values,
with
gives
Therefore,
This means the estimated fine-grid discretization uncertainty, expressed as a percentage of the fine-grid result, is approximately under the stated assumptions.
It does not mean that the total simulation error is .
13.2 Limitations of GCI
GCI should be used with care when:
- Mesh refinement is not systematic.
- Results oscillate rather than converge monotonically.
- The observed order is unreliable.
- The mesh levels are too coarse to be in the asymptotic range.
- Iterative or temporal errors contaminate the comparison.
- Turbulent quantities have large sampling uncertainty.
- Important local features are under-resolved despite a stable global quantity.
A GCI estimate for drag does not establish the uncertainty in every velocity, pressure, or temperature field.
14. Time-Step Refinement
Transient CFD introduces both spatial and temporal discretization error.
A solution may appear stable on a fixed mesh while changing significantly when the time step is reduced.
For a time-step study, keep the mesh and physical setup fixed and calculate the same quantity using several time steps.
For example,
Compare the results after ensuring that each simulation covers the same physical time interval and uses a consistent averaging procedure.
14.1 Example: Vortex shedding
For flow past a cylinder, relevant quantities may include:
- Mean drag coefficient.
- RMS lift coefficient.
- Vortex-shedding frequency.
- Strouhal number.
- Pressure distribution.
A large time step can smooth the fluctuating lift signal, alter the predicted shedding frequency, or introduce temporal phase error.
The time-step study should compare the same statistically meaningful quantities rather than only comparing instantaneous contours at arbitrary times.
14.2 Courant number
For a simple one-dimensional convective transport problem, the Courant number is
where is the transport velocity and is the cell size.
The Courant number relates the distance travelled by the flow during one time step to the cell size.
It is a useful diagnostic, but it is not a universal measure of accuracy or stability. Acceptable values depend on the numerical scheme, physical model, mesh, and solver.
For diffusion, a related dimensionless time-step parameter is
where is thermal diffusivity.
For the one-dimensional explicit forward-Euler discretization of pure diffusion on a uniform mesh, stability requires
This condition is specific to that discretization and problem. It should not be treated as a universal limit for implicit methods or general CFD solvers.
14.3 Separating spatial and temporal error
To assess spatial error, reduce the cell size while keeping temporal error sufficiently small.
To assess temporal error, reduce the time step while keeping spatial error sufficiently small.
For a more complete study, perform both types of refinement and assess whether the two error sources interact significantly.
In transient simulations, also check that the averaging period and statistical convergence are adequate.
15. Validation Against Experimental Data
Verification establishes numerical credibility. Validation examines whether the model predicts the physical system adequately.
The quality of a validation study depends on both the experiment and the simulation.
15.1 Compare equivalent quantities
A meaningful comparison requires equivalent definitions and conditions.
For example, when comparing drag coefficients, ensure that the reference area, characteristic length, reference velocity, and fluid properties are consistent.
The drag coefficient is commonly defined as
where:
- is drag force.
- is the reference density.
- is the reference velocity.
- is the reference area.
Using different reference areas or velocities can create an apparent disagreement even if the force predictions are comparable.
Other important comparisons include:
- Velocity profiles at matching measurement locations.
- Pressure drop across the same section.
- Wall temperature at the same physical position.
- Heat-transfer coefficient using the same definition.
- Time-averaged quantities over comparable intervals.
- Turbulence statistics calculated using compatible definitions.
15.2 Quantitative comparison
For a simulation result and experimental result , the absolute difference is
A relative difference can be defined as
This percentage is unsuitable when the experimental reference is zero or very close to zero.
For a spatial profile, use an appropriate set of sample locations and report a suitable error norm, rather than relying exclusively on visual overlay.
15.3 Agreement does not prove the model is correct
A simulation may agree with one experiment because of compensating errors.
For example, excessive numerical diffusion and an unsuitable turbulence model may partially offset each other for one observable.
That agreement may not persist at another Reynolds number, geometry, or boundary condition.
Confidence increases when the model is tested against several relevant quantities and operating conditions.
15.4 Validation requires uncertainty awareness
Experimental measurements have uncertainty, and CFD predictions have numerical and modelling uncertainties.
If the simulation and experiment differ by less than their combined uncertainty, the difference may not be statistically meaningful.
However, the exact interpretation depends on how the uncertainties are defined, whether they are independent, and whether they represent comparable quantities.
A validation report should describe the reference data, uncertainty estimates, comparison method, and limits of the conclusion.
16. Uncertainty Quantification
Verification and validation are related to uncertainty quantification, but they are not the same activity.
Uncertainty quantification (UQ) studies how uncertainty in inputs, numerical approximations, and models affects predicted outputs.
16.1 Sources of uncertainty
A practical classification includes:
- Numerical uncertainty: Uncertainty associated with discretization and incomplete numerical convergence.
- Input uncertainty: Uncertainty in boundary conditions, material properties, geometry, and other inputs.
- Experimental uncertainty: Uncertainty in the measurements used as reference data.
- Model-form uncertainty: Uncertainty caused by simplifying assumptions and imperfect physical models.
These categories may interact and should not automatically be treated as independent.
16.2 Sensitivity analysis
Sensitivity analysis investigates how changes in inputs affect an output.
Suppose the predicted pressure drop depends on viscosity , inlet velocity , and pipe diameter :
A local sensitivity to an input parameter can be estimated using a finite difference:
This estimate is meaningful only when the perturbation is chosen appropriately and the numerical noise is sufficiently small.
Sensitivity analysis can identify parameters that deserve better measurement or more careful modelling.
16.3 First-order uncertainty propagation
For an output depending on several uncertain inputs , a first-order uncertainty estimate for independent inputs is
where is the standard uncertainty of input .
For correlated inputs, covariance terms must also be included.
This approximation assumes that a local linearization is adequate. Strong nonlinearities, discontinuities, or large input uncertainties may require methods such as Monte Carlo simulation or other sampling-based techniques.
16.4 Do not confuse uncertainty with error
Error is the difference between a result and a reference value, when that reference is known.
Uncertainty characterizes the range of values reasonably associated with a result or measurement under stated assumptions.
In real CFD applications, the exact physical answer is often unknown. Therefore, uncertainty estimates and validation evidence are essential for assessing confidence in predictions.
17. A Practical Verification and Validation Workflow
A disciplined workflow makes CFD projects more defensible and reproducible.
Step 1: Define the engineering question
Specify the quantities you need to predict.
Examples include:
- Pressure drop through a component.
- Maximum temperature in a data centre.
- Drag coefficient of a hydrofoil.
- Heat-transfer rate in a fixed-bed reactor.
- Vortex-shedding frequency behind a cylinder.
The required accuracy should be linked to the engineering decision.
Step 2: Check the physical model
Document:
- Governing equations.
- Physical assumptions.
- Material properties.
- Boundary and initial conditions.
- Turbulence or multiphase models.
- Simplified or neglected physical effects.
Check dimensions and units.
Step 3: Verify simple cases
Start with analytical solutions or established benchmarks.
Test boundary conditions, source terms, fluxes, and solver behaviour before applying the method to a complicated geometry.
Step 4: Establish iterative convergence
Monitor residuals, relevant physical quantities, and conservation errors.
Use sufficiently strict criteria that iterative error does not dominate the refinement study.
Step 5: Perform spatial refinement
Run at least three systematically refined meshes when practical.
Compare the same quantities, estimate convergence behaviour, and report any limitations.
Step 6: Perform temporal refinement
For transient simulations, compare multiple time steps while keeping the physical conditions and sampling intervals consistent.
Step 7: Evaluate conservation
Check mass balance and, where relevant, energy balance and other conserved quantities.
Investigate unexplained imbalances instead of relying only on solver completion.
Step 8: Validate against relevant reference data
Compare numerical predictions with analytical solutions, benchmark results, or experimental measurements as appropriate.
State the reference conditions and uncertainty.
Step 9: Quantify uncertainty and limitations
Identify the dominant sources of numerical and physical uncertainty.
Avoid claiming more accuracy than the evidence supports.
Step 10: Document the calculation
Record the mesh, solver settings, schemes, boundary conditions, convergence criteria, software version, and post-processing methods.
A result that cannot be reproduced is difficult to assess or build upon.
18. Applying Verification and Validation in OpenFOAM
OpenFOAM provides tools for solving a wide range of CFD problems. However, using a mature solver does not eliminate the need for verification and validation.
18.1 Inspect the setup
Before running a case, check the relevant configuration files.
| File | Main purpose |
|---|---|
constant/physicalProperties or other model-specific property files | Material and physical properties |
constant/polyMesh/ | Mesh geometry and topology |
system/blockMeshDict | Block-mesh definition, when applicable |
system/fvSchemes | Spatial and temporal discretization schemes |
system/fvSolution | Linear solvers, tolerances, and algorithm settings |
0/ or another initial-time directory | Initial fields and boundary conditions |
controlDict | Solver execution, time controls, and output settings |
Exact filenames and directory structures vary by OpenFOAM version, solver, and selected physical models.
18.2 Monitor solver behaviour
Use the solver output to examine:
- Residuals for the relevant fields.
- Continuity errors.
- Time-step and Courant-number information for transient cases.
- Whether the monitored physical quantities stabilize.
- Whether the solution develops unexpected nonphysical values.
A successful solver exit code is not a validation result.
18.3 Check the mesh
Use the mesh-checking utilities available in your installation, such as checkMesh.
Investigate:
- Negative cell volumes or invalid topology.
- Excessive skewness.
- Non-orthogonality.
- Poorly shaped cells.
- Unexpected boundary patches.
- Mesh resolution in boundary layers, wakes, and high-gradient regions.
A mesh can pass basic geometric checks and still be insufficiently refined for the physics of interest.
18.4 Use appropriate post-processing
Choose diagnostics according to the engineering question.
For example:
forcesorforceCoeffsfor forces and coefficients.- Surface and patch integrations for fluxes.
- Sampling tools for velocity or temperature profiles.
- Field statistics for mean and fluctuating quantities.
- Time-series analysis for periodic behaviour.
Available function objects and their settings depend on the OpenFOAM version and case configuration.
Always verify the definitions, dimensions, reference values, and sign conventions used by post-processing tools.
18.5 Example: Flow past a cylinder
For a cylinder-flow simulation, a useful verification and validation plan could include:
- Check mesh quality and boundary locations.
- Confirm the inlet velocity, fluid properties, and Reynolds number.
- Monitor residuals and mass conservation.
- Refine the mesh and compare mean drag.
- Refine the time step and compare lift fluctuations.
- Confirm that the transient record is long enough to estimate periodic quantities.
- Calculate the Strouhal number using a clearly defined shedding frequency.
- Compare drag, lift, and shedding behaviour with appropriate reference data.
- Report numerical uncertainty and remaining limitations.
The Reynolds number is
For a periodic vortex-shedding signal, the Strouhal number is
where is the shedding frequency, is the cylinder diameter, and is the chosen reference velocity.
The definitions of and must match those used by the reference data.
This example illustrates how verification, convergence assessment, and validation work together.
19. Common Mistakes in CFD Verification and Validation
Mistake 1: Treating solver completion as proof of correctness
A solver can finish with an incorrect setup or inadequate resolution.
Better practice: Inspect the physics, numerical setup, conservation, and quantities of interest.
Mistake 2: Reporting residuals without physical diagnostics
Residuals describe algebraic convergence, not the complete accuracy of the physical prediction.
Better practice: Monitor residuals together with mass balance, energy balance, and engineering quantities.
Mistake 3: Comparing only two meshes
Two meshes may suggest that a result is stable, but they provide limited evidence about the convergence trend.
Better practice: Use three systematically refined meshes when practical, and report the observed behaviour.
Mistake 4: Refining the mesh and changing the numerical scheme simultaneously
If multiple settings change, the reason for a difference becomes unclear.
Better practice: Change one principal factor at a time when isolating numerical error.
Mistake 5: Assuming a formally second-order method is always second-order accurate
The actual observed order can be lower because of boundaries, irregular meshes, insufficient refinement, nonsmooth solutions, or other errors.
Better practice: Estimate convergence behaviour and explain deviations.
Mistake 6: Confusing mesh independence with physical accuracy
A result can be stable under mesh refinement but disagree with experiments because of model-form error.
Better practice: Combine numerical verification with relevant validation evidence.
Mistake 7: Comparing inconsistent experimental and CFD quantities
Different reference areas, averaging periods, or boundary conditions can create misleading discrepancies.
Better practice: Match definitions and operating conditions before comparing values.
Mistake 8: Ignoring statistical convergence in turbulent simulations
A short time record may produce unreliable mean and RMS quantities even when the solver is numerically stable.
Better practice: Examine the time series, averaging interval, and sampling uncertainty.
Mistake 9: Reporting too many decimal places
Numerical output may contain many digits without supporting that level of accuracy.
Better practice: Report precision consistent with numerical uncertainty, experimental uncertainty, and the engineering purpose.
20. Mini Project: Verify a One-Dimensional Heat-Conduction Solver
This mini project brings together the concepts from Modules 3–9.
Objective
Implement or reuse a one-dimensional steady heat-conduction solver and demonstrate that its result is numerically credible.
Physical problem
Consider a slab of length with constant thermal conductivity , no internal heat generation, and prescribed boundary temperatures.
The governing equation is
The boundary conditions are
The exact solution is
Task 1: Choose a baseline
Specify:
- Slab length.
- Thermal conductivity.
- Left and right boundary temperatures.
- Number of cells.
- Numerical discretization.
- Linear solver and stopping criteria.
Use consistent units.
Task 2: Compare with the analytical solution
Calculate the numerical temperature at cell centres and evaluate the exact solution at the same locations.
Calculate:
- Maximum absolute error.
- Root-mean-square error.
- Heat flux at both boundaries.
Task 3: Refine the mesh
Use at least three mesh resolutions, for example:
Record the error and the computed heat flux for each case.
Task 4: Estimate the convergence order
If the errors are nonzero and decrease monotonically according to the assumed power-law model, estimate
Here, is the ratio of the coarse and fine characteristic mesh sizes. Ensure that the error definition is consistent between meshes.
Task 5: Check conservation
Compare the heat flux at the two boundaries.
For steady conduction with no internal heat generation, the heat-transfer rate should be constant through the slab.
Task 6: Document the evidence
Create a small report containing:
- Problem definition and assumptions.
- Analytical solution.
- Numerical method.
- Mesh sizes.
- Error table.
- Heat-flux balance.
- Convergence plot.
- Estimated convergence order, where appropriate.
- Limitations and conclusions.
Expected outcome
You should be able to explain not only whether your numerical solution matches the analytical solution, but also how the error changes with mesh refinement and whether the heat balance is satisfied.
This is more valuable than presenting a temperature contour without quantitative evidence.
21. Suggested Project Structure
A reproducible numerical verification project could use the following structure:
heat-conduction-verification/
├── README.md
├── CMakeLists.txt
├── src/
│ └── main.cpp
├── tests/
│ └── analytical_solution_test.cpp
├── cases/
│ ├── mesh_020/
│ ├── mesh_040/
│ └── mesh_080/
├── scripts/
│ ├── run_study.py
│ ├── compare_analytical.py
│ └── plot_convergence.py
└── results/
├── error_table.csv
├── heat_flux_table.csv
└── convergence_plot.png
The exact structure is flexible. The important principle is to separate the numerical implementation, test cases, analysis scripts, and generated results.
Record the software version, input parameters, and commands required to reproduce the results.
22. How to Present Verification Results Professionally
A technical report should state the evidence rather than simply claiming that the simulation is accurate.
A useful summary table is:
| Check | Evidence to report |
|---|---|
| Physical model | Governing equations and assumptions |
| Implementation | Analytical or manufactured-solution tests |
| Iterative convergence | Residual history and monitored quantities |
| Conservation | Mass and energy balance |
| Spatial resolution | Mesh sizes and refinement trends |
| Temporal resolution | Time-step study for transient cases |
| Validation | Comparison with relevant reference data |
| Uncertainty | Estimated numerical, input, and measurement uncertainties |
| Reproducibility | Software version, case files, and execution procedure |
For example, instead of writing:
The simulation was validated because the residuals converged.
Write a more specific conclusion:
The numerical solution was compared against the analytical temperature field. The error decreased under systematic mesh refinement, and the heat fluxes at the two boundaries agreed within the reported numerical tolerance. These checks support the numerical verification of the selected test problem. They do not, by themselves, validate a more complex physical model.
This wording distinguishes the evidence obtained from the conclusions that can reasonably be drawn.
23. Key Takeaways
- A converged CFD calculation is not necessarily an accurate prediction.
- Verification asks whether the mathematical equations are solved correctly.
- Validation asks whether the mathematical model represents the physical system adequately.
- Analytical benchmarks and manufactured solutions provide strong verification tools.
- Error norms quantify differences that visual inspection may miss.
- Conservation checks are essential, but conservation alone does not prove accuracy.
- Residuals should be interpreted alongside monitored quantities and physical balances.
- Mesh and time-step refinement help assess discretization error.
- Richardson extrapolation and GCI provide estimates under specific convergence assumptions.
- Experimental comparisons must use consistent definitions and account for measurement uncertainty.
- Numerical, input, experimental, and model-form uncertainties are distinct.
- Reproducibility is part of credible engineering simulation.
24. The Complete First-Principles CFD Learning Path
This module completes the current nine-module sequence.
| Module | Subject | Main question |
|---|---|---|
| 1 | Mathematical foundations | What mathematical tools describe continuous fields? |
| 2 | Physics and governing equations | What physical laws govern the flow and transport? |
| 3 | Discretization from scratch | How do continuous derivatives become discrete approximations? |
| 4 | Algebraic systems and numerical solvers | How are the resulting equations solved numerically? |
| 5 | Finite Volume Method | How do control-volume flux balances produce conservative equations? |
| 6 | Transient numerical methods | How is the evolution of a physical system represented in time? |
| 7 | Convection, transport, and numerical stability | How do numerical schemes handle transport without unacceptable oscillations or diffusion? |
| 8 | Fluid-flow solvers and pressure–velocity coupling | How are velocity and pressure calculated consistently for incompressible flow? |
| 9 | Verification, validation, and numerical quality | What evidence supports the accuracy and credibility of a CFD prediction? |
The modules form a connected learning path: physics leads to equations, equations lead to discrete systems, numerical methods produce a solution, and verification and validation establish the evidence needed to assess that solution.
25. What Comes Next?
Understanding numerical methods is the foundation. The next step is to apply them repeatedly in practical projects.
A strong progression is to:
- Implement simple numerical methods independently.
- Test them against analytical solutions.
- Automate mesh and time-step studies.
- Compare predictions against trusted benchmark data.
- Use OpenFOAM or another CFD package for more complex physical systems.
- Document assumptions, uncertainties, and limitations.
- Build a reproducible portfolio that demonstrates both technical results and the reasoning behind them.
The goal is not merely to obtain a converged simulation. It is to understand why the numerical result should be trusted, what it can predict, and where its limitations remain.