MF 206 A22 Lect 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Introduction to Computational Fluid Dynamics

Lecture 3

Pressure Correction Methods for the


Navier–Stokes Equations for Incompressible Flows

Marica Pelanti

marica.pelanti@ensta-paris.fr

MF206 (ENSTA Paris) Lecture 3 2021-2022 1 / 34


Outline

1 Finite Difference and Finite Volume Methods

2 Incompressible Navier–Stokes equations

3 Pressure Correction Methods


Projection Method

MF206 (ENSTA Paris) Lecture 3 2021-2022 2 / 34


Finite Difference and Finite Volume Methods

Finite Difference and Finite Volume Methods

Finite Difference Method


◦ Numerical solution associated to grid points.
un n
i,j,k ≈ u(xi , yj , zk , t )

approximation of pointwise values of solution


◦ Based on differential form of the equations
(assumes smoothness).
Derivatives approximated by Finite Differences.

Finite Volume Method


◦ Domain subdivided into control volumes (cells)
un 1 n
R
i,j,k ≈ |V| V u(xi , yj , zk , t )dV

approximation of solution averaged over CV = V


◦ Based on integral form of the equations.

MF206 (ENSTA Paris) Lecture 3 2021-2022 3 / 34


Finite Difference and Finite Volume Methods

Finite Difference and Finite Volume Methods


For simple equations (e.g. linear) and simple Cartesian grids FD and FV approaches
might lead to same discrete equations.

Example: Unsteady heat conduction in a solid (or fluid at rest)


Conservation law: rate of change of energy within the CV = rate of heat addition
Integral form
Z Z Z Z
∂ρe ~H · ~n dS = 0 ∂T ~H · ~n dS = 0
dV + F → ρch dV + F
V ∂t S V ∂t S

ρ = density (Hp. const.), e = specific internal energy, e = ch T


T = temperature, ch = heat coefficient (const.), κ = thermal conductivity coef. (const.)
Heat flux = F~H = −κ∇T~ (Fourier Law of heat conduction)
~H · ~n dS = ~ ·F
~H dV
R R
By using divergence theorem of Gauss: F S
∇ V

Differential form
∂T ~ ·F
~H = 0
ρch +∇
∂t

MF206 (ENSTA Paris) Lecture 3 2021-2022 4 / 34


Finite Difference and Finite Volume Methods

1D Heat equation
∆x
ρch ∂T
∂t
+ ∂F
∂x
H
=0
xi−2 xi−1 xi xi+1 xi+2
ith CV

xi− 3 xi− 1 xi+ 1 xi+ 3


2 2 2 2
Finite Volume Discretization
R xi+1/2
ith CV = interval [xi−1/2 , xi+1/2 ], numerical solution Ti∗ ≈ ∆x
1
xi−1/2
T (x, t∗ ) dx
Z xi+1/2
∂T
Integral equation over CV: ρch dx + FH (xi+1/2 , t) − FH (xi−1/2 , t) = 0
xi−1/2 ∂t

FH = −κ ∂T
∂x
→ ρch ∆x ∂T
∂t
i
+ (−κ ∂T )
∂x i+1/2
− (−κ ∂T )
∂x i−1/2
=0
 
Ti+1 −Ti Ti+1 −Ti T −T
( ∂T )
∂x i+1/2
≈ ∆x
⇒ ρch ∂T ∂t
i κ
− ∆x ∆x
− i ∆xi−1 = 0
∂Ti α κ
⇒ ∂t
− (∆x)2
(Ti+1 − 2Ti + Ti−1 ) = 0, α= ch ρ
= thermal diffusivity
2
∂T
Same as Finite Difference discretization in space of PDE ∂t
− α ∂∂xT2 = 0
 2 
T −2T +T
Ti∗ ≈ T (xi , t∗ ), ∂ T
∂x2
≈ i+1 ∆xi2 i−1
i
MF206 (ENSTA Paris) Lecture 3 2021-2022 5 / 34
Finite Difference and Finite Volume Methods

Simple uniform Cartesian FD and FV grids


1D
∆x

xi−2 xi−1 xi xi+1 xi+2


ith CV

xi− 3 xi− 1 xi+ 1 xi+ 3


2 2 2 2

2D
j + 23
j+1
j + 21
(xi , yj ) CV (i, j)
j
j − 21
j−1
j − 23
i− 32 i− 21 i+ 21 i+ 32
i−1 i i+1

MF206 (ENSTA Paris) Lecture 3 2021-2022 6 / 34


Incompressible Navier–Stokes equations

Navier–Stokes equations for incompressible flows


Hp. density ρ = const., µ, κ, cv = const., ~fb = 0, qV = 0, ν = µ
ρ
= kinematic viscosity.

~ · ~v = 0 ,
∇ Mass
~
∂~v ~ v = − ∇p + ν ∇2~v ,
+ ~v · ∇~ Momentum
∂t ρ
 ∂T 
ρcv ~
+ ~v · ∇T = κ∇2 T + Φ . Energy
∂t

+ Initial and Boundary Conditions (on solid rigid walls: no-slip condition ~v = 0 )

Unknowns: velocity ~v (~x, t), pressure p(~


x, t), temperature T (~
x, t).

Mixed set of elliptic-parabolic equations.

Hp. constant flow properties ⇒ decoupling of thermal problem ⇒


1) Solve mass & momentum equations for ~v , p ;
2) Given ~v field, solve energy equation for T .

MF206 (ENSTA Paris) Lecture 3 2021-2022 7 / 34


Incompressible Navier–Stokes equations Velocity-Pressure formulation

Incompressible Navier–Stokes equations


Velocity-Pressure formulation ~v = velocity, p = pressure (primitive variables)
~ · ~v = 0 ,
∇ mass eq.
~
∂~
v ~v=
+ ~v · ∇~ − ∇p + ν ∇2~v . momentum eq.
∂t ρ

• Divergence-free velocity field constraint expresses incompressibility.


• The pressure for incompressible flows is not a thermodynamic variable.
The pressure adjusts instantaneously so that velocity remains divergence-free.
→ pressure projects velocity into subspace of zero-divergence functions.

MF206 (ENSTA Paris) Lecture 3 2021-2022 8 / 34


Incompressible Navier–Stokes equations Velocity-Pressure formulation

Incompressible Navier–Stokes equations


Velocity-Pressure formulation ~v = velocity, p = pressure (primitive variables)
~ · ~v = 0 ,
∇ mass eq.
~
∂~
v ~v=
+ ~v · ∇~ − ∇p + ν ∇2~v . momentum eq.
∂t ρ

• Divergence-free velocity field constraint expresses incompressibility.


• The pressure for incompressible flows is not a thermodynamic variable.
The pressure adjusts instantaneously so that velocity remains divergence-free.
→ pressure projects velocity into subspace of zero-divergence functions.

Poisson equation for pressure


Take divergence of momentum equation (Hp. appropriate differentiability)
~ · (∇p)
Note: ∇ ~ = ∇2 p, ∇2~v = ∇(
~ ∇~ · ~v ) − ∇
~ ×∇
~ × ~v ⇒ ∇
~ · (∇2~v ) = 0 (div curl ≡ 0)
~ · (~v · ∇~
⇒ ∇2 p = −ρ∇ ~ v ) + Neumann BC
∂p
BC for ∂~
n
derived by normal projection of momentum equation on boundary.
Note: BC for pressure Poisson equation (PPE) complicated issue [Gresho–Sani 87].
MF206 (ENSTA Paris) Lecture 3 2021-2022 8 / 34
Incompressible Navier–Stokes equations Velocity-Pressure formulation

Incompressible Navier–Stokes equations

Velocity-Pressure formulation
Conservative form
~ · ~v = 0 ,
∇ ~ · ~v = 0 ,

~
 
∂~v ~ v = − ∇p + ν ∇2~v .
+ ~v · ∇~
∂~v ~ p~~ ~
+ ∇ · ~v ⊗ ~v + I − ν ∇~v = 0 .
∂t ρ ∂t ρ

Integral form V = control volume, S = ∂V, ~n = outward unit normal vector

Z
~v · ~n dS = 0 ,
S
Z Z Z Z
∂~v 1 ~ v · ~n dS = 0 .
dV + ~v (~v · ~n)dS + p~n dS − ν ∇~
V ∂t S ρ S S

MF206 (ENSTA Paris) Lecture 3 2021-2022 9 / 34


Incompressible Navier–Stokes equations Velocity-Pressure formulation

Incompressible Navier–Stokes equations

2D Velocity-Pressure formulation ~v = (u, v), ~


x = (x, y)

∂u ∂v
+ = 0, (1a)
∂x ∂y
 2
∂2u

∂u ∂u ∂u 1 ∂p ∂ u
+u +v =− +ν + , (1b)
∂t ∂x ∂y ρ ∂x ∂x2 ∂y 2
 2
∂2v

∂v ∂v ∂v 1 ∂p ∂ v
+u +v =− +ν 2
+ . (1c)
∂t ∂x ∂y ρ ∂y ∂x ∂y 2

Note: By using (1a) can rewrite convective terms in conservative form:

∂u ∂u ∂(u2 ) ∂(uv) ∂v ∂v ∂(uv) ∂(v 2 )


u +v = + , u +v = + .
∂x ∂y ∂x ∂y ∂x ∂y ∂x ∂y

In general different mathematical forms lead to different discrete equations.

MF206 (ENSTA Paris) Lecture 3 2021-2022 10 / 34


Incompressible Navier–Stokes equations Vorticity-Stream function formulation

Incompressible Navier–Stokes equations

2D Vorticity-Stream Function formulation ~v = (u, v), ~


x = (x, y)
∂v ∂u
~ × ~v
~ =∇
Vorticity: ω ~ = ω~k , ω =
2D: ω − ~k ⊥ plane (x, y)
∂x ∂y
∂ψ ∂ψ ~ · ~v = 0 identically satisfied
Stream function ψ : u = , v=− ⇒ ∇
∂y ∂x

∂2ω ∂2ω
 
∂ω ∂ω ∂ω
+u +v =ν + , (2a)
∂t ∂x ∂y ∂x2 ∂y 2
∂2ψ ∂2ψ
2
+ = −ω . (2b)
∂x ∂y 2

(2a) Convection-diffusion equation for the vorticity ω(~


x, t) (parabolic)
∂ ∂
Obtained from momentum eqs., − ∂y (1b)+ ∂x (1c).

(2b) Poisson equation for the stream function ψ(~


x, t) (elliptic)
Obtained by using the definition of ψ into the definition of ω.

MF206 (ENSTA Paris) Lecture 3 2021-2022 11 / 34


Incompressible Navier–Stokes equations Vorticity-Stream function formulation

Incompressible Navier–Stokes equations


3D extension of the 2D Vorticity-Stream Function formulation

Vorticity-Vector Potential formulation ~v = (u, v, w), ~


x = (x, y, z)
~ × ~v
~ =∇
Vorticity: ω
~ = (ψx , ψy , ψz ):
Express ~v as the curl of a vector potential ψ
~v = ∇ ~
~ ×ψ ~ · ~v = 0 identically satisfied
⇒ ∇
~ into definition of ω
Insert definition of ψ ~ × (∇
~ ⇒ ∇ ~ =ω
~ × ψ) ~
~ × (∇
Recall identity ∇ ~ = ∇(
~ × ψ) ~ ∇ ~ − ∇2 ψ
~ · ψ) ~
~ can be arbitraily chosen to satisfy ∇
Since vector potential ψ ~=0
~ ·ψ

~ = −~
⇒ ∇2 ψ ω ~
vector Poisson equation for ψ
+ vector convection-diffusion equation for ω
~ : ∂~
ω ~ × (~
+∇ ω × ~v ) = ν∇2 ω
~
∂t

Need to solve 3 elliptic equations + 3 parabolic equations.


∂ψz ∂ψy ∂ψy
~ componentwise: u =
~ ×ψ
(Note ~v = ∇ ∂y
− ∂z
, v = − ∂ψ
∂x
z
+ ∂ψx
∂z
, w= ∂x
− ∂ψx
∂y
.)

MF206 (ENSTA Paris) Lecture 3 2021-2022 12 / 34


FD/FV Methods for Incompressible Navier–Stokes Equations

FD/FV Methods for the Incompressible Navier–Stokes Equations


Methods based on 2D Vorticity-Stream function formulation
Advantages:
- Pressure does not appear explicitly (can be obtained later).
- Incompressibility automatically satisfied (by definition of stream function).
Drawback: Extension to 3D complicated.

Methods based on Velocity-Pressure Formulation


• Artificial compressibility [Chorin 1967]
• Pressure Correction Methods
- MAC (Marker-And-Cell) [Harlow and Welch 1965]
- Projection Method [Chorin 1968, Temam 1969]
- SIMPLE (Semi-Implicit Method for Pressure-Linked Equations)
[Caretto et. al. 1972, Patankar and Spalding 1972)
- SIMPLER (SIMPLE Revised) [Patankar 1981]
- SIMPLEC [van Doormal and Raithby 1984]
- PISO (Pressure-Implicit with Splitting of Operators) [Issa 1985]

MF206 (ENSTA Paris) Lecture 3 2021-2022 13 / 34


FD/FV Methods for Incompressible Navier–Stokes Equations Pressure Correction Methods

Pressure Correction Methods

Velocity-Pressure formulation ~v = velocity, p = pressure

~ · ~v = 0 ,
∇ mass (continuity) eq.
~
∂~v ~ v = − ∇p + ν ∇2~v .
+ ~v · ∇~ momentum eq.
∂t ρ

General idea of the algorithm


At each time level:

I Solve momentum equation with estimate of pressure field


(projection method: with no pressure field)
⇒ Obtain temporary velocity field ~v ∗ that does not satisfy zero-divergence constraint

I Find pressure field that ensures divergence-free velocity field


→ solution of pressure Poisson equation
~ · ~v = 0
I Correct velocity ~v ∗ to obtain new velocity field satisfying ∇

MF206 (ENSTA Paris) Lecture 3 2021-2022 14 / 34


FD/FV Methods for Incompressible Navier–Stokes Equations Staggered vs. Collocated grids

Staggered vs. Collocated grids

Collocated grid ui , pi ∆x

i−2 i−1 i i+1 i+2

Staggered grid ui− 1 ui+ 1


2 2
(staggered because of a stability problem)
pi ∆x

i−2 i−1 i i+1 i+2

i− 32 i− 21 i+ 21 i+ 32

Velocities and pressure not defined in the same grid points.


Pressure p defined at cell centers, velocities u defined at cell edges.

(Here we assume uniform grids)

MF206 (ENSTA Paris) Lecture 3 2021-2022 15 / 34


FD/FV Methods for Incompressible Navier–Stokes Equations Staggered vs. Collocated grids

2D staggered uniform grid ~v = (u, v), ~


x = (x, y) MAC Method Grid (1965)

j + 32

j+1 p
vi,j+ 1 u
j + 12 2
v
pi,j ui+ 1 ,j
2
j

j − 12

j−1

j − 32
i− 32 i− 21 i+ 12 i+ 23

i−1 i i+1

Pressure p defined at cell centers;


Velocities u and v defined in centers of vertical & horizontal cell faces, respectively.

MF206 (ENSTA Paris) Lecture 3 2021-2022 16 / 34


Pressure Correction Methods Projection Method

Projection Method [Chorin 1967, Temam 1968] (Originally on colocated grid)

Space-time discretization of Navier–Stokes equations


Here assume 1st-order time-integration, explicit for convective and diffusive terms.

~ h · ~v n+1 = 0 ,

~v n+1 − ~v n 1~
= −Ah (~v n ) − ∇ hp
n+1
+ ν∇2h ~v n .
∆t ρ
~v
Ah = discrete spatial differential operator for convective term ~v · ∇~
~ h , ∇2h = discrete spatial differential operators for ∇
∇ ~ and ∇2

Fractional Step Method


I. Integrate in time momentum equation with no pressure term
v ∗ −~
vn
~
∆t
= −Ah (~v n ) + ν∇2h ~v n ~v n → ~v ∗
II. Project ~v into subspace of divergence-free (soleinodal) functions
v∗
v n+1 −~ ~ h p n+1 ~ h · ~v n+1 = 0
~
∆t
= − ρ1 ∇ ~v ∗ → ~v n+1 with ∇

MF206 (ENSTA Paris) Lecture 3 2021-2022 17 / 34


Pressure Correction Methods Projection Method

Projection Method

I. Time-integration with no pressure term


v ∗ −~
vn
~
∆t
= −Ah (~v n ) + ν∇2h ~v n ⇒ ~v ∗ = ~v n + ∆t(−Ah (~v n ) + ν∇2h ~v n )

Velocity ~v ∗ does not satisfy zero-divergence constraint (mass eq. = incompressibility).

II. Projection
v∗
v n+1 −~ ~ h p n+1 ~ h pn+1
~
∆t
= − ρ1 ∇ ⇒ ~v n+1 = ~v ∗ − ∆t
ρ

~ h · ~v n+1 = ∇
Take divergence: ∇ ~ h · ~v ∗ − ∆t ~ h · (∇
∇ ~ h pn+1 )
ρ

~ h · ~v n+1 = 0
Mass equation: ∇

ρ ~
⇒ ∇2h pn+1 = ∇
∆t h
· ~v ∗ Pressure Poisson Equation

Pressure field that projects velocity into subspace of soleinodal functions.

MF206 (ENSTA Paris) Lecture 3 2021-2022 18 / 34


Pressure Correction Methods Projection Method

Projection Method for the Incompressible Navier–Stokes equations

Algorithm

1. Find temporary velocity ~v ∗ by integrating convective and diffusive terms only

~v ∗ = ~v n + ∆t(−Ah (~v n ) + ν∇2h ~v n )

2. Find pressure field needed to make velocity field divergence-free

ρ ~
∇2h pn+1 = ∇h · ~v ∗
∆t this is a splitted operator resolution

3. Correct velocity by adding the pressure gradient (projection)

∆t ~ n+1
~v n+1 = ~v ∗ − ∇h p
ρ

MF206 (ENSTA Paris) Lecture 3 2021-2022 19 / 34


Pressure Correction Methods MAC Method

Marker-And-Cell (MAC) Method [Harlow and Welch 1965]

Originally derived for free surface flows on staggered grid.


Space-time discretization of Navier–Stokes equations

~ h · ~v n+1 = 0 ,

~v n+1 − ~v n 1~
= −Ah (~v n ) − ∇ hp
n+1
+ ν∇2h ~v n .
∆t ρ

Take divergence of momentum equation:


∇ v n+1 −∇
~ h ·~ vn
~ h ·~
~ h · Ah (~v n ) − 1 ∇
~ · (∇
~ h p n+1 ) + ν ∇
~ h · (∇2h ~v n ).
∆t
= −∇ ρ h

~ h · ~v n = 0 and ∇
Using ∇ ~ h · ~v n+1 = 0

~ h · Ah (~v n )
⇒ ∇2h pn+1 = −ρ∇ Pressure Poisson Equation

~ h · (∇
Note: ∇ ~ h p n+1 ) = ∇2h pn+1 and

~ h · (∇2h ~v n ) = ∇
∇ ~ h · (∇
~ h (∇
~ h · ~v n ) − ∇
~h×∇
~ h × ~v n ) = ∇2h · (∇
~ h · ~v n ) = 0.

MF206 (ENSTA Paris) Lecture 3 2021-2022 20 / 34


Pressure Correction Methods MAC Method

MAC vs. Projection Method


Using explicit time-integration for convective and diffusive terms and staggered grid:
MAC and Projection methods can be equivalent although written in different form.

MAC vs. Projection


the choice of one of those methods
1. depends on the problem we study 1. Integration without pressure
mac was created for a free surface
flow
~v n = ~v n
~v ∗ = ~v n + ∆t(−Ah (~v n ) + ν∇2h ~v n )

2. Pressure Poisson equation

~ h · Ah (~v n )
∇2h pn+1 = −ρ∇ ∇2h pn+1 = ρ ~
∇ · ~v ∗
∆t h

3. Projection into incompressible field

~v n+1 = ~v n +∆t(−Ah (~v n ) + ν∇2h ~v n )− ∆t ~ h pn+1


∇ ~v n+1 = ~v ∗ − ∆t ~ h pn+1

ρ ρ

MF206 (ENSTA Paris) Lecture 3 2021-2022 21 / 34


Projection Method Space discretization on staggered grid

Spatial discretization on a 2D staggered uniform grid


~v = (u, v) Hp. uniform grid ∆x = ∆y ≡ h (grid spacing)
Finite Volume approach: integral form of Navier–Stokes eqs. over Control Volume
Cell averages: ui+ 1 ,j ≈ |V1u | Vu u dV, vi,j+ 1 ≈ |V1v | Vv v dV, pi,j ≈ |V1p | Vp p dV
R R R
2 2

j+1 p
vi,j+ 1 u
2
j + 12 v
pi,j ui+ 1 ,j
2
j

CV for mass equation = Vp


j − 12
CV for x-momentum equation = Vu
j−1 CV for y-momentum equation = Vv
i−1 i i+1
i− 12 i+ 12
Finite Difference approach: use differential Navier–Stokes equations
pointwise approx.: ui+ 1 ,j ≈ u(xi+ 1 , yj ), vi,j+ 1 ≈ v(xi , yj+ 1 ), pi,j ≈ p(xi , yj )
2 2 2 2

MF206 (ENSTA Paris) Lecture 3 2021-2022 22 / 34


Projection Method Space discretization on staggered grid

Mass equation
j +1 p
Mass conservation law vi,j+ 1 u
R j + 12 2
v
Sp
~v · ~n dS = 0 pi,j ui+ 1 ,j
2
j
hui+ 1 ,j −hui− 1 ,j +hvi,j+ 1 −hvi,j− 1 = 0
2 2 2 2
j − 12
⇒ ui+ 1 ,j − ui− 1 ,j + vi,j+ 1 − vi,j− 1 = 0
2 2 2 2 j −1
i−1 i i+1
n = outward unit normal
~
i− 12 i+ 21
Note: same result with Finite Difference approach
~ ·~
PDE: ∇ u= ∂u
+ ∂v
=0
∂x ∂y
u −u v −v
∂u
 i+ 1 ,j i− 1 ,j ∂v
 i,j+ 1 i,j− 1
Take centered differences: ∂x i,j
≈ 2
h
2
, ∂x i,j
≈ 2
h
2

u −u v −v
i+ 1 ,j i− 1 ,j i,j+ 1 i,j− 1
~ ·~
∇ u = 0 at (i, j) ⇒ 2 2
+ 2 2
=0
h h

MF206 (ENSTA Paris) Lecture 3 2021-2022 23 / 34


Projection Method Space discretization on staggered grid

x-momentum equation
∂u 1 ~ · ~n dS = 0
R R R R
Vu ∂t
dV + u(~v · ~n)dS +
Su ρ Su
p nx dS − ν Su
∇u

j +1 p
Unsteady term
  vi,j+ 1 u
∂u
= h2 ∂t
∂ 1
j + 12
R R 2
Vu ∂t
dV h2 Vu
udV v
pi,j ui+ 1 ,j
∂ui+1/2,j j 2
→ h2 ∂t

Pressure term j − 12
R
Su
p nx dS → h(pi+1,j − pi,j ) j −1
i−1 i i+1
i− 21 i+ 12
Convective term  
u(~v · ~n)dS → h u2i+1,j − u2i,j + (uv)i+ 1 ,j+ 1 − (uv)i+ 1 ,j− 1
R
Su 2 2 2 2

Diffusive term  
   
~ · ~n dS → h ∂u ∂u ∂u ∂u
R  
Su
∇u ∂x i+1,j
− ∂x i,j
+ ∂y
− ∂y
i+ 1
2
1
,j+ 2 i+ 1
2
,j− 1
2

~
nEast = (1, 0), ~
nNorth = (0, 1), ~ nSouth = (0, −1)
nWest = (−1, 0), ~
MF206 (ENSTA Paris) Lecture 3 2021-2022 24 / 34
Projection Method Space discretization on staggered grid

x-momentum equation
 
u(~v · ~n)dS → h u2i+1,j − u2i,j + (uv)i+ 1 ,j+ 1 − (uv)i+ 1 ,j− 1
R
Convective term Su 2 2 2 2
 2
Interpolate the velocities: (u2 )i,j = 21 (ui+ 1 ,j + ui− 1 ,j )
2 2
  
(uv)i+ 1 ,j+ 1 = 12 (ui+ 1 ,j+1 + ui+ 1 ,j ) 1
2
(vi,j+ 1 + vi+1,j+ 1 ) .
2 2 2 2 2 2
     
~ · ~ndS → h ∂u ∂u ∂u ∂u
R  
Diffusive term S ∇u ∂x i+1,j
− ∂x i,j
+ ∂y 1 1
− ∂y
u 1 i+ 2 ,j+ 2 i+ 2 ,j− 1
2

→ ui+ 3 ,j + ui− 1 ,j + ui+ 1 ,j+1 + ui+ 1 ,j−1 − 4ui+ 1 ,j


2 2 2 2 2

j +1 p
Same as FD 5-point (∇2 u)i+ 1 ,j vi,j+ 1 u
2
j + 12 2
v
u −u pi,j ui+ 1 ,j
∂u
 i+ 1 ,j i− 1 ,j 2
∂x i,j
= 2
h
2 j

u −u
i+ 1 ,j+1 i+ 1 ,j j − 12
 
∂u 2 2
∂y
= h
i+ 1
2
,j+ 1
2
j −1
i−1 i− 1 i i+ 12 i+1
2
MF206 (ENSTA Paris) Lecture 3 2021-2022 25 / 34
Projection Method Space discretization on staggered grid

y-momentum equation
∂v 1 ~ · ~n dS = 0
R R R R
Vv ∂t
dV + v(~v · ~n)dS +
Sv ρ Sv
p ny dS − ν Sv
∇v

j +1 p
vi,j+ 1 u
j + 12 2
v
∂v
∂v
h2 i,j+1/2
R
dV → pi,j ui+ 1 ,j
Vv ∂t ∂t 2
j

j − 12
R
Sv
p ny dS → h(pi,j+1 − pi,j )

j −1
i−1 i i+1
i− 21 i+ 12
 
2 2
R
v(~v · ~n)dS → h vi,j+1
Sv
− vi,j + (uv)i+ 1 ,j+ 1 − (uv)i− 1 ,j+ 1
2 2 2 2
 2
2 1
(v )i,j = 2 (vi,j+ 1 + vi,j− 1 )
2 2

~ · ~n dS → v
R
Sv
∇v i,j+ 3 + vi,j− 1 + vi+1,j+ 1 + vi−1,j+ 1 − 4vi,j+ 1
2 2 2 2 2

MF206 (ENSTA Paris) Lecture 3 2021-2022 26 / 34


Projection Method Space discretization on staggered grid

Space discretization of Navier–Stokes equations on staggered grid


Mass ui+ 1 ,j − ui− 1 ,j + vi,j+ 1 − vi,j− 1 = 0
2 2 2 2

x−momentum
∂u
i+ 1 ,j
 
∂t
2
= − h1 (u2 )i+1,j − (u2 )i,j + (uv)i+ 1 ,j+ 1 − (uv)i+ 1 ,j− 1
2 2 2 2
1
− hρ (pi+1,j − pi,j )
 
ν
+ h2 ui+ 3 ,j + ui− 1 ,j + ui+ 1 ,j+1 + ui+ 1 ,j−1 − 4ui+ 1 ,j
2 2 2 2 2

y-momentum
∂v
i,j+ 1
 
2
∂t
= − h1 (v 2 )i,j+1 − (v 2 )i,j + (uv)i+ 1 ,j+ 1 − (uv)i− 1 ,j+ 1
2 2 2 2
1
− hρ (pi,j+1 − pi,j )
 
ν
+ h2 vi,j+ 3 + vi,j− 1 + vi+1,j+ 1 + vi−1,j+ 1 − 4vi,j+ 1 .
2 2 2 2 2

 2  2
(u2 )i,j = 21 (ui+ 1 ,j + ui− 1 ,j ) (v 2 )i,j = 12 (vi,j+ 1 + vi,j− 1 )
 2 2  2 2 
(uv)i+ 1 ,j+ 1 = 12 (ui+ 1 ,j+1 + ui+ 1 ,j ) 1
(v
2 i,j+ 1
+ vi+1,j+ 1 )
2 2 2 2 2 2

MF206 (ENSTA Paris) Lecture 3 2021-2022 27 / 34


Projection Method Space-time discretization

Space-time discretization of Navier–Stokes equations on staggered grid


1st-order time-integration, explicit for convective and diffusive terms.

~ h · ~v n+1 = 0,

v n+1 −~
vn ~ h p n+1 +ν∇2h ~v n .
~
∆t
= −Ah (~v n )− ρ1 ∇

un+1
i+ 1 ,j
− un+1
i− 1 ,j
n+1
+ vi,j+ n+1
1 − vi,j− 1 = 0 ,
2 2 2 2

un+1 −un 1
i+ 1 ,j i+ ,j
 
2
∆t
2
= − h1 (u2 )n 2 n n n
i+1,j − (u )i,j + (uv)i+ 1 ,j+ 1 − (uv)i+ 1 ,j− 1
2 2 2 2
 
1
− hρ (pn+1
i+1,j − pn+1
i,j ) + ν
h2
u n
i+ 3 ,j
+ u n
i− 1 ,j
+ u n
i+ 1 ,j+1
+ u n
i+ 1 ,j−1
− 4uni+ 1 ,j
,
2 2 2 2 2

v n+1 1 −v n
i,j+ 1
i,j+
 
2
∆t
= − h1 (v 2 )n
2 2 n n n
i,j+1 − (v )i,j + (uv)i+ 1 ,j+ 1 − (uv)i− 1 ,j+ 1
2 2 2 2
 
1
− hρ (pn+1
i,j+1 − p n+1
i,j ) + ν
h2
v n
i,j+ 3 + v i,j− 1 + v n
i+1,j+ 1 + v n
i−1,j+ 1 − n
4vi,j+ 1 .
2 2 2 2 2

(u2 )n 2 n n
i,j , (v )i,j , (uv)i+ 1 ,j+ 1 interpolated
2 2

MF206 (ENSTA Paris) Lecture 3 2021-2022 28 / 34


Projection Method Pressure Poisson Equation

Projection Method - Pressure Poisson equation


Recall derivation of Pressure Poisson Equation
Projection Step ~v n+1 = ~v ∗ − ∆t ~ h pn+1 (*)

ρ

~ h · (*) and use continuity equation ∇


Take divergence ∇ ~ h · ~v n+1 = 0
ρ ~
⇒ ∇2h pn+1 = ∇
∆t h
· ~v ∗
For the considered space discretization:
un+1
i+ 1 ,j
= u∗i+ 1 ,j − ∆t

(pn+1
i+1,j − pn+1
i,j )
2 2

n+1 ∗
vi,j+ 1 = vi,j+ 1 −
∆t

(pn+1
i,j+1
n+1
− pi,j )
2 2

Insert in the continuity equation un+1


i+ 1 ,j
− un+1
i− 1 ,j
n+1
+ vi,j+ n+1
1 − vi,j− 1 = 0
2 2 2 2

