Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
DrivenCavity_Matyka

# DrivenCavity_Matyka

Ratings: (0)|Views: 35 |Likes:

### Availability:

See more
See less

05/10/2014

Solution to two-dimensional Incompressible Navier-Stokes Equations withSIMPLE, SIMPLER and Vorticity-Stream Function Approaches.Driven-Lid Cavity Problem: Solution and Visualization.
Maciej Matyka
Computational Physics Section of Theoretical PhysicsUniversity of Wroclaw in PolandDepartment of Physics and AstronomyExchange Student at University of Link¨oping in Swedenmaq@panoramix.ift.uni.wroc.plhttp://panoramix.ift.uni.wroc.pl/
maqMay 8, 2003
Abstract
In that report solution to incompressible Navier - Stokes equations in non - dimensional form will be presented.Standard fundamental methods: SIMPLE, SIMPLER (SIMPLE Revised) and Vorticity-Stream function approach arecompared and results of them are analyzed for standard CFD test case - Drived Cavity ﬂow. Diﬀerent aspect ratiosof cavity and diﬀerent Reynolds numbers are studied.
1 Introduction
The main problem is to solve two-dimensional Navier-Stokes equations. I will consider two diﬀerent mathemat-ical formulations of that problem:
u,v,p
primitive variables formulation
ζ,ψ
vorticity-stream function approachI will provide full solution with both of these methods.First we will consider three standard, primitive componentformulations, where fundamental Navier-Stokes equationwill be solved on rectangular, staggered grid. Then, solu-tion on non-staggered grid with vorticity-stream functionform of NS equations will be shown.
2 Math background
We will consider two-dimensional Navier-Stokes equationsin non-dimensional form
1
:
1
We consider ﬂow without external forces i.e. without gravity.

∂
u∂t
=
(
u
)
u
ϕ
+1
Re
2
u
(1)
D
=
u
= 0 (2)Where equation (2) is a continuity equation which hasto be true for the ﬁnal result.
3 Primitive variables formulation
First we will examine SIMPLE algorithm which is basedon primitive variables formulation of NS equations. Whenwe say ”primitive variables” we mean
u,v,p
where
u
=(
u,v
) is a velocity vector, and
p
is pressure. We can rewriteequation (1) in diﬀerential form for both velocity compo-nents:
∂u∂t
=
∂u
2
∂x
+
∂uv∂y
∂p∂x
+1
Re
(
∂
2
u∂x
2
+
∂
2
v∂y
2
) (3)
∂v∂t
=
∂v
2
∂y
+
∂uv∂x
∂p∂y
+1
Re
(
∂
2
u∂x
2
+
∂
2
v∂y
2
) (4)We rewrite continuity equation in the following form:
∂u∂x
+
∂v∂y
= 0 (5)These equations are to be solved with SIMPLE method.
3.1 SIMPLE algorithm
SIMPLE algorithm is one of the fundamental algorithm tosolve incompressible NS equations. SIMPLE means: SemiImplicit Method for Pressure Linked Equations.Algorithm used in my calculations is presented in theﬁgure (1). First we have to guess initial values of thepressure ﬁeld
2
(
)
n
and set initial value of velocity ﬁeld- (
)
n
, (
)
n
. Then equation (3) and (4) is solved toobtain values of (
)
n
+1
, (
)
n
+1
. Next we have to solvepressure-correction equation:
2
p
=1
t
(
·
) (6)After that we use simple relations to obtain correctedvalues of pressure and velocity ﬁelds. Then we can checkif solution is coverged.
2
Subscripts denote computational step, where ”n+1” means cur-rent step.
Guess(P*)
n
, (U*)
n
, (V*)
n
Solve Momentumeq. for(U*)
n+1
, (V*)
n+1
Solve Poisson eq.for (P’)P
n+1 
= (P*)
n 
+ (P’)U
n+1 
= (U*)
n 
+ (U’)V
n+1 
= (V*)
n 
+ (V’)
If not covergedIf coverged
Visualize Results
Figure 1: SIMPLE Flow Diagram
3.2 Numerical Methods in SIMPLE
3.2.1 Staggered Grid
For discretization of diﬀerential equations I am using stag-gered grid. In the ﬁgure (2) staggered grid for rectangulararea is sketched. Primitive variables are placed in diﬀerentplaces. In points
i,j
on a grid pressure
values, in points
i
+0
.
5
,j u
x-velocity components and in points
i,j
+0
.
5
v
y-velocity components are placed. That simple model of staggered grid gives us possibility to use simple discretiza-tion with second order accuracy which will be discussedlater.
u
i+0.5,j
p
i,j
v
i,j-0.5
v
i,j+0.5
u
i-0.5,j
p
0,0
u
0.5,0
v
0,0.5
Figure 2: Staggered grid: ﬁlled circles
, outline circles
x-velocity, cross
y-velocity component.2

