Professional Documents
Culture Documents
MIT 2 - 29 Fal2011 - Lect - 18
MIT 2 - 29 Fal2011 - Lect - 18
Examples
2.29
Examples
Extensions to 2D and 3D
Explicit and Implicit schemes
Alternating-Direction Implicit (ADI) schemes
dV
(
.n )dA
CS
dt CVfixed
Advective fluxes
2.29
q .n dA
CS
s dV
CVfixed
.( v) . q s
t
Introduction to FV Methods
Approximations needed and basic elements of a FV scheme
FV grids
Approximation of surface integrals (leading to symbolic formulas)
Approximation of volume integrals (leading to symbolic formulas)
2.29
2.29
dV
(
.n )dA
CV
CS
dt
q .n dA
CS
s dV
CV
FV METHODS: Introduction
FV approach has two main advantages:
Ensures that the discretization is conservative, locally and globally
Mass, Momentum and Energy are conserved in a discrete sense
In general, if discrete equations are summed over all CVs, the global
dV (v .n )dA q .n dA s dV
S (t )
S (t )
V (t )
dt V ( t )
where V(t) is any discrete control volume. We will assume for now that they
dont vary in time: V(t)=V
2.29
FV METHODS
Several Approximations Needed
To integrate discrete CV equation:
dV
v
n
dA
(
.
)
q
s dV
.n dA
V
S
S
V
dt
dt V
dt
d
Hence cons. eqn. becomes:
F .n dA S
dt S
FV METHODS
Several Approximations Needed, Contd
Time-marching method for CV equation:
d
F .n dA S
S
dt
d
F .n dA S
S
dt
(since
d
d
1
dV (V
dt V
dt V
dV )
Flux-difference splitting
FV METHODS
Basic Elements of FV Scheme
1. Given for each CV, construct an approximation to (x, y, z)
in each CV and evaluate fluxes F
Find at the boundary using this approximation, evaluate fluxes F
This generally leads to two distinct values of the flux for each
boundary
F .n dA
: Surface Integrals
2.29
Time-Marching
PFJL Lecture 18,
Node Centered
Other approach:
Define nodal locations first
Construct CVs around them (so that CV
faces lie midway between nodes
Advantage: CDS approximations of
derivatives (fluxes) at boundaries are more
accurate (faces are midway between two
nodes)
2.29
CV-Faces Centered
10
vs. Unstructured:
Meshes formed of triangular or
tetrahedra or pyramids in 3D
Springer. All rights reserved. This content is excluded from our Creative Commons license.
Remarks
For more information, see http://ocw.mit.edu/fairuse. Source: Cebeci, T., J. Shao, et al.
Computational Fluid Dynamics for Engineers: From Panel to Navier-Stokes Methods with
Computer Programs. Springer, 2005.
What changes are the relations between various locations on the grid and accuracies
2.29
11
NW
yj
WW
yj-1
nw
w
n ne
P e ne
sw
s se
SW
(3D) faces:
NE
SE
xi-1
xi
xi+1
F
. n dA
f dA
S
Sk
n
W
s
b
2.29
EE
12
yj+1
Goal: estimate Fe S f dA
NW
yj
Simplest approximation:
WW
yj-1
nw
w
n ne
P e ne
sw
s se
SW
NE
EE
SE
x
x
x
i
Fe is approximated as a product of
x
the integrand at cell-face center
i-1
F e f dA f e Se f e Se O(y 2 ) f e Se
Se
i+1
f
(
y
)
f
(
y
)
f
'(
y
)
f ''( ye ) R2 y ye
e
e
2!
obtained by interpolation
Has to be computed with 2nd order
midpoint rule
2.29
13
yj+1
Another
2nd
yj
order approximation:
WW
nw
w
n ne
P e ne
sw
s se
xi-1
NE
SW
Fe is approximated as:
Se
yj-1
Trapezoid rule
Fe f dA Se
NW
EE
SE
xi
xi+1
( f ne f se )
O(y 2 )
2
In this case, it is the fluxes at the corners fne and fse that need to be obtained by
interpolation
Have to be computed with 2nd order accuracy to preserve accuracy
locations
2.29
To keep accuracy of integral: e.g. use cubic polynomials to estimate these values
from Ps nearby
Numerical Fluid Mechanics
PFJL Lecture 18, 14
14
Se
n
W
Fe is approximated as:
Fe f dA Se f e
Se
O(y , z )
s
b
y
2.29
15
S s dV
yj+1
1
V
NW
yj
dV
WW
yj-1
nw
w
n ne
P e ne
sw
s se
SW
NE
SE
xi-1
xi
xi+1
SP approximated as:
T
n
S P s dV sP V sP V
n
W
2nd
EE
s
b
16
S s dV
V
1
V
yj+1
dV
NW
yj
WW
yj-1
Requires
values at other locations than
Obtained either by interpolating nodal
polynomials
nw
w
n ne
P e ne
sw
s se
SW
EE
SE
xi-1
NE
xi
xi+1
a
a
a
S P s dV x y a0 3 x 2 4 y 2 8 x 2 y 2
V
12
12
144
Only four coefficients (linear dependences cancel), but they still depend on the 9 nodal values
2.29
17
x y
16sP 4ss 4sn 4sw 4se sse ssw sne snw
36
Since only value at node P is available, one must interpolate to obtain values at
surface locations
Has to be at least 4th order accurate interpolation to retain order of integral
approximation
3D case:
Techniques are similar to 2D case: above 4th order approx directly extended
For Higher Order
Integral approximation formulas are more complex
Interpolation of node values are more complex
2.29
18
Fe f dA
Se
Fe f dA f e Se f e Se O(y 2 ) f e Se
Fe f dA Se
Fe
Se
Se
Se
( f ne f se )
O(y 2 )
2
( f 4 f e f se )
f dA Se ne
O(y 4 )
6
Fe f dA Se f e
Se
O(y 2 , z 2 )
Volume Integrals:
S s dV ,
V
1
V
dV
SP
x y
16sP 4ss 4sn 4sw 4se sse ssw sne snw
36
S P s dV sP V sP V
19
F .n dA S
This integral eqn. is:
S
dt
dt
1
where V dV and S s dV
V
V
This implies:
The discrete state variables are the averaged values over each cell (CV): P 's
Need rules to compute surface/volume integrals as a function of within CV
Evaluate integrals as a function of e values at points on and near CV.
Need to interpolate to obtain these e values on and near CV from averaged P 's of nearby CVs
Other approach: impose piece-wise function within CV, ensures that it satisfies P ' s
constraints, then evaluate integrals (surface and volume)
Select scheme to resolve/address discontinuities
Solve resultant discrete integral/flux eqns: (Linear) algebraic system for P 's
2.29
20
j-2
j-1
j+1/2
j+1
j+2
f j1/ 2 f ( j 1/ 2 )
1
V
dV
1
x
x j 1/2
x j 1/2
( x , t ) dx
S j (t ) s j dV
V
x j 1/ 2
x j 1/ 2
s ( x, t ) dx
d
V
F .n dA S
dt S
d x j
dt
2.29
f j 1/ 2 f j 1/ 2
becomes:
x j 1/ 2
x j 1/ 2
s ( x, t ) dx
PFJL Lecture 18,
21
j-1/2
x j 1/2
x j 1/2
(x, t )dx
1 x/2
R2 d
j
x x/2
x j 2 x 2 j
j-2
j-1
j+1/2
j+1
j+2
x 2 2
4
(
)
O
x
j
24 x 2 j
x
Image by MIT OpenCourseWare.
j (t ) j O(x 2 )
2.29
22
One-Dimensional Example I
Linear Convection (Sommerfeld) Eqn:
(xt , t ) c ( xx, t ) 0
With convection only, our generic 1D eqn.
d x j
dt
f j 1/ 2 f j 1/ 2
x j 1/ 2
x j 1/ 2
j-1/2
s ( x, t ) dx
becomes:
d x j
dt
j-2
j-1
j+1/2
j+1
f j 1/ 2 f j 1/ 2 0
j+2
x
Image by MIT OpenCourseWare.
( x ) j x j1/ 2 x x j1/ 2
This gives simple flux terms. The only issue is that they differ depending
on the cell from which the flux is computed:
L
f jL1/ 2 f ( j
1/ 2 ) c j
L
L
f j1/
2 f ( j1/ 2 ) c j1
2.29
R
R
f j1/
2 f ( j1/ 2 ) c j1
R
R
f j1/
2 f ( j1/ 2 ) c j
23
One-Dimensional Example I
Linear Convection (Sommerfeld) Eqn, Contd
Now, we have obtained the fluxes at the CV boundaries in terms
of the CV-averaged values
We need to resolve the flux discontinuity => average values of
the fluxes on either side, leading the (2nd order) estimates:
f j1/ 2
L
R
f j1/
2 f j1/ 2
c j1 c j
f j1/ 2
d j
dt
f j1/ 2 f j1/ 2
c j1 c j1
2
d x j
dt
f j1/ 2 f j1/ 2
L
R
f j1/
f
2
j1/ 2
d x j
dt
c j c j1
c j c j1
2
c j1 c j
2
B P ( 1,0,1) 0
dt
2x
2.29
24
One-Dimensional Example I
Linear Convection (Sommerfeld) Eqn, Contd
The resultant linear algebraic system is circulant tri-diagonal (for
periodic BCs)
d
c
B P ( 1,0,1) 0
dt
2x
c t
1
x
25
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.