
6.10 WORKED EXAMPLES OF THE SIMPLE ALGORITHM 209
a fortunate choice of initial velocity and pressure fields). For example, the
discretised momentum equation at node 1 in the next iteration is
1.20425u
1
= 1.98592
The difference between the left and right hand sides of the discretised
momentum equation at every velocity node is called the momentum
residual. Substituting the current velocity value of u
1
= 1.78856 yields:
u-momentum residual at node 1 = 1.20425 × 1.78856 − 1.98592 = 0.16795
If the iteration sequence is convergent this residual should decrease to show
an improving balance between the computed velocity and pressure fields.
Ideally, we would like to stop the iteration process when mass and momen-
tum are exactly balanced in the discretised pressure correction and momen-
tum equations. In practice, the finite precision of number representation
in computing machinery would make this impossible and, even if it were
possible to compute with very high precision, this would take far too much
computing time. Our aim is to truncate the iterative sequence when we are
sufficiently close to exact balance that further improvement is of limited
practical value.
We calculate momentum residuals at all velocity nodes and monitor the
sum of absolute values of the residuals as an indication of satisfactory progress
of the calculation sequence. We note that residuals can be positive as well
as negative. Using the sum of absolute values prevents spurious indication
of convergence due to cancellation between positive and negative contribu-
tions. We accept the solution when the sum of absolute residuals is less than
a predetermined small value (say 10
−5
). It should be noted that this is a weak
test to determine the point where the iterative sequence can be truncated.
A decreasing sum of residuals could be due to residuals that decrease by
roughly the same amount at every node or due to a small number of decreas-
ing residuals in conjunction with others that do not decrease much at all. In
a grid with a large number of nodes a few increasing residuals might even
be hidden amongst a much larger number of strongly decreasing residuals.
Nevertheless, summed residuals calculations are routinely used as conver-
gence indicator in fluid flow calculations. For a further discussion of the use
of residuals and iterative convergence the reader is referred to Chapter 10.
Application of under-relaxation factors of 0.8 for both u and p and allowing
a maximum sum of absolute momentum residuals of 10
−5
yields convergence
in 19 iterations. The solution is given in the table below
Converged pressure and velocity field after 19 iterations
Pressure (Pa) Velocity (m/s)
Node Computed Exact Error (%) Node Computed Exact Error (%)
A 9.22569 9.60000 −3.9 1 1.38265 0.99381 39.1
B 9.00415 9.37500 −4.0 2 1.77775 1.27775 39.1
C 8.25054 8.88889 −7.2 3 2.48885 1.78885 39.1
D 6.19423 7.50000 −17.4 4 4.14808 2.98142 39.1
E0 0 –
Solution
ANIN_C06.qxd 29/12/2006 09:59 AM Page 209