0% found this document useful (0 votes)
199 views

Euler Equation by Jameson Method

The document summarizes the Jameson finite volume scheme for solving the Euler equations over a 2D domain. It discusses: 1) Discretizing the Euler equations into a finite volume form involving volume and surface integrals over small control volumes. 2) Approximating the integrals using cell-centered values at the control volume nodes and mid-plane points for the surface fluxes. 3) Combining the discretized terms to form the basic explicit Jameson scheme for updating the conserved variables in each control volume from time step to time step.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
199 views

Euler Equation by Jameson Method

The document summarizes the Jameson finite volume scheme for solving the Euler equations over a 2D domain. It discusses: 1) Discretizing the Euler equations into a finite volume form involving volume and surface integrals over small control volumes. 2) Approximating the integrals using cell-centered values at the control volume nodes and mid-plane points for the surface fluxes. 3) Combining the discretized terms to form the basic explicit Jameson scheme for updating the conserved variables in each control volume from time step to time step.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 40

CFD Lecture 18-20

Euler Equations
Jameson Finite Volume Scheme

Prof. Ken Gordon
Solve Euler Equations over 2-D domain using Jameson Finite Volume Scheme:
1. Euler Equations
Classification
Conservative (differential) form (5.5)
Transformation to computational (,,q) domain (5.6)
2. Finite Volume (FV) vs. Finite Difference (FD) schemes (3.5, 5.7)
Development of FV form: cell volume vs. fluxes
General discretization with (small) grid cell
Three steps:
a) Gridding: Cell-centered vs. Nodal-point
b) Volume / Fluxes: select scheme to approximate integrals (6.3-6.5)
c) Time step: select scheme to update cell-averaged parameters
3. Boundary Conditions (6.7)
Walls: Dummy-cell, extrapolation
Far-field: Characteristics (information flow) (6.2)
Linear, Non-Linear (Riemann Invariants)
Overview
Class 18
Class 19
Solve Euler Equations over 2-D domain using Jameson Finite Volume Scheme:
4. Smoothing
Artificial viscosity vs. Inherent numerical dissipation
5. Stability Analysis
CFL condition, max local At
6. Initial Conditions
Write & Run your code! (steady-state solution, not time accurate)
Overview
Class 20
Recall equations in 2-D are:
Euler Equations (Inviscid, Adiabatic Flow): Overview
0 =
c
c
+
c
c
+
c
c
y
F
x
E
t
U
(
(
(
(

=
t
e
v
u
U

( )
(
(
(
(

+
+
=
u p e
uv
p u
u
E
t


2
( )
(
(
(
(

+
+
=
v p e
p v
uv
v
F
t

2
where
( )
2 2 2
2
1
w v u T c e
RT p
t
+ + + =
=
v

and thermodynamic / state equations for ideal gas:


( )
2 2 2
2
1
w v u T c
p e h
p
t t
+ + + =
+ =
Subsonic
(M < 1)
Sonic
(M = 1)
Supersonic
(M = 1)
Elliptic
Hyperbolic
Parabolic
Hyperbolic
Hyperbolic (in space)
Hyperbolic (in time)
Steady Flow:
Unsteady Flow:
These are Non-Linear system of equations in Strong Conservative form
Often appropriate for predicting core velocity and pressure field use for initial designs
Classification:
Examples of Elliptic, Hyperbolic steady-flow fields (body in flow)
Euler Equations: Classification
What happens if Flow is subsonic?
Flow is supersonic?
Flow
Wind tunnel
Convert strong-conservative differential form to pair of volume / surface integrals:
Finite Volume Method: Volume / Flux integrals
0 =
|
|
.
|

\
|
c
c
+
c
c
+
c
c
}
dA
y
F
x
E
t
U
A
Greens Theorem converts a volume (area) to surface integral
( ) 0 = +
c
c
} }}
S A
dx F dy E dy dx U
t
( ) ( )
} }
= V
S A
dS n B dA B


For 2-D flow, assume unit depth (in z), so volume integral is ~ area integral
Apply using and , integrating CCW:
=
|
|
.
|

\
|
c
c
+
c
c
}
A
dA
y
F
x
E
j F i E B

+ = j
dS
dx
i
dS
dy
n

=
Change of U
within area
Fluxes E and F
crossing surfaces
(CCW integral)
n
x
= cosu
dy = dS cosu
S
A
dS

-dx

u
n
x
n
n
y
u
|n|=1
Euler equations become:
( )
} }
=
|
.
|

\
|

S S
Fdx Edy dS
dS
dx
F
dS
dy
E
We want to discretize this conservative integral equation over small Control Volumes.
Finite Volume Method: Small Control Volume (Area)
( ) 0 = +
c
c
} }}
S A
dx F dy E dy dx U
t
Simple example: Consider a small rectangular area
Ax
Ay E
E
F
N
E
W
F
S
( ) ( ) 0 = + + A A
c
c
}
dx F dy E dx F dy E y x
t
U
S W N E
U

( ) x F y E x F y E
y x t
U
S W N E
A A A + A
A A

