CapSel Euler - 01 The Euler equations keppens@rijnh.nl conservation laws for 1D dynamics of compressible gas ρ t + (ρ v) x = 0 m t + (m v + 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 = ρv2 p + } 2{{} γ 1 }{{} kinetic thermal energy ratio of specific heats γ
CapSel Euler - 02 internal energy considerations specific ( per unit mass) internal energy e s i ρe s i = p/(γ 1) for ideal gas: temperature defined as p = RρT with gas constant R e s i(t ) = RT γ 1 = (c p c v )T cp cv 1 = c v T c v specific 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
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 = v: Riemann Invariant dt equivalent to the characteristic equation along dx dt = v, find dp c 2 s dρ = 0 with dp = p t dt + p x dx and c 2 s = γp/ρ
CapSel Euler - 04 write system as U t + (F (U)) x = 0 with flux vector F = Flux Jacobian becomes F U = m 2 ρ 3 γ m 2 + (γ 1)e ρ γ γ 1 2 em m 3 ρ 2 0 1 0 (3 γ) γ 1 m 2 γ 3 ρ 2 2 γ em ρ 2 + (γ 1) m3 ρ 3 3 eigenvalues/eigenvectors m ρ eγ ρ + (1 γ)3 2 m 2 ρ 2 mγ ρ
CapSel Euler - 05 eigenvalue λ 1 = m ρ γp ρ eigenvector r 1 = eigenvalue λ 2 = m ρ = v eigenvector r 2 = eigenvalue λ 3 = m ρ + γp ρ eigenvector r 3 = = v c s 1 v c s v 2 2 vc s + c2 s γ 1 1 v v 2 2 = v + c s 1 v + c s v 2 2 + vc s + c2 s γ 1
CapSel Euler - 06 Rankine-Hugoniot relations for Euler system F (U l ) F (U r ) = s (U l U r ) m2 l ρ 2 l 3 γ 2 + (γ 1)e l e lm l ρ l m2 r ρ 2 r γ γ 1 m 3 l 2 ρ 2 l m l m r = s(ρ l ρ r ) 2 + (γ 1)e r = s(ml m r ) 3 γ e r m r ρ r γ γ 1 2 m 3 r ρ 2 r = s(el 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
CapSel Euler - 07 general solution to Riemann Problem: given two states U l and U r find 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 p }{{} primitive match the velocity and pressure of intermediate state connected to U l by a 1-wave U ml = the states U ml and U mr can be connected by a 2-shock (contact discontinuity) ρ ml v p
CapSel Euler - 08 note: counts ok: 6 equations for 6 unknowns (s 1, ρ ml, v, p ) and (s 3, ρ mr, v, p ) 1-rarefaction t CD 2-shock 3-shock U ml U mr U l U r 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 x
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 ± 1 γpρ (p t + (v ± c)p x ) = 0
CapSel Euler - 10a since 2c γ 1 = 2 γp γ 1 ρ can be rewritten to v ± 2c and under constant s = pρ γ γ 1 found 3 Riemann Invariants t + (v ± c) v ± 2c γ 1 x = 0 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
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
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 + c2 l γ 1 = v2 r 2 + c2 r γ 1 = γ + 1 2(γ 1) c2 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 )!
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 ρ l ρ r = (γ 1)M 2 l + 2 (γ + 1)M 2 l pressure ratio can be shown to obey p l p r = γ + 1 1 γ + 2γM 2 l for stationary shock: all jumps depend on γ and M l only
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 = α + P v r αp + 1 = ρ r ρ l three parameters for a moving shock: α, P, shock speed s give while also v l s v r s = α + P αp + 1 = ρ r ρ l (s v l ) 2 = c 2 l 1 + γ + 1 2γ p r p l 1
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
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!
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
CapSel Euler - 22 Linear sound waves: time dependent driver v = A sin (2πt/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!
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!
CapSel Euler - 24 References R.J. LeVeque, Numerical Methods for Conservation Laws, 1990, Birkhäuser 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