Some basic hydrodynamics The art of CFD Hydrodynamic challenges in stellar explosions Hydrodynamics of stellar explosions
General: Literature L.D.Landau & E.M.Lifshitz, Fluid Mechanics, Pergamon (1959) R.J.LeVeque, D.Mihalas, E.A.Dorfi & E.Müller, Computational Methods for Astrophysical Fluid Flow, Saas Fee Advanced Course 27, Springer (1998) E.Müller, Fundamentals of Gas Dynamical Simulations, in Galactic Dynamics and N Body Simulations, eds. G.Cantopoulos, N.K.Spyrou & L.Vlahos, LNP 433, p.313 364 (1994) C.B.Laney, Computational Gasdynamics, Cambridge Univ.Press (1998) E.F.Toro, Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction, Springer (1997) Specific topics: T.Plewa & E.Müller, The Consistent Multi Fluid Method, A&A 342, 179 (1999) T.Plewa & E.Müller, AMRA: An Adaptive Mesh Refinement Hydrodynamic Code, CPC 138, 101 (2001)
hydrodynamic equations are derivable from microscopic kinetic equations (Liouville, Boltzmann) under two assumptions (i) microscopic behaviour of single particles can be neglected (λ << L) Some basic hydrodynamics (ii) forces between particles saturate (short range forces!)
Some basic hydrodynamics E t
Some basic hydrodynamics hydrodynamic approximation holds --> set of conservation laws simplest case: single, ideal, non-magnetic fluid; no external forces mass: t v = 0 momentum: energy: v t v v pi = 0 E E p v = 0 t hyperbolic system of PDEs
hydrodynamic approximation holds --> general case: additional equations and/or additional source terms Some basic hydrodynamics describe effects due to viscosity, reactions, transport, radiation, magnetic fields, self-gravity, relativity, etc
Some basic hydrodynamics eg., viscous, self-gravitating flow mass: momentum: energy: Poisson eq.: v = 0 t v v v p I π t E E p v h π v t Φ = 4πG = Φ = v Φ
Astropysical applications: - viscosity & heat conduction often negligibly small (except in shock waves) --> inviscous Euler eqs. instead of viscous Navier-Stokes eqs. are solved Some basic hydrodynamics - numerical methods posses numerical viscosity (depending on grid resolution) --> strange situation: One tries to solve inviscous Euler eqs, but instead solves a viscous variant, different from NS eqs!!
hydrodynamic equations are incomplete (closure relation missing) --> equation of state required to close system p = p(,t), ɛ = ɛ(,t) Some basic hydrodynamics discontinuous solutions of Euler eqs. exist (weak solutions: shocks, contact discont.) --> conservation laws in integral form jump conditions (Rankine-Hugoniot)
Some basic hydrodynamics flows characterizable by dimensionless numbers Reynolds number: Re = ul/ν (ν: kinematic viscosity) measures relative strength of inertia & dissipation; often very large in astrophysics (>10 10 ) For all flows there exists a critical Reynolds number, above which the flow becomes turbulent! Prandtl number: Pr = ν κ (κ: conductivity) measures relative strength of dissipation & conduction
evolution equations: Set of 1 st order PDEs one way to solve equations: discretization in space & time, i.e. PDEs --> set of coupled algebraic eqs --> introduces unavoidable errors --> It is crucial to use methods, which minimize the errors! The art of CFD
The art of CFD numerical diffusion numerical dispersion
The art of CFD High Resolution Shock Capturing Schemes (HRSC) (most appropriate for supersonic flows) Methods for hyperbolic system of conservation laws Upwind methods (along characteristics) Enforcing conservation ensures correct dynamics of discontinuities High order spatial accuracy in smooth regions of the flow reduces to first order at discontinuities
hydrodynamic equations: The art of CFD - quasi-linear hyperbolic system of conservation laws U x, t t F U x, t x =0 - can be rewritten using the Jacobian of the flux vector F(U) 1 U t F U U x =0 - integration over finite (control) volume: x 1, x 2 t 1, t 2 x1 U x, t 2 dx= x1 U x, t 1 t1 x 2 x 2 t 2 F U x 1, t dt t1 t 2 F U x 2, t dt
Finite Volume Formulation Differential form assume smoothness of solution No viscous terms Euler equations allow discontinuous solutions integral form of equations Euler equations in Conservative form (from G.Bodo)
Multidimensional Strang Splitting Multidimensional integration is achieved by solving 1 D sub problem: Alternating directions gurantees O( t 3 ), e.g., in 2D: (from G.Bodo)
Handling discontinuities p1 p2 x Example of a problem with discontinous initial conditions (from G.Bodo)
numerical derived local The art of CFD U i n 1 = U i n t x F xi 1 2 F xi 1 2 fluxes are 1 from solution of Riemann problems ---> requires: complete spectral information!
Godunov Method Building 1 D block: In Hyperbolic systems information propagate along characteristics, at finite speed; we need a numerical flux function: U(x i+1/2,t) is the solution of the Riemann Problem: Ui 1 Ui Ui+ (from G.Bodo) xi 3/2 xi 1/2 Xi+1/2 1 Xi+3/2
Higher order extension Interpolation inside cells Use slope limiters to enforce monotonicity (avoid appearance of new maxima) Higher order interpolation PPM (Piecewise Parabolic Method) uses parabolic interpolation + monotonicity constraints + other controls of discontinuities (from G.Bodo)
The art of CFD diffusivity of various finite volume methods
The art of CFD simple test problem more difficult test problem
The art of CFD test problem which cannot be handled by linearized Riemann solver proposed by Roe
Choice of coordinate system when simulating multi-dimensional flow: - Lagrangian/comoving coordinates inappropriate shear flow and vortices --> grid tangling - Eulerian coordinates better choice if advection terms are discretized with 'minimal' numerical diffusion The art of CFD - SPH: free-lagrange method, but more diffusive
Methods widely used in astrophysics: - finite difference/volume schemes ~ 10 2 to 10 3 zones / dimension - smoothed particle hydrodynamics (SPH) ~ 10 4 to 10 7 particles The art of CFD
Computer - 3 10 10 10 ---> The art of CFD resources required: CPU time - 20 variables 1 3-10 8 zones (present record: 2048 3 ~ 8 10 9 ) 3-10 6 timesteps 2-10 3 Ops/zone/variable/timestep 10 10-10 18 operations / simulation
50 1 ---> 3D - ~ The art of CFD - present day computer Mflops (PC) [ ~ CRAY-1 in 1980! ] Tflop ( supercomputer, e.g. 512 PE IBM Power 4) 1 1D simulation: ~ minutes on PC simulation: ~ weeks on supercomputer output data: ~ Gbyte / model ---> data analysis Tbyte / simulation is non trivial!
Hydrodynamics of stellar explosions Numerical challenges (I): Extreme range of scales both in time & space has to be treated properly scale problem in TNSNe: 1 l burn ~ 10-3 cm l WD ~ 10 +8 cm τ burn ~ 10-11 s τ WD ~ 10 +0 s --> factor 10 11
Hydrodynamics of stellar explosions Numerical challenges (I): Extreme range of scales both in time & space has to be treated properly scale problem in CCSNe: 1 l NS ~ 10 +6 cm l star ~ 10 +13 cm τ NS ~ 10-3 s τ sh ~ 10 +4 s --> factor 10 7
Hydrodynamics of stellar explosions Numerical challenges (II): Proper treatment of hydrodynamic instabilities is important 1 Rayleigh Taylor instability causes mixing & clumping
Hydrodynamics of stellar explosions 2D Simulations FLASH Code Univ. Chicago Calder et al. 2002 Density ratio 2:1 Effective resolution 16384x4096 (from G.Bodo)
Hydrodynamics of stellar explosions Numerical challenges (II): Proper treatment of hydrodynamic instabilities is important 1 RTIs in CCSNe; Müller & Janka 1997 RTIs in TNSNe; Reinecke etal 2000
Numerical challenges (III): Nucleosynthesis - Common practice (in 1D) nowadays * online reaction networks (several 100 species) * reduced network for energy generation + 1 post processing (easy with Lagrangian codes) Hydrodynamics of stellar explosions - Multi-dimensional flows Lagrangian codes inappropriate --> Eulerian codes + marker particle method
Numerical challenges (III): Nucleosynthesis - Marker particle method A set of marker particles is distributed properly across regions expect to burn 1 and Hydrodynamics of stellar explosions advected with the flow and their T and ρ history is recorded for the post-processing
Hydrodynamics of stellar explosions Self-gravitating multi-dimensional multi-fluid flow v = 0 t 1 v t v v P Φ = 0 E t E P v v Φ = Q nuc X i X i v = X i, t i X i = 1
Hydrodynamics of stellar explosions Simulating multi-fluid flow - Non-linear discretization of advection terms --> i X i 1 - Consistent Multi-fluid Advection (Plewa & Müller '99) (a) renormalization of mass fraction fluxes (b) conservative species advection (c) contact steepening to reduce numerical diffusion
Hydrodynamics of stellar explosions.simulating CMAZ.multi-fluid flow (total flattening).. FMA (Fryxell, Müller & Arnett).Composition profiles.in the ejecta of a CMA.15 solar mass star (Plewa & Müller).at t =3s
Hydrodynamics of stellar explosions.simulating multi-fluid flow CMAZ CMA FMA.dependence of Ti44 production on grid resolution
Hydrodynamics of stellar explosions 1 Kifonidis 2000
Hydrodynamics of stellar explosions Ti44 1 Ni56 Kifonidis 2000
Additional numerical (& physical) challenges: - CCSNe parallelization of neutrino transport simulating magnetized cores (MHD, GRMHD) black hole formation & collapsars 1 - TNSNe Hydrodynamics of stellar explosions modelling flames & turbulent combustion (Niemeyer) simulating the pre-runaway stage (Podsiadlowski) spectral synthesis (Hauschildt, Mazzali)