5.4 Residual

In Sec. 5.3 , we established a criterion for convergence of the Gauss-Seidel method. We now need a way to estimate a level of convergence to determine when to stop iterating.

The analysis of convergence centred on the solution error eqn, introduced in Sec. 5.2 . In practice, eqn cannot be determined since the exact solution is unknown. Instead the residual provides a measure of the accuracy of the solution. The residual vector eqn represents the change to the solution of the equation, required to make eqn exact, according to

r = A ex A = b A ; \relax \special {t4ht=
(5.10)
where eqn.
For the remainder of this chapter, the matrix notation eqn is replaced by eqn, equivalent to vector notation with an eqn tensor eqn.

The vector eqn (of size eqn) provides one value per matrix row, with both positive and negative values. A measure of residual given by a single value, is defined as

 ------kb----A------k--------- r = kA A --k+ kb A -k ; \relax \special {t4ht=
(5.11)
where eqn is the matrix norm, calculated as the sum of the magnitude of each component, e.g. eqn; the mean value of eqn over all cells is denoted by eqn.

The residual eqn provides a measure of error in the solution of eqn, rather than the absolute error eqn. It is divided by the norms of eqn and eqn to reduce its dependency on the scale of the geometry and solution variable. By reducing its scale-dependency, eqn can be used to compare the level of error equitably between simulations at different scales.

PICT\relax \special {t4ht=

The figure above shows eqn calculated from Eq. (5.11 ) following successive sweeps of the Gauss-Seidel method (starting from the initial eqn). The graph uses a logarithmic vertical scale since the values of eqn extend over 4 orders of magnitude.

Tolerance

CFD software generally provides the following controls to stop the iterative solver:

  • absolute tolerance eqn ;
  • relative tolerance eqn .

Sweeping ceases if either tolerance condition is satisfied: eqn; or eqn, where eqn is the initial residual within the particular solution step. The eqn criterion is often deactivated by setting eqn, especially for transient simulations when sufficient accuracy is required at every solution step.

Notes on CFD: General Principles - 5.4 Residual