
PIPE AND OPEN-CHANNEL FLOWS 165
Boundary conditions require that velocity vanishes at solid walls and shear stress
is zero at the free surface, or, mathematically,
U = 0atY = 0andatZ = 0 and 1 (3.4.4)
∂U
∂Y
= 0atY = 1 (3.4.5)
For a numerical solution a square grid system is set up to cover the region
occupied by the fluid in the Y -Z plane. With the grid size h = 0.05, we obtain
21 (= m) vertical grid lines and 21 (= n) horizontal grid lines. Because of the
derivative boundary condition (3.4.5), a fictitious horizontal line is needed at
a distance h above the free surface. Comparing (3.4.3) with the generalized
form (2.8.1) of the Poisson equation, we can write down its finite-difference
computational scheme based on the successive overrelaxation formula (2.8.13):
U
i, j
= (1 −ω)U
i, j
+
ω
4
U
i−1,j
+U
i+1,j
+U
i,j−1
+U
i,j+1
+h
2
(3.4.6)
Here the superscripts used in (2.8.13) to indicate the number of iterations are
omitted; they are not needed if in each iteration (3.4.6) is applied successively at
interior points starting from the lower left corner of the grid. The optimum value
for the relaxation parameter ω is determined according to (2.8.14).
In index notation the boundary conditions (3.4.4) become
U
i,1
= 0, i = 1, 2, ..., m (3.4.7)
U
1, j
= U
m, j
= 0, j = 1, 2, ..., n (3.4.8)
After replacing the derivative in (3.4.5) by its central-difference approximation,
the derivative boundary condition is reduced to
U
i, n+1
= U
i, n−1
, i = 2, 3, ..., m − 1 (3.4.9)
In the program to follow the conditions (3.4.7) and (3.4.8) are assigned at the
beginning and are kept the same for all iterations, while (3.4.9) is used in the
computation of (3.4.6) in every iteration whenever j reaches the value n.
Knowing the velocity distribution across a section, we can calculate the vol-
ume of fluid passing through the channel per unit time. Let the solid lines in
Fig. 3.4.2 represent schematically the grid system covering the channel cross
section. Dashed vertical and horizontal lines are then drawn to bisect the solid-
line square meshes.
At each of the grid points marked at the intersections of solid lines, the dimen-
sionless velocity U is either given or computed. These points may be grouped
into three categories according to their locations: the interior points, the bound-
ary points, and the corner points, as indicated in Fig. 3.4.2. For small mesh sizes
we may assume that the velocity in the shaded area containing a grid point is
approximately the same as that at the point itself. As shown in the figure, the
shaded small area for an interior point is of magnitude h
2
, that for a boundary