Anda di halaman 1dari 24

Semi Implicit Method for Incompressible Flows: FVM

on Staggered Grids

Shyam Sunder
Mechanical Engineering

BITS Pilani
April 21, 2019
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 1 / 24
Table of contents

1 Integral form of governing equations

2 Governing equations for steady, incompressible, isothermal flows

3 Control volumes for cartesian, staggered mesh

4 x momentum equation

5 y momentum equation

6 SIMPLE algorithm

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 2 / 24
Integral form of governing equations
The governing equations for fluid flow are the Navier-Stokes
equations in two dimensions which can be written as:
Momentum:
R ∂ρU~ R R R R
V ∂t dV + V ∇ · CdV = − V ∇PdV + V ∇ · TdV + V ρ~ g dV
R  ∂ρ 
Continuity: V ∂t + ∇ · (ρU) ~ dV = 0
 
Here U~ = u is the velocity vector
v
 
~ ~ ρuu ρuv
C = ρU U = is the convective flux tensor:
ρvu ρvv
T = −λ(∇ · U)I~ + 2µD is the viscous stress tensor, I is the identity
1
tensor, D = 2 (∇U ~ + ∇U ~ T ) is the deformation gradient tensor
   
−λ(∇ · U)~ + 2µ ∂u µ ∂v
+ ∂u
Therefore T =    ∂x ∂x ∂y 
∂u
µ ∂y + ∂x ∂v ~ ∂v
−λ(∇ · U) + 2µ ∂y

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 3 / 24
Governing equations for steady, incompressible flows
For use in FVM, we have to convert the volume integrals to surface
integrals where possible using Gauss divergence theorem
For steady incompressible flows we have density independent of time,
but it can still be a function of space as in 2-phase flows. Therefore
~ ~ · n̂dS = 0
R R
Continuity: V ∇ · ρUdV = 0 or S ρU
The steady momentum equation becomes:
R R R R
S n̂ · CdS =

− S P n̂dS + S n̂ · TdS + V ρ~g dV
 
2µ ∂u
∂x µ ∂v
∂x + ∂u
∂y 
where T =    for incompressible flows
∂u ∂v ∂v
µ ∂y + ∂x 2µ ∂y
We split the viscous fluxes into two parts as follows where the first
one is treated implicitly and second one is treated explicitly as a
source term: Z Z Z
~ ~ T
R R
S n̂·CdS = − S P n̂dS + n̂ · µ∇UdS + n̂ · µ∇U dS + ρ~g dV
|S {z } |S {z V
}
treated implicitly treated explicitly as source term Q

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 4 / 24
Governing equations for steady, incompressible flows

Putting the expressions for different terms we get:


R
Continuity equation: S (nx ρu + ny ρv )dS = 0
R R
x mom.: S (nx ρu + ny ρv )u dS = − S Pnx dS + 
Z Z
R  ∂u ∂u
 ∂u ∂v
S n µ
x ∂x + n µ
y ∂y dS + nx µ + n y µ dS + ρgx dV
S ∂x ∂x V
| {z }
treated explicitly as source term Qx
R R
y mom.: S (nx ρu + ny ρv )v dS= − S Pny dS + 
Z Z
R  ∂v ∂v
 ∂u ∂v
S nx µ ∂x + ny µ ∂y dS + nx µ
∂y
+ ny µ
∂y
dS + ρgy dV
|S {z V
}
treated explicitly as source term Qy
In the following, we assume one Gauss quadrature point located at
center of faces to evaluate the surface integral terms which is
sufficient for achieving 2nd order accuracy

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 5 / 24
Control volumes for a Cartesian, Staggered mesh
Scalars like pressure P, pressure
correction P 0 are stored at control
volume centres
x component of velocity, u, are stored
at the center of vertical faces
y component of velocity, v , are stored
at the center of horizontal faces

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 6 / 24
Continuity equation: Mass conservation

P R ~ · n̂dS = 0 Or
ρU
P R
Sm S (nx ρu + ny ρv )dS = 0
faces faces
Calculate the surface integral numerically by assuming one Gauss
quadrature point located at faces centers
We get: ρu∆y |e − ρu∆y |w + ρv ∆x|n − ρv ∆x|s = 0 Eqn.(1)
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 7 / 24
Discretized x Momentum equation

