You are on page 1of 25

CapSel Euler - 01

The Euler equations


keppens@rijnh.nl
conservation laws for 1D dynamics of compressible gas
_

t
+ ( v)
x
= 0
m
t
+ (mv + p)
x
= 0
e
t
+ (e v + p v)
x
= 0
vector of conserved quantities U =
_
_
_
_
_
_
_
_

m
e
_
_
_
_
_
_
_
_
total energy density related to pressure by
e =
v
2
2
. .
kinetic
+
p
1
. .
thermal energy
ratio of specic heats
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 02
internal energy considerations
specic ( per unit mass) internal energy e
s
i
e
s
i
= p/( 1)
for ideal gas: temperature dened as p = RT with gas constant R
e
s
i
(T) =
RT
1
=
(c
p
c
v
)T
c
p
c
v
1
= c
v
T
c
v
specic heat at constant volume
generally =
+2

, where is the total number of degrees of freedom over


which internal energy can be distributed
for molecules: translational, rotational, vibrational
monoatomic gas: only 3 translational DOF = 5/3
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 03
deduce equation for entropy s = p

s
t
+ v
s
x
= 0
since v(x, t): Not in conservation form!
like advection equation
constant along characteristics
dx
dt
= v: Riemann Invariant
equivalent to the characteristic equation
along
dx
dt
= v, nd
dp c
2
s
d = 0
with dp = p
t
dt + p
x
dx and c
2
s
= p/
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 04
write system as U
t
+ (F(U))
x
= 0 with ux vector
F =
_
_
_
_
_
_
_
_
_
_
m
m
2

3
2
+ ( 1)e
em


1
2
m
3

2
_
_
_
_
_
_
_
_
_
_
Flux Jacobian becomes
F
U
=
_
_
_
_
_
_
_
_
_
_
0 1 0
m
2

2
3
2
m

(3 ) 1

em

2
+ ( 1)
m
3

3
e

+ (1 )
3
2
m
2

2
m

_
_
_
_
_
_
_
_
_
_
3 eigenvalues/eigenvectors
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 05
eigenvalue
1
=
m

= v c
s
eigenvector r
1
=
_
_
_
_
_
_
_
_
_
1
v c
s
v
2
2
vc
s
+
c
2
s
1
_
_
_
_
_
_
_
_
_
eigenvalue
2
=
m

= v
eigenvector r
2
=
_
_
_
_
_
_
_
_
_
1
v
v
2
2
_
_
_
_
_
_
_
_
_
eigenvalue
3
=
m

= v + c
s
eigenvector r
3
=
_
_
_
_
_
_
_
_
_
1
v + c
s
v
2
2
+ vc
s
+
c
2
s
1
_
_
_
_
_
_
_
_
_
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 06
Rankine-Hugoniot relations for Euler system
F(U
l
) F(U
r
) = s (U
l
U
r
)

_
m
l
m
r
= s(
l

r
)
_
_
m
2
l

2
l
3
2
+ ( 1)e
l
_
_

_
_
m
2
r

2
r
3
2
+ ( 1)e
r
_
_
= s(m
l
m
r
)
_
_
e
l
m
l

l

1
2
m
3
l

2
l
_
_

_
_
e
r
m
r

r

1
2
m
3
r

2
r
_
_
= s(e
l
e
r
)
for given right state: 3 equations for 4 unknowns s, U
l
verify that Contact Discontinuity obeys RH
s = v, v
l
= v
r
= v, p
l
= p
r
= p while
l
=
r
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 07
general solution to Riemann Problem:
given two states U
l
and U
r
nd intermediate state U
mr
connected to U
r
by a 3-wave
which is such that its velocity and pressure
U
mr
=
_
_
_
_
_
_
_
_

mr
m
mr
e
mr
_
_
_
_
_
_
_
_
. .
conservative

_
_
_
_
_
_
_
_

mr
v

_
_
_
_
_
_
_
_
. .
primitive
match the velocity and pressure of intermediate state
U
ml
=
_
_
_
_
_
_
_
_

ml
v

_
_
_
_
_
_
_
_
connected to U
l
by a 1-wave
the states U
ml
and U
mr
can be connected by a 2-shock (contact
discontinuity)
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 08
note: counts ok:
6 equations for 6 unknowns (s
1
,
ml
, v

, p

) and (s
3
,
mr
, v

, p

)
r
l U
U
x
1-rarefaction
CD
3-shock
2-shock
t
mr
U
ml
U
again only entropy-satisfying shocks allowed
ingredients to solve RP: L R
1
or S
1
M
l
CD M
r
R
3
or S
3
R
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 09
Euler system in terms of primitive variables
_
_
_
_
_
_
_
_

v
p
_
_
_
_
_
_
_
_
t
+
_
_
_
_
_
_
_
_
_
v 0
0 v
1

0 p v
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_
_

v
p
_
_
_
_
_
_
_
_
x
= 0
possible to deduce
v
t
+ (v c) v
x

p
(p
t
+ (v c)p
x
) = 0
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 10a
since
2c
1
=
2
1

and under constant s = p