=
c
c 1
Three-step plan for Finite Volume process:
a) Gridding: Discretized points to store values of fluid variables
b) Volume / fluxes: select scheme to approximate area & surface integrals
c) Time step: select scheme to update cell-averaged parameters
For example, consider first row of U, E, F in Euler equations (mass conservation):
( ) ( ) ( ) ( ) | | x v y u x v y u
y x t
S W N E
A A A + A
A A

=
c
c

1
Integration
direction
(CCW)
Advantages to FINITE VOLUME vs. FINITE DIFFERENCE formuation:
Finite Volume Method: Why??!!
( ) 0 = +
c
c
} }}
S A
dx F dy E dy dx U
t
0 =
|
|
.
|

\
|
c
c
+
c
c
+
c
c
}
dA
y
F
x
E
t
U
A
a) Conservative discretization: locally and globally
Mass, momentum, energy is conserved between adjacent cells.
Conservation maintained over entire domain since interior surface integrals cancel.
b) Can work directly in (x,y) domain.
No need to transform to (,q) or use metrics.
Two grid methodologies: Nodal-Point vs. Cell-Centered
Finite Volume Method: Grid Layout
Nodal-Point (Face-Centered)
Define nodal locations first ( )
i,j
.
Variables (e.g. , u, v, p) stored at grid nodes.
Control volumes connect nodes.
Boundary
N
E
S
W
Cell-Centered (Node-Centered)
Boundary
N
E
S
W
Advantage: Nodal values represent mean over
CV better since nodes at centroid.
Advantage: Approximation of fluxes
better for skewed cells since faces
connect computational nodes.
Establish CVs with suitable grid ().
Geometry (x,y) stored at grid intersection points.
Assign computational node ( )
i,j
to CV centroid.
Variables (e.g. , u, v, p) stored at grid nodes.
More typically used
Use cell-centered scheme on Euler equations
Jameson Finite Volume Scheme: Integral Evaluations
( ) 0 = +
c
c
} }}
S A
dx F dy E dy dx U
t
1) Volume integral:
N
E
S
W
i,j
i+1, j
i-1, j
i, j+1
i, j-1
a
b
d
c
t
U
A dy dx U
t
j i
j i
A
c
c
~
c
c
}}
,
,
Assume U
i,j
represents value over CV
( )( ) ( )( ) | |
b d a c b d a c j i
x x y y y y x x A =
2
1
,
For area A
i,j
calculated as
Control volume (i,j) has area A
i,j
, nodes
(a,b,c,d), and faces (E,N,W,S).
Make approximation that each face is a
straight line.
Faces at:
E (i+, j), W (i-, j), N (i, j+), S (i, j-)

Use cell-centered scheme on Euler equations
Jameson Finite Volume Scheme: Integral Evaluations
( ) 0 = +
c
c
} }}
S A
dx F dy E dy dx U
t
2) Surface integrals:
N
E
S
W
i,j
i+1, j
i-1, j
i, j+1
i, j-1
a
b
d
c
Two choices for flux at (say) East face:
i) F
E
= F(U
E
) for U
E
= (U
i,j
+ U
i+1,j
)
ii) F
E
= (F
i,j
+ F
i+1,j
)
Method (ii) is chosen in general, but (i) can be just as good.
( ) ( )

}
A A = x F y E dx F dy E
S
Also, fluxes E and F can be evaluated at time level k (explicit) or k+1 (implicit).
Jameson is explicit scheme. Fluxes evaluated using known values from last completed
time step k.
A + A + A =
E E N N E E
x F y E y E
Where (CCW!) , ,
b c E b c E
x x x y y y = A = A
, ,
d a W d a W
x x x y y y = A = A
3) Combine for Basic Jameson Scheme
| | | | 0
,
,
= A + A + A + A A + A + A + A +
c
c
S S N N W W E E S S N N W W E E
j i
j i
x F x F x F x F y E y E y E y E
t
U
A
Work directly in (x,y) domain!
Transform equations from physical (x,y) to computational (,q) domain
Jameson FV Scheme: Comparison to Finite Differencing
=
c
c
+
c
c
+
c
c
y
F
x
E
t
U
(


=
(


q q
q q

x y
x y
J
y x
y x
1
0 = + +
c
c

q q q q
x F x F y E y E
t
U
J
Return to Strong Conservative form:
| | | | | | 0 =
c
c
+
c
c
+
c
c
q t
( )
( ) ( ) 0 = + = +
c
c
+
c
c
+
c
c
q q q q q q
q
Fx Ey Fx Ey Fx Ey Fx Ey
t
JU
Better than textbook: uses metrics in form we calculate them
Use values of metrics:
0

=
c
c
+
c
c
+
c
c
q
F E
t
U
Can think of this like
Can then apply finite differencing
schemes over 2-D grid (,q).
0 = + + + +
c
c
y y x x
F F E E
t
U
q q
q q
Finite difference with central schemes:
Jameson FV Scheme: Comparison to Finite Differencing

A
d
dx
q
q
A
d
dy

A
d
dy
q
q
A
d
dx
( )
q
q
u
q q
A A =
A A =
=
= =
J
x y y x
x y y x
OC OB OC OB A
C B C B
sin
Proof: Area of quadrilateral:
( )
( ) ( ) 0 = +
c
c
+
c
c
+
c
c
q q
q
Fx Ey Fx Ey
t
JU
( )
t
U
J
t
JU
j i
j i
c
c
~
c
c
,
,
1) Time derivative term:
Jacobian transforms area of computational element to true FV area
x
y

q
A
t
U A
j i j i
c
c
A A
=
, ,
q
Finite difference with central schemes:
Jameson FV Scheme: Comparison to Finite Differencing
( )
( ) ( ) 0 = +
c
c
+
c
c
+
c
c
q q
q
Fx Ey Fx Ey
t
JU
( )
( ) ( )

q q
q
A

~
c
c

+
+
j i
j i
j i
j i
y E y E
Ey
,
,
,
,
2
1
2
1
2
1
2
1
( )
j i j i
j i
E E E
, 1 , 2
1
,
2
1
+
+
+ =
2) One spatial term: Use central differencing about mid-point