The x component of momentum equation


is:
R
S (nx ρu + ny ρv )udS = 
− S Pnx dS + S nx µ ∂u ∂u
R R
+ n y ∂y dS +
µ
Z  ∂x Z
∂u ∂v
nx µ + ny µ dS + ρgx dV
S ∂x ∂x V
| {z }
treated explicitly as source term Qx

By using one Gauss quadrature point located at face centres, we get:


 2
ρu |E − ρu 2 |P ∗ ∆y + ρvu|ne − ρvu|se ∗ ∆x Convective =
 
 
P|P − P|E ∗ ∆y Pressure +
 ∂u
µ ∂x |E − µ ∂u
 ∂u ∂u

∂x |P ∗ ∆y + µ ∂y |ne − µ ∂y |se ∗ ∆x Viscous +
 ∂u
µ ∂x |E − µ ∂u
 ∂v ∂v
x

∂x |P ∗ ∆y + µ ∂x |ne − µ ∂x |se ∗ ∆x + ρe ge ∆x∆y Body

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 8 / 24
Discretized x momentum eqn.: Using Central scheme
uE = 12 (ue + uee ) vne = 21 (vn + vene )
uP = 21 (uw + ue ) vse = 12 (vs + vese )
une = 12 (ue + unne ) ρe = 12 (ρP + ρE )
use = 12 (usse + ue ) gex = Constant
ρne = ρse =
1 1
4 (ρP +ρE +ρNE +ρNP ) 4 (ρP +ρE +ρSE +ρSP )
µne = 14 (µP + µE + µse = 14 (µP + µE +
µNE + µNP ) µSE + µSP )
We
 get:ue +uee 2 e 2
− ρP uw +u ρne ue +u
   vn +vene 
ρE 2  2 ∗ ∆y +  nne
2 2 −
ρse usse2+ue vs +v

2
ese
∗ ∆x Convective
= PP − P E ∗ ∆y +
 u −u ue −uw
 unne −ue ue −usse
Pressure

µE ∆x − µP ∆x
ee e
∗ ∆y + µne ∆y − µse ∆y ∗ ∆x Viscous
 u −u ue −uw
 vene −vn vese −vs

+ µE ∆x − µP ∆x
ee e
∗ ∆y + µne ∆x − µse ∆x ∗ ∆x+
ρe gex ∆x∆y Body

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 9 / 24
Fully discretized x momentum equation
The
 equation after rearrangement becomes:
ρE ∆y ρP ∆y ρne ∆x ρse ∆x
4 (ue + uee ) − 4 (uw + ue ) + 4 (vn + vene ) − 4 (vs +

vese ) + (µP + µE ) ∆y ∆x
∆x + (µse + µne ) ∆y ue +
   
ρE ∆y ∆y ρP ∆y ∆y
4 (ue + uee ) − µE ∆x uee + − 4 (uw + ue ) − µP ∆x uw +
 
ρne ∆x ∆x
4 (vn + vene ) − µne ∆y unne +
 
ρse ∆x ∆x
− 4 (vs + vese ) − µse ∆y usse = (PP − PE ) ∗ ∆y +

µE ∆y ∆y
∆x (uee − ue ) − µP ∆x (ue − uw ) + µne (vene − vn ) − µse (vese −

x
vs ) + ρe ge ∆x∆y
P
We write it as: ae ue + anb unb = (PP − PE )∆y + Qx Eqn.(2)
nb
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 10 / 24
Discretized y Momentum equation

The y component of momentum equation


is:
R
S (nx ρu + ny ρv )vdS = 
∂v ∂v
R R
− S Pny dS + S nx µ ∂x + ny µ ∂y dS +
Z   Z
∂u ∂v
nx µ + ny µ dS + ρgy dV
S ∂y ∂y V
| {z }
treated explicitly as source term Qy

By using one Gauss quadrature point located at face centres, we get:


