applications of advanced numerical simulations and analysis in theoretical astrophysics

Post on 02-Dec-2014

357 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

This is a talk I gave at to the "Computational Research in Boston and Beyond" (http://math.mit.edu/crib/) group in October 2013 at MIT.

TRANSCRIPT

Applications of Advanced Numerical Simulations and Analysis in Theoretical Astrophysics

John ZuHoneNASA/Goddard Space Flight CenterNASA Postdoctoral ProgramDOE CSGF Alumnus

Outline

• Numerical simulations in astrophysics

• yt: a framework for analysis of astrophysical* data

• An application: cold fronts in galaxy clusters

Numerical Simulations in Astrophysics

Astrophysical Modeling

• Astrophysical modeling basically boils down to three things (at the risk of oversimplification):

• Fluids: hydrodynamics, equations of state, material properties, etc.

• Fields: gravity, electromagnetism, dark energy, etc.

• Particles: collisionless plasmas, dark matter, cosmic rays, stars(!), etc.

• In reality, the distinctions between these things are fluid (no pun intended), but in practice they are amenable to very different simulation techniques and approximations

• The most versatile codes combine the simulation of many effects in a single framework

Varieties of Simulations

• Stellar explosions

• Galaxy cluster mergers

• Cosmological structure formation

• Accretion disks

• Star/planet formation

• Black hole feedback

• ...

Physics of Simulations

• Hydrodynamics/Magnetohydrodynamics: conservation equations for the fluid density, temperature, pressure, and magnetic field

• Equations of State: ideal gases, degenerate matter, radiation pressure

• Source terms: nuclear burning, heating, radiative cooling

• Diffusive processes: viscosity, thermal conductivity, resistivity

• N-body: stars, collisionless plasmas, dark matter particles

• Gravity

Astrophysical Simulation Codes

FLASH Enzo Gadget

Athena Arepo(Davis et al 2010)

(Di Matteo et al 2005)(Jordan et al 2008) (Skillman et al 2013)

(Springel 2010)

Challenges for Astrophysical Simulation Codes

• Coupling of diverse physical processes

• Coupling between particle and grid-based fields

• Particle-mesh method (Hockney & Eastwood 1988)

• Mapping particle quantities to mesh (e.g., mass) and mesh quantities to particles (e.g., forces)

• Particularly important for cosmological simulations since the dominant mass component is collisionless dark matter

• Coupling between conservation equations and source terms

• Conservation equations: Mass, momentum, energy, etc.

• Source terms: Heating, cooling, stirring, etc.

• Rely heavily on operator splitting

• Often places severe constraints on the timestep

Particle-mesh/hydrodynamics simulation of merging galaxy clusters (ZuHone 2011)

Gas Dark Matter

Challenges for Astrophysical Simulation Codes

• Handling large dynamic ranges

• Need to resolve small scales within large domains

• Shocks, contact discontinuities, regions of high density, turbulent cascades...

• Adaptive/Static Mesh Refinement (AMR/SMR) allows us to do this without incurring a severe computational cost and exorbitant memory footprint Enzo Cosmological Simulation with AMR

Challenges for Astrophysical Simulation Codes

• What does a method do well and where does it break down?

• Grid-based hydrodynamics codes:

• What they do well:

• Resolve shocks and contact discontinuities

• Resolve fluid instabilities and turbulence, mixing of gases at the cell level

• Well-defined discretizations of conservation equations, including complex derivative terms

• What they struggle with:

• Coupling with Lagrangian representations of the fluid (passive tracer particles) is often inconsistent ()

• High memory footprint even with adaptive meshes

• Not strictly Galilean invariant x → x− vt

Challenges for Astrophysical Simulation Codes

• What does a method do well and where does it break down?

• Particle-based hydrodynamics codes:

• What they do well:

• Capable of following “Lagrangian” mass elements of the fluid, allowing one to determine the evolution of a particular mass of gas over time

• Typically have light memory footprints

• Galilean invariant

• What they struggle with:

• Require artificial viscosity to resolve shocks, which often has to be finely tuned

• Resolving fluid instabilities and turbulent cascades

• Difficulty implementing particular equations and constraints, e.g. ∇ ·B = 0

Agertz et al 2007, “Fundamental Differences Between SPH and Grid Methods”, Monthly Notices of the Royal Astronomical

Society

grid-based codes

particle-based codes

Moving On to Analysis...

• There are many simulation codes, but there’s only one sky.

• The codes have different data structures, methods, assumptions, IO formats, units, variable names...

• For some analysis toolkits, access is given to the data structures of the output files, but after that you’re on your own.

• But we want answers to physical, not computational questions.

• A computational question: “What is the sum of the variable “density” times the cell volume within these cells on these grids on this level of refinement?”

• A physical question: “What is the total mass within a sphere of radius 300 kpc centered at (0,0,0)?”

yt: A Framework for the Analysis of Astrophysical Data

Thinking Different

• Much of programming for analysis tasks in astrophysics is still procedural--object-oriented programming hasn’t caught on very fast (e.g., widespread use of Fortran, C, and IDL).

• Widespread adoption of Python is changing that.

• A vast scientific software landscape has emerged in Python in recent years: NumPy, SciPy, AstroPy, IPython, etc.

• yt is an important addition to this landscape for simulation data. s

The Philosophy of yt

• Address physical, not computational questions.

• Heavily reliant on objects:

• “Data container” objects

• “Field” objects

• “Quantity” objects

Data Container Objects

Orthogonal Rays Non-orthogonal Rays

Slices Oblique Slices Projections

Spheres Rectangular Prisms Disks/Cylinders Boolean Regions Ellipsoids

1D

2D

3D

Field Objects: Democratizing Fields

• Traditionally, the “fields” of a simulation have been the variables stored on disk.

• In my experience, procedural coding led to piecemeal routines that gather the field data from files and perform specific tasks (e.g., one script to compute entropy within a spherical volume, another script to sum up the kinetic energy over the entire domain, etc.)

• yt expands the concept of a “field” by including “derived” fields within this definition

• Fields include grid and particle-based, scalar and vector, and even “helper” fields

Quantity Objects

• Quantities are reductions of data within data containers

• Sums, weighted averages, center of mass, bulk velocity, etc.

• Derived quantities can be created just like derived fields

Demonstration Interlude using the IPython Notebook

Other Analysis

• Streamlines

• Particle Trajectories

• Time Series Analysis

• Light Cones

• Object Finding (halos, clumps)

• Isosurfaces

• Loading Arbitrary Data

• Synthetic observations

The yt Community

The Website: http://yt-project.org

The yt Community

Twitter: @yt_astro

Google+: yt Project

Outside Astrophysics

Earthquake Simulations Nuclear Reactorshttp://yt-project.org

An Application: Cold Fronts in Galaxy Clusters

Galaxy Clusters

• Fascinating objects!• Galaxies: star formation,

supernovae, active galactic nuclei

• Intracluster medium: diffuse (n ~ 10–4-10-1 cm-3), hot (T ~ 107-108

K), magnetized (B ~ 0.1-10 μG), plasma emits X-rays

• Dark matter: collisionless particles that interact only by gravity comprise vast majority of the mass in clusters

Observations of Cold Fronts

X-Ray Surface Brightness Temperature

Dupke + 2007

Chandra

Ghizzardi+ 2013

Abell 496

Observations of Cold Fronts

X-Ray Surface Brightness Temperature

Ghizzardi+ 2013

LX ∝ neniΛ(T, Z)

Observations of Cold Fronts

• Nearly all of the fronts are smooth and sharp, but in the simple fluid picture this shouldn’t be the case:

• The fronts should be susceptible to the effects of fluid instabilities (e.g. Kelvin-Helmholtz, Rayleigh-Taylor)

• Thermal conduction, if present, should smooth out the temperature gradient

• This implies that cold fronts potentially serve as a powerful probe of the microphysical properties of the cluster plasma

Why Are the Fronts Smooth and Sharp?

The Effect of Magnetic Fields

• In the cluster plasma, the electrons and ions are essentially forced to travel only along field lines

• Even slowly moving gas can reorient magnetic fields and produce tangential “draping layers”

• These layers can suppress instabilities and diffusion across the front surfaces Dursi and Pfrommer 2007

The Effect of Magnetic Fields

Temperature Magnetic Field

The Effect of Magnetic Fields

No Fields With Fields

The Effect of Viscosity

Inviscid Viscous

Simulated Observations

• In the simulation, we have God-like qualities: we can just grab the density, temperature, etc. anywhere we want

• In the real thing it’s not so... we’re limited by:

• Projection effects

• Background

• Modeling limitations

• A more direct comparison to the real data is facilitated by constructing mock observations

Simulated Observations

• Basic procedure:

1. For each cell, compute an energy spectrum based on the density, temperature, and material properties of the gas in the cell

2. Use the spectrum as a CDF from which to draw random photon samples

3. Choose a line of sight, and project photon positions onto the plane. Apply cosmological and Doppler shifting to the photon energies. Apply absorption due to neutral hydrogen in our galaxy.

4. Convolve the resulting photon distribution with instrument responses.

Viscosity

Inviscid Anisotropic Viscosity

Isotropic Viscosity

Conduction

Summary

• Numerical astrophysics is a wide-open field driven by state-of-the art simulation codes and techniques empowered by high-performance computing platforms

• New analysis tools such as yt are making analyzing large and/or complicated simulations easier and with greater capabilities than ever before

• A key aspect of the way forward involves the comparison of mock observations generated from simulated data to observations of real astrophysical objects

top related