Dierential Discretization Type
∂u∂tu
n
+1
u
n
t
forward,
O
(
h
)
∂
2
u∂x
2
u
i
+1
,j
2
u
i,j
+
u
i
1
,j
(∆
x
)
2
central,
O
(
h
2
)
∂u
2
∂xu
2
i
+1
,j
u
2
i
1
,j
(2
·
x
)
central,
O
(
h
2
)
∂p∂x p
i
+1
,j
p
i,j
(∆
x
)
forward,
O
(
h
)
∂p∂y p
i,j
+1
p
i,j
(∆
x
)
forward,
O
(
h
)Table 1: Discretizations used in SIMPLE algorithm
3.2.2 Discretization Schemes
Let us now examine some numerical methods used in pre-sented solution. For algorithm presented in the ﬁgure (1)we have only three equations which have to be discretizedon a grid. First we have momentum equations (3) and (4).Discrete schemes used in discretization of momentumequations are presented in a table (1). Using presenteddiscrete form of derivatives I obtain numerical scheme formomentum equations exactly in the form presented in [1].Equations (3) , (4) discretized on staggered grid can bewritten
3
as follows
4
:
u
n
+1
i
+0
.
5
,j
=
u
ni
+0
.
5
,j
+ ∆
t
·
(
A
(∆
x
)
1
(
p
i
+1
,j
p
i,j
)) (7)
v
n
+1
i,j
+0
.
5
=
u
ni,j
+0
.
5
+ ∆
t
·
(
B
(∆
y
)
1
(
p
i,j
+1
p
i,j
)) (8)where
A
and
B
are deﬁned as:
A
=
a
1
+ (
Re
)
1
·
(
a
3
+
a
4
) (9)
B
=
b
1
+ (
Re
)
1
·
(
b
3
+
b
4
) (10)and respectively we deﬁne:
3
Please note than cited [1] reference contains some print mistakesthere.
4
Generally I show there only an idea how to write discretizedequations, they should be rewritten with ”*” and ”’” chars for con-crete steps of the algorithm
a
1
=
(
u
2
)
ni
+1
.
5
,j
(
u
2
)
ni
0
.
5
,j
2
·
x
(
u
˙
v
)
ni
+0
.
5
,j
+1
(
u
˙˙
v
)
ni
+0
.
5
,j
1
2
·
y
(11)
b
1
=
(
v
2
)
ni,j
+1
.
5
(
v
2
)
ni,j
0
.
5
2
·
y
(
v
˙
u
)
ni
+1
,j
+0
.
5
(
v
˙˙
u
)
ni
1
,j
+0
.
5
2
·
x
(12)(
a
3
) =
u
ni
+1
.
5
,j
2
·
u
ni
+0
.
5
,j
+
u
ni
0
.
5
,j
(∆
x
)
2
(13)(
a
4
) =
u
ni
+0
.
5
,j
+1
2
·
u
ni
+0
.
5
,j
+
u
ni
+0
.
5
,j
1
(∆
y
)
2
(14)(
b
3
) =
v
ni,j
+1
.
5
2
·
v
ni,j
+0
.
5
+
v
ni,j
0
.
5
(∆
y
)
2
(15)(
b
4
) =
v
ni
+1
,j
+0
.
5
2
·
v
ni,j
+0
.
5
+
v
ni
1
,j
+0
.
5
(∆
x
)
2
(16)Now we have deﬁned almost everything. Dotted veloc-ities should be also deﬁned. I use simple expressions forit:˙
u
= 0
.
5
·
(
u
i
0
.
5
,j
+
u
i
0
.
5
,j
+1
) (17)˙˙
u
= 0
.
5
·
(
u
i
+0
.
5
,j
+
u
i
+0
.
5
,j
+1
) (18)˙
v
= 0
.
5
·
(
v
i,j
+0
.
5
+
v
i
+1
,j
+0
.
5
) (19)˙˙
v
= 0
.
5
·
(
v
i,j
0
.
5
+
v
i
+1
,j
0
.
5
) (20)
3.2.3 Poisson Equation
For equation I use simple iterative procedure. In the ﬁgure(3) points used for calculation of pressure at each (
i,j
) gridpoints are marked.
P
i,j
P
i+1,j
P
i-1,j
P
i,j-1
P
i,j+1
Figure 3: Points on a grid used in iterative procedure forPoisson equation solving.3