q
i,j i+1, j
where we can define values at plane:
( ) ( ) | | | |
W W E E a d W b c E
y E y E y y E y y E A + A
A A
=
A A
=
q q
1 1
a b
d c
( )
( ) ( )

q q

q
A
A

A

~
c
c
+ + + + +
1 1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
, , , , , , j i j i j i j i j i j i
y y E y y E
Ey
A
Aq
3) Combine time derivative and all four flux terms for:
| | | | 0
,
,
= A + A + A + A A + A + A + A +
c
c
S S N N W W E E S S N N W W E E
j i
j i
x F x F x F x F y E y E y E y E
t
U
A
This is exactly Jamesons (basic) Finite Volume scheme!
Nodal-Point scheme has better flux accuracy for skewed gridding
Nodal-Point FV Scheme: Fluxes
2) Surface integrals:
N
E
S
W
i,j
i+1, j
i-1, j
i, j+1
i, j-1
a
b
d
c
Two choices for flux at (say) East face:
i) F
E
= F(U
E
) for U
E
= (U
i,j
+ U
i+1,j
)
ii) F
E
= (F
i,j
+ F
i+1,j
)
Method (ii) is chosen in general, but (i) can be just as good.
( ) ( )

}
A A = x F y E dx F dy E
S
Also, fluxes E and F can be evaluated at time level k (explicit) or k+1 (implicit).
Jameson is explicit scheme. Fluxes evaluated using known values from last completed
time step k.
+ A + + A + A =
E E N N E E
x F y E y E
Where (CCW!) , ,
b c E b c E
x x x y y y = A = A
, ,
d a W d a W
x x x y y y = A = A
3) Combine for Basic Jameson Scheme
| | | | 0
,
,
= A + A + A + A A + A + A + A +
c
c
S S N N W W E E S S N N W W E E
j i
j i
x F x F x F x F y E y E y E y E
t
U
A
Work directly in (x,y) domain!
THIS SLIDE IS
TEMPORARILY BOGUS!!
Solve Euler Equations over 2-D domain using Jameson Finite Volume Scheme:
1. Euler Equations
Classification
Conservative (differential) form (5.5)
Transformation to computational (,,q) domain (5.6)
2. Finite Volume (FV) vs. Finite Difference (FD) schemes (3.5, 5.7)
Development of FV form: cell volume vs. fluxes
General discretization with (small) grid cell
Three steps:
a) Gridding: Cell-centered vs. Nodal-point
b) Volume / Fluxes: select scheme to approximate integrals (6.3-6.5)
c) Time step: select scheme to update cell-averaged parameters
3. Boundary Conditions (6.7)
Walls: Dummy-cell, extrapolation
Far-field: Characteristics (information flow) (6.2)
Linear, Non-Linear (Riemann Invariants)
Overview
Class 18
Class 19
Many hyperbolic methods to advance from one time step to next.
Consider conceptual differential equation
Goal: Would like explicit, at least O(At
2
) error scheme
Time Step Evaluation
1. Leap-frog method:
Multi-Step scheme requires special starting procedures from U
0
to U
1
before
getting to U
2
and later times.
) (U f
dt
dU
=
) (
1 1 1 +
A + =
k k k
U f t U U
2. Runge-Kutta (Single-step, Multi-stage scheme)
No special starting requirements. Advance directly from U
k
to U
k+1
, but may take
additional calls of flux terms in-between.
The 4-stage R-K is generally written for as
( ) t K K K K U U
k k
A + + + + =
+

4 3 2 1 6
1
1
2 2
) , ( t U f
dt
dU
=
) , (
) , (
) , (
) , (
1
3 4
2 2
1
3
1 2
1
2
1
2
1
2
1
+
+
+
A + =
A + =
A + =
=
k k
k
k
k
k
k k
t t K U f K
t t K U f K
t t K U f K
t U f K




J ameson-Schmidt-Turkel high-order error, lower-storage, 4-stage scheme:
Jameson FV Scheme: Time Step Evaluation
O(At
2
) scheme, stable for . 2 2 s
A
A
=
x
t a
v
1
,
) 3 ( ) 0 ( ) 4 (
) 2 (
2
1
) 0 ( ) 3 (
) 1 (
3
1
) 0 ( ) 2 (
) 0 (
4
1
) 0 ( ) 1 (
+
= A =
A =
A =
A =
k
j i
U R t U U
R t U U
R t U U
R t U U
0
,
,
= +
c
c

fluxes
t
U
A
j i
j i
j i
j i
j i
R fluxes
A t
U
,
,
,
1
=
c
c

Original J ameson uses fact that RHS is not explicitly dependent on time.
k
j i
U
,
k
j i
U U
,
) 0 (
=
) 0 (
R
) 0 (
U
( )
( )
1
,
) 2 ( ) 0 (
2
1
) 0 ( ) 3 (
) 1 ( ) 0 (
2
1
) 0 ( ) 2 (
) 0 ( ) 0 ( ) 1 (
+
= + A =
+ A =
A =
k
j i
U R R t U U
R R t U U
R t U U
O(At
2
) scheme, stable for .
Requires extra storage of residuals.
2 s
A
A
=
x
t a
v
Consider current state , and define and as residual based on .
Rewrite as
For SS problems can think of R as a residual, and want to drive R 0.
Solid Walls (or known streamlines / symmetry)
Boundary Conditions: Solid Walls
( ) 0 = +
c
c
} }}
S A
dx F dy E dy dx U
t
Typical code
(# lines)
PDE: 30-35%
BC: 50-55%
Smoothing: 15%
i,1
a
b
How to calculate flux on ab wall? ( ) ( )
} }
+ =
b
a
y x
b
a
dS n F n E dx F dy E
Given along solid boundary / streamline: 0 = + =
y x
n v n u n u

