0% found this document useful (0 votes)
12 views11 pages

Week 8

Uploaded by

jofred
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views11 pages

Week 8

Uploaded by

jofred
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Chapter 6

Solution of Navier-Stokes
Equations for
Incompressible Flows Using
SIMPLE and MAC
Algorithms

6.1 Introduction
In Cartesian coordinates, the governing equations for incompressible three-
dimensional flows are
∂u ∂v ∂w
+ + =0 (6.1)
∂x ∂y ∂z

∂u ∂(u2 ) ∂(uv) ∂(uw) 1 ∂2u ∂2u ∂2u


 
∂p
+ + + =− + + + (6.2)
∂t ∂x ∂y ∂z ∂x Re ∂x2 ∂y 2 ∂z 2
∂v ∂(uv) ∂(v 2 ) ∂(vw) 1 ∂2v ∂2v ∂2v
 
∂p
+ + + =− + + 2+ 2 (6.3)
∂t ∂x ∂y ∂z ∂y Re ∂x2 ∂y ∂z
2 2 2
∂ 2w
 
∂w ∂(uw) ∂(vw) ∂(w ) ∂p 1 ∂ w ∂ w
+ + + =− + + + (6.4)
∂t ∂x ∂y ∂z ∂z Re ∂x2 ∂y 2 ∂z 2

In this chapter no assumption is made about the relative magnitude of the


velocity components, consequently the full forms of the Navier-Stokes equations
are solved. Methods described in this section will be based, basically, on finite-
volume and finite-difference discretizations and on the solution of a Poisson
equation to determine the pressure. It may be mentioned that these methods

1
6.2 Computational Fluid Dynamics

use primitive variables u, v, w and p as function of x, y, z, t and Re which are


preferable in flow calculations.

6.2 Staggered Grid


As it has been seen, the major difficulty encountered during solution of in-
compressible flow is the non-availability of any obvious equation for the pres-
sure. This difficulty can be resolved in the stream- function-vorticity approach.
This approach loses its advantage when three-dimensional flow is computed
because of the fact that a single scalar stream-function does not exist in three-
dimensional space. A three-dimensional problem demands a primitive-variable
approach. Efforts have been made so that two-dimensional as well as three-
dimensional problems could be computed following a primitive variable ap-
proach without encountering non-physical wiggles in the pressure distribution.
As a remedy, it has been suggested to employ a different grid for each of the
dependent variables.
Such a staggered grid for the dependant variables in a flow field was first
used by Harlow and Welch (1965), in their very well known MAC (Marker
and Cell) method. Since then, it has been used by many researchers. Specif-
ically, SIMPLE (Semi Implicit Method for Pressure Linked Equations) proce-
dure of Patankar and Spalding (1972) has become popular. Figure 6.1 shows a
two-dimensional staggered where independent variables (ui,j ,vi,j and pi,j ) with
the same indices staggered to one another. Extension to three-dimensions is
straight-forward. The computational domain is divided into a number of cells,
which are shown as “main control volume” in Fig. 6.1. The location of the ve-
locity components are at the center of the cell faces to which they are normal.
If a uniform grid is used, the locations are exactly at the midway between the
grid points. In such cases the pressure difference between the two adjacent cells
is the driving force for the velocity component located at the interface of these
cells. The finite-difference approximation is now physically meaningful and the
pressure field will accept a reasonable pressure distribution for a correct velocity
field.
Another important advantage is that transport rates across the faces of the
control volumes can be computed without interpolation of velocity components.
The detailed outline of the two different solution procedures for the full Navier-
Stokes equations with primitive variables using staggered grid will be discussed
in subsequent sections. First we shall discuss the SIMPLE algorithm and then
the MAC method will be described.
Solution of Navier-Stokes.. 6.3

= u velocity
= v velocity
variables with same = p pressure
indices staggered

11111
00000
main control volume
00000
11111
000001111
111110000
11111 00000
11111
000001111
0000
00000
11111
v velocity control
0000
1111
00000
11111
u volumes
0000
1111
00000
11111
Y
00000
11111

Figure 6.1: Staggered grid.

6.3 Semi Implicit Method for Pressure Linked


Equations (SIMPLE)
SIMPLE algorithm is based on finite-volume discretization of the Navier-Stokes
equations. The method was introduced by Patankar and Spalding (1972). The
discretization indicated below corresponds to a uniform grid. The more general
case of a non-uniform grid can be obtained from Patankar (1980). Consider the
continuity equation
∂u ∂v
+ =0
∂x ∂y
For the control volume shown in Fig. 6.2. The application of the finite-volume
method to the continuity equation produes the following discretized form of the
equation
un+1 n+1 n+1 n+1
 
