3.11 Example
67
start with results obtained using uniform grid with 11 nodes (10 equal subdivisions). The profiles of $(x) obtained using CDS and UDS for convection
and CDS for diffusion terms are shown in Fig. 3.8.
The UDS solution is obviously over-diffusive; it corresponds to the exact
solution for Pe M 18 (instead of 50). The false diffusion is stronger than the
true diffusion! On the other hand, the CDS solution exhibits severe oscillations. The oscillations are due to the sudden change of gradient in $ at the
last two points. The Peclet number based on mesh spacing (see Eq. (3.63))
is equal to 5 at every node.
1 ---- Exact
------------- Calculated
Exact
------------- Calculated
Fig. 3.9. Solution of the 1D convection/diffusion equation at Pe = 50 using CDS
(left) and UDS (right) for convection terms and a uniform grid with 41 nodes
If the grid is refined, the CDS oscillations are reduced, but they are still
present when 21 points are used. After the second refinement (41 grid nodes),
the solution is oscillation-free and very accurate, see Fig. 3.9. The accuracy
of the UDS solution has also been improved by grid refinement, but it is still
substantially in error for x > 0.8.
The CDS oscillations depend on the value of the local Peclet number,
Pe = p u A x / r . It can be shown that no oscillations occur if the local Peclet
number is Pe 5 2 a t every grid node (see Patankar, 1980). This is a sufficient,
but not necessary condition for boundedness of CDS solution. The so-called
hybrid scheme (Spalding, 1972) was designed to switch from CDS t o UDS at
any node at which Pe > 2. This is too restrictive and reduces the accuracy.
Oscillations appear only when the solution changes rapidly in a region of high
local Peclet number.
In order t o demonstrate this, we repeat the calculation using a nonuniform grid with 11 nodes. The smallest and the largest mesh spacings are
Axmi, = XN - ZN-I = 0.0125 and Ax,,,
= x2 - X I = 0.31, corresponding to
67
start with results obtained using uniform grid with 11 nodes (10 equal subdivisions). The profiles of $(x) obtained using CDS and UDS for convection
and CDS for diffusion terms are shown in Fig. 3.8.
The UDS solution is obviously over-diffusive; it corresponds to the exact
solution for Pe M 18 (instead of 50). The false diffusion is stronger than the
true diffusion! On the other hand, the CDS solution exhibits severe oscillations. The oscillations are due to the sudden change of gradient in $ at the
last two points. The Peclet number based on mesh spacing (see Eq. (3.63))
is equal to 5 at every node.
1 ---- Exact
------------- Calculated
Exact
------------- Calculated
Fig. 3.9. Solution of the 1D convection/diffusion equation at Pe = 50 using CDS
(left) and UDS (right) for convection terms and a uniform grid with 41 nodes
If the grid is refined, the CDS oscillations are reduced, but they are still
present when 21 points are used. After the second refinement (41 grid nodes),
the solution is oscillation-free and very accurate, see Fig. 3.9. The accuracy
of the UDS solution has also been improved by grid refinement, but it is still
substantially in error for x > 0.8.
The CDS oscillations depend on the value of the local Peclet number,
Pe = p u A x / r . It can be shown that no oscillations occur if the local Peclet
number is Pe 5 2 a t every grid node (see Patankar, 1980). This is a sufficient,
but not necessary condition for boundedness of CDS solution. The so-called
hybrid scheme (Spalding, 1972) was designed to switch from CDS t o UDS at
any node at which Pe > 2. This is too restrictive and reduces the accuracy.
Oscillations appear only when the solution changes rapidly in a region of high
local Peclet number.
In order t o demonstrate this, we repeat the calculation using a nonuniform grid with 11 nodes. The smallest and the largest mesh spacings are
Axmi, = XN - ZN-I = 0.0125 and Ax,,,
= x2 - X I = 0.31, corresponding to
