10051027, 1994
Pe~nmon
00457930(94)E00140
NUMERICAL
INTRODUCTION
The subject of this paper is the comparison of the flow profiles obtained from the solution of
the twodimensional and threedimensional formulation of the lid driven cavity flow problem.
Two cavity configurations are considered, (1) the unit cavity (square for 2D and cubic for
3D), and (2) the rectangular cavity with an aspect ratio of 2 (rectangular for 2D and
prismatic for 3D). The calculated centerline velocity profile is used as the means for comparing
results obtained from the 2D and 3D calculations.
The paper proceeds by first reviewing a few salient points about Jacobi polynomial collocation. The Jacobi polynomials are a general class of orthogonal polynomials represented
by the notation P(a, b). The specific case of P(0, 0) is the shifted Legendre polynomial often
used as a basis function in spectral collocation techniques. A thorough discussion of the
Jacobi polynomials as applied to the solution of differential equations can be found in
Villadsen and Michelsen [1]. Finlayson [2], discusses the shifted Legendre polynomial in great
detail and Canuto et al. [3] discuss the use of Cbebysbev and Legendre polynomials in spectral
and pseudospectral methods. The Jacobi polynomial method from Ref. 1 is extended to multidimensions in this paper by using a superposition technique. The extended method is called
the spectral difference method [4] and includes the construction of cornerless/edgeless
computational grids.
The pressure problem which is inherent in the primitive variable formulation of the
NavierStokes equations is solved by a newly developed iterative pressure correction algorithm
called the modified compressibility method. The new pressure solver is elaborated on in this
paper. All of the calculations for the lid driven cavity flow problem were performed using
nonstaggerexl grids. The Reynolds number ranged from 100 to 5000 for all of the cavity
configurations considered and the Reynolds number was extended to 10,000 for the twodimensional cavities. The use of the newly developed techniques: the spectral difference
method, the cornerless/edgeless computational grid and the modified compressibility method
provide an efficient approach for the solution of the threedimensional NavierStokes
equations.
1005
1006
A.B. CORTESand
J. D.
MILLER
JACOBI COLLECTION
A function such as d u / d x when expanded using Jacobi polynomials on a grid consisting of five
points will result in a system of coupled equations given by,
du =
m
dx
Fll
FI2
FI5
U!
F2,
U2
FI3
FI4
F3, F32 r .
F34 r .
U3
F41
F,~
U4
F42
F43
F45
(1)
U5
The Fus are the first derivative expansion coefficients. For example, the appropriate expansion for
the second point would be
d~x 2 = F21ul + F22u2 + F23u3 t F24u 4 + F25u 5 .
(2)
Similarly, the function d2u/dx 2 when expanded using Jacobi polynomials on the same computational grid produces the coupled system of equations that is shown below. The Si/s represent
second derivative expansion coefficients. An interesting property of the collocation method is that
the number of collocation points used determines the number of expansion coefficients independent
of the order of the derivatives.
Ul
831
U3
$41
842
$43
S,44 $45
U4
851
S52
S53
S54
U5
all
d2u
dx 2
S55
U2
(3)
The method for obtaining the values of the F~/and S u coefficients is explained in detail by Villadsen
and Michelsen [1] for the general form of the Jacobi polynomial. Finlayson [2] derives the
coefficients for a limited order of the shifted Legendre polynomial, and Canuto et al. [3] provide
a method for obtaining the coefficients of Chebyshev and Legendre polynomials. The computer
codes needed to generate the coefficients are provided in the above references.
A more complicated case wherein the grid is made up of more than one domain is treated below.
Figure 1 shows that the reference computational grid is made up of two subdomains. For
simplicity, impose the condition that the length of the subdomains are equal (ht = hr). The first
subdomain (h0 is composed of points 14 while the second subdomain (hr) is made up of points
47. Point 4 is common to both subdomains and forms the interface. To relate the two
subdomains, a C ' continuity constraint is explicitly imposed on point 4. Consequently, the function
d2u/dx ~ expanded in terms of Jacobi polynomials for the computational grid shown in Fig. 1,
results in,
d2u
dx 2
Ul
Su
S12
Su
S~
S~
S~3
S31
832
S33
$34
F4,
F.~
F43
(Y,lF,,)
U4
S2,
S3~
S4,
U5
Si4
U2
U3
(4)
U6
U7
where F u and S o represents the first and second derivative expansion coefficients. The F u coefficients
represent the C ~ continuity constraint that was imposed on point 4. The onedimensional Jacobi
2
~
1007
problem
dk
J~
J~
hi ~
~ hr
Fig. I. A diseretization grid with two subdomains. The filled square represents the interface point
between the two subdomains.
polynomial expansions will be used as the building block for the multidimensional collocation
method that is developed later on.
As a preliminary test to see if the Jacobi collocation method is suitable for solving the
NavierStokes equations, a onedimensional, unsteady, nonlinear equation shown below, is solved
Ou
1 (92u
dt=Redx 2
au
U~xx.
(5)
(6)
defined in the region  1 ~<x ~< 1. The boundary conditions are u (  1, t) = 0 and u(1, t) = 0. The
Reynolds number is 1/100n, and the solution is calculated for t = 0.5. The computational domain
is not of the form 0 ~<x ~< 1 which is required by the Jacobi collocation method, requiring a
preliminary transformation. Examination of the solution shown in Fig. 2 shows that a very steep
gradient appears in the middle of the domain (0.0 in the original computational domain and 0.5
in the transformed computational domain). This particular problem is a severe test for global
collocation methods since the gradient is located at the point where the collocation grid points are
spread furthest from each other. Basdevant e t al. [6] evaluated several methods based on spectral
and pseudospectral techniques and found that single domain methods are not suitable for this type
of problem even in the presence of very large numbers of interior points. A pseudospectral method
based on a finite element approach using four subdomains, called spectralelements [7], proved
to be the most accurate. Another pseudospectral method developed by Macaraeg and Street [8]
0.5
0.5
I
~.5
0.5
X
Fig. 2. A plot of the solution for the test case u(x, t) =  s i n ( n x )
I/lOOn.
1008
using three subdomains, and a grid stretching technique has been shown to provide very accurate
solutions for this particular test problem.
As part of the initial stage of evaluation, two time integrators were used in solving the test
problem. The first method used is the implicit backward Euler integrator. This technique requires
the formation of a coefficient matrix. Newton's method was used to linearize the resulting coupled
system of equations. An iterative technique called 3D Xprojection developed by Wainwright [9]
was used to solve the system of linear equations. Two subdomains were used (0.5, 0.5), and the
C I constraint was used to relate the two subdomains. Each subdomain contained 61 interior
points. The time step At used 0.001. The Jacobi polynomial was P(l, 1). Crowding 61 interior
points in each of the subdomains created a very stiff system of ODEs requiring the use of small
time steps.
The second approach used the forward Euler time integration scheme. Being explicit, there was
no need to form the coefficient matrix; furthermore, the nonlinearity of the problem was no longer
a consideration. The main disadvantage of this approach is the small time step necessary to
maintain numerical stability. As in the first approach, the resulting system of ODEs was stiff.
Furthermore, the C ~constraint that is needed to relate the subdomains must be imposed properly.
Two subdomains were used (0.5, 0.5) with each subdomain containing 62 interior points. The time
step At was 0.0001 and the Jacobi polynomial used was P(1, 1).
The results of the calculations together with the results reported by other investigators are shown
in Table 1. The results of the calculations indicate that both methods provide accurate results for
the test problem. As mentioned in Ref. 6, the maximum slope is a very good indicator because of
its sensitivity to the numerical algorithm used. The results indicate that the Jacobi polynomial
collocation method can be used successfully and that extending the method to handle multidimensional problems is the next step.
SPECTRAL DIFFERENCE METHOD
Consider the Laplacian, V2u, in two dimensions, d2u/dx2+ 02u/dy2, defined over the region
0 ~<x ~< 1 and 0 ~<y ~< 1. Figure 3 shows a computational grid consisting of three interior points
for each coordinate direction and the two boundary points. The expansion of Wu, centered around
point 13 is obtained by expressing the terms d2u/dx 2 and d:u/dy 2 as finite difference approximations
separately, and then combining the individual expressions to obtain the final finite difference
approximation. Expressing d2u/dx 2 in terms of a central difference approximation gives
(7)
U8   2Ut3 4 U18
l2
Similarly, the term d2u/dy 2, expanded about point 13, gives
UI2 
(8)
k2
If I = k = h, V2u expanded about point 13 reduces to
us + ul2  4ul3 + UI4 "1 U18
h2
(9)
Table I. The maximum slope obtained from the different numerical methods
used in solving Burger's equation
Max.
Method
Domains
Slope
Theoretical [6]
Pseudospectral [6]
Spectral elements [6]
Pseudospectral [8]
Backward Euler
(present work)
Forward Euler
(present work)
1
4
3
2
152.005
142.606
152.04
152.005
151.732
152.08
15.
20
14
19
1009
25
8
13
18
12
17
11
12
17
121
11
120
I0
9
dL
14
23
22
II
6
21
7
18
24
31
8
13
A
W
16
21
A
w
15
119
Fig. 3. An example of a twodimensionalcomputational Fig. 4. A computationalgrid for the twodimensionalspecgrid used in finitedifferencemethods.
tral differencemethod.
With the finite difference procedure as a basis, a new approach that extends the Jacobi
polynomial collocation method to two and threedimensional problems is proposed. Other
investigators have extended spectral and pseudospectral (collocation) methods to two and
threedimensional problems using tensor expansion techniques [3, 10]. Due to the form of the
expansion, the extension of Jacobi collocation to multidimensional problems is called the spectral
difference method. The new method implies that separate onedimensional expansions are to be
performed for each relevant axis and the final form of the expansion is the result of the
superposition of the onedimensional results. To illustrate the spectral difference method, consider
the problem of discretizing the term Wu, in two dimensions. The new method requires that all
interior points be expanded in both directions (x and y) while boundary points can only be
expanded in one direction. The direction of expansion for boundary points is the direction normal
to the coordinate axis where the point lies. A computational grid with 3 interior points and two
boundary points in both coordinate axes is shown in Fig. 4.
The computational grid as shown by Fig. 4 does not have corner points. The figure shows the
points to be equally spaced, for clarity. They should be located at the roots of the chosen Jacobi
polynomial. The points are numbered consecutively in the y direction. To parallel the finite
difference method discussed earlier, the expansion of Wu will be performed on the center point,
point 11 in this case. The onedimensional expansion of a2u/c~x2 is given by
2
S31u
6 6
q ' l l . II
"~'S32/d "~,J33 u
'[
16. 16   q'20. 20
1 ~J35 u .
834u
(10)
The superscripts refer to the position as determined from the grid numbers and the subscripts refer
to the proper expansion coefficients based on onedimensional expansion. The term O2u/Oy2
expands into
9 , 9 L K'IO, 10 t
II 11
31" 7  0 3 2 "
"3 S33u
12
~13.
3L 5 312
4 td .q ~.J35u
13
.
(11)
The function V2u expanded in terms of Jacobi polynomials around point 11 is given below
$21 u2 .31_S62u 6 ..if_
i1
S33u
11
~,16. 16
q,20, 20
q,9,9
Ji ~3414
"3L , J 3 5 ~" ~ 3 1 
A_ q, lO, i0 ~ 1 1 . 1 1
q,12. 12
c l 3 . ,3
T ~J32 u
"T O33U
"~ ~J34 u
"~" ,J35 u .
(12)
Equation 12 shows that an interior point is coupled to 2n,  2 other points, where n, is the number
of points in each of the coordinate axes. The proper expansion for a boundary point is illustrated
below with the expansion made on point 2
(~2H
K"6  6   c, l l . 11
16 16
+ Sl4]d
S ~ u 20.
(13)
1010
mmmmm
(
ummmm
mmmmm
mmmmmm
mmmmm
10
(m
iN
mmmmm
mmmmmm
miNim
mmmmm
mmmmm
i
20
[]
mmmmm
mmmmm
mmmmm
mmmmm
mmmmm
20
15
i
10
Columns
Fig. 5. The sparsity pattern of the coefficientmatrix obtained from the computationalgrid shown in
Fig. 4.
On point 2, the expansion of ~2u/~y2 is not performed. The sparsity pattern for the coefficient
matrix shown in Fig. 4 is illustrated in Fig. 5.
The computational grid for threedimensional problems can be created by straightforward
application of the discretization procedures previously discussed. An example of a three17
3
12 ~
10
22
27
0
28
Layer 1
38
43
13
48
18
Layer2
59
33
23
64
69
51
54
~72
52
70
49
31
34
44
Layer 3
55
60
65
Layer 4
75
78
81
L~verS
Layer 5
Layer1
73
76
79
1011
dimensional grid consisting of three interior points and two boundary points for each of the
coordinate axes is shown in Fig. 6. For clarity, the computational grid is shown as a series of layers
indicating how each of the grid points are arranged. The layers arc numbered starting at the bottom
layer and ending at the topmost layer. The grid points are numbered in the manner shown in Fig. 6.
There is no fixed rule regarding the numbering of the grid points. The numbering scheme used
is just one of the many possible ways of numbering the grid points. The square box represents the
boundaries of the computational domain for each of the layers. For layers numbered 2, 3, and 4,
layers which in some sense could be considered interior layers, the points are distributed in the same
manner as the twodimensional single domain grid as shown in Fig. 4. Layers 1 and 5 can be
thought to represent boundary layers; they do not have points that lie on the boundary represented
by the square line. The resulting computational domain can be viewed as a unit cube which does
not contain any grid points located at the cube edges. This configuration is a generalization of the
twodimensional case where the computational domain is a square without points at the corners.
The function V2u, expanded around point 25, an interior point results in
V2.
i
, l l . II
U[25 ~ O 4 1 U
15. 15
"~ $42u
23. 23   ~ 2 4 .
+$31u
~ 2 0 . 20
$24~5u25
~ 2 9 . 29
~ ~.J43 u
[3L ,.a45u
24
~25.
r ~,32u +,,a3u
25
q,26. 26
q,27. 27
+~,a4u
+~,3su
+ S~I us + q,25.
~,22u25 + S2~u ~ + ~,:4u~67"671o25u"So"
so.
(14)
q ' 5 , 5 ~_ C 2 0 , 20
~41.
41
K'62. 62
~ 7 7 . 77
~..rll~ T J.~12~
"[ J J I 3 / g
"~ ~.~14 u
"31 ~.,15 u
.
(15)
(16)
The boundary point expansions are subject to modification in order to satisfy the boundary
conditions of the problem being solved. The sparsity pattern of the coefficient matrix is shown in
Fig. 7. The coefficient matrix is very sparse
The technique for creating the computational grid for multidimensional problems is now
extended to cases when the computational domain is composed of more than one subdomain. The
example will be twodimensional in nature. Threedimensional multidomain computational grids
are obtained by extending the principles directly.
The example shows a computational grid that is composed of two subdomains in the x direction
and two subdomains in the y direction. This is shown in Fig. 8. The points that belong to the
0
mew
"''.... w....."....
'iiii.
liem
eww
mei
20  .
IWW
mm li w
Be
"w
"w
www
al m
""
.,
w..
w,,
Iow
"'... .....
40
w..
:.:.,
hiei a i m Ram
e
...
.,.
iR a
Unnal
im
..
601.._
Bee
".
".". "~,.,:l.
i w no
iBm
i
Inno
anne
ulmal
"%
80
0
Fig. 7.
mw
Sparsity pattern
..
2O
4O
Colum~
60
80
A. B. CORTESand J. D. MILLER
1012
15
24
33
oomooo
16
25
48
57
66
:I72
39
6)
0
~0.0~00.~
44
D
n
40
49
58
l(
Fig. 8. A computational
grid with two subdomains in the x direction and two subdomains in the y
direction.
overlapping domains are shown as filled squares. Points 3439 are calculated using a C continuity
condition in the x direction. Similarly, the values for points 11, 20, 29, 44, 53, 62 are found by
imposing the C condition along the y direction. As an illustration of multidomain expansion,
consider V2u, expanded about point 9
+
( >z[s:,u=
Vu(, = f
s$49 + s:$41s+
s:;u=+ s::u35]
xl
&
z[s:,u
Yl
s:,u*
g3u9
S$ouO
(17)
s::u].
>
Ft u 44+
F:;u~~ + F:ua
+ Fj:u4 + e5u]
= 0
(18)
S, and Fij refer to the second derivative and first derivative expansion coefficients. The size of the
subdomains are indicated by the symbols, h,, , h,, , and hy2. The resulting sparsity pattern is shown
in Fig. 9.
NAVIERSTOKES
EQUATIONS
afd 1
ar=v=~v*vIIvP,
v.g=o,
(20)
where M is the velocity, Re is the Reynolds number, t is the time and p is the pressure. The
solution to the incompressible NavierStokes equations is difficult due to the absence of an
ome
im
WoooooUO
10 . .am
....
omol0o
lmu
I'."m'iff[[
9.0
It
an
iw
",
~m
wi
".
wire w
n
I.
% "'m
ml
o
mi
n a oo moi
w n . w o. o . . . .
go
oo
w
ommn
wem
mw
gi
o
i
1013
we
w
i
~e n
mo
""
ewee
m Be
m~mm
imlemmoi
me
~alw
rimme
50
. . . .
ei
i1
ell
~
emma
m. i ~. n .
it
BeameD
~i
enoe
mnmal
no
IW
~Will
m i
70
DUal
""i w
0
10
20
30
~O
" ..
I
40
Columns
"" .
I
50
60
70
Fig. 9. The sparsity pattern for the computational grid shown in Fig. 8.
explicit pressure term. Equations (19) and (20) written in terms of primitive variables are as
follows
g=
c~x
Oy
Ow
Ow
Ow
Ow Op
(21)
(22)
The choice of the primitive variable representation implies that the pressure variable must be
taken into account during the calculations. A method introduced by Chorin [11], and used in the
primitive variable formulation is called the artificial compressiblity method or the pseudocompressibility method. In this approach, the continuity equation is modified by appending a time
dependent pressure term. This modification is shown below
ap
c:( au
aw)
at + k,ax + ~yy + ~z _ = 0.
(23)
The variable C 2 is an arbitrary constant. This modification to the continuity equation provides a
means to calculate pressure explicitly at each time step. The disadvantage of this method is that
the solution is guaranteed to be accurate only when steady state is achieved. Prior to reaching
steady state, the solution can violate the continuity equation.
An alternative approach commonly used within the finite element community is the penalty
function technique [12]. The penalty function technique modifies the continuity equation as follows
p + ( Ou Ov Ow)
~x + ~y + ~'z = 0.
(24)
C is an arbitrary large number. This approach allows the accurate solution of pressure at each time
CAF 23/~4:2
1014
step thus making this approach time accurate. The major disadvantage of this approach is that
the system of differential equations tend to become stiff.
Finally, another approach commonly used in primitive variable formulation is the formation of
a pressure equation. This approach provides a time accurate solution but the solution to the
pressure equation is implicit. Furthermore, the correct boundary conditions for the pressure
equation must be supplied. Gresho and Sanni [13] discuss the proper way to implement the pressure
boundary condition.
( Ou av Ow)
P+
2
~x + ~yy
= 0,
(25)
where 2 is typically a small number. Equation (25) looks like equation (24), however, the constant
in equation (25) takes on a small value whereas the constant in equation (24) takes on a large
numerical value. A second stage consisting of pressure correction follows
p,OW= pold + peorrection.
(26)
The algorithm is iterative in nature and is implemented as follows.
Algorithm
1.
2.
3.
4.
(27)
du
av
0w
(28)
(29)
(30)
The algorithm by virtue of its iterative nature, allows for the satisfaction of the continuity
constraint in a controlled manner. Also, since an explicit expression is available for pressure, the
problem of imposing the correct pressure boundary conditions disappears. The degree of fulfilment
of the continuity equation can be monitored through the dilation values.
Preaminary experience with the algorithm indicates that the chosen value of the constant 2 has
a large influence on the time step size At. The algorithm implements the pressure correction as a
direct proportionality with the dilation values. At a given time step, the pressure is corrected by
a certain amount times the value of the dilation at the particular point. If the continuity equation
is satisfied, the dilation vanishes and there is no need for pressure correction. From a calculation
point o f view, the dilation does not go to zero but is maintained as a small number. The use of
1015
direct proportionality for the correction vector may not be the optimal way to update pressure;
this topic requires further investigation. Other iterative schemes have been proposed by Soh and
Goodrich [14], Williams [15], and Ramshaw and Mesina [16].
LID DRIVEN CAVITY FLOW
To test the proposed calculation technique, the lid driven cavity flow problem was chosen as the
test case. Two cavity configurations were chosen, the unit cavity and the rectangular cavity with
an aspect ratio of 2. Calculations were performed for both two and threedimensional cases. The
Reynolds numbers were varied from 100 to 5000 for the two and threedimensional test runs and
extended to 10,000 for the twodimensional cavities. A wide range of Reynolds numbers was used
to verify the suitability of the proposed numerical algorithm. Results are presented in terms of the
centerline velocity profiles. The centerline velocity profile allows for the comparison of results
obtained from two and threedimensional calculations.
The lid driven cavity flow problem solved using a square cavity has been used to validate
numerical algorithms. It has been used to test algorithms using pseudospectral methods [17], finite
element methods [18], and finite difference methods [19] that have been proposed to solve the
NavierStokes problem. It has also been used to test different approaches which have been used
to solve the pressure problem [20].
The cubic cavity problem is the threedimensional analogue of the square cavity problem
Recently, several investigators have published results for high Reynolds number simulations
[21, 22]. The solution to the threedimensional cavity flow problem is very difficult to perform due
to the large amount of computer resources needed.
The rectangular cavity is a variation of the lid driven cavity problem in which the cavity height
is twice as large as the width. The aspect ratio is 2. This configuration has been extensively
investigated by Gustafson and Halasi [23], Gustafson and Halasi [24], and Goodrich et al. [25].
Bruneau and Jourdon [26] provide some unsealed centerline velocity profiles for this type of
configuration. Finally, the rectangular cavity is ideal for testing the multidomain extension to the
spectral difference method discussed earlier.
The prism configuration is the threedimensional analogue of the rectangular cavity. There are
no prior publications of results for this particular configuration.
Figure 10 shows the square and rectangle cavity and Fig. 11 shows the cube and prismatic cavities
that were used in the test problems.
The boundary conditions for the square cavity are
u =v =0
at x = 0 and x = 1
(31)
u=l
aty=l
(32)
at y = 0
(33)
andv=0
u =v =0
Rectangle
Lid m o t i o n
~quare
Lid motion
I I T
I
T
1
I
Fig. 10. Square and rectangle cavity configurations used for the twodimensional test problems.
A. B. CORTESand J. D. MILLER
1016
Prism
Cube
z
Fig. 11. Cube and prism cavity configurations used in the threedimensional test problems.
For the rectangular cavity with an aspect ratio of 2, the boundary conditions are
u =v =0
at x = 0 and x = 1,
u=l
aty=2,
andv=0
u=v=0
a t y =0.
(34)
(35)
(36)
atx0andx=l,
(37)
u=l
at z =1,
(38)
u=v=w=0
at Z 0,
(39)
u=v=w=O
at y = 0 and y = 1.
(40)
andv=w=0
at x = 0 and x = 1,
(41)
u=l
at z = 2 ,
(42)
U=V=W=0
at z = 0,
(43)
u=v=w=O
at y = 0 and y = 1.
(44)
andv=w=0
The square cavity case illustrated in Fig. 10, uses a computational grid that is made up of a single
domain in the x and a single domain in the y axis. The use of a single domain in conjunction with
the Jacobi polynomial expansion is appropriate for this situation. The Jacobi polynomial expansion
clusters points next to the boundaries close together, while the points near the middle of the domain
are spread further apart. The clustering of the points near the boundaries allows for better
resolution of the boundary layers where the velocity gradients are largest. The threedimensional
cubic cavity benefits in the same way.
The rectangular cavity with an aspect ratio of 2 uses a computational grid that has one domain
in the x direction but has two subdomains in the y direction. Likewise, the prism configuration
uses a computational grid that has two subdomains in the z direction and one domain for each
of the x and y direction. Since the rectangular cavity does not have unit dimensions, a mapping
must be performed that will transform the rectangular physical domain into a unit square
computational domain. A corresponding transformation mapping was also performed on the
prismatic cavity. The subdomain approach for the rectangular cavity is appropriate because it
allows placement of ciosely spaced grid points in the interior of the cavity. The larger number of
grid points in the cavity interior will help resolve the more complex flow patterns that exists in these
configurations.
A second order explicit RungeKutta method proposed by Shu and Osher [27] was used as the
time intesrator for the momentum equation in all of the cases that were explored. In order to
1017
L i d d r i v e n c a v i t y flow problem
Table 2. Simulation parameters for the square cavity
Re
At
100
400
1000
2000
5000
10,000
0.02
0.01
0.01
0.005
0.003
0.002
0.00025
0.0015
0.0015
0.0015
0.001
0.0008
10
25
50
70
100
200
n~xn~,
35
35
35
41
47
61
x
x
x
x
x
x
35
35
35
41
47
61
At
100
400
1000
2000
5000
10,000
0.02
0.008
0.01
0.005
0.003
0.002
0.00025
0.0015
0.0015
0.0015
O.OOI
0.0008
15
25
50
70
150
200
x
x
x
At
100
400
1000
2000
5000
0.02
0.01
0.01
0.005
0.003
0.00025
0.0015
0.0015
0.0015
0.001
10
25
50
70
100
n, xn:,xn:
35
35
35
41
47
x
x
x
x
x
35
35
35
41
47
x
x
x
x
x
35
35
35
41
47
n~ x n~
35
35
35
41
47
61
Re
2*35
2*35
2*35
2"41
2*47
2"61
Re
,~
At
100
400
1000
2000
5000
0.001
0.008
0.005
0.004
0.003
0.00025
0.001
0.0015
0.0015
0.001
15
25
50
70
100
nx x nr x n:
35
35
35
41
47
35
35
35
41
47
2*35
2*35
2*35
2"41
2*47
properly compare the results obtained from twodimensional simulations with their corresponding
three dimensional counterparts, the numerical parameters used were made to have identical values
whenever possible. The Jacobi polynomial P(1, 1) was used in all cases. The iterative pressure
correction loop was fixed at four iterations. The rest of the simulation parameters are given in
Tables 25. The values for the constant 2 were chosen so that the step size At could be as large
as possible without experiencing numerical instability. The pressure field was initialized with a value
of zero.
RESULTS AND DISCUSSION
Evaluating the results obtained from the numerical simulation of the different cavity configurations requires careful consideration. The issue that is central to the analysis is the question of the
numerical solution reaching a steady state for a given Reynolds number. The steady state solution
is important for two reasons. The first reason is that it allows comparison of the center line velocity
profile obtained from the proposed algorithm with center line velocity profiles reported by other
investigators. Secondly, a steady state solution allows the comparison of centerline velocity profiles
obtained from two and threedimensional representations of the same physical problem.
If a steady state solution is not achieved for a given Reynolds number, direct comparison of the
centerline velocity profile obtained at the end of the integration period may not be appropriate.
The reason for this is that the resulting velocity profiles are strongly influenced by the numerical
methods used. One procedure that allows centerline velocity profiles to be compared is to use an
averaged velocity profile. This approach is used in comparing the simulation results with measured
experimental data in the case of the cubic cavity.
Thus, the results are given in terms of centerline velocity profile of the u velocity component.
This allows the comparison of results obtained from the numerical simulation of two and
threedimensional cases. If the twodimensional representation of the problem accurately describes
the threedimensional flow, then the centerline velocity profile from the twodimensional calculation must be the same as the centerline velocity profile obtained at the middle of the
threedimensional cavity if a steady state solution exists.
Table 6 provides a summary of results showing whether or not a steady state solution has been
achieved for the various configurations tested at specific Reynolds numbers. For Reynolds number
of 1000 and lower, all tested configurations achieved a steady state solution. In the case of
Table 6. Reynolds numbers at which steady state was achieved
for different cavity configurations
Re
Square
Rectangle
Cube
Prism
1O0
400
1000
2000
5000
I0,000
yes
yes
yes
yes
yes
no
yes
yes
yes
yes
yes
no
yes
yes
yes
yes
no
NA
yes
yes
yes
no
no
NA
1018
A . B . CORTES a n d J. D . MILLER
Rectangle
Square
Re
ID.~xl
100
400
1000
2000
5000
10,000
2.919
8.529
1.474
3.356
6.205
4.127
Table 8. M a x i m u m
lu I /dl~x
10 5
10 5
10 5
10 5
10 5
10 3
1.937
2.056
1.192
3.278
3.695
1.406
x 10 7
10 6
10  7
10  7
10 7
10 4
IDm,,I
2.165
2.945
2.624
4.252
2.261
1.210
x
x
x
lu h  u~lmx
10 5
10 4
10 5
10 5
10 5
10 3
2.960
2.116
7.413
3.054
3.576
5.952
IDa,, I
100
400
1000
2000
5000
2.288
3.391
6.103
1.332
2.838
10  7
10  7
10  7
10 4
Re
10 s
x 10 s
Prism
Ira~ ua[~,,~
10 3
10 5
10 5
10 4
10 3
5.960
1.490
9.685
4.556
3.791
10 s
10 7
10 s
10 5
10 4
IDa,, I
3.304
2.944
2.657
9.063
2.890
I#d~ ~dlm,u
10 s
10 s
10 5
10 4
10 3
8.940
6.929
2.321
2.080
3.974
10 8
10 7
10 6
10 4
10 4
of 1000 and lower, all tested configurations achieved a steady state solution. In the case of
twodimensional cavities, steady state solutions were achieved for Reynolds number as high as
5000. For the cubic cavity, a steady state solution was achieved up to a Reynolds number of 2000.
The prism configuration had a steady state solution only up to a Reynolds number of 1000. This
suggests that the flow patterns in a rectangular cavity are more complex than those found in a
square cavity. The case of the rectangular cavity at Re = 5000 requires some comments. Goodrich
et al. [25] reported that the solution was unsteady. However, our calculations indicated that a steady
state was achieved. To verify our reported results, a second test run with a grid size of 55 2*55
was used. Furthermore, the calculation time was extended to t = 400. The results of the refined
grid confirmed our earlier simulations. The use of two subdomains in the rectangular cavity may
explain the difference in results. The use of two subdomains automatically allocates a lot of very
closely spaced points in the middle portion of the cavity. Examination of the centerline profile
shows that there is a gradient that exists in the middle portion of the rectangular cavity. The
presence of closely spaced grid points in this region may have helped to resolve the flow.
Tables 7 and 8 provide the maximum values of the dilation vector and the maximum velocity
difference for successive time intervals at the end of the integration period. Dilation results were
calculated for all of the grid points including those situated on the boundary. Examination of the
Tables 7 and 8 indicate that the proposed algorithm satisfies the continuity constraint. All
calculations were done using single precision. The use of single precision helped cut down on the
required storage cost of the algorithm. Early computational work indicated that the algorithm was
not adversely affected by the use of single precession. Furthermore, by judicious use of compiler
switches, performance even in the RS6000 was not comprised.
Tables 9 and 10 shows the effect of varying 2 with the number of pressure correction iterations
kept constant. The cavity used was a prism and the Reynolds number was 1000. The time was fixed
at 0.75. The short time represents the early stages of the calculation. It is clear from the two tables
that the largest ). value which allows numerical stability provides better satisfaction of the
continuity constraint. Table 11 shows the effect of increasing the number of pressure correction
loop iterations for a fixed value of 2. The cavity configuration is a prism with Re = 1000 and t = 0.3.
Table 9. The maximum velocity difference and the maxim u m dilation as a function o f different 2 values for a
Prism cavity at Re = 1000, four pressure correction
iterations and t ffi 0.75
,l
t~ ~  ~lm.~
ID~.~I
I~ ~  ~im,,
ID~,~I
0.006
1.127 10 3
5.685 10 2
0.006
1.058 10 3
2.533 x 10 2
0.005
0.004
0.003
0.002
1.142
1.149
1.188
1.499
6.268
8.352
1.082
1.535
0.005
0.004
0.003
0.002
1.260
1.112
1.139
9.843
2.563
3.847
6.006
6.424
x
x
10 3
10 3
IO 3
10 3
x
x
x
x
10 2
10 2
I0 l
I0 I
x
x
x
10 3
10 3
I0 3
I0 4
x
x
x
x
10 .2
10 2
10 2
I0 3
1019
iterations
4
8
12
20
40
80
luI  Ulm~
1.963
1.764
1.794
1.795
1.762
1.860
x
x
x
x
x
x
ID.,I
10 5
10 3
10 5
10 5
10 5
10 5
1.793
8.420
5.118
3.791
1.529
1.310
x
x
x
x
x
x
10'
10 2
10 2
10 2
10 2
10 2
It is clear that better results are obtained as one increases the number of pressure loop corrections.
However, the computational time increases correspondingly.
To verify the validity of the proposed numerical method, the centerline velocity profiles obtained
from the simulation were compared with results reported by other investigators. Figure 12 shows
the centerline velocity profile obtained using a square cavity at a Reynolds number of 1000, with
the centerline velocity profile reported by Ghia et al. [28]. The agreement between the two results
is excellent. Ghia et al. used a finite difference method for their calculations. Figure 13 shows the
centerline velocity profile obtained from a cubic cavity and the profile reported by Ku et al. [29].
The results show excellent agreement between the two results. Ku et al. used a pseudospectral
method with Chebyshev polynomials and a projection method for the calculation of pressure.
Figure 14 shows the averaged velocity profile obtained from a cubic cavity at a Reynolds number
of 3200. The results presented were obtained by averaging the u velocity from 85 to 95 s during
the simulation. The results are compared to the experimentally measured velocity profiles reported
by Prassad and Koseff [30]. It can be seen that the calculated profiles are in very good agreement
with the measured data. Comparison of centerline velocity profiles for the rectangular cavity with
an aspect ratio of 2 are not given since such profiles have not been reported to date.
Figures 1519 present the comparison between the centerline velocity profiles calculated in our
work for the two and threedimensional unit cavities for specific Reynolds numbers. At low
Reynolds numbers, (100), the centerline velocity profiles are almost identical. However, for
Reynolds numbers >400, the centerline velocity profile obtained from the twodimensional
representation of the cavity problem is markedly different from the centerline velocity profile by
solving the three dimensional NavierStokes equations. Figure 20 shows the centerline velocity
=1000
0.8
.~
0.6
0.4
Simulation Results
Ghia, et. aL
0.2
0.5
O.5
u velocity
Fig. 12. Comparison o f the calculated centerline velocity profiles from the numerical simulation and those
reported by Ghia et al. for the square cavity at Re = 1000.
A. B. CORTESand J. D. MILLER
1020
Re = 1000
0.8
0.6
"~ 0.4
0.2
Simulation Results
Ku, et. al.
I
wl''~I
0.5
'
0.5
u velocity
Fig. 13. Comparisonof the calculatedcenterlinevelocityprofilesfrom the numericalsimulationand those
reported by Ku et al., for the cubic cavity at Re = I000.
profile for a square cavity at a Reynolds number of 10,000. No threedimensional profile is provided
at the present due to the length of time needed for such calculations.
Figures 2125 show the centerline velocity profiles obtained from cavities with an aspect ratio
of 2 for both the twodimensional and threedimensional cases. For low Reynolds number
simulations (Re = 100), the centerline velocity profiles are almost identical. This situation changes
when the Reynolds number increases. At Reynolds numbers greater than 400, the two centerline
profiles are very different from each other. This same situation was observed for the case of the
square and cubic cavity profiles. Figure 26 shows the velocity profile from a twodimensional
simulation of a cavity with aspect ratio of 2 at a Reynolds number of 10,000. The corresponding
threedimensional calculations were not performed due to the length of time needed for compuRe= 3200
0.8
.'
0.6
0.4
0.2
Simulation Results, [
Experimental Results I
I
0.5
~I
'
0.5
'
'
'
u velocity
Fig. 14. Comparisonof the averagedcenterlinevelocityprofilewith the experimentallymeasured profile
for a cubic cavity at Re = 3200.
1021
R e = 100
1
0.8
0.6
0.4
O.2
0.5
0.5
Fig. 15. Comparison of the centerlinevelocityprofilesobtained from a square cavity (2D) and a cubic
cavity (3D) at a Reynolds number of I00.
tation. The use of a faster computer would allow such calculations in the future. The rectangular
cavity simulations indicate that the multidomain extension to the spectral difference method is
appropriate.
CONCLUSIONS
The numerical simulation results show that the proposed numerical algorithm is suitable for the
calculation o f the two and threedimensional NavierStokes equations. This was verified by
comparing the results obtained with results reported by other investigators using different
numerical methods. The use o f an averaged velocity allows the comparison between calculated
results and the experimentally measured velocity profiles at high Reynolds numbers.
Re=400
1
0.6
/o
. . . . .
3  D P~mult8
'
O.S
o.5
u veloc/ty
Fig. 16. Comparisonof the centerlincvelocityprofies from a square cavity(2D) and from a cubic cavity
(3D) at a Reynolds number of 400.
1022
~ =10oo
a o~Q mmmmm
0.6
lzl
D Results
D
ill
0.4
0.2
'
0.5
0.5
u wloeity
Fig. 17. Comparisonof the centeflinevelocityprofilesfrom a square cavity (2D) and from a cubic cavity
(3D) at a Reynolds number of 1000.
The use of an explicit integration method coupled with the iterative modified compressibility
method used for pressure update eliminates the need to solve an elliptic partial differential equation,
thus simplifying the calculation procedure. The iterative pressure correction was successful in
satisfying the continuity equations, as can be verified by examining Tables 7 and 8 for dilation
values. Even for cases where a steady state solution was not re.ached, the largest value of the dilation
vector is acceptable. This is particularly noteworthy in light of the fact that the values for ,1. were
chosen so that the largest time step could be taken.
The use of the computational grid which did not have corner points for the twodimensional
cases nor edges for the threedimensional cases was appropriate for the cavity flow problem. The
corner points located at top of the cavity for the twodimensional case is ill defined and usually
Re =2000
1
o l w ~
.
o . ,
0,11
 . . . . . . . . 3  D lh,sults
ss So
u v~W
Lid drivencavity'floWproblem
1023
!).L~ ~ = 5 0 0 0
"
0.8
"
3 D Re.ult
"~
0.4
0.2
'
,~""r:'~
0.5
0
0.5
1
U velocity
Fig. 19. Comparisonof the centerlinevelocityprofilesfroma squarecavity(2D),anda cubiccavity(3D)
at a Reynoldsnumber of 5000.
requires special treatment such as those mentioned by Boyd [31], modification of the boundary
conditions as described by Ku et al. [29], or even the use of a regularized driving force as suggested
by Shen [32, 33]. The absence of corner and edge points completely with this new approach
eliminated this problem.
The spectral difference method used in conjunction with the cornerless/edgcless computational
grid and the modified compressibility method provides an efficient way for solving the multidimensional NavierStokes equations. The following factors contribute to the efficiency of the numerical
method: (1) the superposition technique, allows the onedimensional Jacobi polynomial coefficients
to be precalculated and stored. The multidimensional expansion coefficients are constructed only
when they are needed. The storage penalty for onedimensional coefficients is negligible. (2) The
resulting coefficient matrices for twodimensional and threedimensional expansions are sparse and
Re = 10000
1
0.8
,
2
0.4
0.2
o
0.5
0.5
u velocity
suts
iii
Fig. 20. The velocity profile from a square cavity (2D) at a Reynolds number of 10,000.
0.2
0.4
0.6
0.8
0.5
'
'
u velocity
0.5
3 D Results
1.2
1.4
1.6
1.8
Re = 100
0.5
;I
/ ,,""
......
u velocity
s .P
0.5
'
'
'
'
8  D Resulta
0.2
0.4
0.6
0.8
!1
1.2
1.4
1.6
1.8
Re = 400
0.5
SS
i~
o,,/
II
u velocity
.........
0.5
Results
3  D Results
0.2
0.4
0.6
0.8
!1
1.2
1.4
1.6
1.8
Reffi 1000
~ *" q . q . q ,
.........
u velocity
0.5
2  D Results
3 D Results
0.5
0.4
O.2
0.6
O.8
1:
].S
1.4
Ls
Re=2000
0.2
0.4
0.6
0.8
0.5
r:
u velocity
.........
0.5
2  D Results
3  D Results
r~
1.2
1.4
1.6
1.8
*

0.2
0.4
0.6
0.8
.0.5
u velocity
O.5
'
'
'
'
9.  D Remalt
lo,ooo.
1.4
1.6
1.8
R e = 10000
1026
this property is t a k e n a d v a n t a g e of by operating o n l y o n the nonzero values. (3) The use of the
modified compressibility m e t h o d in c o n j u n c t i o n with a n explicit time integrator makes the whole
algorithm explicit in nature. The m a i n c o m p u t a t i o n a l cost is therefore confined to a m a t r i x  v e c t o r
multiplication o p e r a t i o n (functional evaluation) which is easily optimized for c o m p u t a t i o n a l speed.
The t w o  d i m e n s i o n a l calculations were performed o n a N e X T w o r k s t a t i o n with a 32 M b of
memory. The threedimensional calculations were performed o n a n I B M 320H w o r k s t a t i o n also
with 32 M b of memory. These two machines represent very modest c o m p u t e r resources a n d are
indicative of the efficiency o f this c o m p u t a t i o n a l approach.
AcknowledgementsThe research was supported by the Department of Interior's Mineral Institute program administered
by the Bureau of Mines through the Generic Mineral Technology Center for Comminution under Grant No. G1105149.
In addition, financial support from NSF Grant No. CTS 900406 and DOE Grant No. DE FG22 90PCP0311 is gratefully
acknowledged.
REFERENCES
1. J. ViUadsenand M. L. Micbelsen, Solution of Differential Equation Models by Polynomial Approximation. PrenticeHall,
Englewood Cliffs, New Jersey (1978).
2. B. A. Finlayson, Nonlinear Analysis in Chemical Engineering. McGrawHill, New York 0980).
3. C. Canuto, M. Y. Hussaini, A. Quarteroni and T. A. Zang, Spectral Methods in Fluid Dynamics. Springer, Berlin (1987).
4. A. Cortes and J. D. Miller, Solution of the NavierStokes equations by the spectral differencemethod. Submitted to
Numer. Methods Partial Differential Equations.
5. E. R. Benton and G. W. Platzman, A table of solutions of the onedimensional Burgers equation. Quart. Appl. Math.
29, 195 0972).
6. C. Basdevant, M. Deville, P. Haldenwang, J. M. Lacroix, J. Quazzani, R. Peyret, P. Orlandi and A. T. Patera, Spectral
and finite difference solutions of the Burgers equations. Computers Fluids 14, 23 (1986).
7. A. T. Patera, A spectral element method for fluid dynamics: laminar flow in a channel expansion. J. Comput. Phys.
54, 486 (1984).
8. M. G. Macaraeg and C. L. Street, Improvements in spectral collocation discretization through a multiple domain
technique. Appl. Numer. Maths 2, 95 (1986).
9. R. L. Wainwright, Threedimensional xprojection method (with acceleration techniques) for solving systems of linear
equations. Comp. Math. Appls 7, 211 (1981).
10. H. C. Ku, T. D. Taylor and R. S. Hirsh, Pseudospectral methods for solution of the incompressible NavierStokes
equations. Computers Fluids 15, 195 (1987).
11. A. J. Chorin, Numerical solution of the NavierStokes equations. Math. Comput. 22, 745 (1968).
12. J. C. Heinrich and R. S. Marshall, Viscous incompressibleflow by a penalty function finite element method. Computers
Fluids 9, 73 (1981).
13. P. M. Gresho and R, L. Sani, On pressure boundary conditions for the incompressibleNavierStokes equations. Int.
J. Numer. Fluids 7, 1111 (1987).
14. W. Y. Soh and J. W. Goodrich, Unsteady solution of incompressible NavierStokes equations. J. Comput. Phys. 79,
113 (1988).
15. M. Williams, Method for calculating incompressible viscous flows. Numer. Heat Transfer Part B 20, 241 (1991).
16. J. D. Ramshaw and G. L. Mesina, A hybrid penaltypseudocompressibilitymethod for transient incompressiblefluid
flow. Computers Fluids 20, 165 (1991).
17. S. Biringenand K. H. Kao, On the application of pseudospectral fit techniques to nonperiodic problems. Int. J. Numer.
Fluids 9, 1235 (1989).
18. T. Tanahashi and H. Okanaga, GSMAC finite element method for unsteady incompressibleNavierStokes equations
at high Reynolds numbers. Int. J. Numer. Fluids 11, 479 (1990).
19. J. W. Goodrich and W. Y. Soh, Timedependent viscous incompressibleNavierStokes equations: the finite difference
Galerkin formulation and streamfunction algorithms. J. Comput. Phys. 84, 207 (1989).
20. S. Biringen and C. Cook, On pressure boundary conditions for the incompressible NavierStokes equations using
nonstaggered grids. Numer. Heat Transfer 13, 241 (1988).
21. Y. Kato, T. Sato, T. Sawada and T. Tanahashi, Numerical simulation of unsteady incompressible viscous flows by
improved GSMACFEM. In Twelfth International Conference on Numerical Methods in Fluid Dynamics (Edited by
K. W. Morton). Springer, Berlin (1990).
22. G. A. Osswald, K. N. Ghia and U. Ghia, Direct method for solution of three dimensional unsteady incompressible
NavierStokes equations. In l lth International Conference on Numerical Methods in Fluid Dynamics (Edited by D. L.
Dwoyer, M. Y. Hussaini and R. G. Voigt). Springer, Berlin (1988).
23. K. Gustafson and K. Halasi, Vortex dynamics of cavity flows. J. Comput. Phys. 64, 279 (1986).
24. K. Gustafson and K. Halasi, Cavity flow dynamics at higher Reynolds number and higher aspect ratio. J. Comput.
Phys. 70, 271 (1987).
25. J. W. Goodrich, K. Gustafson and K. Halasi, Hopf bifurcation in the driven cavity. J. Comput. Phys. 90, 219 (1990).
26. C. Bruneau and C. Jouron, An efficientscheme for solving steady incompressibleNavierStokes equations. J. Comput.
Phys. 89, 389 (1990).
27. C. Shu and S. Osher, Efficientimplementation of essentiallynonoscillatory shockcapturing schemes. J. Comput. Phys.
77, 439 (1988).
28. U. Ghia, K. N. Ghia and C. T. Shin, High Re solution for incompressibleflow using the NavierStokes equations and
a muitigrid method. J. Comput. Phys. 48, 387 (1982).
29. H. C. Ku, R. S. Hirsh and T. D. Taylor, A pseudospectral method for solution of the three dimensional incompressible
NavierStokes equations. J. Comput. Phys. 70, 439 (1987).
1027
30. A. K. Prassad and J. R. Koseff, Reynolds number and endwall effects on a liddriven cavity flow. Phys. Fluids A 1,
208 (1989).
31. J. P. Boyd, Chebyshev and Fourier Spectral Methods. Sprinp,', Berlin (1989).
32. J. Shen, Numerical simulation of the regularized driven cavity flows at high Reynolds numbers. Comput. Methods Appl.
Mech. Eng. 80, 273 (1990).
33. J. Shen, Hopf bifurcation of the unsteady regularized driven cavity flow..I. Comput. Phys. 95, 228 (1991).