i,j − ui−1,j ∆y + vi,j − vi,j−1 ∆x = 0 (6.5)

6.3.1 x - momentum equation


The Navier-Stokes equation in x-direction in conservative form (using continuity
equation) is given as

∂u ∂(u)2 1 ∂ 2 u ∂ 2u
 
∂(uv) ∂p
+ + + = + 2
∂t ∂x ∂y ∂x Re ∂x2 ∂y
6.4 Computational Fluid Dynamics

V i−1,j+1 V i,j+1 V i+1,j+1

U i−1,j+1 φi,j+1 U i,j+1 U i+1,j+1

V i−1,j V i,j V i+1,j

1111111
0000000
φ i−1,j 0000000
1111111
φ φ i+1,j
0000000
1111111
U i−1,j i,j U i,j U i+1,j

0000000
1111111
0000000
1111111
v, j, y V i,j−1
V i−1,j−1 V i+1,j−1

0000000
1111111
U i−1,j−1 φi,j−1 U i,j−1 U i+1,j−1

u, i, x

Figure 6.2: Control volume for continuity equation.

Integrating over the u-control volume (Fig. 6.3), we can write


ZZ     
∆x∆y n+1 n
 ∂ 2 1 ∂u ∂ 1 ∂u
ui,j − ui,j + u − + uv − dxdy
∆t
ZZ   ∂x Re ∂x ∂y Re ∂y
∂p
+ dxdy = 0
∂x
Application of Green’s theorem to the above expression leads to
∆x∆y n+1   1   
ui,j − uni,j + Ei+ 1
,j
1
− Ei− 1
,j
1
∆y + Fi,j+ 1 − F
1
i,j− 1 ∆x
∆t 2 2 2 2

+ pn+1 n+1

i+1,j − pi,j ∆y = 0 (6.6)
where E 1 and F 1 are defined as
1 ∂u
E 1 = u2 −
Re ∂x
and
1 ∂u
F 1 = uv −
Re ∂y
E 1 and F 1 are axial and transverse fluxes of x-momentum.
Thus
1 2 1 (ui+1,j − ui,j )
Ei+ 1
,j = 0.25 (ui,j + ui+1,j ) −
2 Re ∆x
Solution of Navier-Stokes.. 6.5

1 2 1 (ui,j − ui−1,j )
Ei− 1
,j = 0.25 (ui−1,j + ui,j ) −
2 Re ∆x
 
1 1 ui,j+1 − ui,j
Fi,j+ 1 = 0.25 (vi,j + vi+1,j ) (ui,j + ui,j+1 ) −
2 Re ∆y

 
1 1 ui,j − ui,j−1
Fi,j− 1 = 0.25 (vi,j−1 + vi+1,j−1 ) (ui,j−1 + ui,j ) −
2 Re ∆y
The linearized form of these equations are

n+1 n+1

1 ui+1,j − ui,j
1
uni,j uni+1,j un+1 un+1
 
Ei+ 1 = 0.25 + i,j + i+1,j −
2 ,j Re ∆x
n+1 n+1

1 ui,j − ui−1,j
1
uni−1,j uni,j un+1 un+1
 
Ei− 1 = 0.25 + + −
i−1,j i,j
2 ,j Re ∆x
n+1 n+1

1 n n
 n+1 n+1
 1 ui,j+1 − ui,j
Fi,j+ 1 = 0.25 vi,j + vi+1,j ui,j + ui,j+1 −
2 Re ∆y
n+1 n+1

1 ui,j − ui,j−1
1 n n
un+1 un+1
 
Fi,j− 1 = 0.25 vi,j−1 + vi+1,j−1 i,j−1 + i,j −
2 Re ∆y

v v
i,j i+1,j

u i−1,j p u
i,j
p
i+1,j
u i+1,j
i,j

y
v v i+1,j−1
i,j−1
x

Figure 6.3: Control volume for x-momentum equation.

Consequently, eq. (6.6) can be written as


 
∆x∆y X
+ ai,j un+1
u
aunb un+1 u n+1 n+1

i,j + nb + b + ∆y pi+1,j − pi,j =0 (6.7)
∆t
6.6 Computational Fluid Dynamics