Euler equations:
=
(
(
(
(
(

|
|
|
|
|
.
|

\
|
+
+
|
|
|
|
|
.
|

\
|
+
}
dS n
vh
p v
uv
v
n
uh
uv
p u
u
b
a
y
t
x
t


2
2
( )
( )
( )
=
|
|
|
|
|
.
|

\
|

+
+

}
dS
h n u
pn v n u
pn u n u
n u
b
a
t
y
x




|
|
|
|
|
.
|

\
|

=
|
|
|
|
|
.
|

\
|
}
}
}
0
0
0
0
dx p
dy p
dS
pn
pn
b
a
y
x
Makes sense physically! No mass / enthalpy flux through across streamline.
Only momentum flux due to pressure force on wall.
Jameson implementation: Approximate P
wall
over P
a
to P
b
:
Jameson FV Scheme: Solid Walls
(i,1)
a
b
ii) 2
nd
-order extrapolation:
But this gives O(Ax) error!
Degrades entire solution
to 1
st
-order accuracy.
i) Simple extrapolation: P
w
= P
1
.
P
w
P
1
|
|
.
|

\
|
A
A
=
|
|
.
|

\
|

}
}
x P
y P
dx p
dy p
w
w
( )
|
|
|
|
|
.
|

\
|
A
A
=
}
0
0
1
1
x P
y P
dx F dy E
b
a
( )
n
R
v u
P P
w
A
+
=
2 2
1

( )
R
v u
n
P P
n
P
w
2 2
1
+
=
A

=
c
c
So, for curvature (a),
( )
n
R
v u
P P
w
A
+
+ =
2 2
1

and for curvature (b).
Use (u,v) from point (i,1), and An & radius of curvature R from boundary grid points.
a
b
P
high
P
low (b)
a
b
P
low
P
high
An

(a)
iii) Dummy (Ghost) cell reflection (recommended):
Jameson FV Scheme: Solid Walls
( )
}

b
a
dx F dy E Calculate as usual, like an interior point.
1 0
1 0
p p =
=
( ) ( )
( ) ( )
1 0
1 0
t u t u
n u n u


=
= Set and
Normal opposite sign
Tangential same sign
So, when averaging E and F on face ab, get mass flux = 0
Problem with Nodal-Point scheme:
( ) ( )
|
|
|
|
|
.
|

\
|
A
A
+ =
}
0
0
2
1
x
y
P P dx F dy E
b a
b
a
Leads to P
high
/P
low

oscillation, driving
fluctuating velocity
vectors.
Can add transpiration terms
to correct for flow tangency:
( ) ( ) ( )
( ) ( ) ( )
y orig c
x orig c
n n u v v
n n u u u


=
=


but then mass flux is not conserved.
a b
(i,1)
a
b
(i,0)
Solve Euler Equations over 2-D domain using Jameson Finite Volume Scheme:
1. Euler Equations
2. Finite Volume (FV) vs. Finite Difference (FD) schemes (3.5, 5.7)
3. Boundary Conditions (6.7)
Walls: Dummy-cell, extrapolation
Far-field: Characteristics (information flow) (6.2)
Linear, Non-Linear (Riemann Invariants)
4. Smoothing
Artificial viscosity vs. Inherent numerical dissipation
5. Stability Analysis
CFL condition, max local At
Write & Run your code! (steady-state solution, not time accurate)

Overview
Class 20
Trade-off: Accuracy vs. Size of Domain
Boundary Conditions: Far-Field
Far from body, u U

, v 0, streamlines are parallel so p p

.
1. Can set u = U