can be rewritten to
_
_
_
_
v
2c
1
_
_
_
_
t
+ (v c)
_
_
_
_
v
2c
1
_
_
_
_
x
= 0
found 3 Riemann Invariants
along characteristics
dx
dt
= v c, constant RI
1
= v
2c
1
along characteristics
dx
dt
= v, constant RI
2
= s
along characteristics
dx
dt
= v + c, constant RI
3
= v +
2c
1
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 10b
can be written as characteristic equations
dp c dv = 0 along
dx
dt
= v c
dp c
2
d = 0 along
dx
dt
= v
dp + c dv = 0 along
dx
dt
= v + c
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 11
back to Rankine-Hugoniot relations for Euler system
F(U
l
) F(U
r
) = s (U
l
U
r
)
consider again stationary shock s = 0 m
l
= m
r
two remaining equations result in
v
2
l
2
+
c
2
l
1
=
v
2
r
2
+
c
2
r
1
=
+ 1
2( 1)
c
2

last equality for sonic point where v

= c

again leads to c
2

= v
l
v
r
Prandtl Meyer relation
stationary shock separates super- from subsonic state (w.r.t. c

)!
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 12
further analysis of stationary shock introduces M
l
=
v
l
c
l
v
l
v
r
=
( + 1)M
2
l
( 1)M
2
l
+ 2
and since m
l
= m
r
we get for the density ratio

r
=
( 1)M
2
l
+ 2
( + 1)M
2
l
pressure ratio can be shown to obey
p
l
p
r
=
+ 1
1 + 2M
2
l
for stationary shock: all jumps depend on and M
l
only
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 13
moving shock: Galilean transformation
leaves all thermodynamic quantities unchanged
change to parameters =
+1
1
and P =
p
l
p
r
stationary shock obeys
v
l
v
r
=
+ P
P + 1
=

r

l
three parameters for a moving shock: , P, shock speed s give
v
l
s
v
r
s
=
+ P
P + 1
=

r

l
while also
(s v
l
)
2
= c
2
l
_

_
1 +
+ 1
2
_
_
_
_
p
r
p
l
1
_
_
_
_
_

_
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 14
Numerical tests
Perform series of Riemann Problem calculations for 1D Euler
always use 2nd order accurate, conservative, TVDLF discretization
TVDLF is Total Variation Diminishing Lax-Friedrichs scheme
monotonicity preserving, but diffusive especially at CD
200 grid points on [0, 1], = 1.4
BCs: x = 0
Start with classical Sod problem
U
l
= (
l
, v
l
, p
l
) = (1, 0, 1) and U
r
= (0.125, 0, 0.1)
shock tube problem: diaphragm separates 2 gases at rest
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 15
Sod problem at t = 0.15
note R
1
where Riemann Invariants s and RI
3
are constant
CD spread over many cells
CapSel Euler - 16
test case from Lax: initial rightwardly moving left state, till t = 0.15
U
l
= (
l
, v
l
, p
l
) = (0.445, 0.698, 3.528) and U
r
= (0.5, 0, 0.571)
CapSel Euler - 17
Sod and Lax test case: remain subsonic M = v/c
s
< 1
Arora & Roe Mach 3 test case considers
U
l
= (
l
, v
l
, p
l
) = (3.857, 0.92, 10.333) and U
r
= (1, 3.55, 1)
solution at t = 0.09
CapSel Euler - 18
supersonic shock tube problem at time t = 0.1562
U
l
= (
l
, v
l
, p
l
) = (8, 0, 8) and U
r
= (0.2, 0, 0.2)
better behaviour at contact than in Mach 3 case
CapSel Euler - 19
case of a slowly moving very weak shock, show t = 0.175
U
l
= (
l
, v
l
, p
l
) = (1, 1, 1) and U
r
= (0.9275, 1.0781, 0.9)
leftward rarefaction and rightward shock: (too) many cells in shock!
CapSel Euler - 20
stationary contact discontinuity
U
l
= (
l
, v
l
, p
l
) = (1, 0, 0.5) and U
r
= (0.6, 0, 0.5)
t = 0 and t = 0.1 and t = 1 solution
diffusion obvious: increasingly (too) many cells in CD!
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 21
recognizing a rarefaction wave
800 cells from [0, 800] with = 5/3
U
l
= (
l
, v
l
, p
l
) = (1, 3, 10) and U
r
= (0.87469, 2.46537, 8)
t = 0 and t = 40 and t = 80 solution, plot v
two states with same entropy: rarefaction emerges
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 22
Linear sound waves: time dependent driver v = Asin (2t/P) at x = 0
density (t = 0) = 1, v(t = 0) = 0, p(t = 0) = 0.6 with = 5/3
A = 0.02 with P = 1 generates sound waves (amplitude 0.01)
compare TVDLF for 100 versus 400 cells at t = 4
to follow linear dynamics: need high resolution to battle diffusion!
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 23
sound wave steepening and shock formation: take amplitude A = 0.2
nonlinear shock formation well captured
Caution to use these methods for pure linear wave processes
high resolution prerequisite
seperate true physical diffusion from numerical effects
note that 10 % variations already imply nonlinear effects!
-Instituut voor Plasmafysica Rijnhuizen
CapSel Euler - 24
References
R.J. LeVeque, Numerical Methods for Conservation Laws, 1990, Birkh auser
Verlag, Berlin
R.J. Leveque et al., Computational Methods for Astrophysical Fluid Flow,
Saas-Fee Advanced Course 27, 1998, Springer-Verlag, Berlin
P. Wesseling, Principles of Computational Fluid Dynamics, 2001, Spinger-
Verlag, Berlin (Chapter 10)
S.A.E.G. Falle, Astrophysical Journal 557, 2002, L123-L126
-Instituut voor Plasmafysica Rijnhuizen

You might also like