X
In the above equation, aunb un+1
nb signifies all the convective and diffusive
contributions from the neighboring nodes (un+1 n+1 n+1 n+1
i+1,j , ui−1,j , ui,j+1 , ui,j−1 and their
u u
coefficients). The coefficients ai,j and anb contain grid sizes, and the solution of
u and v at nth time level. The term bu equals −∆x∆y uni,j /∆t. In the following
sub-section, equation (6.6) has been written term by term so that aui,j , aunb and
bu in equation (6.7) can be clearly determined.
Equation (6.6) can be expanded as
 
∆x∆y n+1 ∆x∆y n
ui,j − ui,j +
∆t ∆t

   
∆y ∆y
un+1
i,j
n n
0.25(ui,j + ui+1,j )∆y + n+1 n n
+ ui+1,j 0.25(ui,j + ui+1,j )∆y −
Re∆x Re∆x

   
∆y ∆y
−un+1
i,j
n n
0.25(ui−1,j + ui,j )∆y − n+1 n n
− ui−1,j 0.25(ui−1,j + ui,j )∆y +
Re∆x Re∆x

   
∆x ∆x
+un+1
i,j 0.25(v n
i,j + v n
i+1,j )∆x + + u n+1
i,j+1 0.25(v n
i,j + v n
i+1,j )∆x −
Re∆y Re∆y

  
∆x
−un+1
i,j 0.25(v n
i,j−1 + v n
i+1,j−1 )∆x − − u n+1 n n
i,j−1 0.25(vi,j−1 + vi+1,j−1 )∆x
Re∆y

∆x
+ pn+1 n+1

+ i+1,j − pi,j ∆y = 0
Re∆y
or,


∆x∆y
+ 0.25(uni,j + uni+1,j )∆y − 0.25(uni−1,j + uni,j )∆y + 0.25(vi,j
n n
+ vi+1,j )∆x
∆t


∆y ∆y ∆x ∆x
n
−0.25(vi,j−1 + n
vi+1,j−1 )∆x + + + + un+1
Re∆x Re∆x Re∆y Re∆y i,j

   
∆y ∆y
+un+1
i+1,j 0.25(u n
i,j + u n
i+1,j )∆y − + u n+1
i−1,j 0.25(u n
i−1,j + u n
i,j )∆y −
Re∆x Re∆x

  
∆x
+un+1
i,j+1 0.25(v n
i,j + v n
i+1,j )∆x − + u n+1 n n
i,j−1 −0.25(vi,j−1 + vi+1,j−1 )∆x
Re∆y

∆x ∆x∆y n
ui,j + ∆y pn+1 n+1

− − i+1,j − pi,j =0
Re∆y ∆t
Solution of Navier-Stokes.. 6.7

6.3.2 y- momentum equation

∂(v)2 ∂2v ∂2v


 
∂v ∂ ∂p 1
+ (uv) + + = 2
+ 2
∂t ∂x ∂y ∂y Re ∂x ∂y

Using the control volume shown in Fig. 6.4, the y momentum equation can be
integrated over v-control volume as

ZZ     
∆x∆y n+1 n ∂ 1 ∂v ∂ 1 ∂v
v2 −

vi,j − vi,j + uv − + dxdy
∆t ∂x Re ∂x ∂y Re ∂y
ZZ  
∂p
+ dxdy = 0
∂y

Application of Green’s theorem to the above expression leads to

Figure 6.4: Control volume for y-momentum equation.

∆x∆y n+1 n 2 2 2 2
(vi,j − vi,j ) + (Ei+1/2,j − Ei−1/2,j )∆y + (Fi,j+1/2 − Fi,j−1/2 )∆x
∆t
+(pn+1 n+1
i,j+1 − pi,j )∆x = 0 (6.8)

1 ∂v 1 ∂v
E 2 = uv − , F 2 = v2 −
Re ∂x Re ∂y
6.8 Computational Fluid Dynamics

Here E 2 and F 2 are the axial and transverse fluxes of y-momentum

2 1 (vi+1,j − vi,j )
Ei+1/2,j = 0.25(ui,j + ui,j+1 )(vi,j + vi+1,j ) −
Re ∆x

2 1 (vi,j − vi−1,j )
Ei−1/2,j = 0.25(ui−1,j + ui−1,j+1 )(vi−1,j + vi,j ) −
Re ∆x

2 1 (vi,j+1 − vi,j )
Fi,j+1/2 = 0.25(vi,j + vi,j+1 )2 −
Re ∆y

2 1 (vi,j − vi,j−1 )
Fi,j−1/2 = 0.25(vi,j−1 + vi,j )2 −
Re ∆y
The linearized form of these equations are
n+1 n+1

n+1 n+1 1 vi+1,j − vi,j
2
uni,j uni,j+1
 
Ei+ 1 = 0.25 + vi,j + vi+1,j −
2 ,j Re ∆x
n+1 n+1

