340 likes | 527 Views
The physics of Flash and A few issues/tricks of the trade. Alan Calder. June 4, 2006. The FLASH Code. Shortly: Relativistic accretion onto NS. Flame-vortex interactions. Type Ia Supernova. Compressed turbulence. The FLASH code Parallel, adaptive-mesh simulation code
E N D
The physics of FlashandA few issues/tricks of the trade Alan Calder June 4, 2006
The FLASH Code Shortly: Relativistic accretion onto NS Flame-vortex interactions Type Ia Supernova Compressed turbulence The FLASH code Parallel, adaptive-mesh simulation code Designed for compressible reactive flows Ideal, Resistive, and Hall MHD (Cartesian coords) Has a modern CS-influenced architecture Can solve a broad range of (astro)physics problems Portable- runs on many massively-parallel systems Scales and performs well- Gordon Bell prize Is available on the web: http://flash.uchicago.edu Flash 3 now (pre-)alpha released! Gravitational collapse/Jeans instability Wave breaking on white dwarfs Intracluster interactions Laser-driven shock instabilities Nova outbursts on white dwarfs Rayleigh-Taylor instability Orzag/Tang MHD vortex Helium burning on neutron stars Cellular detonation Magnetic Rayleigh-Taylor Richtmyer-Meshkov instability
Hydrodynamics • PPM hydrodynamics based on the Prometheus code of Fryxell. • Directionally split, direct Eulerian implementation of Colella and Woodward (1984) that allows for non-ideal gasses (Colella and Glaz 1985). • 2nd-order Strang split in time. • Solves Euler equations for inviscid compressible hydrodynamics in 1, 2, and 3 dimensions and several geometries (Cartesian, 2-d cylindrical, 1-d spherical) • Other `flavors’ of PPM may be released.
Hydrodynamics • Contact steepener controlled by parameter use_steepening. • Modified states version for use in simulations of objects in hydrostatic equilibrium. Contribution to pressure in Riemann solver from gravity removed. Parameter ppm_modifiedstates. • Interpolation/monotonization procedure of PPM can introduce errors in abundances of species. There is an implementation of the consistent mass advection method of Plewa and Muller (1999). Parameter use_cma_flattening. • Odd/even instability can occur when shocks are aligned with the grid (Quirk 1997). Fix is to switch to HLLE solver in shocks. Parameter hybrid_riemann. Test problem odd_even.
Relativistic Hydrodynamics • Module based on the Pluto code of A. Mignone. • Extension to PPM. • 1-, 2-, and 3-d Cartesian, 2-d cylindrical, 1-d spherical geometries • Ideal gas EOS • Directionally split version of Mignone et al. 2005 implemented in Flash.
MHD • Based on a finite-volume cell-centered method proposed Powell et al. 1999. • Ideal, Resistive, Hall MHD in Cartesian coords. • Works with other modules: self-gravity, multi-species, burning, general EOS. • Verified against standard benchmarks: MHD shock tube, Brio-Wu problem, shock-cloud, Orszag-Tang problem. • Details of resistive MHD in Malyshkin, Linde et al. (2005) • Dongwook Lee coming to Flash soon!
Equations of state • “Helmholtz” EOS for degenerate plasma (stellar material) • P = Pion + Prad + Pele + Ppos + Pcoul • Pion = ideal g = 5/3 gas for ionized nuclei • Prad = blackbody = 1/3 aT4 • Pele and Ppos = non-interacting Fermions • Pcoul = correction for Coulomb interactions between ions and the surrounding e- gas • Fryxell et al. (2000), Timmes and Arnett (1999)
Source Terms • Nuclear reactions • 7 nuclide “a-chain” + Si burning network • 13 nuclide “a-chain” + heavy-ion network • 19 nuclide “a-chain” + heavy-ion + H burning network • Someday a general network? • Non-equilibrium Ionization • Stirring • Heating
Finite Volume Hydrodynamics Method (PPM) Divide the domain into zones that interact with fluxes
Riemann Problem: Shock Tube Initial conditions: a discontinuity in density and pressure
Riemann Problem: Shock Tube World diagram for Riemann problem
Riemann Problem: Shock Tube PPM has special algorithms for these features
Verification Test: Sod Shock Tube Demonstrates expected 1st order convergence of error
Verification Test: Isentropic Vortex Demonstrates expected 2nd order convergence of error
Sod Tube W/ AMR Demonstrates expected 1st order convergence of error, but…
New Validation Results: Vortex-dominated Flows • “Cylinder” of SF6 hit by Mach 1.2 shock LANL
Shocked Cylinder Experiment • Snapshots at 50, 190, 330, 470, 610, 750 ms
New Validation Results: Vortex-dominated Flows Visualization magic from ANL Futures Lab
l (grid points) Single-mode 3-d Rayleigh-Taylor Density (g/cc) 4 8 16 32 64 128 256 t = 3.1 sec
Boundary Condition • Construct divide_domain for a particular problem
Summary/Conclusions • Numerical diffusion is a resolution-dependent effect that can significantly alter results. • Care must be taken when adding physics to hydro (e.g. convex EOS) • AMR is tricky. • Need right balance between computational savings and accuracy of solution. • Refinement criteria are problem-dependent and can affect the results of simulations.
Bibliography T. F. M. Fryxell et al., ApJS, 131 273 (2000) Calder et al., in Proc. Supercomputing 2000, sc2000.org/proceedings Calder et al., ApJS, 143 201 (2002) Plewa and Muller, A&A, 142, 349 (1999) Mignone, Plewa, and Bodo, ApJS, 160 199 (2005) Powell et al. JCP, 154, 284 (1999) Timmes & Arnett ApJS, 125, 294 (1999) Malyshkin, Linde, & Kulsrud, Phys. Plasmas, 12 (10), 102902, 2005 astro-ph/0508094