
12.2 Relaxation Methods 287
number of steps needed to get to the boundary point with value B
i
and N
T
=
N
i=1
N
i
is the total number of steps. The accuracy increases as N
−4
T
, but clearly many, many
steps must be taken.
6. Write the N algebraic equations in N unknowns, and use a traditional algebraic
solver. The algebraic equations are sparse, which helps, but the fact that the matrix
of the coefficients is not narrow-banded means that special methods tailored to such a
problem must be used. These and other procedures can be found in much more detail
in Smith (1978), for example.
In the preceding, attention has been paid only to the case where boundaries are
rectangular, a fairly restricted case. For irregular boundaries, one could rephrase equation
(12.2.1) in a mesh of unequal sides, but then a good part of the computational problem
is to determine which boundary point you are near and which variation of equation
(12.2.1) is needed. Also, near corners, where changes in the solution can be rapid,
accuracy can be lost unless the grid mesh is shrunk. Two (at least) methods have been
introduced to overcome this problem.
The ideas of conformal mapping introduced in Chapter 3 are ideally suited to
generate grids to fit boundaries of any shape. Thomson, Warsi, and Mastin (1985)
present techniques useful in both two and three dimensions for computer generation
of grids for all three classes of partial differential equations. Basically, they use the
conformality of analytic functions to map the flow space into a rectangle. Control
functions can be used to adapt the grid spacing so that spacing is small and cell count
denser where the gradient of the function can be expected to be large. After the space is
transformed to the rectangle, the equations of interest are also transformed to the new
coordinate system and then solved.
The finite element method (FEM, also sometimes FEA for finite element analysis),
introduced for one-dimensional problems in Chapter 11, can also be adapted to two- and
three-dimensional problems. Programs usually come as a package, including grid gener-
ation and solvers. Grid generation is to some degree usually automatic, with provisions
for intervention by the user where refinements in the grid are needed. Elements used
can be rectangular, triangular, semi-infinite, and a variety of others. The polynomials
used on the sides of the elements vary in complexity, depending on the accuracy and
order of the derivatives needed.
FEM was originally developed for solution of problems in the linear theory of elas-
ticity, where the equations are strongly elliptic. In elasticity theory energy is conserved,
and only the “laminar” state exists. Thus, one would expect that, unless special provi-
sions are made for fluid flow problems, there would be a Reynolds number limitation
on computational accuracy. Upwind differencing, described later, has made it possible
to extend this limitation somewhat, and great claims have been made for the commer-
cial programs. Many even claim to handle turbulent flows. However, since many of
the companies are secretive as to how Reynolds number limitations and turbulence are
treated, it is difficult to assess their claims.
FEM programs can be used for irrotational flows with cavities. A simple approach
is to first estimate the shape of the cavity, then correct the shape to make it tangent
to the computed velocity. In the process, all nodes on the cavity are moved by the
process. It is to be repeated until some error norm such as
all cavity nodes
y
new
−y
old
2
is less than some value. Other methods for cavity flows have been suggested (e.g.,
Brennen, 1969).