numerical cosmology & galaxy formation€¦ · numerical cosmology & galaxy formation 1...
TRANSCRIPT
Numerical Cosmology& Galaxy Formation
1
Benjamin Moster
Lecture 3: Generating initial conditions
Outline of the lecture course
• Lecture 1: Motivation & Historical Overview
• Lecture 2: Review of Cosmology
• Lecture 3: Generating initial conditions
• Lecture 4: Gravity algorithms
• Lecture 5: Time integration & parallelization
• Lecture 6: Hydro schemes - Grid codes
• Lecture 7: Hydro schemes - Particle codes
• Lecture 8: Radiative cooling, photo heating
• Lecture 9: Subresolution physics
• Lecture 10: Halo and subhalo finders
• Lecture 11: Semi-analytic models
• Lecture 12: Example simulations: cosmological box & mergers
• Lecture 13: Presentations of test simulations
2 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Outline of this lecture
• Initial conditions for cosmological simulations
‣ Cosmological principle
‣ Power spectrum and transfer function
‣ Zel’dovich Approximation
‣ Putting particles in a simulation box
‣ Limitations
‣ Zoom simulations
• Initial conditions for disc galaxy simulations
‣ Properties of disc galaxies
‣ Creating a particle representation of a disc galaxy
‣ Merger orbits
• Initial conditions for cosmological simulations
‣ Cosmological principle
‣ Power spectrum and transfer function
‣ Zel’dovich Approximation
‣ Putting particles in a simulation box
‣ Limitations
‣ Zoom simulations
3 Numerical Cosmology & Galaxy Formation 3 04.05.2016
The World EggIn many mythologies: universe comes into existence
by hatching from World Egg
4 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Egyptian mythology: Ra was contained in egg laid by celestial bird.
• Phoenician mythology: Môt burst forth from egg and heavens were created.
• Polynesian mythology: Primordial goddess created man in coconut shell
• Greek mythology: From the Orphic egg hatched the primordial deity Phanes who created other gods.
• Chinese mythology: Universe began as egg from which Pangu was born. Two halves of egg became sky and earth.
The World EggIn many mythologies: universe comes into existence
by hatching from World Egg
4 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Egyptian mythology: Ra was contained in egg laid by celestial bird.
• Phoenician mythology: Môt burst forth from egg and heavens were created.
• Polynesian mythology: Primordial goddess created man in coconut shell
• Greek mythology: From the Orphic egg hatched the primordial deity Phanes who created other gods.
• Chinese mythology: Universe began as egg from which Pangu was born. Two halves of egg became sky and earth.
Modern Cosmology:Universe expanded from hot dense state in Big Bang
Cosmic egg?
Cosmology
Numerical Cosmology
5 Numerical Cosmology & Galaxy Formation 3 04.05.2016
This is where we start
Computational Cosmology
• Cosmological model + initial conditions + simulation code = galaxies
SDSSCMB
generation theinitial conditions
running the simulation
analyzingthe data
6 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Cosmological Principle
• On large scales, the properties
of the Universe are the same to
all observers
• Homogeneity: Universe looks
the same at every location
• Isotropy: Universe looks the
same in every direction
• Discretize density field into
particleshomogeneous & isotropic
7 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Cosmological Principle
• On large scales, the properties
of the Universe are the same to
all observers
• Homogeneity: Universe looks
the same at every location
• Isotropy: Universe looks the
same in every direction
• Discretize density field into
particlesinfinite
(periodic boundary conditions)
7 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Cosmological Principle
• On large scales, the properties
of the Universe are the same to
all observers
• Homogeneity: Universe looks
the same at every location
• Isotropy: Universe looks the
same in every direction
• Discretize density field into
particlesinfinite
(periodic boundary conditions)
7 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Cosmological Principle
• On large scales, the properties
of the Universe are the same to
all observers
• Homogeneity: Universe looks
the same at every location
• Isotropy: Universe looks the
same in every direction
• Discretize density field into
particlesinfinite
(periodic boundary conditions)
7 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Perturbations
• Universe shows small density
fluctuations already at high z(see CMB)
• Convert CMB fluctuations to
density perturbations
homogeneous & isotropic
8 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Perturbations
• Universe shows small density
fluctuations already at high z(see CMB)
• Convert CMB fluctuations to
density perturbations
How?
perturbed density field
8 Numerical Cosmology & Galaxy Formation 3 04.05.2016
The power spectrum
• Use power spectrum to describe density fluctuations
• Temporal evolution (in the linear regime):
• How do we obtain P(k)?
P(k)
P (k, t) = P0(k)D2(t)
P (k) = h|�(k)|2i
9 Numerical Cosmology & Galaxy Formation 3 04.05.2016
The power spectrum
10 Numerical Cosmology & Galaxy Formation 3 04.05.2016
The transfer function
• From inflation: with n=1 called Harrison-Zel’dovich
• Many complex physical processes transfer P(k) during recombination due to coupling of radiation and matter:
- Silk damping for baryons
- Free-streaming damping for DM
- Different growth during radiation and matter dominated eras
• Initial power spectrum istransferred to post-recombinationpower spectrum as:
Pi(k) = Akn
P (k) = T 2(k)Pi(k)
11 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Computing the power spectrum with CAMB
• Power spectra & transfer functions can be computed with CAMB Free code by Lewis & Challinor available at http://camb.info
• Either download and install Fortran 90 source codeor use web interface at lambda: http://lambda.gsfc.nasa.gov/toolbox/tb_camb_form.cfm
12 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Computing the power spectrum with CAMB
• Output files are then generated that can be downloaded
• Cosmological parameters are printed
• Normalization must be chosen to get !8 right!
13 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Perturbations
• How to impose a spectrum of
fluctuations on a particle
distribution?
P(k)
perturbed density field
14 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Using cosmological perturbation theory we have derived
• And the growth equation is solved by the growth function D(a)
• With the quantities:
The Zel’dovich Approximation
� +~r · ~ua
= 0
~u+H~u = �~r�P
a⇢�
~r��
a
��� = 4⇡G⇢a2�
¨� + 2H ˙
� = �
✓4⇡G⇢+
c2sk2
a2
◆
~r = a(t)~x
~v = ~r = a~x+ a~x = H~r + ~u
� =�⇢
⇢
�(~x, t) =
Zd3k
(2⇡)3�(~k, t)e�i
~
k·~x
c2s =P
⇢
15 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Growth function satisfies the growth equation: or rewritten:
The Zel’dovich Approximation
• In a matter dominated universe:
• Integrate continuity equation or
�(a) = �0D(a)
~r2� = 4⇡Ga2⇢� = 4⇡Ga2⇢0a3
D(a)�0 =D(a)
a~r2�0
�(a) =D(a)
a�0
D(a) ⇠ a ! �(a) = �
@~u
@t+
a
a~u = �1
a~r�
• Substitute into Poisson equation (with ):
• So the potential also grows as
D + 2a
aD = 4⇡G
⇢ca3
D 1
a2@(a2D)
@t= 4⇡G
⇢ca3
D
⇢ = ⇢0/a3
@(a~u)
@t= �~r�
~u = �~r�0
a
ZD
adt
16 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Integrate this yields
• Use this with the integrated continuity equation to get
The Zel’dovich Approximation
a2D
4⇡G⇢c=
ZD
adt
• Integrate this to get the Zel’dovich approximation:
• This formulation can be used to extrapolate the evolution of
structures into the regime where displacements are no longer small
~x� ~x0 = �D
~r�0
4⇡G⇢c= �a
~r�(a)
4⇡G⇢cwith the unperturbed position ~x0
~x =~u
a
= �~r�0
a
2
a
2D
4⇡G⇢c= � D
~r�0
4⇡G⇢c
17 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• How apply the Zel’dovich approximation to a grid?
• Define and its Fourier transform
• With Poisson’s equation we get
Displacing particles on a grid
~
= ~x� ~x0
• Use the power spectrum : with where and are drawn from
Gaussian with standard deviation of 1 (P is only ensemble average)
• Initial velocities are given by
�~k =p
P (k)R~kei�~k
R~kei�~k = R1 + iR2 R1 R2
~x =D
D
~
! ~v~k = a
D
D
~
~k
P (k) = h|�(k)|2i
~ ~k = �a(i~k)�~k
4⇡G⇢0
�k2�~k =4⇡G⇢0�~k
a~ ~k = i~k
�~kk2
18 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• There are a number of parameters that have to be chosen:
‣ Cosmology ΛCDM (?)
‣ Box size
‣ Number of particles
‣ Starting redshift
Limitations of this method
• Choices are not completely free, but interwoven…
B
N
zi
19 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• N/B3 has to be chosen large enough to model interesting features
Wavenumber limitation
B
2B3pN B = 100h�1Mpc N = 10243
20 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• N/B3 has to be chosen large enough to model interesting features
Wavenumber limitation
B
2B3pN B = 100h�1Mpc N = 2563
20 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• N/B3 has to be chosen large enough to model interesting features
Wavenumber limitation
B
2B3pN B = 100h�1Mpc N = 323
20 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Largest mode (2"/B) has to stay linear or MF will be suppressed
• Iteratively computeknl using
• Set
• Results in typically B > 30 Mpc/h
Linearity constraint
1 =1
2⇡2
Z knl
0P (k, z = 0)k2dk
B � 2⇡
knl
21 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Initial redshift: not too early and not too late!
• Too early: integration of numerical noise
• Too late: shell crossing not taken into account
Initial redshift constraints
~x = ~x0 �D(a)~r�0
4⇡G⇢0
22 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Distances and masses have to be divided by h to get physical values!
Why is h used everywhere???
⇢ =Nmp
B3= ⌦0⇢c,0 = ⌦0
3H20
8⇡G= ⌦0
3 · (100h)2
8⇡G
mp = ⌦030000h2
8⇡G
B3
N
hmp = ⌦030000
8⇡G
(hB)3
N
mp = ⌦030000
8⇡G
B3
N
23 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Alternative to Grid ICs are Glass ICs
‣ Start with random positions for particles in the box
‣ Evolve box forward in time under gravity BUT with reversed sign
‣ Use resulting particle positions for Zel’dovich approximation
• Just cosmetics?
Grid vs. Glass ICs
GlassGrid
24 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Increasing the resolution of the box becomes very expensive
• Alternative: just increase the resolution in the area of interest:
1) Run low resolution simulation and identify interesting object(s)
2) trace back particles of that object to initial positions in ICs
3) resample this area with more particles and rerun the simulation
• Disadvantage: only one system simulated - no statistics
Zoom simulations
ICs z=0 zoom on halo
25 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Nmesh 128 % This is the size of the FFT grid
Nsample 128 % sets the maximum k that the code uses, % Ntot = Nsample^3, where Ntot is the
Box 150000.0 % Periodic box size of simulation
FileBase ics % Base-filename of output files OutputDir ./ICs/ % Directory for output
GlassFile glass.dat % File with unperturbed glass/grid (163 particles)
TileFac 8 % Number of times the glass file is tiled
Omega 0.3 % Total matter density (at z=0) OmegaLambda 0.7 % Cosmological constant (at z=0) OmegaBaryon 0.0 % Baryon density (at z=0) HubbleParam 0.7 % Hubble paramater Redshift 63 % Starting redshift Sigma8 0.9 % power spectrum normalization
N-GenIC
26 Numerical Cosmology & Galaxy Formation 3 04.05.2016
SphereMode 1 % if "1" only modes with |k| < k_Nyquist are used WhichSpectrum 2 % "1" selects Eisenstein & Hu spectrum, % "2" selects a tabulated power spectrum % otherwise, Efstathiou parametrization is used
FileWithInputSpectrum spectrum.txt % tabulated input spectrum InputSpectrum_UnitLength_in_cm 3.085678e24 % defines length unit (Mpc) ReNormalizeInputSpectrum 1 % if zero, spectrum assumed to be normalized
ShapeGamma 0.21 % only needed for Efstathiou power spectrum PrimordialIndex 1.0 % may be used to tilt the primordial index Seed 123456 % seed for IC-generator
NumFilesWrittenInParallel 2 % limits the number of files that are written
UnitLength_in_cm 3.085678e21 % defines length unit (in cm/h) kpc UnitMass_in_g 1.989e43 % defines mass unit (in g/cm) 1010M⦿ UnitVelocity_in_cm_per_s 1e5 % defines velocity unit (in cm/sec) km/s
N-GenIC
27 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Outline of this lecture
• Initial conditions for cosmological simulations
‣ Cosmological principle
‣ Power spectrum and transfer function
‣ Zel’dovich Approximation
‣ Putting particles in a simulation box
‣ Limitations
‣ Zoom simulations
• Initial conditions for disc galaxy simulations
‣ Properties of disc galaxies
‣ Creating a particle representation of a disc galaxy
‣ Merger orbits
• Initial conditions for disc galaxy simulations
‣ Properties of disc galaxies
‣ Creating a particle representation of a disc galaxy
‣ Merger orbits
28 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Set up individual system(s) and simulate/study those
• Advantage: much higher resolution (more particles per system) ‘Nice’ discs can be studied (often hard in cosmological runs)
• Disadvantage: Cosmological background is neglected (no infall, etc)
Why simulate isolated disc systems?
Stars Gas29 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• What does a disc galaxy system consist of?
Disc Galaxies
• Stellar disc
• Gaseous disc
• Stellar bulge
• Hot gaseous halo
• Dark matter halo
30 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Size of the dark matter halo is given by the virial radius (with mean
overdensity 200#crit) containing the virial mass:
• The virial velocity is and we have:
and
The dark matter halo
M200 = 200⇢crit4⇡
3R3
200
v2200 =GM200
R200
M200 =v3200
10GH(z)R200 =
v20010H(z)
• The density profile is the NFW profile:
• Often the Hernquist profile is used:
⇢(r) =�c
(r/rs)(1 + r/rs)2
⇢(r) =Mdm
2⇡
a
r(r + a)3 Spri
ngel
et
al. (
2005
)
31 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Disc has exponential radial profile:
Disc scale length is fixed by assuming the specific angular momentum of disc and dark matter halo are equal
• Vertical profile of the disc given by:
The stellar components
⌃(R) =
Md
2⇡R2d
exp
✓� R
Rd
◆
Rd
⇢(z) =Md
2z0sech2
✓z
2z0
◆
• For the bulge the spherical Hernquist profile is assumed:
• The bulge is typically assumed to be non-rotating
⇢b(r) =Mb
2⇡
rbr(rb + r)3
32 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• Like the stellar disc, the gaseous disc has exponential radial profile
• The vertical profile of the gas disc cannot be chosen freelybecause it depends on the temperature of the gas
• For a given surface density, the vertical structure of the gas disc arises
as a result of self-gravity and pressure:
The gaseous components
• Hot gaseous halo follows a beta-profile:
• The gas temperature is determined using hydrostatic equilibrium:
� 1
⇢g
@P
@z=
@�
@z
�(r) = �0
"1 +
✓r
rc
◆2#� 3
2�
T (r) =µmp
kB
1
�hot
(r)
Z 1
r�hot
(r)GM(r)
r2dr
33 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• We know the density profiles of each component. How can we put the particles such that these are reproduced?
• First step compute mass profile:
• Invert M(r), possibly analytically, otherwise numerically
• Draw random number q from uniform distribution between 0 and 1
• Radius is given by:
• For spherical distribution: (with random and )
Creating a particle representation of a galaxy
M(r) =
Z r
0⇢(r0)d3r0
r = r(q Mtot
)
0
@x
y
z
1
A= r
0
@sin ✓ cos�
sin ✓ sin�
cos ✓
1
A✓ �
34 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• To get the velocities: solve the collisionless Boltzmann equation
• Alternative: assume that velocity distribution can be approximated by
a multivariate Gaussian ➙ only 1st and 2nd moments needed
• For static + axisymmetric system: E and Lz are conserved along orbitsIf distribution function depends only on E and Lz the moments are:
Velocity structure
vR = vz = vRvz = vz v� = vRv� = 0
v2R = v2z =1
⇢
Z 1
zdz0⇢(R, z0)
@�
@z0(R, z0)
v2� = v2R +R
⇢
@
@R(⇢v2R) +R
@�
@R
• Must be solved numerically
35 Numerical Cosmology & Galaxy Formation 3 04.05.2016
• For simulating galaxy mergers: put 2 systems on orbit.
• Parameters that specify the merger orbit:
‣ Initial separation Rstart (typically around the virial radius R200)
‣ Pericentric distance dmin (if galaxies were point masses)
‣ Orbital eccentricity e (usually parabolic orbits, i.e. e=1)
‣ Orientation of discs with respect to orbital plane:
The orbit of galaxy mergers
�1, ✓1, �2, ✓2
Rstart
dmin
e�1, ✓1
�2, ✓2
36 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Final notes
• Text Books:
‣ Cosmology: Galaxy Formation and Evolution (Mo, vdBosch, White)
‣ Galactic Structure: Galactic Dynamics (Binney, Tremaine)
• Papers:
‣ Bertschinger (2001), ApJS, 137, 1
‣ Springel & White (1999), MNRAS, 307, 162
‣ Springel et al. (2005), MNRAS, 62, 79
• Gadget and N-GenIC website: http://www.mpa-garching.mpg.de/gadget/
37 Numerical Cosmology & Galaxy Formation 3 04.05.2016
Up next
• Lecture 1: Motivation & Historical Overview
• Lecture 2: Review of Cosmology
• Lecture 3: Generating initial conditions
• Lecture 4: Gravity algorithms
• Lecture 5: Time integration & parallelization
• Lecture 6: Hydro schemes - Grid codes
• Lecture 7: Hydro schemes - Particle codes
• Lecture 8: Radiative cooling, photo heating
• Lecture 9: Subresolution physics
• Lecture 10: Halo and subhalo finders
• Lecture 11: Semi-analytic models
• Lecture 12: Example simulations: cosmological box & mergers
• Lecture 13: Presentations of test simulations
38 Numerical Cosmology & Galaxy Formation 3 04.05.2016