Numerical Galaxy Formation & Cosmologypuchwein/NumCosmo_lect_2016/NumericalCosmology01.pdfPoisson...

Post on 08-Feb-2020

3 views 0 download

Transcript of Numerical Galaxy Formation & Cosmologypuchwein/NumCosmo_lect_2016/NumericalCosmology01.pdfPoisson...

Numerical Galaxy Formation& Cosmology

1

Benjamin Moster

Ewald Puchwein

Lecture 1: Motivation and Initial Conditions

Outline of the lecture course

• Lecture 1: Motivation & Initial conditions

• Lecture 2: Gravity algorithms & parallelization

• Lecture 3: Hydro schemes

• Lecture 4: Radiative cooling, photo heating & Subresolution physics

• Lecture 5: Halo and subhalo finders & Semi-analytic models

• Lecture 6: Getting started with Gadget

• Lecture 7: Example galaxy collision

• Lecture 8: Example cosmological box

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.20162

Outline of this lecture

• Motivation for simulations and semi-analytic models

‣ Observations at high redshift (CMB) and low redshift (SDSS)

‣ Linear density perturbations

• Initial conditions for cosmological simulations

‣ Zel’dovich Approximation

‣ Putting particles in a simulation box

‣ Zoom simulations

• Initial conditions for disc galaxy simulations

‣ Properties of disc galaxies

‣ Creating a particle representation of a disc galaxy

3

• Motivation for simulations and semi-analytic models

‣ Observations at high redshift (CMB) and low redshift (SDSS)

‣ Linear density perturbations

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

Observing large scale structure

• Cosmic structure can be observed at very high redshift (z>1000): CMBVery smooth, only small perturbations (10-5)

• At low redshift: galaxies are very clustered forming a ‘cosmic web’.

4

CMB - Planck

z > 1000 z ~ 0

GalaxiesSDSS

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

Observing large scale structure

• Things to keep in mind:

‣ Structure formation process is dominated by gravity

‣ Galaxies are only tracers of cosmic structure (<3% of all mass)

‣ Galaxy formation depends on ‘baryonic physics’

5

CMB - Planck

z > 1000 z ~ 0

GalaxiesSDSS

How?

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

What about linear perturbation theory?

• How far can we push it?

• A quick recap of cosmological perturbation theory:

6

~r = a~x

~u = a~x~v = ~r = ~u+a

a~r with

~x

~u

comoving position

peculiar velocity

@~v

@t+ (~v ~rphys)~v = �~rphys�

momentum conservation:@~u

@t+

a

a~u = �1

a~r�

continuity equation:@⇢

@t+ ~rphys(⇢~v) = 0

@�

@t+

1

a~r~u = 0

Poisson equation:~r2

phys� = 4⇡G⇢ ~r2� = 4⇡Ga2⇢�

� =⇢� ⇢

with

comoving (1st order):

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

• Formalism works as long as

• Breaks down when (negative densities)

• Either go to higher order (still no ‘baryonic physics’) or use simulations

Linear growth of structures

• Combining this we get the evolution of the density contrast

• For a matter dominated universe we have

• Can be decomposed into waves: Power spectrum is (where : ensemble average) and it grows like

7

solved by growth function : �(a) = �0D(a)D(a)

D(a) ⇠ a

� ⌧ 1

�(~x) =

Z�(~k)e�i

~

k~x

d

3k

P (k) = P0D2(a)

� ⇠ 1

� + 2a

a� = 4⇡G

⇢ca3

P (k) = h|�(k)|2i hi

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

From high to low redshift

• Cosmological model + initial conditions + simulation code = galaxies

8

Dark matter

GalaxiesBenjamin Moster Numerical Galaxy Formation & Cosmology

1IoA, 13.01.2016

Outline of this lecture

• Motivation for simulations and semi-analytic models

‣ Observations at high redshift (CMB) and low redshift (SDSS)

‣ Linear density perturbations

• Initial conditions for cosmological simulations

‣ Zel’dovich Approximation

‣ Putting particles in a simulation box

‣ Zoom simulations

