- CFD codes use iterative approach to solve the solution matrix.
- Consider a CFD solution of Heat conduction in a 1D bar without a heat source.
- The solution matrix for a bar with 5 cells
Heat flux gradient, Temperature & Heat source
-
The Matrix equation for residual is defined as
-
Once the Temperature field is calculated, each value can be substituted and the residuals can be obtained.
-
As , the solution gets more accurate.
-
From the matrix definition, the residual is vector give the local error in each cell.
-
Note that the residual has the same units as the quantity calculated by the solution algorithm.
-
In general
Representative Residual
The residual vector contains the error for every cell in the mesh, making it impractical to monitor against iteration. A representative residual is a scalar that represents the residual for all cells in the mesh.
Three Norms for Calculating Residuals
1. Norm
-
Also known as the mean of all residual components
-
Has no bias
2. Norm
-
Mean magnitude of all components of the residual vector
-
Approximately equivalent to RMS (Root Mean Square)
-
Biased towards large values
-
Magnifies the effect of a few bad cells on the representative residual
3. Norm
-
Takes the maximum of the residual vector