, v = 0. Accurate to 0.1% by ~32 radii (1/r


2
) to 1000 radii (1/r)
1. Where to put boundaries
2. How to model behavior
3. How many BCs to apply,
and which ones?
upstream
U


radius, a
2 2
2 y x
y
U u
+
I
+ =

t
2 2
2 y x
x
v
+
I
=
t
2
log 1
r
r
r
+
r 1
( ) 1 cos 2 1
2
2
2
=

u
r
a
U
u
Recall for circle,
UG potential theory (source/sinks):
Circulation (lift) ~
(drag) ~
Doublet (thickness) ~
2
1 r
General shape
2. For cases with circulation, set correction ,
For 0.1% accuracy, can reduce domain back to ~32 radii.
Careful not to over-constrain problem
Consider 1-D incompressible (subsonic) steady nozzle flow:
Boundary Conditions: Far-Field
Steady subsonic flow is elliptic, could specify u and P at either location.
Full unsteady Euler equations are elliptic/hyperbolic
1. Where to put boundaries
2. How to model behavior
3. How many BCs to apply,
and which ones?
P
0
, u
0
P
1
, u
1
How many boundary conditions need be specified?
const uA=
Specify: u
0
(inlet velocity)
Specify: P
1
(back pressure)
const u P
dx
dP
dx
du
u = + = +
2
2
1
0
1

Improved BC methodology: (Non-linear) Riemann Invariants


Rewrite Euler equations under assumption no shocks, :
Boundary Conditions: Far-Field
0
0
0
1
0
1 1
=
c
c
+
c
c
=
c
c
+
c
c
=
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
x
s
u
t
s
x
v
u
t
v
x
p
x
u
u
t
u
x
u
x
u
t

( ) 1 d p de ds T + =
s
const s
e
p
a
1 2
=
=
c
c
=

s
e p

=
0 = c c y
Ideal gas:
T c e
v
=
Supporting Equations:
RT p =
Entropy:
Eq
n
of state:
Speed of sound:
Thermo:
v
c c R
p
=
v
c c
p
=
( )
( )
ds
a
da d
ds
d
a
da
s a
1
1
1
2
1 2
ln 1 ln ln 2

=
+ =
+ + =


Already in
convective form
Put in
convective
form
ds
d
p
dp
+ =

( )
ds
a
da a
dp
1 1
2
2

=