• Initial conditions for disc galaxy simulations

‣ Properties of disc galaxies

‣ Creating a particle representation of a disc galaxy

9

• Initial conditions for cosmological simulations

‣ Zel’dovich Approximation

‣ Putting particles in a simulation box

‣ Zoom simulations

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

particles

10

homogeneous & isotropic

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

particles

10

infinite (periodic boundary conditions)

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

Perturbations

• Universe shows small density

fluctuations already at high z(see CMB)

• Convert CMB fluctuations to

density perturbations

11

homogeneous & isotropic

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

Perturbations

• Universe shows small density

fluctuations already at high z(see CMB)

• Convert CMB fluctuations to

density perturbations

11

How?

perturbed density field

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

The power spectrum

• Use the power spectrum to describe the density fluctuations

• From inflation:

• Temporal evolution (in the linear regime):

• How to impose a spectrum of fluctuations on a particle distribution?

12

P(k)

Pi(k) = Akn

P (k, t) = P0(k)D2(t)

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

• Growth function satisfies the growth equation: or rewritten:

The Zel’dovich Approximation

• In a matter dominated universe:

• Integrate continuity equation or

13

�(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

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

• Integrate this yields

• Use this with the integrated continuity equation to get

The Zel’dovich Approximation

14

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

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

15

~

= ~x� ~x0~ ~k = �

a(i~k)�~k4⇡G⇢c

�k2�~k =4⇡G⇢c�~k

a~ ~k = i~k

�~kk2

• 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

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

• There are a number of parameters that have to be chosen:

‣ Box size

‣ Number of particles

‣ Starting redshift

Limitations of this method

16

• In practice there are several constraints on these:

‣ Minimal modes that are included:

‣ Largest mode has to stay linear:

‣ Starting redshift (typically ): Too late: shell crossing not taken into accountToo early: numerical noise is integrated

B

N

zi

2B/3pN

B � 2⇡/knl ⇠ 20Mpc

40 < zi < 80

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

17

GlassGrid

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

18

ICs z=0 zoom on halo

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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 or grid

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

19 Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

SphereMode 1 % if "1" only modes with |k| < k_Nyquist are used WhichSpectrum 0 % "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 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) UnitMass_in_g 1.989e43 % defines mass unit (in g/cm) UnitVelocity_in_cm_per_s 1e5 % defines velocity unit (in cm/sec)

N-GenIC

20 Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

Outline of this lecture

• Motivation for simulations and semi-analytic models

‣ Observations at high redshift (CMB) and low redshift (SDSS)

‣ Linear density perturbations

• Initial conditions for cosmological simulations

‣ Zel’dovich Approximation

‣ Putting particles in a simulation box

‣ Zoom simulations

• Initial conditions for disc galaxy simulations

‣ Properties of disc galaxies

‣ Creating a particle representation of a disc galaxy

21

• Initial conditions for disc galaxy simulations

‣ Properties of disc galaxies

‣ Creating a particle representation of a disc galaxy

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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?

22

Stars GasBenjamin Moster Numerical Galaxy Formation & Cosmology

1IoA, 13.01.2016

• What does a disc galaxy system consist of?

Disc Galaxies

23

• Stellar disc

• Gaseous disc

• Stellar bulge

• Hot gaseous halo

• Dark matter halo

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

24

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

)

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

25

⌃(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

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

26

• 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

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

27

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✓ �

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

28

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

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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

29

�1, ✓1, �2, ✓2

Rstart

dmin

e�1, ✓1

�2, ✓2

Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.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/

30 Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016

Up next

• Lecture 1: Motivation & Initial conditions

• Lecture 2: Gravity algorithms & parallelization

• Lecture 3: Hydro schemes

• Lecture 4: Radiative cooling, photo heating & Subresolution physics

• Lecture 5: Halo and subhalo finders & Semi-analytic models

• Lecture 6: Getting started with Gadget

• Lecture 7: Example galaxy collision

• Lecture 8: Example cosmological box

31 Benjamin Moster Numerical Galaxy Formation & Cosmology 1

IoA, 13.01.2016