ρuv |ne − ρuv |nw ∗ ∆y + ρv 2 |N − ρv 2 |P ∗ ∆x Convective =
  
 
P|P − P|N ∗ ∆x Pressure +
 ∂v
µ ∂x |ne − µ ∂v
 ∂v
|N − µ ∂v

∂x |nw ∗ ∆y + µ ∂y ∂y |P ∗ ∆x Viscous +
 ∂u ∂u
 ∂v y
|N − µ ∂v

µ ∂y |ne − µ ∂y |nw ∗ ∆y + µ ∂y ∂y |P ∗ ∆x + ρn gn ∆x∆y Body

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 11 / 24
Discretized y momentum eqn.: Using Central scheme
vN = 21 (vn + vnn ) vne = 21 (vn + vene )
vP = 21 (vs + vn ) vnw = 12 (vwnw + vn )
une = 12 (ue + unne ) ρn = 12 (ρP + ρN )
unw = 12 (uw +unnw ) gny = Constant
ρne = ρnw = 14 (ρP + ρN +
1
4 (ρP +ρE +ρN +ρNE ) ρNW + ρWP )
µne = µnw = 14 (µP + µN +
1
4 (µP +µE +µN +µNE ) µNW + µWP )
We get: ρne ue +u
 v +v 
− ρnw uw +u
  v +v 
2
nne n
2
ene
2
nnw wnw
2
n
∗ ∆y +
vn +vnn 2 vs +vn 2
   
ρ
 N 2 − ρP  2 ∗ ∆x Convective =
P − PN ∗ ∆x Pressure +
 P v −v
µne ene∆x n − µnw vn −v −vn
∗ ∆y + µN vnn∆y −vs
− µP vn∆y
 
∆x
wnw
∗ ∆x Viscous
+ µne unne∆y−ue − µnw unnw∆y−uw ∗ ∆y + µN vnn∆y −vn −vs
− µP vn∆y
 
∗ ∆x+
y 
ρn gn ∆x∆y Body

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 12 / 24
Fully discretized y momentum equation
The
 equation after rearrangement becomes:
ρne ∆y ρnw ∆y ρN ∆x
4 (unne + ue ) − 4 (uw + unnw ) + 4 (vn + vnn ) −

ρP ∆x ∆y ∆x
4 (vn + vs ) + (µne + µnw ) ∆x + (µP + µN ) ∆y vn +
 
ρne ∆y ∆y
4 (unne + ue ) − µne ∆x vene +
 
ρnw ∆y ∆y
− 4 (uw + unnw ) − µnw ∆x vwnw +
   
ρN ∆x ∆x ρP ∆x ∆x
4 (vnn + vn ) − µN ∆y vnn + − 4 (vn + vs ) − µP ∆y vs =

∆x
(PP − PN ) ∗ ∆x + µne (unne − ue ) − µnw (unnw − uw ) + µN ∆y (vnn −

∆x
vn ) − µP ∆y (vn − vs ) + ρn gyn ∆x∆y
P
We write it as: bn vn + bnb vnb = (PP − PN )∆x + Qy Eqn.(3)
nb
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 13 / 24
How to solve the equations?

We obtained the discrete equations as:


Continuity: ρe ue ∆y − ρw uw ∆y + ρn vn ∆x − ρs vs ∆x = 0
P
x mom.: ae ue + anb unb = (PP − PE )∆y + Qx
nb
P
y mom.: bn vn + bnb vnb = (PP − PN )∆x + Qy
nb
We observe that the equations are non-linear and coupled. Biggest
problem is that we do not have equation for pressure
The primery idea behind SIMPLE is to create a discrete equation for
pressure correction from the discrete continuity equation
The continuity equation contains discrete face velocities. We need
some way to relate these velocities to the discrete pressure field
SIMPLE uses discrete momentum equations to derive this connection

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 14 / 24
How to solve the equations?
Due to non-linearity and coupling between equations, these discrete
equations can not be solved directly. The coefficients a and b and the
source terms Qx , Qy depend on the unknown solution
We have to use an iterative approach in which first the coefficients a,
b and the source terms Qx , Qy are updated. These are called Outer
iterations
The linearized system of equations can then be solved iteratively or
directly but the iterative methods are advantageous as we are solving
for something which is provisional. We are continuously improving the
solution. There is no point in spending computational effort with
direct methods in solving the system of equations which will be
updated soon
Multigrid based iterative methods give fastest solution. The iterations
performed while solving the linearized system of equations are called
Inner iterations

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 15 / 24
SIMPLE: Semi Implicit Method for Pressure Linked Equations
The discrete equations can be written with an outer iteration index m
as follows:
x mom.: ae uem∗ + anb unbm∗ = (P m−1 − P m−1 )∆y + Q m−1
P
P E x
nb
y mom.: bn vnm∗ + bnb vnb m∗ = (P m−1 − P m−1 )∆x + Q m−1
P
P N y
nb
We introduced the outer iteration index so that u m , v m represents the
velocity field after mth outer iteration. Such a field satisfies both the
continuity and the momentum equations to the extent of mth outer
iteration
The ∗ on u m∗ , v m∗ denotes a velocity field which is obtained from a
guessed pressure and velocity field (a and b are functions of velocity
components). Such a field is obtained from the momentum equations
during mth outer iteration but it does not satisfy continuity equation
Note that the pressure and source term on right hand side of
equations are those from the previous outer iteration. This also
contributes to ‘Semi-Implicitness’ in SIMPLE
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 16 / 24
SIMPLE: Semi Implicit Method for Pressure Linked Equations

To enforce continuity, velocities need to be corrected. To satisfy


momentum equations, pressure also needs to be updated during the
outer iterations
We have to simultaneously update velocity and pressure fields
Let us denote corrections in the different fields with a ’ symbol
u m = u m∗ + u 0 , v m = v m∗ + v 0 , P m = P m−1 + P 0
Putting u m∗ = u m − u 0 , v m∗ = v m − v 0 , P m−1 = P m − P 0 in the
discrete momentum equations, we get:
ae (uem −ue0 )+ anb (unb
m −u 0 ) = Q m−1 +(P m −P m )∆y −(P 0 −P 0 )∆y
P
nb x P E P E
nb
be (vem −ve0 )+ bnb (vnb
m −v 0 ) = Q m−1 +(P m −P m )∆x −(P 0 −P 0 )∆x
P
nb y P N P N
nb

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 17 / 24
SIMPLE: Semi Implicit Method for Pressure Linked Equations
The equation obtained after putting u m∗ = u m − u 0 , v m∗ = v m − v 0 ,
P m−1 = P m − P 0 in discrete momentum equations are equivalent to:
x mom.: ae uem + anb unb m = Q m−1 + (P m − P m )∆y
P
x P E
nb
+
−ae ue0 0 = −(PP0 − PE0 )∆y
P
− anb unb Eqn.(4)
nb

y mom.: bn vnm + m = Q m−1 + (P m − P m )∆x


P
bnb vnb y P N
nb
+
−bn vn0 − 0 = −(P 0 − P 0 )∆x
P
bnb vnb P N Eqn.(5)
nb
Observe that the boxed part of the equations is satisfied as the outer
iterations m → ∞. You are applying a pressure field which is correct
upto the extent of mth outer iteration!
What remains are the equations between the velocity and pressure
corrections for the x and y directions
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 18 / 24
SIMPLE: Velocity and pressure corrections
We obtained
X the relation between velocity and pressure corrections as:
0 0
−ae ue − anb unb = −(PP0 − PE0 )∆y
|nb {z }
Neglect
X
0 0
−bn vn − bnb vnb = −(PP0 − PN0 )∆x
|nb {z }
Neglect
The correction for neighbours is neglected because we do not know
the pressure correction themselves! We want to obtain the equation
itself for pressure corrections
Untill we know the pressure corrections, we can not solve for the
system of equations for velocity corrections. The corrections for the
neighbours are bluntly neglected in SIMPLE algorithm
We obtain the velocity correction equations as:
ae ue0 = (PP0 − PE0 )∆y ⇒ ue0 = ∆y 0 0
ae (PP − PE )
bn vn0 = (PP0 − PN0 )∆x ⇒ vn0 = ∆x 0 0
bn (PP − PN )
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 19 / 24
SIMPLE: Pressure correction equation