1 vi,j − vi−1,j
n+1 n+1
2
uni−1,j uni−1,j+1
 
Ei− 1 = 0.25 + + − vi−1,j vi,j
2 ,j Re ∆x
n+1 n+1

2 n n
 n+1 n+1
 1 vi,j+1 − vi,j
Fi,j+ 1 = 0.25 vi,j + vi,j+1 vi,j + vi,j+1 −
2 Re ∆y
n+1 n+1

2 n n
 n+1 n+1
 1 vi,j − vi,j−1
Fi,j− 1 = 0.25 vi,j−1 + vi,j vi,j−1 + vi,j −
2 Re ∆y
Substituting E 2 and F 2 in Eq. (6.8) yields
 
∆x∆y n+1
X
n+1
+ avi,j vi,j avnb vnb + bv + ∆x pn+1 n+1

+ i,j+1 − pi,j =0 (6.9)
∆t
At any intermediate stage, the solution is to be advanced from nth time level
to (n + 1)th time level. The term bv equals −∆x∆yvi,j n
/∆t. The velocity is
advanced in two steps. First, the momentum equations (6.7) and (6.9) are
solved to obtain the provisional values of u∗ , and v ∗ . It is not possible to
obtain un+1 and v n+1 directly since the provisional velocities have not satisfied
the continuity equation as yet.To be noted that the nth level presssures are
available at this stage.
Making use of the approximate velocity solution u∗ , a pressure correction
δp will evolve which will give pn+1 = pn + δp and also a velocity correction
uc will be obtainable. As such, uc will correct u∗ in such a manner that
un+1 = u∗ + uc and un+1 will satisfy the continuity Eq. (6.5).
In order to obtain u∗ , Eqns. (6.7) and (6.9) are approximated as
 
∆x∆y u
X
aunb u∗nb = −bu − ∆y pni+1,j − pni,j

+ ai,j u∗i,j + (6.10)
∆t
Solution of Navier-Stokes.. 6.9

 
∆x∆y v
X
avnb vnb = −bv − ∆x pni,j+1 − pni,j
∗ ∗

+ ai,j vi,j + (6.11)
∆t

6.3.3 Solution Procedure


The Eqns. (6.10) and (6.11) can be evaluated in an implicit manner. For exam-
ple, in Eq. (6.10) u∗i,j and all the neighbors, u∗i+1,j , u∗i−1,j , u∗i,j+1 , and u∗i,j−1 are
unknowns and they can be expressed as a system of equations by substitution
of i = 2 to (imax - 1) and j = 2 to (jmax - 1). This will involve, solution of a
penta-diagonal matrix. Patankar (1980) splits the evaluation procedure. At the
first place, he writes Eqns. (6.10) and (6.11) as tridiagonal systems along each
x-grid line (j constant) and solves them using Thomas algorithm. In a sub-
sequent step, Eqns. (6.10) and (6.11) are written as tridiagonal systems along
each y-grid line (i constant) and solves them using Thomas algorithm. This
is equivalent to implicit evaluation using ADI scheme. Now, if we substract
Eq. (6.10) from Eq. (6.7), we shall obtain
 
∆x∆y X
+ aui,j uci,j = aunb ucnb − ∆y (δpi+1,j − δpi,j ) (6.12)
∆t

In a similar manner, Eq. (6.11) is substracted from Eq. (6.9) to produce a


correction equation for v c .
 
∆x∆y v c
X
+ ai,j vi,j = avnb vnb
c
− ∆x (δpi,j+1 − δpi,j ) (6.13)
∆t

In order to make the link between uc and δp explicit, Eq. (6.12) can be reduced
to
E1 ∆y (δpi,j − δpi+1,j )
uci,j = (6.14)
(1 + E1 ) aui,j
where E1 = ∆t aui,j /∆x∆y
c
An equivalent expression can be obtained for vj,k as

c E2 ∆x (δpi,j − δpi,j+1 )
vi,j = (6.15)
(1 + E2 ) avi,j

where E2 = ∆t avi,j /∆x∆y


Now, substitution of un+1 ∗ c n+1 ∗ c
i,j = ui,j + ui,j and vi,j = vi,j + vi,j into (6.5) and
use of (6.14) and (6.15) produces

api,j δpi,j =
X p
anb δpnb + bp (6.16)

where, bp = − u∗i,j − u∗i−1,j ∆y − vi,j


 ∗ ∗

