Download 4 - Princeton CS

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Weakly-interacting massive particles wikipedia , lookup

Photon polarization wikipedia , lookup

Standard solar model wikipedia , lookup

Magnetohydrodynamic generator wikipedia , lookup

Star formation wikipedia , lookup

Magnetohydrodynamics wikipedia , lookup

Transcript
Module on Computational Astrophysics
Jim Stone
Department of Astrophysical Sciences
125 Peyton Hall : ph. 258-3815:
[email protected]
www.astro.princeton.edu/~jstone
Lecture 1: Introduction to astrophysics, mathematics, and methods
Lecture 2: Optimization, parallelization, modern methods
Lecture 3: Particle-mesh methods
Lecture 4: Particle-based hydro methods, future directions
Future challenges
Adding more physics,
• stellar evolution
• stellar collisions
Luminosity
Fate of Massive stars, Sun-like stars, and Red Dwarfs
Temperature
Stellar collision
J. Barnes, U. Hawaii
QuickTime™ and a
YUV420 codec decompressor
are needed to see this picture.
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.
For
continuum approximations apply.
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…
Equations of hydro express conservation of mass,
momentum, and energy
Conservation of mass
Conservation of
momentum
Equation of state
But how to define continuum variables (mass density r and
pressure P) from discrete particles?
Smooth particle hydrodynamics (SPH)
As in PIC codes, average particle properties
over a “smoothing length” h
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 r is high
2. Easy to interface to N-body codes (especially tree codes)
3. Method is simple, easy to code
4. Code always runs (robust)
Weaknesses of SPH:
1. Method is Lagrangian; poor resolution in regions where r is low
2. Code always runs (sometimes gives misleading results)
3. Poor at shock capturing
4. 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
(Evans & Hawley 1988)
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)…
Test: Circularly Polarized Alfven Wave
Exact, nonlinear solution to MHD equations - quantitative test
r= 1, P = 0.1, b = 0.1, wave amplitude = 0.1 (Toth 2000)
Lx = 2Ly, Dx = Dy , wave propagates at tan-1 q = 1/2
Quic kTime™ and a GIF dec ompres sor are needed to s ee this pic ture.
Animation of Bz
Test Problem: Spherical Blast Waves
LX = 1
LY = 1.5
P = 0.1
r=1
P = 0.1
r=1
P = 100 in r < 0.1
HYDRO
B at 45 degrees,
b = 0.1
MHD
Dx = Dy, 400 x 600 grid, periodic boundary conditions
Not a very quantitative test, BUT
• check of whether blast waves remain
spherical
QuickTime™ and a GIF decompressor are needed to see this picture.
Hydrodynamic Blast Wave
400 x 600 grid
QuickTime™ and a GIF decompressor are needed to see this picture.
MHD Blast Wave
400 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) methods
2. Tree codes
3. Particle-Mesh methods
What have these methods been used for?
Stellar dynamics in
a globular cluster
(PP code)
QuickTime™ and a
YUV420 codec decompressor
are needed to see this picture.
QuickTime™ and a
YUV420 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.
Cooling
heating by formation of binaries
Result: oscillations
driven by cooling
from evaporation,
heating by binaries
Log (radius)
Log(temperature)
Log(density)
QuickTime™ and a
YUV420 codec decompressor
are needed to see this picture.
Stellar dynamics during collision
of two galaxies (tree code)
QuickTime™ and a
YUV420 codec decompressor
are needed to see this picture.
Calculation by Chris Mihos, Vanderbilt U.
Formation of structure in the Universe (PM code)
Evolution of the Universe is an initial value problem
The past: temperature fluctuations
300,000 years after the Big Bang
WMAP
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 a 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