We obtained corrections Similarly we can write


∆y ∆y
ue0 = 0
ae (PP − PE0 ) uw0 = 0 0
aw (PW − PP )
vn0 = ∆x 0
bn (PP − PN0 ) vs0 = ∆x 0 0
bs (PS − PP )

Since u m = u m∗ + u 0 , v m = v m∗ + v 0 , we obtain
∆y
uem = uem∗ + 0
ae (PP − PE0 ) Eqn.(6) uwm = uwm∗ + ∆y 0 0
aw (PW − PP ) Eqn.(8)
0
vnm = vnm∗ + ∆x
bn (PP − PN0 ) Eqn.(7) vsm = vsm∗ + ∆x 0
bs (PS − PP0 ) Eqn.(9)
Velocity field at the end of mth outer iteration must satisfy continuity
equation ρe uem ∆y − ρw uwm ∆y + ρn vnm ∆x − ρs vsm ∆x = 0. From this
we obtain the pressure correction equation as
∆y
ρe {uem∗ + 0
ae (PP − PE0 )}∆y − ρw {uwm∗ + ∆y 0 0
aw (PW − PP )}∆y +
ρn {vnm∗ + ∆x 0 − PN0 )}∆x − ρs {vsm∗ + bs (PS0 − PP0 )}∆x = 0
∆x
bn (PP

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 20 / 24
SIMPLE algorithm: Pressure correction equation
The
 obtained pressure correction
 equation can be rearranged as
ρe ∆y ρw ∆y ρn ∆x ρs ∆x
ae + aw + bn + bs PP0 − ρea∆y
e
PE0 − ρnb∆x
n
PN0 − ρwa∆y
w
0 −
PW
ρs ∆x 0
b s PS = − (ρe uem∗ ∆y − ρw uwm∗ ∆y + ρn vnm∗ ∆x − ρs vsm∗ ∆x)
Notice that the mass imbalance due to the ∗ velocity field obtained
after solving the momentum equations during mth outer iteration
drives the pressure corrections
The above equation is written as: cP PP0 + cnb Pnb 0 = d Eqn.(10)
P
nb
Such an equation can be solved iteratively using any of the methods
Notice that pressure corrections tend to a constant value once the
mass imbalance in a grid cell vanish
Once pressure corrections are obtained, get better pressure using
P m = P m−1 + P 0 and velocities using
∆y 0 ∆y
uem = uem∗ + ae (PP − PE0 ) uwm = uwm∗ + 0 0
aw (PW − PP )
vnm = vnm∗ + ∆x 0 − PN0 ) vsm = vsm∗ + ∆x 0 0
bn (PP bs (PS − PP )
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 21 / 24
SIMPLE: Steps Involved in the algorithm
1 Guess the pressure and velocity field
I For the very first iteration: Take some sensible distribution
I Beginning of mth outer iteration: Take (m − 1)th iteration field values
2 Calculate the coefficients a, b and the source terms Qx , Qy in
momentum equations (2) and (3)
3 Solve momentum equations (2) and (3) to get u m∗ , v m∗ using an
iterative method like the Gauss-Siedel, S.O.R., C.G. etc.
4 Calculate the coefficients c and the mass imbalance term d in
equation (10)
5 Solve equation (10), i.e., Poisson equation for pressure correction P 0
I Get better pressure using: P m = P m−1 + P 0
6 Correct velocities using equation (6) to (9) to get u m , v m
7 Check whether P m , u m , v m fields satisfy the momentum equations
(2) and (3)
8 Stop if momentum equations are satisfied
I Else go for (m + 1)th outer iteration by going to step 1 above
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 22 / 24
SIMPLE: Flow chart

START
Initial guess

STEP 1: Solve discretized momentum equations No

Yes
Convergence? STOP

New velocities

STEP 3: Correct pressure and velocities


STEP 2: Solve pressure correction equation

Pressure corrections

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 23 / 24
Thank you all for the attention...
Any questions?

Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Staggered Grids 24 / 24

Anda mungkin juga menyukai