module on computational astrophysics jim stone department of astrophysical sciences 125 peyton hall...

31
Module on Computational Astrophysics Jim Stone Department of Astrophysical Sciences 125 Peyton Hall : ph. 258-3815: [email protected] www.astro.princeton.edu/~jstone 1: Introduction to astrophysics, mathematics, and 2: Optimization, parallelization, modern methods 3: Particle-mesh methods 4: Particle-based hydro methods, future directions

Post on 21-Dec-2015

221 views

Category:

Documents


1 download

TRANSCRIPT

Module on Computational Astrophysics

Jim StoneDepartment of Astrophysical Sciences

125 Peyton Hall : ph. 258-3815: [email protected]

www.astro.princeton.edu/~jstone

Lecture 1: Introduction to astrophysics, mathematics, and methodsLecture 2: Optimization, parallelization, modern methodsLecture 3: Particle-mesh methodsLecture 4: Particle-based hydro methods, future directions

Future challenges

Adding more physics, • stellar evolution• stellar collisions

Fate of Massive stars, Sun-like stars, and Red Dwarfs

Temperature

Luminosity

Stellar collision

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

J. Barnes, U. Hawaii

Future challenges

Adding more physics, • stellar evolution• stellar collisions

Ever larger simulations, e.g. 1011 particles allows one to follow every star in a galaxy.

Is it real or a simulation?

The purpose of computation is understanding.

A simulation that included all the physics (if possible) would be just as difficult to understand as nature.

Simulations should be used to simplify physical systems so they can be understood.

Particle-based hydro methods.

Rather than solving for the position of each particle individually, instead compute the evolution of the phase space density: f (x, v, t)evolves in time according to the Boltzmann equation:

If collisions are extremely frequent, the particle distribution function (phase space density f ) will be Maxwellian.

Moments of the Boltzmann equation lead to the equations of gas dynamics…

For continuum approximations apply.

Equations of hydro express conservation of mass, momentum, and energy

Conservation of mass

Equation of state

Conservation of momentum

But how to define continuum variables (mass density and pressure P) from discrete particles?

Smooth particle hydrodynamics (SPH)

h

As in PIC codes, average particle properties over a “smoothing length” h

Then density becomes:

Where W is the “smoothing kernel”, i.e. a weighting function which describes how to “smooth” the particles over h Momentum equation then becomes:

Strengths of SPH:1. Method is Lagrangian; particles concentrate where is high2. Easy to interface to N-body codes (especially tree codes)3. Method is simple, easy to code4. Code always runs (robust)

Weaknesses of SPH:1. Method is Lagrangian; poor resolution in regions where is low2. Code always runs (sometimes gives misleading results)3. Poor at shock capturing4. Slow (need at least 100 particles/h )5. Very diffusive

Grid-based methods for compressible gas dynamics

1. Discretize space into zones

x xi,j,k

2. Discretize the continuous variables

3. Difference the conservation laws:

as

Difficulty is computing accurate and stable fluxes:

The two challenges of numerical MHD

1. There are 3 wave families in MHD, which are sometimes degenerate Greatly complicates the calculation of fluxes

2. Evolved field must satisfy the divergence-free constraint requires a conservative scheme for the magnetic flux

Rewrite the induction equation

using Stoke’s Law as

Difference using a staggered B and EMFs located at cell edges.

Still need accurate and stable EMFs (fluxes of B)…

(Evans & Hawley 1988)

Test: Circularly Polarized Alfven Wave

QuickTime™ and aGIF decompressorare needed to see this picture.

= 1, P = 0.1, = 0.1, wave amplitude = 0.1 (Toth 2000)Lx = 2Ly, x = y , wave propagates at tan-1

Exact, nonlinear solution to MHD equations - quantitative test

Animation of Bz

Test Problem: Spherical Blast Waves

Not a very quantitative test, BUT• check of whether blast waves remain spherical• late term evolution interesting

x = y, 400 x 600 grid, periodic boundary conditions

P = 0.1

LX = 1

LY = 1.5

P = 100 in r < 0.1

B at 45 degrees, = 0.1

HYDRO MHD

P = 0.1

QuickTime™ and aGIF decompressorare needed to see this picture.QuickTime™ and aGIF decompressorare needed to see this picture.

Hydrodynamic Blast Wave400 x 600 grid

MHD Blast Wave400 x 600 grid

Successes in N-body simulation.

We’ve covered the most commonly used methods for N-body simulations in astrophysics

1. Direct N-body (PP) methods2. Tree codes3. Particle-Mesh methods

What have these methods been used for?

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Stellar dynamics in a globular cluster(PP code)

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Gravo-thermal oscillations: Self-gravitating systems have negative heat capacity: cool them down, they shrink, and get hotter.

Result: oscillations driven by cooling from evaporation, heating by binaries

Cooling heating by formation of binaries

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Log (radius)

Log

(tem

pera

ture

)

Log

(den

sity

)

Stellar dynamics during collision of two galaxies (tree code)

QuickTime™ and aYUV420 codec decompressor

are needed to see this picture.

Calculation by Chris Mihos, Vanderbilt U.

Evolution of the Universe is an initial value problem

The past: temperature fluctuations 300,000 years after the Big Bang

WMAP

Formation of structure in the Universe (PM code)

Cosmology calculations require solving:• N-body equations for collisionless dark matter• Hydrodynamical equations for normal matter• Radiative transfer equations for photons• Microphysics: ionization/recombination, chemistry

Successes: • Explanation of Ly forest• Discovery that most normal matter is very hot

But there are so many more problems to solve…

How do stars form from interstellar gas?

Why do massive stars explode at the end of their lives?

The Future of Computational Astrophysics

What is certain: increases in hardware performance will enable larger problems to be tackled numerically

What is needed:– More accurate algorithms– Community codes & visualization software– More realistic physics– Students trained in computation: they are the real future