Вы находитесь на странице: 1из 23

COMPUTATIONAL FLUID DYNAMICS

VISCOUS FLUID FLOW



Introduction

Computation Fluid Dynamics CFD is the analysis of systems involving fluid flow, heat
transfer and associated phenomena (such as chemical reactions) by means of computer
simulation. CFD is becoming an important component in the design of industrial products and
processes.

The finite volume method was originally developed as a special finite difference formulation.
This method is used to develop the main commercially available CFD codes: FLUENT,
PHOENICS, FLOW 3D, STAR-CD, CFX etc.

The finite volume algorithm consists of 3 main steps:

1. Divide the solution domain into finite number of control volumes with one grid point
within each control volume.
2. Integrate the governing equations over all the control volumes and apply the initial and
boundary conditions.
3. Solve the resulting algebraic equations to find the dependent variable in all solution
domains.


The Fluid Flow Equations

The momentum and continuity equations for a flowing fluid can be written in many co-ordinate
systems. In this chapter the Cartesian co-ordinate will be considered.

The Conservation of Mass

Consider the element shown in Figure 1 with the velocity components (u, v, w) at point (x, y, z)
in the x, y and z directions respectively. The density is at that point also.

dx
dy
dz
2
) ( dx
x
u
u
c
c

2
) ( dx
x
u
u
c
c
+

y
x
z

Figure 1

Allowing the density to change with position, the total mass flowing into the element in the x
direction is

dxdydz
x
u
dydz
dx
x
u
u dydz
dx
x
u
u
c
c
=
c
c
+
c
c

) (
]
2
) (
[ ]
2
) (
[



With similar terms dxdydz
y
v
c
c

) (
and dxdydz
z
w
c
c

) (
for the y and z directions. Thus the
total mass flowing into the element is

dxdydz
z
w
y
v
x
u
]
) ( ) ( ) (
[
c
c
+
c
c
+
c
c




This must equal the rate of increase of mass in the element of ddxdydz

Thus.

0
) ( ) ( ) (
=
c
c
+
c
c
+
c
c
+
c
c
z
w
y
v
x
u
t

(1)

This is the conservation of mass or the continuity equation.


The Conservation of Momentum
Consider the same element with the stress components
rs
t (r= x, y, z ; s= x, y, z) at position (x,
y, z).

dx
dy
dz
y
x
z
2
dx
x
xx
xx
c
c
+
t
t
2
dx
x
xx
xx
c
c

t
t
2
dz
z
xz
xz
c
c

t
t
2
dz
z
xz
xz
c
c
+
t
t

Figure 2

xx
t ,
yy
t and
zz
t are similar to negative pressures;
xy
t ,
yz
t and
zx
t etc are shear stresses. In
addition, by writing an angular momentum balance on the element it is easy to show that

xy
t =
yx
t ;
yz
t =
zy
t ;
zx
t =
xz
t

The total force on the element in the direction is made up of three terms.

dxdydz
x
dydz
x
x
dx
x
xx xx
xx
xx
xx
c
c
=
c
c
c

c
c
+
t t
t
t
t )]
2
( )
2
[(

dxdydz
y
dxdz
y
y
dy
y
xy xy
xy
xy
xy
c
c
=
c
c
c

c
c
+
t t
t
t
t )]
2
( )
2
[(

And
dxdydz
z
dxdy
z
z
dz
z
xz xz
xz
xz
xz
c
c
=
c
c
c

c
c
+
t t
t
t
t )]
2
( )
2
[(

In addition a body force, such as gravity, with component
x
g may exist giving a force on the
element dxdydz g
x
.

This must balance the acceleration

dxdydz
Dt
Du


Thus the force balance in the x direction becomes,

dxdydz
Dt
Du
z y x
g
xz
xy
xx
x

t
t
t
=
c
c
+
c
c
+
c
c
+

Where

z
w
y
v
x
u
t Dt
Du
c
c
+
c
c
+
c
c
+
c
c
=

Similar balances can be written for the y and z equations to give

Dt
Du
g
z y x
x
xz
xy
xx

t
t
t
= +
c
c
+
c
c
+
c
c


Dt
Dv
g
z y x
y
yz yy yx

t t t
= +
c
c
+
c
c
+
c
c
(2)

Dt
Dw
g
z y x
z
zz
zy
zx

t
t
t
= +
c
c
+
c
c
+
c
c


These constitute the conservation of momentum equations. Before they can be used the equation
of
rs
t linking with the velocity components of u, v and w.

The Rheological Equation

The normal method of obtaining this equation is to consider the stresses in a cube as in Elasticity
Theory (e.g. the Mohr Circle). A simpler method using simple tensor calculus is outlined below.

Using matrix notation, the stress tensor
rs
t is given by,

(
(
(

=
zz zy zx
yz yy yx
xz xy xx
rs
t t t
t t t
t t t
t

We have stated above that
rs
t =
rs
t ; thus
rs
t is a symmetric tensor. Furthermore, the trace of
rs
t (viz.
zz yy xx
t t t + + ) is variant with respect to the orientation of the axis. Thus a scalar
quantity can be identified that usually called as the pressure P as

) (
3
1
zz yy xx
P t t t + + =

Now every tensor can be resolved into an isotropic component and a deviator. Thus,

(
(
(

+
+
+
+
(
(
(

=
P
P
P
P
P
P
zz zy zx
yz yy yx
xz xy xx
rs
t t t
t t t
t t t
t
0 0
0 0
0 0


The first matrix corresponds to the isotropic pressure, the second to the residual stresses causing
distortion or deviation of the fluid element. Defining the Kronecker delta
rs
o , as

(
(
(

=
1 0 0
0 1 0
0 0 1
rs
o

rs
t can be written as,

o rs rs
P t o t + = (3)

Where
o
t is the deviator component

Consider again the tensor made up of velocity gradients
s
u
r
c
c
to form,

(
(
(
(
(
(
(

c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
=
(

c
c
z
w
y
w
x
w
z
v
y
v
x
v
z
u
y
u
x
u
s
u
r


In general, this tensor is not symmetric, but can be made so by taking averages of diagonally
opposite terms to give the rate of strain tensor,

(
(
(
(
(
(
(

c
c
c
c
c
c
c
c
c
c
c
c
c
c
+
c
c
c
c
+
c
c
c
c
=
z
w
y
w
x
w
z
v
y
v
x
v
x
w
z
u
x
v
y
u
x
u
e
rs
) (
2
1
) (
2
1


The rheological equation which we are seeking is of the form,

( )
rs rs
e f = t

Since in various flow we are interested in relating only the deviator components of the stress and
strain components, the tensor
rs
e is split up into two as above, by noting that

) (
3
1
z
w
y
v
x
u
e
V
c
c
+
c
c
+
c
c
=

Is the rate of change of volumetric strain, a scalar quantity, so that

(
(
(
(
(
(
(

c
c
c
c
+
c
c
c
c
+
c
c
c
c
+
c
c

c
c
c
c
+
c
c
c
c
+
c
c
c
c
+
c
c

c
c
+ =
V
V
V
rs V rs
e
z
w
y
w
z
v
x
w
z
u
y
w
z
v
e
y
v
x
v
y
u
x
w
z
u
x
v
y
u
e
x
u
e e


) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
o

Or using similar nomenclature to above,

o rs V rs
e e e + = o (4)

Now the simplest rheological equation relating the deviator components of
rs
t and
rs
e is to say
that they are proportional to one another. Thus, let us assume that

o o
e t 2 = (5)

Where is a constant and;

(
(
(
(
(
(
(

c
c
c
c
+
c
c
c
c
+
c
c
c
c
+
c
c

c
c
c
c
+
c
c
c
c
+
c
c
c
c
+
c
c

c
c
=
(
(
(

+
+
+
V
V
V
zz zy zx
yz yy yx
xz xy xx
e
z
w
y
w
z
v
x
w
z
u
y
w
z
v
e
y
v
x
v
y
u
x
w
z
u
x
v
y
u
e
x
u
P
P
P

) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
2
t t t
t t t
t t t
(6)

Thus equating components of the tensor equation (6) we have.

|
|
.
|

\
|
c
c
+
c
c
+
c
c

c
c
+ =
z
w
y
v
x
u
x
u
P
xx
t
3
2
2
|
|
.
|

\
|
c
c
+
c
c
+
c
c

c
c
+ =
z
w
y
v
x
u
y
v
P
yy
t
3
2
2
|
|
.
|

\
|
c
c
+
c
c
+
c
c

c
c
+ =
z
w
y
v
x
u
z
w
P
zz
t
3
2
2 (7)
|
|
.
|

\
|
c
c
+
c
c
=
x
v
y
u
xy
t
|
|
.
|

\
|
c
c
+
c
c
=
y
w
z
v
yz
t
|
.
|

\
|
c
c
+
c
c
=
z
u
x
w
zx
t

A long-winded version of equation (5) which simply states that the deviator stress and stain
tensors are proportional to one another. For plane laminar motion, equations (7) reduce to


xy
u
y
t
c
=
c


And is clearly the coefficient of dynamic viscosity.


The Navier Stokes Equations

Now substitute equations (7) in (2). For example terms such as

) (
z y x
xz
xy
xx
c
c
+
c
c
+
c
c t
t
t
become,
|
|
.
|

\
|
c
c
+
c c
c
+
|
|
.
|

\
|
c c
c
+
c
c
+
|
|
.
|

\
|
c
c
+
c
c
+
c
c
c
c

c
c
+
c
c

2
2 2 2
2
2 2
3
2
z
w
z x
w
y x
v
y
u
z
w
y
v
x
u
x x
u
x
P

|
|
.
|

\
|
c
c
+
c
c
+
c
c
c
c
+
|
|
.
|

\
|
c
c
+
c
c
+
c
c
+
c
c
=
z
w
y
v
x
u
x z
u
y
u
x
u
x
P

3
1
2
2
2
2
2
2


Similar substitutions can be made for y and z direction momentum balances to give,

|
|
.
|

\
|
c
c
+
c
c
+
c
c
c
c
+
|
|
.
|

\
|
c
c
+
c
c
+
c
c
+ +
c
c
=
c
c
+
c
c
+
c
c
+
c
c
z
w
y
v
x
u
x z
u
y
u
x
u
g
x
P
z
u
w
y
u
v
x
u
u
t
u
x
3
1
2
2
2
2
2
2
v
v


|
|
.
|

\
|
c
c
+
c
c
+
c
c
c
c
+
|
|
.
|

\
|
c
c
+
c
c
+
c
c
+ +
c
c
=
c
c
+
c
c
+
c
c
+
c
c
z
w
y
v
x
u
y z
v
y
v
x
v
g
y
P
z
v
w
y
v
v
x
v
u
t
v
y
3
1
2
2
2
2
2
2
v
v

(8)
|
|
.
|

\
|
c
c
+
c
c
+
c
c
c
c
+
|
|
.
|

\
|
c
c
+
c
c
+
c
c
+ +
c
c
=
c
c
+
c
c
+
c
c
+
c
c
z
w
y
v
x
u
z z
w
y
w
x
w
g
z
P
z
w
w
y
w
v
x
w
u
t
w
z
3
1
2
2
2
2
2
2
v
v



Where v is the kinematic viscosity / .

These are the NavierStokes equations which form the basis of modern fluid mechanics. They
must be solved along with the continuity equation (1).

The Navier-Stokes equations also can be written in the polar coordinate system as stated below:

In r-direction:

|
|
.
|

\
|
c
c

c
c
+
c
c
+
c
c
+
c
c
+ +
c
c
=
c
c
+
c
c
+
c
c
+
c
c
u u
v
u
v
r r
v
x
v v
r r
v
r r
v
g
r
P
r
w
x
v
u
v
r
w
r
v
v
t
v
r
2 2 2
2
2
2
2 2
2 2
2 1 1 1


In -direction:

|
|
.
|

\
|
c
c

c
c
+
c
c
+
c
c
+
c
c
+ +
c
c
= +
c
c
+
c
c
+
c
c
+
c
c
u u
v
u u u
u
v
r r
w
x
w w
r r
w
r r
w
g
P
r r
vw w
u
w
r
w
r
w
v
t
w
2 2 2
2
2
2
2 2
2
2 1 1 1


In x-direction:

|
|
.
|

\
|
c
c
+
c
c
+
c
c
+
c
c
+ +
c
c
=
c
c
+
c
c
+
c
c
+
c
c
2
2
2
2
2 2
2
1 1 1
x
u u
r r
u
r r
u
g
x
P u
u
u
r
w
r
u
v
t
u
x
u
v
u u



Special Cases of the Fluid Flow Equations

Equations (1) and (8) have been solved for only a few special cases, mainly because equations
(8) are nonlinear in the velocities. Fluid mechanics tends to split into two parts (1) viscous flow
and (2) inviscid flow. In the former solutions are available for some special cases.

(1a) Exact solutions where the quadratic terms in (8) are identically zero e.g. steady
incompressible flow through a pipe with v = w = 0 and thus 0 =
c
c
x
u
giving,

2
2
1
x
u
x
P
c
c
=
c
c
v



(1b) Approximate solutions in which the quadratic terms may be neglected e.g. theory of
lubrication or stokes flow past a sphere.

(1c) problems in which the viscosity effects are assumed to occur close to a surface only e.g.
boundary layer theory in which the equations (8) are simplified.

In (1c) curvature of the surface is assumed to effect the flow only through the pressure gradient
term
x
P
c
c
. Surface shape influences the flow outside the boundary layer where the flow is
assumed to be inviscid. In this second category of fluid flow problems further simplifying
assumptions are made.


(2a) The flow is inviscid and incompressible so that,

0 =
c
c
+
c
c
+
c
c
z
w
y
v
x
u

x
P
z
u
w
y
u
v
x
u
u
t
u
c
c
=
c
c
+
c
c
+
c
c
+
c
c

1
(9)

y
P
z
v
w
y
v
v
x
v
u
t
v
c
c
=
c
c
+
c
c
+
c
c
+
c
c

1

z
P
z
w
w
y
w
v
x
w
u
t
w
c
c
=
c
c
+
c
c
+
c
c
+
c
c

1


These are known as Eulers equations.


(2b) In addition the flow is two dimensional so that equations (9) reduce to

0 =
c
c
+
c
c
y
v
x
u

x
P
y
u
v
x
u
u
t
u
c
c
=
c
c
+
c
c
+
c
c

1

y
P
y
v
v
x
v
u
t
v
c
c
=
c
c
+
c
c
+
c
c

1


Governing differential equations

The differential forms of the governing equations in the fluid flow and heat transfer in two
dimension are

1. Continuity equations

0 ) ( ) ( =
c
c
+
c
c
+
c
c
v
y
u
x t

(10)

2. x-momentum equations.


) ( ) ( ) ( ) ( ) (
y
u
y x
u
x x
P
vu
y
uu
x
u
t c
c
c
c
+
c
c
c
c
+
c
c
=
c
c
+
c
c
+
c
c

(11)
3. y-momentum equations.

) ( ) ( ) ( ) ( ) (
y
v
y x
v
x y
P
vv
y
uv
x
v
x c
c
c
c
+
c
c
c
c
+
c
c
=
c
c
+
c
c
+
c
c
(12)


4. Energy equations


(13)


Equations (2), (3) and (4) can be written in general form of:

S
y y x x
v
y
u
x t
+
c
c
I
c
c
+
c
c
I
c
c
=
c
c
+
c
c
+
c
c
) ( ) ( ) ( ) ( ) (
| |
| | |

Or

S
y y x x y
v
x
u
t
+
c
c
I
c
c
+
c
c
I
c
c
=
c
c
+
c
c
+
c
c
) ( ) (
| | |

|
(14)

Where is the general dependent variable
= for momentum equations
= k/C
p
for energy equations.

Convection and Diffusion

For steady 1-D convection and diffusion, the equation (14) can be reduced to:
S
y
T
C
k
y x
T
C
k
x
vT
y
uT
x
T
t
p p
+
c
c
c
c
+
c
c
c
c
=
c
c
+
c
c
+
c
c
) ( ) ( ) ( ) ( ) (


S
x x
u
x
+
c
c
I
c
c
=
c
c
) ( ) (
|
|
Convection Diffusion Source

Or, in general (by neglecting the source term)

) ( ) (
x x
u
x c
c
I
c
c
=
c
c |
|
(15)


The flow must satisfy continuity, so

0 ) ( =
c
c
u
x


In this stage, no reference will be made to the evaluation of velocities. It is assumed that they are
somehow known. The method of computing velocities will be discussed later.

Integration of the transport equation (15) over the control volume shown in Figure 3 gives:

) ( ) ( ) ( ) (
W P
w
w
P E
e
e
w e
x x
u u | |
o
| |
o
| |
I

I
=
w
x o
e
x o
e
w
x A
W P E

Figure 3 Staggered grids

It is convenient to define two variables F and D to represent the convection mass flux per unit
area and diffusion conductance at cell faces.

u F = and
x
D
o
I
=

Then equation (23) becomes:

) ( ) (
W P e P E e w w e e
D D F F | | | | | | =

If we assume linear profile of (central difference) as

) (
2
1
P E e
| | | + = and ) (
2
1
P W w
| | | + = , we get

W W E E P P
A A A | | | + =
(16)


Where

2
e
e E
F
D A = ,
2
w
w W
F
D A = ,
) (
2 2
w e W E
w
w
e
e P
F F A A
F
D
F
D A + + = + =

This assumption of linear profile of to represent
e
and
w
have some difficulties. For
example assume

D
e
= D
w
= 1 and F
e
= F
w
= 4 (continuity F
e
- F
w
= 0 satisfied)

Then A
E
= 1, A
W
= 3, A
P
= 2,

- Now if
E
= 200 and
W
= 100, equation (16) gives
P
= 50 ??
- and if
E
= 100 and
W
= 200, equation (16) gives
P
= 250 ??

Since
P
must be in the range 100
P
200. We must seek better formulation for convection-
diffusion problems.

In general the convection-diffusion formulation can be written as

W W E E P P
A A A | | | + =

With

) 0 , ( ) (
e e e P
F Max P A D A + =
) 0 , ( ) (
w w w W
F Max P A D A + =
) (
w e W E P
F F A A A + + =

Where the new function A(|P|) is defined as follows for different schemes

Table 1 The function A(|P|) for different schemes
Scheme A ( | P | )
Central difference
Upwind
Hybrid
Power law
Exponential
1 - 0.5 |P|
1
Max (0, 1 - 0.5 |P|)
Max {0, (1-0.1 |P|)
5
}
|P| / {exp (|P| - 1}

Where P= F/D is the Peclet number. The Peclet number at the control volume faces can be
calculated as

e
e e
e
e
e
x u
D
F
P
I
= =
o ) (
and
w
w w
w
w
w
x u
D
F
P
I
= =
o ) (


For the 2-D problems, the Peclet number at the north and south faces of the control volume can
be calculated as

n
n
n
D
F
P = and
s
s
s
D
F
P =


Solution of the linear algorithm equations using Tri-diagonal matrix algorithm (TDMA)

Generally TDMA is an efficient tool to solve a set of linear equations in the form of equation
(17) i.e.

i i i i i i i
D T C T B T A + + =
+ 1 1
, i= 2, 3, 4, , N-1 (17)

For the steady 1-D conduction problem, assume that the boundary conditions are given as T
1
and
T
N
; or

At i= 1; A
1
= 1, B
1
= C
1
= 0, D
1
= T
1
.
At i= N; A
N
= 1, B
N
= C
N
= 0, D
N
= T
N
.

The solution seek a relation

i i i i
Q T P T + =
+1
(18)

Or

1 1 1
+ =
i i i i
Q T P T (19)

Substituting (19) into (17) to find


i i i i i i i i i
D Q T P C T B T A + + + =
+
) (
1 1 1


Rearrange the above equation in the form of (18) as

1

=
i i i
i
i
P C A
B
P and
1
1

+
=
i i i
i i i
i
P C A
Q C D
Q , i= 2, 3, 4, , N-1 (20)

At i= 1; P
1
= B
1
/A
1
and Q
1
=D
1
/A
1
(21)
At i= N; P
N
= 0 and from (18) T
N
= Q
N
(22)

Summary of TDMA

1. Calculate P
1
and Q
1
from (21)
2. Calculate P
i
and Q
i
for i= 2, 3, 4, .., N from (20)
3. Set T
N
= Q
N

4. Use (18) to find T
N-1
, T
N-2
, T
3
, T
2
, T
1
by back substitution.


Unsteady 2-D convection and diffusion

The 2-D form of equation (14) can be written as

S
y y x x
v
y
u
x t
+
c
c
I
c
c
+
c
c
I
c
c
=
c
c
+
c
c
+
c
c
) ( ) ( ) ( ) ( ) (
| |
| | |

It can be written as

S
y
J
x
J
t
y
x
=
c
c
+
c
c
+
c
c
) (|
(23)


Where
x
u J
x
c
c
I =
|
| and
x
v J
y
c
c
I =
|
| are the total fluxes

(i.e. convection and diffusion).

N
S
E
W
e w
s
n
n
y o
s
y o
y A
x A
w
J
e
J
n
J
s
J

Figure 4 Control Volume
Integration of equation (23) over the control volume shown above would give

t y x S t x J J t y J J x y
ys yn xw xe
o
p
o
p p p
A A A + A A + A A + A A ) ( ) ( ) ( | |

Let x J J y J J
ys s xe e
A = A = ;.....; (the integrated total fluxes) then the above equations becomes

( )
y x S J J J J
t
y x
s n w e
o
p
o
p p p
A A = + +
A
A A | |
(24)


Again here the superscript o refers to the dependent variable at time t; at time level t+t
are not superscripted.

The above equation (24) must be solved with the continuity equation

0 ) ( ) ( =
c
c
+
c
c
+
c
c
v
y
u
x t



Or

0 ) ( ) ( =
c
c
+
c
c
+
c
c
y x
F
y
F
x t



Integrating the above equation over the control volume in Figure 4 gives

0 ) ( ) ( ) ( = A A + A A + A A t x F F t y F F x y
ys yn xw xe
o
p p


Let x F F y F F
ys s xe e
A = A = ;.....; (mass flow rate through the faces), then

( )
0 = + +
A
A A
s n w e
o
p p
F F F F
t
y x
(25)


Multiply equation (25) by
p
and substrate it from (24) to find

y x S F J F J F J F J
t
y x
p s s p n n p w w p e e
o
p
o
p p
A A = + +
A
A A
) ( ) ( ) ( ) ( ) ( | | | |

| |
(26)


Where (J - F
p
) can be written as

) (
e p E p e e
A F J | | | =
(27)

) (
P W W p w w
A F J | | | =
) (
N p N p n n
A F J | | | =
) (
P S S P s s
A F J | | | =

Where

) 0 , ( ) (
e e e E
F Max P A D A + =
(28)

) 0 , ( ) (
w w w W
F Max P A D A + =
) 0 , ( ) (
n n n N
F Max P A D A + =
) 0 , ( ) (
s s s S
F Max P A D A + =

Where A(|P|) is defined in Table 1.

Substituting (27) in (26) and rearranging to find

b A A A A A
S S N N W W E E P P
+ + + + = | | | | |
(29)


where A
E
, A
W
, A
N
, and A
S
are defined in (28) and

t
y x
A
o
p
o
P
A
A A
=


o
P
o
P
T A y x S b + A A =
o
P S N W E P
A A A A A A + + + + =

and the mass flow rate through the faces of the control volume and the corresponding diffusion
conductance are defined as
y u F
e e
A = ) ( ;
e
e
e
x
y
D
o
A I
=
y u F
w n
A = ) ( ;
w
w
w
x
y
D
o
A I
=
y u F
n n
A = ) ( ;
n
n
n
x
y
D
o
A I
=
y u F
s s
A = ) ( ;
s
s
s
x
y
D
o
A I
=

And the Peclet numbers are

e
e
e
D
F
P = ;
w
w
w
D
F
P = ;
n
n
n
D
F
P = ;
s
s
s
D
F
P =

The function A(|P|) can be selected from Table 1. The power law scheme is recommended by
Patankar, for which

{ }
5
1 . 0 1 ( , 0 ) ( P Max P A
w
=

The resulting set of algebraic equations can be solved using line-by-line TDMA same as in the
case of unsteady 2-D conduction problem.

Flow-Field Calculation (The main difficulties)

1. Pressure gradient term

Consider first the steady 1-D x-momentum equation (11)

) ( ) (
x
u
x x
P
uu
x c
c
c
c
+
c
c
=
c
c


Integrate this over the control volume as shown in Figure, we have

E W e
w
Control volume of
pressure

Figure 5 Control volume

) ( ) ( ) ( ) ( ) (
e w w e w e
P P
y
u
x
u
uu uu +
c
c

c
c
=

This we assume a piecewise-Linear profile for pressure, we find

) (
2
1
) (
2
1
) (
2
1
e w e p p w e w
P P P P P P P P = =

This means that the momentum equation will contain the pressure difference between two
alternate grid points and not between adjacent points.

100 500 100 500 100 500 100


Figure 6 Pressure difference between two alternate grid points

If the pressure field is given as in above, for any point P, the corresponding P
w
P
e
can be seen
to be zero. Thus such a worry pressure field will be like a uniform pressure field (dp/dx = 0) by
the momentum equation???

2. Representation of the continuity equation

A similar difficulty arises in the integration of the steady 1-D continuity equation (du/dx=
0) to find u
w
u
e
= 0 or

0 ) (
2
1
) (
2
1
= + +
p w e p
u u u u

0 =
p e
u u ??


A Remedy: The Staggered Grid

In the staggered grid, the velocity is calculated in the points that lie on the faces of the
pressure control volume as shown in Figure 7 below.

Control volume of
U-velocity
Control volume of
pressure
1 i
u
i
u
1 + i
u
1 i
P
i
P
1 + i
P


Figure 11.8 Control volumes of pressure and velocity

In this way, we have the main control volumes for the pressure (and any other scalar
variable such as density temperature etc.) and different control volumes for the velocities.

Advantages:

i. The mass flow rate across the main control volume faces (F
e
F
w
) can now be
calculated without any interpolation for the velocity component.
ii. The continuity equation would contain the differences of adjacent velocities.
iii. The pressure difference between two adjacent pressure grid points now becomes
the driving force for the velocity component located between these pressure grid
points.

The price here in the difficulty in the programming since the velocity grid is staggered the new
notation based on grid line and cell numbering must be used.

Solution algorithm using staggered grid (Two-Dimensional)

The momentum equations

x
P
y y x x
vu
y
uu
x
u
t c
c

c
c
c
c
+
c
c
c
c
=
c
c
+
c
c
+
c
c
) ( ) ( ) ( ) ( ) (
|

|


integration of this equation over the u-control volume shown below, with the center at i, j gives

y P P u A u A u A u A u A
j i j i j i
u
S j i
u
N j i
u
w j i
u
E j i
u
P
A + + + =
+ +
) (
, 1 , 1 , 1 , , 1 , 1 ,


or it can be written as


y P P u A u A
j i j i nb
u
nb j i
u
P
A + =

) (
, 1 , ,
(30)


Similarly the integration of the y-momentum equation over the v-control volume with the center
at i, j gives

x P P v A v A
j i j i nb
v
nb j i
v
P
A + =

) (
, 1 , ,
(31)


where A
u
s and A
v
s are calculated in the same way as in (29)

N
S
E W
e w
s
n
J-2
j
j+1
J
J+1
I-1 i I i+1 I+1 i-1 I-2
j-1
J-1
P
v-cell
u-cell

Figure 8 Two-dimensional staggered grid



Semi-Implicit Method for Pressure-Linked Equations (SIMPLE)
It is an efficient algorithm put by Patankar in 1972 and it is essentially a Guess-and-Correct
procedure for calculation of pressure on the staggered grid arrangement.

To start the SIMPLE algorithm, the pressure field P
*
is guessed. Then the momentum equations
(30) and (31) are solved using the guessed pressure field to find the velocities such an imperfect
velocity field based on P
*
will be denoted by u
*
and v
*


y P P u A u A
j i j i nb
u
nb j i
u
j i
A + =

) (
*
,
*
, 1
* *
, ,
(32)


x P P v A v A
j i j i nb
v
nb j i
v
j i
A + =

) (
*
,
*
1 ,
* *
, ,
(33)


Now, let us propose that the correct pressure P is obtained from

P P P ' =
*
(34)


where P' will be called pressure correction.

Similarly, we define the velocity corrections u' and v' to the guessed velocities u
*
and v
*


u u u ' =
*

v v v ' =
*


subtraction of Equation (32) from Equation (30) gives


y P P u A u A
j i j i nb
u
nb j i
u
j i
A + =

) (
'
,
'
, 1
' '
, ,
(35)


Similarly for the y-momentum equation
x P P v A v A
j i j i nb
v
nb j i
v
j i
A + =

) (
'
,
'
1 ,
' '
, ,
(36)


At this point an approximation is introduced to ensure

x P P v A u A
j i j i nb
v
nb nb
u
nb
A + =

) (
'
,
'
1 ,
' '


Then equations (35) and (36) are simplified to

) (
'
,
'
, 1 ,
'
, j i j i
u
j i j i
P P d u =



) (
'
,
'
1 , ,
'
, j i j i
v
j i j i
P P d v =



y P P P P u u A u u A
j i j i j i j i nb nb
u
nb j i j i
u
j i
A + =

) ( ) ( ) ( ) (
*
, ,
*
, 1 , 1
* *
, , ,
where
u
j i
u
j i
A
y
d
,
,
A
= and
v
j i
v
j i
A
x
d
,
,
A
=

Then add these corrections to the guessed values in Equations (37) and (38) gives

) (
'
,
'
, 1 ,
*
, , j i j i
u
j i j i j i
P P d u u + =

(37)

) (
'
,
'
1 , ,
*
, , j i j i
v
j i j i j i
P P d v v + =

(38)


Similarly expressions exit for u
i+1,j
and v
i,j+1
as

) (
'
, 1
'
, , 1
*
, 1 , 1 j i j i
u
j i j i j i
P P d u u
+ + + +
+ =
(39)

) (
'
1 ,
'
1 , 1 ,
*
1 , 1 , + + + +
+ =
j i j i
v
j i j i j i
P P d v v
(40)


To find pressure correction P

, the continuity equation is used



0 ) ( ) ( =
c
c
+
c
c
+
c
c
v
y
u
x t



Continuity is satisfied is discretized form for the main (scalar) control volume shown in Figure
below.
N
S
E W
e w
s
n
n
y o
s
y o
y A
x A
e
u
J-1
j
j+1
J
J+1
I-1 i
I i+1 I+1

Figure 11.10 Main scalar control volume


( )
{ } { } 0 ) ( ) ( ) ( ) (
, 1 , , , 1
= A + A +
A
A A
+ +
x v v y u u
t
y x
j i j i j i j i
o
p p


(41)


Substituting of the corrected velocities equation equations (37)-(39) into equation (40) gives
(after arranging)

p
j i j i
p
j i j i
p
j i j i
p
j i j i
p
j i j i
p
j i
b P A P A P A P A P A
, 1 , 1 , 1 , 1 , , 1 , 1 , 1 , 1 , ,
+ ' + ' + ' + ' = '
+ + + +
(42)


where
y d A
j i
u p
j i
A =
+ , 1 ,
) (
y d A
j i
u p
j i
A =
, , 1
) (
x d A
j i
v p
j i
A =
+ + 1 , 1 ,
) (
x d A
j i
v p
j i
A =
, 1 ,
) (
p
j i
p
j i
p
j i
p
j i
p
j i
A A A A A
1 , 1 , , 1 , 1 , + +
+ + + =
( )
{ } { } x v v y u u
t
y x
b
j i j i j i j i
o
p p
p
j i
A + A +
A
A A
=
+ + 1 ,
*
,
*
, 1
*
,
*
,
) ( ) ( ) ( ) (



The source term b
p
i,j
is the continuity imbalance arising from incorrect velocity field u
*
and v
*
. In
the final iteration, the value of b
p
will come out to be practically zero for all the control volume.
Then P

=0 at all grid points will be an acceptable solution of equation (42) and the starred
velocities and pressure will themselves be the correct values (i.e. P
*
= P, u
*
= u, v
*
= v).

The source term b
p
thus serves as a useful indicator of the convergence of the fluid flow solution.

Assembly of a complete SIMPLE algorithm.
1. Guess the pressure field P
*

2. Solve the momentum equations (37) and (38) to find u
*
and v
*
.
3. Solve P equation (42).
4. Calculate P from P P P ' + =
*

5. Calculate u and v from u
*
and v
*
using equations (39) and (40)
6. Check convergence
7. If no convergence set P
*
= P, u
*
= u and v
*
= v and return to step 2 and return to step 2 and
repeat the whole procedure until a converged solution is obtained.

Note that the solution of the pressure correction equation (42) is expected to diverge unless some
under-relaxation is used during the iteration, i.e. we add only a fraction of P to P
*
, or instead
of equation (34) we employ

P P P
p
' + = o
*


where o
p
is the pressure under-relaxation factor. Patankar recommend o
p
~ 0.8.

Implementation of Boundary Conditions

The flows inside a CFD solution domain are driven by the boundary conditions.
The process of solving a field problem (e.g. fluid flow or heat and mass transfer) is nothing more
than the extrapolation of a set of data defined the boundary surface in the domain interior.

The most common boundary conditions are:
1. Inlet
2. Outlet
3. Wall
4. Prescribed pressure
5. Symmetry

The above boundary conditions are easy to implement for the velocities, temperatures, ., etc.
But the new pressure correction P equation (42) needs boundary conditions to be solved.

There are two kinds of conditions at the boundary. Either (i) the pressure at the boundary is
given, or (ii) the velocity component normal to the wall is specified.

(i) If the guessed pressure field P
*
is arranged such that at a boundary P
*
= P
given
, then the
value of P at that boundary will be zero.
(ii) If the grid is designed such that the boundary is on the face of the of the control
volume as shown in Figure 10 below.


N
S
E
W
e w
s
n
n
y o
s
y o
y A
x A
e
u
boundary
Given velocity
component

Figure 10 Pressure face of control volume

The velocity u
e
is given as a boundary condition. In the derivation of P equation for the above
control volume from the continuity equation, the flow rate across the boundary should be
expressed in terms of a given u
e
itself. Then P'
E
(P'
i+1,j
) will not appear will not appear (A
p
i+1,j
) in
the P equation for this case.

Вам также может понравиться