Computational Fluid Dynamics (CFD

)
• Navier-Stokes Equations
• Reynolds Number
• Numerical Analysis of Navier-Stokes Equations
• SIMPLE and PISO algorithm
• OpenFoam Project
• Some results for the Lid-driven cavity flow
http://www.phy.syr.edu/courses/PHY600.10Fall/Presentations/jorge.pdf
Navier Stokes Equations
For an Incompressible Newtonian Fluid
( ) 0 = · V +
c
c
u
t

µ
µ
   


    





Forces
Viscous
Forces
essure
Dt
u D
u p u u
t
u
2
Pr
V + V ÷ =
|
.
|

\
|
V · +
c
c
µ µ
Continuity Equation
viscosity : pressure, : velocity, : density, : µ µ p u

In order to make some estimates, let us suppose we have a typical change in
speed given by U over a typical length L.
Forces Inertial
2
~
L
U µ
Forces Viscous
2
~
L
U µ
Viscosity Kinematic : Number, Reynolds : Re
/ Forces Viscous
Forces Inertial
u
u µ µ
= = ~
LU LU
For low Reynolds number we have Stokes (or creeping) flow. This is the typical regime
where cells move.
Reynolds Number
Numerical Analysis of Navier Stokes Equations
The first issue is to select the points in the domain at which the values of the
unknown dependent variables are to be computed.
Collocated Arrangement Staggered Arrangement
Issues solving Navier-Stokes Equations
• Lack of an independent equation for the pressure.
• Presence of non-linear quantities in the convective
term.
• The equations are intricately coupled.
Discretisation Process
Time derivative: It is used the explicit Euler method unless
detailed time history of the flow be required.
( ) ( ) ( )
t
u u
t
u
n n
A
÷
~
c
c
+
µ µ µ
1
Gradient, Divergence and Laplacian: The discretisation typically is
performed using Gauss’ theorem according to the following equations
Gradient
f
f
f
s V
S S d dV | | |
¿
} }
= = V
  
Divergence
¿
} }
· = · = · V
f
f
S V
u S u S d dV u






( ) ( ) ( ) Laplacian
f f
f
f
S V
S S d dV | | | V · I = V I · = V I · V
¿
} }
     
Algorithm: SIMPLE
( ) ( ) ( )
J i J I J I nb nb J i J i
A p p u a u a
x
p
y
u
y x
u
x
vu
y
uu
x
, , , 1 , ,
÷ + = ¬
c
c
÷
|
|
.
|

\
|
c
c
c
c
+ |
.
|

\
|
c
c
c
c
=
c
c
+
c
c
÷ ¿
µ µ µ µ
( ) ( ) ( )
j I J I J I nb nb j I j I
A p p v a v a
y
p
y
v
y x
v
x
vv
y
uv
x
, , 1 , , ,
÷ + = ¬
c
c
÷
|
|
.
|

\
|
c
c
c
c
+ |
.
|

\
|
c
c
c
c
=
c
c
+
c
c
÷ ¿
µ µ µ µ
( ) ( ) ( ) ( ) | | ( ) ( ) | | 0 0
, 1 , , , 1
= ÷ + ÷ ¬ =
c
c
+
c
c
+ + j I j I J i J i
vA vA uA uA v
y
u
x
µ µ µ µ µ µ
The algorithm is essentially a guess-and-correct procedure for the calculation
of pressure on the staggered grid.
From a guessed we get velocities
*
p
( ) ( )
( ) ( ) 2
1
,
,
*
1 ,
* *
,
*
,
,
,
*
, 1
* *
,
*
,
j I
J I J I nb
nb
j I
j I
J i
J I J I nb
nb
J i
J i
A p p v a v a
A p p u a u a
÷ + =
÷ + =
÷
÷
¿
¿
We define the correction pressure p’ as the difference between the correct pressure
and the guessed pressure. Analogously for the velocities.
' ' '
* * *
v v v u u u p p p + = + = + =
By subtracting Eqs. (1) and (2) we get
( ) ( )
( )
j I J I J I nb nb j I j I
J i J I J I nb nb J i J i
A p p v a v a
A p p u a u a
, , 1 , , ,
, , , 1 , ,
' ' ' '
3 ' ' ' '
÷ + =
÷ + =
÷
÷
¿
¿
0 ' , ' : point Key ~
¿ ¿ nb nb nb nb
v a u a
The pressure correction equation is susceptible to divergence
Unless some under-relaxation is used. We then have
1 0 , '
*
s s + =
p p
new
p p p o o
We need some not too small to have appropriate
Computation speed and not too big to assure convergence.
Unfortunately, the optimum value are flow dependent and
must be sough on a case-by-case basis.
p
o
From (3) we get u and v in terms of p’
We use continuity Eq. to provide a relation for p’
1 , 1 , 1 , 1 , , 1 , 1 , 1 , 1 , ,
' ' ' ' '
÷ ÷ + + ÷ ÷ + +
+ + + =
J I J I J I J I J I J I J I J I J I J I
p a p a p a p a p a
The PISO algorithm
• PISO involves one predictor step and two corrector steps and
may be seen as an extension of SIMPLE, with a further
corrector step to enhance it.
• PISO was developed originally for the non-interative
computation of unsteady compresible flows, but it has been
adapted succesfully on steady state problems.
• Although the method implies a considerable increase in
Computational effort it has been found to be efficient and fast.
OpenFoam Project
OpenFoam is first and foremost a C++ library for the customisation
and extension of numerical solvers for continuum mechanics
problems, including computational fluid dynamics (CFD).
Apart from the standard solvers, one of the distinguishing features of OpenFOAMis
its relative ease in creating custom solver applications. OpenFOAMallows the user to
use syntax that closely resemble the partial differential equations being solved. For
example the equation
( )
( ) p u u
t
u
V ÷ = V · V ÷ · V +
c
c


 



µ |
µ
is represented by the code
Next I used the program to study the Lid-driven cavity flow. This is a typical phenomena
to test CFD algorithms.
Pressure
Velocity flow field

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.