Semi Implicit Method For Incompressible Flows: FVM On Co-Located Grids
Semi Implicit Method For Incompressible Flows: FVM On Co-Located Grids
on Co-located Grids
Shyam Sunder
Mechanical Engineering
BITS Pilani
April 8, 2020
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 1 / 27
Table of contents
4 x momentum equation
5 y momentum equation
7 Rhie-Chow interpolation
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 2 / 27
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
~ = u is the velocity vector
Here U
v
~ ~ ρuu ρuv
C = ρU U = is the convective flux tensor:
ρvu ρvv
~ + 2µD is the viscous stress tensor, I is the identity
T = −λ(∇ · U)I
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 Co-located Grids 3 / 27
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 Co-located Grids 4 / 27
Governing equations for steady, incompressible flows
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 5 / 27
Control volumes for a Cartesian, Staggered mesh
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 6 / 27
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 Co-located Grids 7 / 27
Discretized x Momentum equation
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 8 / 27
Discretized x momentum eqn.: Using Central scheme
ue = 12 (uP + uE ) ρe = 12 (ρP + ρE )
uw = 12 (uW + uP ) ρw = 12 (ρW + ρP )
vn = 12 (vP + vN ) ρn = 12 (ρP + ρN )
vs = 12 (vS + vP ) ρs = 12 (ρS + ρP )
vne = vse =
1 1
4 (vP + vE + vNE + vN ) 4 (vP + vE + vSE + vS )
vnw = vsw =
1 1
4 (vP +vW +vNW +vN ) 4 (vP +vW +vSW +vS )
We get:
2 2
ρe uP +u − ρw uW 2+uP ∗ ∆y + ρn uP +u
v +v
2
E
2
N P
2
N
−
uS +uP vS +vP
∆y
ρs ∗ ∆x Convective = PW − PE ∗ 2 Pressure +
uE2−uP 2
−uW −uP −uS
µe ∆x − µw uP∆x ∗ ∆y + µn uN∆y − µs uP∆y
∗ ∆x Viscous
−uP −uW −vnw −vsw
+ µe uE∆x − µw uP∆x ∗ ∆y + µn vne∆x − µs vse∆x
∗ ∆x+
x
ρP gP ∆x∆y Body
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 9 / 27
Fully discretized x momentum equation
The equation after rearrangement becomes:
ρe ∆y ρw ∆y ρn ∆x ρs ∆x
4 (uP + uE ) − 4 (uW + uP ) + 4 (vP + vN ) − 4 (vS +
vP ) + (µe + µw ) ∆y
∆x + (µ s + µ ∆x
n ∆y uP +
)
ρe ∆y ∆y ρw ∆y ∆y
4 (uP + uE ) − µe ∆x uE + − 4 (uW + uP ) − µw ∆x uW +
ρn ∆x ∆x ρs ∆x ∆x
4 (vN + vP ) − µn ∆y uN + − 4 (vS + vP ) − µs ∆y uS =
(PW − PE ) ∗ ∆y ∆y ∆y
2 + µe ∆x (uE − uP ) − µw ∆x (uP − uW ) + µn (vne −
x
vnw ) − µs (vse − vsw ) + ρP gP ∆x∆y
P ∆y
We write it as: aP uP + anb unb = (PW − PE ) ∗ 2 + Qx Eqn.(2)
nb
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 10 / 27
Discretized y Momentum equation
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 11 / 27
Discretized y momentum eqn.: Using Central scheme
ue = 12 (uP + uE ) ρe = 12 (ρP + ρE )
uw = 12 (uW + uP ) ρw = 12 (ρW + ρP )
vn = 12 (vP + vN ) ρn = 12 (ρP + ρN )
vs = 12 (vS + vP ) ρs = 12 (ρS + ρP )
une = use =
1 1
4 (uP +uE +uNE +uN ) 4 (uP + uE + uSE + uS )
unw = 14 (uP + uW + usw =
1
uNW + uN ) 4 (uP +uW +uSW +uS )
We get: ρe uP +u
v +v
− ρw uW 2+uP vW 2+vP
2
E P
2
E
∗ ∆y +
vP +vN 2 vS +vP 2
ρ −ρ ∗ ∆x Convective =
n 2 ∆xs 2
P − P ∗ 2 Pressure +
Pv −v N −vW −vP −vS
µe E∆x P − µw vP∆x ∗ ∆y + µn vN∆y − µs vP∆y
∗ ∆x Viscous +
−vP −vS
u −u −usw
µe ne∆y se − µw unw∆y ∗ ∆y + µn vN∆y − µs vP∆y
∗ ∆x+
ρP gPy ∆x∆y Body
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 12 / 27
Fully discretized y momentum equation
The equation after rearrangement becomes:
ρe ∆y ρw ∆y ρn ∆x ρs ∆x
4 (uP + uE ) − 4 (uW + uP ) + 4 (vP + vN ) − 4 (vS +
vP ) + (µe + µw ) ∆y
∆x + (µ s + µ ∆x
n ∆y vP +
)
ρe ∆y ∆y ρw ∆y ∆y
4 (uP + uE ) − µe ∆x vE + − 4 (uP + uW ) − µw ∆x vW +
ρn ∆x ∆x ρs ∆x ∆x
4 (vP + vN ) − µn ∆y vN + − 4 (vS + vP ) − µs ∆y vS =
(PP − PN ) ∗ ∆x ∆x
2 + µe (une − use ) − µw (unw − usw ) + µn ∆y (vN −
∆x y
vP ) − µs ∆y (vP − vS ) + ρP gP ∆x∆y
P ∆x
We write it as: bP vP + bnb vnb = (PS − PN ) ∗ 2 + Qy Eqn.(3)
nb
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 13 / 27
Pressure checkerboarding on co-located grids
We obtained the discrete equations as:
Continuity: ρe ue ∆y − ρw uw ∆y + ρn vn ∆x − ρs vs ∆x = 0
x mom.: aP uP + anb unb = (PW − PE ) ∗ ∆y
P
2 + Qx
nb
y mom.: bP vP + bnb vnb = (PS − PN ) ∗ ∆x
P
2 + Qy
nb
We notice that the co-located version of momentum equations for
control volume ‘P’ do not inolve pressure from cell ‘P’. Only pressure
from cells adjacent to cell ‘P’ are there. A checkerboarded pressure
field will go undetected!
Likewise vn = vP +v
2 ≡
N v̂P +v̂N
2 +
0
100
∆x PS −PN ∆x PP −PNN 100
bP 4 + bN 4
Similarly
∆y ∆y
uw = 0.5(ûW + ûP ) + 12 aW + aP (PW −PP ) 100 0 100
| {z }
ûw
0 100
0
vn = 0.5(v̂P + v̂N ) + 12 ∆x
bP + ∆x
bN (PP − PN )
| {z }
v̂n 0
100 100
vs = 0.5(v̂S + v̂P ) + 12 ∆x
bS + ∆x
bP (PS − PP )
| {z }
v̂s
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 16 / 27
Rhie-Chow interpolation: Some observations
We have removed the pressure gradient 100 0 100
term resulting from linear interpolation
of velocities (which involves pressure
0 100 0
difference of alternate grid cells) and
added a new gradient term which
involves pressure across the cell face 100 0 100
Checkerboarding can be dectected now
It can be shown that on a uniform mesh with constant flow field,
diffusion coeffs. and source terms, Rhie-Chow interpolation gives
3 3
∆y ∆y
ue = uP +u
2
E
− 4aP
∂ P
∂x 3 e
∆x 3 uw = uW 2+uP − 4a P
∂ P
∂x 3 w
∆x 3
3 3
vn = vP +v
2
N
− ∆x
4aP
∂ P
∂y 3
∆y 3 vs = vP +v
2
N
− ∆x
4aP
∂ P
∂y 3
∆y 3
n s
It can also be shown that the continuity equation is equivalent to
4 4
∂u ∂v ∆y ∂ P 3 + ∆x ∂ P
∂x | P + ∂y |P = 4aP ∂x 4 ∆x 4aP ∂y 4
∆y 3
P P
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 17 / 27
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 Co-located Grids 18 / 27
SIMPLE: Semi Implicit Method for Pressure Linked Equations
The discrete momentum equations can be written with an outer
iteration index m as follows:
x mom.: aP uPm∗ + anb unb m∗ = (P m−1 − P m−1 )∆y + Q m−1
P
W E x
nb
y mom.: bn vPm∗ + bnb vnb m∗ = (P m−1 − P m−1 )∆x + Q m−1
P
S N y
nb
These will give cell centred velocities
We introduced outer iteration index so u m , v m represents velocity
field after mth outer iteration. Such a field satisfies both continuity
and 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 field
variables). 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 Co-located Grids 19 / 27
SIMPLE: Semi Implicit Method for Pressure Linked Equations
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 20 / 27
SIMPLE: Velocity and Pressure corrections
m 0
Similarly we can write: uw − uw =
ûwm − ûw0 + 12 ∆y
aW + ∆y
aP (PW
m − P m ) − 1 ∆y + ∆y (P 0 − P 0 )
P 2 aW aP W P
vnm −vn0 = v̂nm −v̂n0 + 21 ∆x ∆x m m 1 ∆x ∆x 0
bP + bN (PP −PN )− 2 bP + bN (PP −PN )
0
vsm −vs0 = v̂sm −v̂s0 + 21 ∆x ∆x m m
bS + bP (PS −PP )− 2
1 ∆x ∆x 0 0
bS + bP (PS −PP )
These give the corrections in face velocities in terms of pressure
corrections as follows:
ue0 = ûe0 + 21 ∆yaP + ∆y
aE (P P
0 − P 0 ) = 1 ∆y + ∆y (P 0 − P 0 )
E 2 aP aE P E
∆y ∆y ∆y ∆y
uw0 = ûw0 + 12 aW + aP (PW 0 − P0 ) = 1
P
0
2 aW + aP (PW − PP )
0
vn0 = v̂n0 + 21 ∆x ∆x 0 0 1 ∆x ∆x
bP + bN (PP − PN ) = 2 bP + bN (PP − PN )
0 0
vs0 = v̂s0 + 21 ∆x ∆x 0
bS + bP (PS − PP ) = 2
0 1 ∆x ∆x 0 0
bS + bP (PS − PP )
In SIMPLE algorithm ûe0 , ûw0 , v̂n0 , v̂s0 are neglected
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 21 / 27
SIMPLE: Pressure correction equation
Since u m = u m∗ + u 0 , v m = v m∗ + v 0 , we obtain
∆y ∆y
uem = uem∗ + 1
2 aP + aE (PP0 − PE0 ) Eqn.(6)
∆y ∆y 0
uwm = uwm∗ + 1
2 aW + aP (PW − PP0 ) Eqn.(7)
vnm = vnm∗ + 1
2
∆x
bP + ∆x
bN (PP0 − PN0 ) Eqn.(8)
vsm = vsm∗ + 1
2
∆x
bS + ∆x
bP (PS0 − 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
We obtain the pressure correction equation as
ρe {uem∗ + 21 ∆y ∆y
aP + aE (PP0 − PE0 )}∆y -
ρw {uwm∗ + 12 ∆y + ∆y (PW0
− PP0 )}∆y +
aW aP
ρn {vnm∗ + 12 ∆x + ∆x (PP0 − PN0 )}∆x -
bP bN
ρs {vsm∗ + 12 ∆x ∆x
bS + bP (PS0 − PP0 )}∆x = 0
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 22 / 27
SIMPLE algorithm: Pressure correction equation
The obtained pressure correction equation can be rearranged as
ρe ∆y 2 1 1 ρw ∆y 2 1 1 ρn ∆x 2 1 1
2 aP + aE + 2 aW + aP + 2 bP + bN
2
+ ρs ∆x 1 1 0 − ρe ∆y 2 1 1 0
2 bS + bP P P 2 aP + aE P E −
ρn ∆x 2 1 1 0 − ρw ∆y 2 1 1 0 − ρs ∆x 2 1 1 0
2 bP + bN P N 2 aW + aP P W 2 bS + bP 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 Pnb0 = 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
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 23 / 27
SIMPLE: Velocity corrections
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 24 / 27
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 face velocities using Eqns. (6) to (9) and cell velocities using
Eqns. (11), (12)
7 Check whether P m , u m , v m fields satisfy the mom. eqns. (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 Co-located Grids 25 / 27
SIMPLE: Flow chart
START
Initial guess No Yes
Convergence? STOP
STEP 1: Solve discretized momentum equations
Pressure corrections
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 26 / 27
Thank you all for the attention...
Any questions?
Shyam Sunder Mechanical Engineering Semi Implicit Method for Incompressible Flows: FVM on Co-located Grids 27 / 27