− vi,j−1 ∆x. Eq. (6.16) is basically a
discrete form of Poisson equation that is equivalent to
1
∇2 (δp) = ∇.u∗ (6.17)
∆t
6.10 Computational Fluid Dynamics

Eq. (6.14)and (6.15) can also be represented as


1
uc = − ∇(δp) (6.18)
∆t
The algorithm may be summarized as
1. u∗ is obtained from equations (6.10) and (6.11).

2. δp is obtained from equation (6.16).

3. uc is obtained from equations (6.14) and (6.15).

4. pnew is obtained from pnew = pn + α δp, where α is a relaxation parameter.


5. Calculate updated ui,j , vi,j from their starred values using velocity cor-
rection formulae unew ∗ c new ∗ c
i,j = ui,j + ui,j and vi,j = vi,j + vi,j

6. Treat the corrected pressure pnew as new initial pressure pn . Use unew
i,j
new
and vi,j as uni,j and vi,j
n
. Calculate new u∗ from equations (6.10) and
(6.11). Repeat (2-5), the entire procedure until a converged solution is
obtained. It may be noted that the solution converges as bp = 0.
Patankar (1980) introduced a revised algorithm, SIMPLER to improve the sit-
uation. The SIMPLER algorithm has the following steps.
1. A velocity field û is computed from equations (6.10) and (6.11) with the
pressure terms deleted from the right-hand sides.
2. equation (6.16) then becomes a Poisson equation for pn+1 rather than δp
with û replacing the u∗ terms in bp .
3. The pn+1 (obtained from step 2) replaces pn in equations (6.10) and (6.11),
which are solved for u∗ (as it was done in SIMPLE).
4. Equation (6.16) is solved for δp and it is used to provide un+1 = u∗ + uc
but no further adjustment is made to pn+1 .
Van Doormal and Raithby (1984) proposed SIMPLEC which is another modi-
fied version of SIMPLE algorithm and gives faster convergence.

6.3.4 Two-dimensional System of Equations and Line-by-


line TDMA
Whether the discretized momentum Eqns. (6.10) and (6.11) or the pressure
correction Eq. (6.16) the final outcome is a system of algebraic equation given
Solution of Navier-Stokes.. 6.11

by aP φP = aE φE + aW φW + aN φN + aS φS + b. The current values of the


dependent variables (φ′ s) are to be evaluated from the known values of the
coefficients (a’s). The evaluation algorithm will be same for the momentum
equations and the pressure correction equation. On a rectangular grid, the
dependent variables at one point (i, j) may be expressed in terms of its neighbors
(Fig. 6.5) as
ai,j ui,j = bi,j ui+1,j + ci,j ui−1,j + di,j ui,j+1 + ei,j ui,j−1 + fi,j
where bi,j is equivalent to aE , ci,j to aW , di,j to aN , ei,j to aS and fi,j to b. The
evaluation of u can be accomplished in the following ways:
(a) Vertical Sweep Upwards may be written in a pseudo FORTRAN code as
DO 10 J = 2, M - 1
DO 10 I = 2, L - 1

10 ai,j ui,j = bi,j ui+1,j + ci,j ui−1,j + (di,j ūi,j+1 + ei,j ūi,j−1 + fi,j )
Here ū is the currently available value in storage and all the coefficients including
fi,j are known. for each j, we shall get a system of equations if we susbtitute
i = 2......L − 1. In other words, for each j, a tridiagonal matrix is available
which can be solved for all i row of points at that j. Once one complete row is
evaluated for any particular j, the next j will be taken up, and so on.
(b) Horizontal Sweep Forward may be written in pseudo FORTRAN code as
DO 20 I = 2, L - 1
DO 20 J = 2, M - 1

20 ai,j ui,j = di,j ui,j+1 + ei,j ui,j−1 + (bi,j ūi+1,j + ci,j ūi−1,j + fi,j )
Again ū is the currently available value in storage from previous calculations.
For each i, we get a system of equation if we substitute j = 2....M − 1. A
tridiagonal matrix is available for each i. Once one complete column of points
are evaluated for any particular i, the next i will be taken up and so on. The
vertical sweep upward and downward are repeated. Similarly the horizontal
sweep forward and rearward are also repeated until convergence is achieved.
For solving tridiagonal system, the tridiagonal matrix algorithm (TDMA) due
to Thomas (1949) is deployed. The above mentioned evaluation procedure is
known as line-by-line TDMA.

6.4 Solution of the Unsteady Navier-Stokes Equa-


tions
6.4.1 Introduction to the MAC method
The MAC method of Harlow and Welch is one of the earliest and most useful
methods for solving the Navier-Stokes equations. This method necessarily deals

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy