![Page 1: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/1.jpg)
Computational Fluid Dynamics CFD
Basic Discretisation
![Page 2: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/2.jpg)
Governing equations
System of equations:
iii
i
i
ijj
iii
i fux
pux
uxTk
xtq
xEu
tE ρ
τρρρ
+∂
∂−
∂∂
+
∂∂
∂∂
+∂∂
=∂
∂+
∂∂
j
ij
ji
j
jii
xxpf
xuu
tu
∂∂
+∂∂
−=∂
∂+
∂∂ τ
ρρρ
0=∂
∂+
∂∂
i
i
xu
tρρ
Mass
Momentum
Energy
![Page 3: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/3.jpg)
Governing equations
iii
i
i
ijj
iiii fu
xpu
xu
xTk
xtq
xEu
tE ρ
τρρρ +
∂∂
−∂
∂+
∂∂
∂∂
+∂∂
=∂∂
+∂∂
j
ij
ji
j
ij
i
xxpf
xuu
tu
∂∂
+∂∂
−=∂∂
+∂∂ τ
ρρρ
0=∂∂
+∂∂
+∂∂
i
i
ii x
ux
ut
ρρρMass
Momentum
Energy
Non-conserved forms
![Page 4: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/4.jpg)
Classification of PDEs ( )( ) ( ) ( )( )2
1221122112212
1221 dxdbdbdxdycbcbdadadycacaA −+−+−−−=
( ) ( ) ( ) 0122112211221
2
1221 =−+−+−−
− dbdb
dxdycbcbdada
dxdycaca
02
=+−
c
dxdyb
dxdya
aacbb
dxdy
242 −±
=
Three situations:
04
04
04
2
2
2
<−
=−
>−
acb
acb
acb hyperbolic
parabolic
elliptic
![Page 5: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/5.jpg)
Classification of PDEs
Hyperbolic
P Domain of dependence Region of influence
Charateristic lines
y
x
![Page 6: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/6.jpg)
Classification of PDEs
parabolic
P Domain of dependence Region of influence
y
x
Known boundary conditions
Known boundary conditions
![Page 7: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/7.jpg)
Classification of PDEs
Elliptic
P
y
x
Every point influences all other points
![Page 8: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/8.jpg)
Governing equations and boundary conditions
Discretisation, choice of grid
System of algebraic equations
Equation system solver
Approximate solution
Mathematical description of physical ”reality”
FV, FD, FE?
![Page 9: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/9.jpg)
Finite differences
02
2=
∂∂
−∂∂
ixtφαφ
Consider the equation
To solve this numerically we create a discrete approximation in time and space. Hence, we get a system of algebraic equations and obtain the solution only at certain points.
x∆x∆ is the grid spacing and
t∆ is the time step
![Page 10: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/10.jpg)
Finite differences
02
2=
∂∂
−∂∂
xtφαφFor simplicity we use 1D-equation
First derivative.
Use Taylor expansion :
H.O.T.!3!2 3
33
2
221 +
∂∂∆
+
∂∂∆
+
∂∂
∆+=+n
j
n
j
n
j
nj
nj t
tt
tt
t φφφφφ
H.O.T.!3!2 3
32
2
21
−
∂∂∆
−
∂∂∆
−∆
−=
∂∂ + n
j
n
j
nj
nj
n
j tt
tt
ttφφφφφ
Rearrange and divide by ∆t:
![Page 11: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/11.jpg)
Finite differences
H.O.T.!3!2 3
32
2
21
−
∂∂∆
−
∂∂∆
−∆
−=
∂∂ + n
j
n
j
nj
nj
n
j tt
tt
ttφφφφφ
( )tOtt
nj
nj
n
j∆+
∆−
=
∂∂ + φφφ 1
Truncation error
First order forward difference, the truncation error is directly proportional to the time step.
Note that we can not from this say anything about the exact size of the TE, only how it behaves as ∆t goes to zero.
![Page 12: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/12.jpg)
Finite differences First derivative.
Use Taylor expansion :
H.O.T.!3!2 3
33
2
221 +
∂∂∆
+
∂∂∆
+
∂∂
∆+=+n
j
n
j
n
j
nj
nj t
tt
tt
t φφφφφ
H.O.T.32 3
3211
+
∂∂∆
−∆−
=
∂∂ −+ n
j
nj
nj
n
j tt
ttφφφφ
H.O.T.!3!2 3
33
2
221 +
∂∂∆
−
∂∂∆
+
∂∂
∆−=−n
j
n
j
n
j
nj
nj t
tt
tt
t φφφφφ
Second order central difference, the truncation error is proportional to the time step squared.
Subtract these two expressions, rearrange and divide by ∆t:
![Page 13: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/13.jpg)
Finite differences
H.O.T.32 3
3211
+
∂∂∆
−∆−
=
∂∂ −+ n
j
nj
nj
n
j tt
ttφφφφ
Second order central difference, the truncation error is proportional to the time step squared.
( )211
2tO
tt
nj
nj
n
j∆+
∆−
=
∂∂ −+ φφφ
![Page 14: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/14.jpg)
Finite differences Second derivative.
Use Taylor expansion:
H.O.T.!4!3!2 4
44
3
33
2
22
1 +
∂∂∆
+
∂∂∆
+
∂∂∆
+
∂∂
∆+=+
n
j
n
j
n
j
n
j
nj
nj x
xx
xx
xx
x φφφφφφ
H.O.T.4
24
42
211
2
2+
∂∂∆
−∆
+−=
∂∂ −+
n
j
nj
nj
nj
n
j tx
xxφφφφφ
H.O.T.!4!3!2 4
44
3
33
2
22
1 +
∂∂∆
+
∂∂∆
−
∂∂∆
+
∂∂
∆−=−
n
j
n
j
n
j
n
j
nj
nj x
xx
xx
xx
x φφφφφφ
Second order central difference, the truncation error is proportional to the node distance squared.
![Page 15: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/15.jpg)
Finite differences
φ
t tn-1 tn tn+1
First order
Second order
1st and 2nd order approximations to the time derivative at point tn
![Page 16: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/16.jpg)
Finite differences
02
2=
∂∂
−∂∂
xtφαφ
In total, the discrete approximation to
can be written as
02
211
1
=∆
+−−
∆− −+
+
xt
nj
nj
nj
nj
nj φφφ
αφφ
Called the FTCS scheme (Forward in Time, Central in Space)
![Page 17: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/17.jpg)
Finite differences Dissipation error
02
2=
∂∂
−∂∂
xxc φαφ
Convection-diffusion equation
1st order FD appoximation of the first derivative and 2nd order for the second derivative:
( ) 02
22
21 =∆+
∂∂∆
+∆−
=∂∂ − xO
xx
xxjj φφφφ
( )22
1112
2
2
2 22
xOxx
cxx
xcx
c jjjjj ∆+∆
+−−
∆−
=∂∂
−∂∂∆
−∂∂ −+− φφφ
αφφφαφφ
Numerical dissipation
( )44
42
211
2
2
O4
2x
xx
xx j
jjj ∆+
∂∂∆
−∆
+−=
∂∂ −+ φφφφφ
![Page 18: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/18.jpg)
Finite differences Dispersion error
02
2=
∂∂
−∂∂
xxc φαφ
Convection-diffusion equation
2nd order FD appoximation of the first derivative and 2nd order for the second derivative:
( ) 022
43
3211 =∆+
∂∂∆
+∆−
=∂∂ −+ xO
xx
xxjj φφφφ
( )44
42
211
2
2
O4
2x
xx
xx j
jjj ∆+
∂∂∆
−∆
+−=
∂∂ −+ φφφφφ
Even derivatives are dissipative
Odd derivatives are dispersive
Peclet number (Cell Reynolds number) α
xcPe ∆=
Dispersive schemes are unstable if
2>Pe
![Page 19: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/19.jpg)
Finite Volumes
0=∂∂
+∂∂
+∂∂
yG
xF
tq
vGuF
q
ρρρ
===
0=
∂∂
+∂∂
+∂∂∫ dxdy
yG
xF
tq
ABCD
Green’s theorem ( )
( )( ) GdxFdyds
GF
dsqdVdtd
ABCD
−=⋅=
=⋅+∫ ∫
nHH
nH
,
0
![Page 20: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/20.jpg)
Finite Volumes
Discrete approximation
( ) ( ) 0, =∆−∆+∑DA
ABABCDkj xGyFAq
dtd
ABAB
ABAB
xxxyyy
−=∆−=∆
2
2,1,
,1,
kjkjAB
kjkjAB
GGG
FFF
+=
+=
−
−
etc.
etc.
etc.
![Page 21: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/21.jpg)
Finite Volumes
022
22
22
22
,,1,,1
1,,1,,
,1,,1,
,1,,1,
=∆+
−∆+
+
∆+
−∆+
+
∆+
−∆+
+
∆+
−∆+
+
−−
++
++
−−
DAkjkj
DAkjkj
CDkjkj
CDkjkj
BCkjkj
BCkjkj
ABkjkj
ABkjkj
ABCD
xGG
yFF
xGG
yFF
xGG
yFF
xGG
yFF
dtdqA
![Page 22: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/22.jpg)
Finite Volumes
02
2
2
2=
∂∂
+∂∂
yxφφ
( ) 02
2
2
2=⋅=
∂∂
+∂∂ ∫∫ dsdxdy
yxABCD
nHφφ
( ) dxy
dyx
ds∂∂
−∂∂
=⋅φφnH
∫∫′′′′′′′′−
=∂∂
=
∂∂ dy
Adxdy
xAx DCBADCBAkjφφφ 11
2/1,
'''',''
''''
''1, ADADCkjCBB
DCBA
BAkj yyyydy ∆+∆+∆+∆≈∫ − φφφφφ
![Page 23: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/23.jpg)
Finite Volumes '''',''
''''
''1, ADADCkjCBB
DCBA
BAkj yyyydy ∆+∆+∆+∆≈∫ − φφφφφ
If the mesh is not too distorted:
kkABkkABDCBAAB
kkADCB
ABDCBA
xyyxAAyyyyyy
,1,1''''
,1''''
''''
−−
−
∆∆−∆∆==
∆≈∆−≈∆∆≈∆−≈∆
( ) ( )AB
ABkkkjkjAB
kj Ayy
xφφφφφ −∆+−∆
=
∂∂ −−
−
,1,1,
2/1,
( ) ( )AB
ABkkkjkjAB
kj Axx
yφφφφφ −∆+−∆
=
∂∂ −−
−
,1,1,
2/1,
![Page 24: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/24.jpg)
• Question: • Given a discrete approximation to the
governing equations can we ensure that we get a solution and that the solution is an approximation of reality?
![Page 25: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/25.jpg)
Lax equivalence theorem: Given a properly posed linear initial value problem and a finite difference approximation to it that satisfies the consistency condition, stability is a necessary and sufficient condition for convergence.
Note! For an non-linear problem this is a necessary but NOT sufficient condition.
![Page 26: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/26.jpg)
Governing Partial Differential Equations
System of algebraic equations
Approximate solution
Exact solution
discretisation
consistency
convergence
stability
CONSISTENCY+STABILITY=CONVERGENCE
![Page 27: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/27.jpg)
Solution error: The difference between the exact solution of the governing PDEs and the exact solution to the system of algebraic equations
( ) njnj
nj tx φφε −= ,
Convergence: The exact solution to the system of algebraic equations will approach the exact solution of the governing PDEs when grid spacing and time step go to zero
0lim0,
=→∆∆
njtx
ε
![Page 28: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/28.jpg)
Consistency: The system of algebraic equations will be equivalent to the governing PDEs at each grid point when grid spacing and time step go to zero
Stability: If spontaneous perturbations in the solution to the system of algebraic equations decay, we have stability
![Page 29: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/29.jpg)
Consistency
02
2
11
111
1
=∆
+−−
∆− +
−++
++
xt
nj
nj
nj
nj
nj φφφ
αφφ
Consider fully implicit form of the equation
Expand and around the j:th node 11+
−njφ1
1+
+njφ
( ) 022
!6!5!4!3!2
!6!5!4!3!2
72
12
1
6
661
5
551
4
441
3
331
2
2211
2
1
6
661
5
551
4
441
3
331
2
2211
2
1
=∆∆
+∆
−
∂∂∆
+
∂∂∆
−
∂∂∆
+
∂∂∆
−
∂∂∆
+
∂∂
∆−∆
+
∂∂∆
+
∂∂∆
+
∂∂∆
+
∂∂∆
+
∂∂∆
+
∂∂
∆+∆
−∆
−
+
+++++++
+++++++
+
xOxx
xx
xx
xx
xx
xx
xx
x
xx
xx
xx
xx
xx
xx
x
t
nj
n
j
n
j
n
j
n
j
n
j
n
j
nj
n
j
n
j
n
j
n
j
n
j
n
j
nj
nj
nj
αφα
φφφφφφφα
φφφφφφφα
φφ
![Page 30: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/30.jpg)
Consistency
( )
( )33
32
2
2
43
33
2
221
O!3!2
O!3!2
1
tt
tt
tt
tt
tt
tt
ttt
n
j
n
j
n
j
nj
n
j
n
j
n
j
nj
nj
nj
∆+
∂∂∆
+
∂∂∆
+
∂∂
=
−∆+
∂∂∆
+
∂∂∆
+
∂∂
∆+∆
=∆
−+
φφφ
φφφφφφφ
0...36012
1
6
641
4
421
2
21
=
+
∂∂∆
+
∂∂∆
+
∂∂
−∆
− ++++ n
j
n
j
n
j
nj
nj
xx
xx
xtφφφα
φφ
Now expand 1+njφ
1
2
2 +
∂∂
n
jxφ and
1
4
4 +
∂∂
n
jxφ
![Page 31: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/31.jpg)
Consistency
( )
∆+
∂∂
∂∆+
∂∂
∂∆+
∂∂
=
∂∂
+3
22
42
2
3
2
21
2
2
2tO
xtt
xtt
xx
n
j
n
j
n
j
n
j
φφφαφα
( )
∆+
∂∂
∂∆+
∂∂
∂∆+
∂∂∆
=
∂∂∆
+3
42
62
4
5
4
421
4
42
21212tO
xtt
xtt
xx
xx
n
j
n
j
n
j
n
j
φφφαφα
![Page 32: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/32.jpg)
Consistency
0....360
...12
...2
....62
6
64
4
5
4
42
22
42
2
3
2
2
3
32
2
2
=
+
∂∂∆
+
+
∂∂
∂∆+
∂∂∆
+
+
∂∂
∂∆+
∂∂
∂∆+
∂∂
−
+
∂∂∆
+
∂∂∆
+
∂∂
n
j
n
j
n
j
n
j
n
j
n
j
n
j
n
j
n
j
xx
xtt
xx
xtt
xtt
x
tt
tt
x
φ
φφ
φφφα
φφφ
![Page 33: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/33.jpg)
Consistency From the governing equation:
6
63
3
3
4
42
2
2
2
2
2
2
2
2
2
2
xt
xxxxtttt
xt
∂∂
=∂∂
∂∂
=
∂∂
∂∂
=
∂∂
∂∂
=
∂∂
∂∂
=∂∂
∂∂
=∂∂
φαφ
φαφααφαφφ
φαφ
02
2=+
∂∂
−∂∂ n
j
n
j
Extφαφ
We can now write:
...720366122 3
3
2
422
2
22+
∂∂
∆+
∆∆+
∆−
∂∂
∆+
∆−=
n
j
n
j
nj t
xtxtt
xtE φαα
φα
2xts
∆∆
=α
![Page 34: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/34.jpg)
Consistency 02
2=+
∂∂
−∂∂ n
j
n
j
Extφαφ
...120
1411
3611
2
...1204
136
12
3
3
2
2
2
2
3
3
22
422
2
22
+
∂∂
++
∆−
∂∂
+
∆−
=+
∂∂
∆
∆+
∆∆
+∆
−
∂∂
∆
∆+
∆−=
n
j
n
j
n
j
n
j
nj
tsst
tst
ttx
txt
ttxtE
φφ
φαα
φα
2xts
∆∆
=α
Consistent if 0lim2
0,=
∆∆
→∆∆ tx
xt
![Page 35: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/35.jpg)
Stability Consider the numerical error *n
jnj
nj φφξ −=
Exact solution to system of algebraic equations
Numerical solution to system of algebraic equations
Stable if decreases towards round off
Unstable if increases
njξ
njξ
![Page 36: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/36.jpg)
Stability
02
211
1
=∆
+−−
∆− −+
+
xt
nj
nj
nj
nj
nj φφφ
αφφ
( ) nj
nj
nj
nj sss 11
1 21 +−+ +−+= φφφφ 2x
ts∆
∆=
α
( ) *11
**1
*1 21 ++−
+ +−+= nj
nj
nj
nj sss φφφφ
If the system is linear we can subract these equations
( ) nj
nj
nj
nj sss 11
1 21 +−+ −++= ξξξξ
![Page 37: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/37.jpg)
Stability von Neumann stability analysis
The errors are expanded as finite Fourier series. Stability is determined by considering whether a Fourier component decays or amplifies when progressing to the next time level.
1,.....,3,2 ,2
1
0 −== ∑−
=
JjeaJ
m
jimj
mθξInitial error: xmm ∆= πθ
( ) nj
nj
nj
nj sss 11
1 21 +−+ −++= ξξξξ
Assume exponetial growth or decay in time: tnm ea ∆= α
![Page 38: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/38.jpg)
Stability von Neumann stability analysis
jitnnj ee θαξ ∆=
Due to linearity it is sufficient to study one a single term of the series.
Substitute into the error equation:
( ) ( ) ( ) ( )111 21 +∆∆−∆∆+ −−+= jitnjitnjitnjitn eseeeseseee θαθαθαθα
( )2/sin41 2 θα se t −=∆
tnj
nj eG ∆
+
== α
ξξ 1
( )21 −++= −∆ θθα iit eese ( )2
cosθθ
θii ee −+
=
( )2
cos12
sin2 θθ −=
Amplification factor
![Page 39: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/39.jpg)
Stability von Neumann stability analysis
Stable if 1≤G for all θ
hence for this scheme ( ) 12/sin411 2 ≤−≤− θs
true if 21
≤s 2xts
∆∆
=α
What does this mean physically?
tx
xs∆
∆∆=
α physical information speed
travelling speed
i.e. speed of physical information should be half of what can be resolved on the grid.
![Page 40: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/40.jpg)
Stability
0111
=∆−
+∆− −+
+
xc
t
nj
nj
nj
nj φφφφ
The convection equation.
011
=∆−
+∆− −
+
xc
t
nj
nj
nj
nj φφφφ
0=∂∂
+∂∂
xc
tφφ
Central difference for convective term
θsin1 iCG −=
1≤C
xtcC
∆∆
=Courant number
Unstable!
Upwind difference for convective term
( ) θθ sincos11 iCCG −−−=
Stable if CFL (Courant-Friedrich-Levi) condition
Physical interpretation:
txcC∆
∆=
Convection speed
travelling speed
![Page 41: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/41.jpg)
Stability von Neumann stability analysis
02
2 21111
1
=∆
+−−
∆−
+∆
− −+−++
xxc
t
nj
nj
nj
nj
nj
nj
nj φφφ
αφφφφ
The convection-diffusion equation. 02
2
=∂∂
−∂∂
+∂∂
xxc
tφαφφ
Central difference for convective term
( ) ( )θθ sincos121 iCsG −−−=
120 2 ≤≤≤ sCxtcC
∆∆
=Courant number Stable if
2xts
∆∆
=α
![Page 42: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/42.jpg)
Stability von Neumann stability analysis
The convection-diffusion equation.
02
2111
1
=∆
+−−
∆−
+∆
− −+−+
xxc
t
nj
nj
nj
nj
nj
nj
nj φφφ
αφφφφ
02
2
=∂∂
−∂∂
+∂∂
xxc
tφαφφ
Upwind difference for convective term
( ) ( )θθ sincos121 iCsG −−−=
12 ≤+ sCxtcC
∆∆
=Courant number
![Page 43: Computational Fluid Dynamics CFD - fm.energy.lth.se€¦ · Computational Fluid Dynamics CFD Basic Discretisation . Governing equations System of equations: i i i i i j ij i i i i](https://reader033.vdocuments.site/reader033/viewer/2022042515/5f6e2ffd7962012be355f669/html5/thumbnails/43.jpg)
Stability
02
2
11
111
1
=∆
+−−
∆− +
−++
++
xt
nj
nj
nj
nj
nj φφφ
αφφ
2xts
∆∆
=α
Explicit vs. implicit schemes
Explicit: 02
211
1
=∆
+−−
∆− −+
+
xt
nj
nj
nj
nj
nj φφφ
αφφ
Stable if 21
≤s
Implicit:
( )2/sin411
2 θsG
+=
( )2/sin41 2 θsG −=
( ) nj
nj
nj
nj sss ξξξξ =−++− +
+++
−11
111 21
Stable if 0≥s i.e. unconditionally stable