Isentropic “shock waves” in numerical simulations of astrophysical problems S.G.Moiseenko(1), G.S.Bisnovatyi-Kogan(1,2) (1)IKI RAS, Moscow, Russia (2) MEPHI, Moscow, Russia
Euler equations Mass conservation Momentum conservation Energy conservation Usually set of hyperbolic partial differential equations Divergent form of equations et is the total specific energy (internal energy + kinetic energy + potential energy)
Typical numerical method can be written in the form: , for x >0, , for x <0.
When the gas flow is strongly supersonic and cold: Einternal << Ekinetic To calculate pressure P or temperature T we need to subtract two big numbers. This is a source of numerical errors. Big numerical errors, or even negative pressure or temperature can be easily obtained. 𝜌 𝑒 𝑘+1 𝑡,𝑖 − 𝜌 𝑒 𝑘 𝑡,𝑖
To avoid this difficulty instead of the energy conservation equation the conservation entropy equation is used. 𝜕𝜀 𝜕𝑡 + 𝑣∙𝛻 𝜀+ 𝑃 𝜌 𝛻∙𝑣=0 𝜕𝑠 𝜕𝑡 + 𝑣∙𝛻 𝑠=0 We tried to estimate possible consequences of such step quantitatively. G.S.Bisnovatyi-Kogan. SM Astrophysics, 2016, 59, 1-10 When there are no shocks in the flow it is correct substitution. Isentropic set of hydro equations is also hyperbolic in time. Isentropic strong discontinuities =‘isentropic shock waves’ exists.
Shock wave Rankine-Hugoniot conditions: 𝜌 1 𝑣 1 = 𝜌 2 𝑣 2 , 𝑃=𝐾(𝑆) 𝜌 𝛾 𝜌 1 𝑣 1 = 𝜌 2 𝑣 2 , 𝑃=𝐾(𝑆) 𝜌 𝛾 Equation of state 𝑃 1 + 𝜌 1 𝑣 1 2 = 𝑃 2 + 𝜌 2 𝑣 2 2 , e= 1 𝛾−1 𝑃 𝜌 = 𝐾(𝑆) 𝛾−1 𝜌 𝛾−1 Internal energy 𝑒 1 + 𝑃 1 𝜌 1 + 𝑣 1 2 2 = 𝑒 2 + 𝑃 2 𝜌 2 + 𝑣 2 2 2
Hugoniot adiabat: 𝑃 2 𝑃 1 = (𝛾+1) 𝜌 2 −(𝛾−1) 𝜌 1 (𝛾+1) 𝜌 1 −(𝛾−1) 𝜌 2 Index ‘1’ – before the shock, ‘2’ – after the shock Relations between parameters before and after the shock: 𝑣 1 − 𝑣 2 = 2 ( 𝑃 2 − 𝑃 1 ) 𝜌 (𝛾−1) 𝑃 1 +(𝛾+1) 𝑃 2 1/2 𝑀 1 = 𝑣 1 𝑐 1 - Mach number before the shock. 𝜌 2 𝜌 1 = 𝑣 1 𝑣 2 = (𝛾+1) 𝑀 1 2 (𝛾−1) 𝑀 1 2 +2 𝑃 2 𝑃 1 = 2𝛾 𝛾−1 𝑀 1 2 − 𝛾−1 𝛾+1 𝑇 2 𝑇 1 =1+ 2(𝛾−1) (𝛾+1 ) 2 𝑀 1 2 ( 𝑀 1 2 −1)(1+𝛾 𝑀 1 2 ), 𝑀 2 2 = 2+(𝛾−1) 𝑀 1 2 2𝛾 𝑀 1 2 −(𝛾−1)
For isentropic case: 𝑒 1 + 𝑃 1 𝜌 1 + 𝑣 1 2 2 = 𝑒 2 + 𝑃 2 𝜌 2 + 𝑣 2 2 2 𝑃 1 𝜌 1 𝛾 = 𝑃 2 𝜌 2 𝛾 . Instead we use Instead of Hugoniot relations we get relations for ‘isentropic shock’: here 𝑥= 𝜌 2 𝜌 1 𝑀 1 2 = 𝑥 𝛾 −1 𝛾 𝑥 𝑥−1 𝑃 2 𝑃 1 = 𝑥 𝛾 ; 𝑇 2 𝑇 1 = 𝑥 𝛾−1 ; 𝑣 2 𝑣 1 = 1 𝑥 ; 𝑐 2 𝑐 1 = 𝑥 𝛾−1 2 𝑀 2 2 = 𝑣 2 2 𝜌 2 𝛾 𝑃 2 = 𝑣 1 2 𝛾 𝑥 2 𝑥 𝜌 1 𝑃 1 𝑃 1 𝑃 2 = 𝑣 1 2 𝛾𝑥 𝜌 1 𝑃 1 1 𝑥 𝛾 = 𝑀 1 2 𝑥 𝛾+1
Plots for 𝑥= 𝜌 2 𝜌 1 𝑀 1 , 𝑃 2 𝑃 1 𝑀 1 , 𝑇 2 𝑇 1 𝑀 1 , 𝑣 2 𝑣 1 𝑀 1 𝛾=5/3 For Hugoniot adiabat and for ‘isentropic shock’ Solid line – real shock Dashed line- “isentropic” shock
x is implicit function of M1 Full energy before the ‘isentropic shock’ 𝜀 1 = 𝐸 1 + 𝑃 1 𝜌 1 + 𝑣 1 2 2 = 𝛾 𝛾−1 𝑃 1 𝜌 1 + 𝑣 1 2 = 𝑐 1 𝛾−1 + 𝑣 1 2 2 = 𝑐 1 2 𝑀 1 2 2 + 1 𝛾−1 Full energy 𝑎𝑓𝑡𝑒𝑟 the ‘isentropic shock’ 𝜀 2 = 𝐸 2 + 𝑃 2 𝜌 2 + 𝑣 2 2 2 = 𝑐 2 2 𝑀 2 2 2 + 1 𝛾−1 Relative violation of full energy on ‘isentropic shock’ 𝜀 2 − 𝜀 1 𝜀 1 = 1 𝛾−1 𝑥 𝛾−1 −1 + 𝑀 1 2 2 1 𝑥 2 −1 1 𝛾−1 + 𝑀 1 2 x is implicit function of M1
For M1=2, error in energy is more then 20% !
What to do? D. Ryu, J.P. Ostriker, H.Kang, R. Cen, ApJ, 414, 1, 1993 Calculate energy and entropy equations simultaneously. In nonshocked regions use entropy equations in shocked regions – energy equation. Some criteria were suggested. G.L.Bryan, M.L. Norman, J.M. Stone, R.Cen, J.P.Ostriker Comput. Phys. Commun., 89, 149, 1995 ‘Dual energy formalism’ suggested. Calculations using internal energy were done in addition to the total energy equations. When the flow was essentially supersonic the pressure and temperature were calculated from the equation for the internal energy were done. In opposite case total energy equation was used.. V.Spergel, MNRAS, 401, 791, 2010 To estimate the shock wave amplitude. When Shock Mach number is ∼ 1.1 or less entropy balance equation was used. Comparison of kinetic and internal energy of every cell. For gravitational flows – comparison of the force by gas pressure and gravitational acceleration. When internal energy is much smaller then gravitational one - entropy equation scan be used.
Conclusions Always try to conserve energy. Use entropy conservation equation very carefully.