(substitute in mass conservation)
Also,
(substitute in x-momentum eq
n
)
(Non-linear) Riemann Invariants:
Boundary Conditions: Far-Field
0
0 0
0 0
0 0 0
0 0 0
) 1 (
) 1 (
2
2
=
|
|
|
|
|
.
|

\
|
c
c
(
(
(
(
(

+
+
|
|
|
|
|
.
|

\
|
c
c

+
J
J
s
v
x
a u
a u
u
u
J
J
s
v
t
a
a


a u J
1
2

( )
0
1 1
2
0
1
2
1
2
2
=
c
c

c
c

+
c
c
+
c
c

=
c
c
+
c
c

+
c
c

x
s a
x
a
a
x
u
u
t
u
x
u
a
x
a
u
t
a


0
0
0
1
0
1 1
=
c
c
+
c
c
=
c
c
+
c
c
=
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
x
s
u
t
s
x
v
u
t
v
x
p
x
u
u
t
u
x
u
x
u
t

In matrix form:
A
B
A B =
( )
( )
0
1 1
2
1
2
2
=
c
c

|
|
.
|

\
|

c
c
+
|
|
.
|

\
|

c
c
x
s a
a u
x
a u a u
t
Now, ignore off-diagonal terms with assumption of no entropy gradients (esp. no shocks)
where
Riemann Invariants

specify v, s, J
+
at (1), J
-
at (2)
specify v, s, J
+
, J
-
at (1), nothing at (2)
(Non-linear) Riemann Invariants: v, s, J
+
, J
-
where , and
See:
Boundary Conditions: Far-Field
a u J
1
2

So at each boundary, need to specify from outside domain:


v, s advected at velocity u
J
+
advected at velocity u+a
J
-
advected at velocity u-a
u > a must specify v, s, J
+
, J
-

0 < u < a v, s, J
+

-a < u < 0 J
+

u < -a nothing
For example:
If flow is subsonic,
If flow is supersonic,

p
e
s
=

p
a =
2
u > 0
(1) (2)
For example:
Implementation: Dummy (Ghost) cell reflection (recommended):
Jameson Boundary Conditions: Far-Field
Apply to each cell, based on local u and a conditions (and use p/

rather than s)
Changing U for each iteration may change # BCs that need be applied
For top & bottom boundaries, rotate coordinate system
(1,j) (0,j)
Calculate fluxes for cell (1,j) as usual, like an interior point.
Calculate from v, s, J
+
, J
-
in right direction.
e.g. for subsonic inflow,
j
U
, 0
( ) ( ) ( ) ff j o ff j o ff j o
J J s s v v
+ +
= = =
, , ,
, , (coming in from far-field)
( ) ( ) j j o
J J
, 1 ,
= (coming out from inside)
(N,j) (N+1,j)
e.g. at other end of domain, for subsonic outflow,
( ) ( ) ( ) j N j N j N
J s v
, 1 , 1 , 1
, ,
+ + + +
set by at (N, j)
( ) ff j o
J J

=
,
(coming in from far-field)
+
J s v , ,
ff
ff
(Linearized) Riemann Invariants Theory
Rewrite Euler equations using primitive
variables under assumption :

Boundary Conditions: Far-Field (Linearized Approach)
| | 0 =
c
c
+
c
c
x
U
A
t
U
0 = c c y
|
|
|
|
|
.
|

\
|
=
p
v
u
U

using .
Linearize about fixed A matrix:
p p p v v v u u u
~
,
~
,
~
,
~
+ = + = + = + =
0
0
0
1
0
=
c
c
+
c
c
=
c
c
+
c
c
=
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
x
s
u
t
s
x
v
u
t
v
x
p
x
u
u
t
u
x
u
x
u
t


0
~ ~
0
~ ~
0
~
1
~ ~
0
~ ~ ~
=
c
c
+
c
c
=
c
c
+
c
c
=
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
x
s
u
t
s
x
v
u
t
v
x
p
x
u
u
t
u
x
u
x
u
t



0
~ ~ ~
=
c
c
+
c
c
+
c
c
x
u
p
x
p
u
t
p


Some work, using

~ ~
~
d
p
p d
s d =
0
~
~
~
~
0 0
0 0 0
1 0 0
0 0
~
~
~
~
=
|
|
|
|
|
.
|

\
|
c
c
(
(
(
(

+
|
|
|
|
|
.
|

\
|
c
c
p
v
u
x
u p
u
u
u
p
v
u
t

Therefore,
(matrix form)
Get characteristics of 1-D Euler flow from eigenvalues/vectors of
Boundary Conditions: Far-Field (Linearized)
( ) ( ) ( ) ( )
|
|
|
|
|
.
|

\
|

+
|
|
|
|
|
.
|

\
|
+
|
|
|
|
|
.
|

\
|
+
|
|
|
|
|
.
|

\
|
=
|
|
|
|
|
.
|

\
|
p
a
t x V
p
a
t x V t x V t x V
p
v
u


0
,
0
,
0
0
0
1
,
0
1
0
0
,
~
~
~
~
4 3 2 1
| |
(
(
(
(

=
u p
u
u
u
A
0 0
0 0 0
1 0 0
0 0

Set : ( ) ( ) ( ) 0
3
=
(

u
p
u u ( ) 0 det = I A
a u u = =
4 , 3 2 , 1
,
( ) ( ) | | 0
2
2 2
= a u u

p
a =
2
where
Eigenvalues:
Total solution:
Shear
wave
Entropy wave
(pure variation)
Isentropic pressure
waves (e.g. acoustic)
) ( a u + ) ( a u ) (u ) (u Convection speed:
|
|
|
|
|
.
|

\
|
(
(
(
(

=
|
|
|
|
|
.
|

\
|
p
v
u
p a
p a
a
V
V
V
V
~
~
~
~
2 1 0 2 1 0
2 1 0 2 1 0
1 0 0 1
0 1 0 0
2
4
3
2
1

And inverse transformation:


Apply to (0,j) as
Only outgoing p wave (V
4
), where from inverse transformation
At far-field, replace with far-field conditions , then
set V
i
= 0 for incoming waves, extrapolate V
i
for outgoing waves to compute .
Boundary Conditions: Far-Field (Linearized)
For example if flow is subsonic throughout,
first three waves travel to right (u, u, u+a)
fourth wave travels to left (u-a)
u > 0
(1) (2)
So at inlet (1) assume far-field disturbances are zero V
1
= V
2
= V
3
= 0
|
|
|
|
|
.
|

\
|

+
|
|
|
|
|
.
|

\
|
=
|
|
|
|
|
.
|

\
|
ff
ff
ff
ff
ff
ff
ff
j
p
a
V
p
v
u
p
v
u

0
4
) , 0 (
( ) ( )p p u a V
~
2 1
~
2 1
4
+ =
(1,j) (0,j)
ff
a p v u , , , ,
ff ff ff ff ff
a p v u , , , ,
p v u
~
,
~
,
~
,
~

Dummy-cell implementation:
ff
ff j
ff
ff j
p
p p
a
u u
V
2 2
, 1 , 1
4

+

= Calculate V
4
from perturbation at (1,j) as
(similar analysis at exit (2), where V
4
= 0, and get V
1
, V
2
, V
3
from (N,j) )
We saw
Finite-difference schemes typically require artificial viscosity smoothing
1. High wave # oscillations (order of grid spacing) solutions to FDE but not PDE
2. Arise also from non-linearities which can be unstable
Smoothing (Dissipation)
0 = +
x t
cu u ( ) 0
2
1 1
=
A
+
c
c

+ j j
j
u u
x
c
t
u
( )
j
j
u 1 =
Recall amplification factor process:
odd/even oscillation
In FD scheme, dissipation is inherent part, but dont want to rely on it because its uncontrollable.
Use:
xxxx xx x t
u x u x cu u
3
4 2
A A = + v v
2
nd
order
viscosity
4
th
order
viscosity
( )
( ) qt x i t
e e t x u

=
|
|
,
( )u q i u u u
u u u i u
t xxxx
xx x
| |
| |
= =
= =
,
, ,
4
2
( )
( )
( )
( ) ( ) ct x i t x x
e e t x u
c q
x x
x x ic q i
A + A
=
=
A + A =
A A = +
| | v | v
|
| v | v
| v | v | |
4 3
4
2
2
,
: Im
: Re
4 3
4
2
2
4 3
4
2
2
Substitute for:
( ) ( ) ( )
x
u u u u u
x
u u u
x
u u c
t
u
j j j j j j j j j j j
A
+ +

A
+
=
A

+
c
c
+ + + + 2 1 1 2 4 1 1 2 1 1
4 6 4 2
2
v v
Important notes:
v
2
, v
4
> 0 give stable solution
v
4
targets higher wave #
(decays quicker in x)
values of viscosity independent
of grid (all 1/Ax)
v
2
introduces O(Ax) error
v
4
introduces O(Ax
3
) error
Implementation like:
Use only at shocks / discontinuities Use over entire flow field
has solution
Apply dissipation term to RHS of finite volume equation:
Jameson Implementation of Smoothing
j i
j i
j i
D fluxes
t
U
A
,
,
,
= +
c
c

( ) ( ) { } ( ) ( ) { } U U U S U S D
t
A
t
A
t
A
t
A
j i
3 3
4 2 , q q q q q
o o o o v o o o o v
A A A A
+ + =
Where: S

, S
q
are switches (turn on/off near high gradients),
A, At are local cell area and time step,
typically v
2
~ 0.05, v
4
~ 0.01,
o

, o
q
are differencing operators, e.g.:
( ) ( )
( ) ( )
( ) ( ) ( ) ( )
( ) ( )
j i j i j i j i
j i j i j i
j i j i
j i j i
U U U U U
U U U U U
U U U
U U U
, 1 , , , 1
3
, 1 , , 1
2
, ,
, ,
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
3 3
2
+ +
+
+
+ +
+ =
+ = =
=
=

o
o o o
o
o
For cell-centered finite volume method, use as ( ) 0 flux modified
,
,
= +
c
c

t
U
A
j i
j i
i,j
a
b
d
c
E
N
W
S
( )
( ) ( )
j i j i j i j i
E
j i j i
E
E E E E E
U U U U
t
A
U U
t
A S
x F y E g e
, 1 , , 1 , 2 4 , , 1 2
3 3
flux mod . .
+ + +
+
|
.
|

\
|
A
+
|
|
.
|

\
|
A

A A =
v v

See 3
rd
-order differencing template extends two to the east
Evaluate S, A, At on face (need to average across neighboring cell)
Further implementation notes for specific faces:
Jameson Implementation of Smoothing
( ) 0 flux modified
,
,
= +
c
c

t
U
A
j i
j i
i,j
a
b
d
c
E
N
W
S
( )
( ) ( )
j i j i j i j i
W
j i j i
W
W W W W W
U U U U
t
A
U U
t
A S
x F y E g e
, 2 , 1 , , 1 4 , 1 , 2
3 3
flux mod . .
+
+
|
.
|

\
|
A
+
|
|
.
|

\
|
A

A A =
v v

W face: Use 3
rd
-order difference template extending two to the west

S face: Along solid wall, set smoothing flux = 0 (to ensure conservation)
N face: Will need 3
rd
-order differencing template two to north (OK) and one below (beyond wall!)
1. use dummy cell (i,0) (easy, since already recommended earlier)
2. use one-sided difference away from wall.
2
nd
order viscosity switch: want to turn on only near shocks / discontinuities
Jameson Implementation of Smoothing
Varies from 0 to 1.
Only apply if expect strong enough
shock / discontinuity to warrant.
Can also track s (entropy) instead.
1
,
) 3 ( ) 0 ( ) 4 (
) 2 (
2
1
) 0 ( ) 3 (
) 1 (
3
1
) 0 ( ) 2 (
) 0 (
4
1
) 0 ( ) 1 (
+
= A =
A =
A =
A =
k
j i
U R t U U
R t U U
R t U U
R t U U
Freeze D
i,j
smoothing during multi-stage Runge-Kutta time-stepping.
Just evaluate dissipation fluxes once, and use for all inner time stages:
j i j i j i
j i j i j i
p p p
p p p
S
, 1 , , 1
, 1 , , 1
2 max
2
+
+
+
+
=

1 , , 1 ,
1 , , 1 ,
2 max
2
+
+
+
+
=
j i j i j i
j i j i j i
p p p
p p p
S
q
(max throughout flow field)
j i
j i j i j i
p
p p p
S
,
, 1 , , 1
2
+
+
=

j i
j i j i j i
p
p p p
S
,
1 , , 1 ,
2
+
+
=
q
or,
Adjusts v
2
automatically, but also
a problem in low pressure areas.
( )
( )
( )
( )
1
,
) 0 ( ) 3 (
1
) 0 ( ) 4 (
) 0 ( ) 2 (
2
1
) 0 ( ) 3 (
) 0 ( ) 1 (
3
1
) 0 ( ) 2 (
) 0 ( ) 0 (
4
1
) 0 ( ) 1 (
+
= A =
A =
A =
A =

k
j i A
A
A
A
U D f luxes t U U
D f luxes t U U
D f luxes t U U
D f luxes t U U
j i
j i
j i
D fluxes
t
U
A
,
,
,
= +
c
c


Explicit scheme time steps need to be limited to prevent unstable solution.
Approach: Evaluate stability requirement (like CFL) at each cell (i,j) At
i,j
.
Global time stepping: (for time accurate solution throughout domain)
No time step anywhere can be larger than min local:
Local time stepping: (for more rapid iteration to steady-state solution)
Use 0.9 At
i,j
for each cell (i,j)
Stability (Temporal)
( )
j i
j i
global
t t
,
,
min 9 . 0 A = A
How to find max(At
i,j
) for the Jameson scheme (system of 2-D, non-linear equations)?
Still use Von Neumann (linearized) stability analysis (ignoring BCs)

1) Stability of 1-D system of equations:
| | 0 =
c
c
+
c
c
=
c
c
+
c
c
x
U
t
U
x
E
t
U
A
0
~
~
~
~
0 0
0 0 0
1 0 0
0 0
~
~
~
~
=
|
|
|
|
|
.
|

\
|
c
c
(
(
(
(

+
|
|
|
|
|
.
|

\
|
c
c
p
v
u
x
u
u
u
u
p
v
u
t


Hold A constant while U is advanced through one At.
Saw linearized Euler equations could be written as:
e.g. Euler:
2) Stability of 1-D system of equations (continued)
Stability (Temporal)
Apply for linearized Euler [A] matrix and Lax-Wendroff time stepping scheme:
Define amplification matrix, [G]:
| |
k k
U G U
| |
=
+1


=

=
= ~
|
|

|
|
| x i
t
e U t x U t x U ) , ( ) , ( Consider one wavenumber | :
Stability given by maximum eigenvalue of [G] < 1 (not just |G| < 1)
Depends on [A] matrix
and FD scheme!
| |( ) | |( )
k
j
k
j
k
j
k
j
k
j
k
j
k
j
U U U
x
t
U U
x
t
U U
1 1
2
2
1 1
1
2
2
1
2
1
+ +
+
+
|
.
|

\
|
A
A
+
|
.
|

\
|
A
A
= A A
( ) ( ) ( ) | |
2
2
2
cos 1 sin
A A
A A
b a I
x x i I G
x
t
x
t
+ + =
A A =
A
A
A
A
| |
x i
t
e e U
|

|
|

0 = +
x t
u c u (Like old wave equation , except c is [A])
Look at development of one wave number:
Solve for amplification matrix:
2) Stability of 1-D Euler equations using Lax-Wendroff scheme (continued)
Stability (Temporal)
Can show eigenvalues of G are (1+a+b
2
) where are eigenvalues of A: a u u = =
4 , 3 2 , 1
,
Requirement that magnitude of (eigenvalue of G) < 1 implies
( ) ( ) | | ( ) ( ) ( ) 1 sin cos 1 1
2
2
2
2
< A + A
A
A
A
A
x x
x
t
x
t
| |

For stability, it can be shown this reduces to

x
t
x
t A
< A <
A
A
1
Which for the worst case gives
a u
x
t
+
A
< A
( ) ( )V b a V b a
2 2
1 1 + + = + + A A
V V = A If V is an eigenvector of A, then
( )V b a GV
2
1 + + =
Like the CFL condition for 1-D wave equation.
Numerical speed (Ax / At) must still exceed
physical speed (|u|+a)!
3) Stability of 2-D Euler equations for multi-stage time step scheme (Jameson!)
Stability (Temporal)
Far too laborious to do entirely here. It involves:
0

=
c
c
+
c
c
+
c
c
=
c
c
+
c
c
+
c
c
q
F E
t
U
J
y
F
x
E
t
U
a) Transforming to (,q) domain
b) Linearize as 0 =
c
c
+
c
c
+
c
c
q
U U
t
U
B A
c) Discretize in (,q) (consistent with face fluxes), and apply 4-stage time-step scheme to
individual wave number U
|
to get amplification matrix G.
d) Interrogate eigenvalues of G (based on eigenvalues of A and B). For stability require
largest magnitude of eigenvalue to be < 1.
2 2 2 2 2 2
,
q q
y x y x a v u
J
K t
j i
+ + + + +
< A Yields formula like:
Where K has value:
MacCormack 1
3-stage R-K 2
4-stage R-K 2\2
For rectangular mesh, v=0 get:
2 2
,
1 y x a u
x K
t
j i
A A + +
A
< A
Cells that with higher AR or more skewness also reduce max. local At.
|
|
.
|

\
|
+
A
+
A
< A
a v
y
a u
x
K t
j i
, min
,
Sometimes approximated as:
-5 -4 -3 -2 -1 0 1 2 3 4 5
-3
-2
-1
0
1
2
3
4
5
Mesh WITH adding ghost points
-5 -4 -3 -2 -1 0 1 2 3 4 5
-3
-2
-1
0
1
2
3
4
5
Mesh WITHOUT adding ghost points
Grid:
Homework

You might also like