Code and Solution Verification deal with numerical errors and uncertainties. Therefore, it is essential to define what are numerical errors and numerical uncertainties. In these pages we follow the definitions of Roache:

  • A numerical error e(Φ) is the difference between the approximate solution Φnum and the truth/exact Φexact solution. It has a sign (positive or negative) and it requires the knowledge of the “truth”e(Φ)=ΦnumΦexact .
  • The numerical uncertainty U(Φ)  defines an interval that should contain the truth/exact solution typically 95 out of 100 times that it is estimated. It is defined with a ∓ sign and it is naturally related to the estimation of the numerical error, Φnum-U(Φ) ≤ Φexact ≤ Φnum-U(Φ) .

The numerical error has several contributions:

  • Round-off error that is a consequence of the finite precision of computers. The “truth” for the determination of the round-off error is the solution of the same discrete problem (not the original problem) obtained in a machine with infinite precision that does not exist. Therefore, assessing round-off errors typically involves the comparison of solutions of the same discrete problem obtained with single, double and quadruple precision.
  • Iterative errors are present in steady flow solutions and implicit time integration of unsteady flows. They are mainly a consequence of the non-linearity of the system of equations solved in CFD. However, in many CFD solvers, it normally involves several contributions:
    • Linearization of the convective terms of the transport equations (Picard or Newton are the most usual techniques);
    • Segregated solutions of the different partial differential equations included in the mathematical model. For example, continuity and momentum equations solved with quantities defined by the solution of the previous iteration of the turbulence closure model;
    • Discretization schemes using deferred corrections to achieve second (or higher) order accuracy, which is very common in the finite volume technique;
    • Iterative methods applied to the solution of the linear systems of equations that are solved for each non-linear iteration.
  • The typical quantities used to assess the magnitude of iterative errors are the normalized residuals of the discrete equations and/or the differences between the dependent variables obtained in consecutive iterations. Although these quantities are related to the iterative error, none of them quantify the level of the iterative error. The “truth” for the determination of the iterative error is a solution of the discrete problem (not the original problem) with the residuals and changes between consecutive iterations reduced to machine accuracy (assuming that round-off errors are negligible when compare to iterative errors). Such requirement is often too expensive (or impossible to achieve) and so there are techniques proposed in the open literature to estimate iterative errors based on the (iterative) convergence history of differences of the dependent variables obtained in consecutive iterations.
  • Statistical errors exist in unsteady flow simulations that start from incorrect initial conditions, i.e. from flow fields that do not satisfy the transport equations. In such conditions, the simulation time has to be sufficiently long to eliminate the effect of the initial condition. If the solution is periodic (or tends to a steady state), it is not difficult to assess statistical errors. The “truth” for the determination of the statistical error will correspond to the simulation time required to achieve a periodic flow field (or steady state) of the discrete problem (not the original problem). However, checking periodicity is related to the iterative error convergence at each time step and so ideally the “truth” should be determined with negligible contributions of the iterative error at each time step. On the other hand, assessing statistical errors in flows that are not periodic (or tend to a steady state) is an open question.
  • Discretization errors are a consequence of the approximations made to the system of partial differential equations to convert them into a system of algebraic equations. Unlike all the previous sources of numerical error, the “truth” for the determination of the discretization error is the exact solution of the original system of partial differential equations. In carefully done simulations, the numerical error is dominated by the discretization error, which can have three different contributions:
    • Approximation of the geometry of the boundaries of the domain.
    • Approximation of the space derivatives/integrals included in the system of partial differential equations.
    • Approximation of the time derivatives/integrals included in the system of partial differential equations.
  • The first two contributions are usually called the space discretization error. Naturally, the time discretization error only exists in unsteady flows. On the other hand, there are applications to simple geometries where the geometric component of the space discretization error does not exist.