⇒ Pressure Poisson Equation


 
pn+1 n+1 n+1 n+1 n+1
i+1,j + pi−1,j + pi,j+1 + pi,j−1 − 4pi,j =
ρ
h∆t
u∗i+ 1 ,j − u∗i− 1 ,j + vi,j+
∗ ∗
1 − vi,j− 1
2 2 2 2

Same result with centered FD:


pn+1 n+1 n+1 n+1 n+1
i+1,j +pi−1,j +pi,j+1 +pi,j−1 −4pi,j ρ
h2
= (u∗ 1 − u∗ + v∗ − v∗ )
h∆t i+ ,j 2
i− 1
2
,j i,j+ 1
2
i,j− 1
2
MF206 (ENSTA Paris) Lecture 3 2021-2022 29 / 34
Projection Method Staggered vs. Collocated grids

Pressure Correction Methods - Staggered vs. Collocated grids


Centered Finite Difference approximations for incompressible Navier–Stokes
equations may lead to odd-even decoupling → pressure oscillations.
1D Projection method
ui , pi ∆x = h
Collocated grid
i−2 i−1 i i+1 i+2

∂u un+1 n+1
i+1 −ui−1 ∂u ∂u2 ∂p 2
Mass eq.: ∂x
=0 → 2h
=0 Momentum eq.: ∂t
+ ∂x
= − ρ1 ∂x + ν ∂∂xu2
u∗ n
i −ui
(un 2 n
i+1 ) −(ui−1 )
2
un n n
i+1 −2ui +ui−1
Temporary velocity u∗i : ∆t
+ 2h
=ν h2

Projection: un+1
i = u∗i − ∆t
2hρ
(pn+1
i+1 − pn+1
i−1 )

pn+1 n+1
i+2 −2pi +pn+1
PPE: 4h2
i−2
= ρ
2h∆t
(u∗i+1 − u∗i−1 )

Stencil of Laplacian of p is (i + 2, i, i − 2) → only odd or even indices


Can lead to decoupling of pressure field resulting in high frequency oscillations.
∂ρ
Note: Related to absence of ∂t
in mass equation. Compressible flow equations:
decoupling does not occur thanks to density-velocity coupling in mass equation.
MF206 (ENSTA Paris) Lecture 3 2021-2022 30 / 34
Projection Method Staggered vs. Collocated grids

Pressure Correction Methods - Staggered vs. Collocated grids


1D Projection method ui− 1 ui+ 1
2 2
Staggered grid
pi ∆x = h
[Harlow-Welch 65]

i−2 i−1 i i+1 i+2

i− 32 i− 21 i+ 21 i+ 32

un+1
1 −u
n+1
1
i+ i−
Mass eq.: ∂u
∂x
=0 → 2
h
2
=0 Momentum eq. → u∗i+ 1
2

Projection: un+1
i+ 1
= u∗i+ 1 − ∆t

(pn+1
i+1 − pn+1
i )
2 2

pn+1 n+1
i+1 −2pi +pn+1
PPE: h2
i−1
= ρ
h∆t
(u∗i+ 1 − u∗i− 1 )
2 2

In the discrete PPE pressure and velocity fully coupled


→ problem of odd-even decoupling eliminated
Note: Collocated grids may be preferable for e.g. body-fitted grids, AMR,...
Various ways to overcome decoupling problem (e.g. upwind for convective terms).
MF206 (ENSTA Paris) Lecture 3 2021-2022 31 / 34
Projection Method Lid-driven cavity flow test

Lid-driven cavity flow problem


UL
Lid
Staggered grid

Ny p
u
v

ghost p
ghost u
ghost v

Green line = physical domain


Ghost values used for BC

1 Nx

MF206 (ENSTA Paris) Lecture 3 2021-2022 32 / 34


Projection Method Lid-driven cavity flow test

LUL
Lid-driven cavity flow problem Projection method, Re = ν = 100, N = 50

Ghia–Ghia–Shin 1982

MF206 (ENSTA Paris) Lecture 3 2021-2022 33 / 34


Projection Method Stability conditions

Stability conditions

Explicit forward in time centered in space projection scheme

For stability necessary that prediction step (no pressure term included) is stable,
numerical evidence indicates that this also sufficient.

Stability condition (FTCS method 2D convection-diffusion equation)

h2
 

∆t ≤ min , .
max(u2 + v 2 ) 4ν

1
Nondimensional variables: ν = Re
, Re = Reynolds number

∆t → 0 for Re → 0 and Re → ∞

Improvements of method:
• Better stability for convective terms for high Reynolds numbers.
• Implicit viscous terms for low Reynolds numbers.

MF206 (ENSTA Paris) Lecture 3 2021-2022 34 / 34

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy