Initial conditions for N-body simulations

17
Initial conditions for N-body simulations Hans A. Winther ITA, University of Oslo

description

Initial conditions for N-body simulations. Hans A. Winther ITA, University of Oslo. Overview. Initial Conditions. The N-body simulation. Dynamical equations Numerical methods. A nalysis of the results Identify halos etc. Connect the simulation with observations…. Introduction. - PowerPoint PPT Presentation

Transcript of Initial conditions for N-body simulations

Page 1: Initial conditions for N-body simulations

Initial conditionsfor N-body simulations

Hans A. WintherITA, University of Oslo

Page 2: Initial conditions for N-body simulations

Overview

The N-body simulation• Dynamical equations• Numerical methods

Analysis of the results• Identify halos etc.

Connect the simulation with observations…

Initial Conditions

Page 3: Initial conditions for N-body simulations

Introduction• Observations (CMB / LSS) suggests that perturbations started from a

random Gaussian field (completly described by P(k)) put up by inflation.

• After inflation, the evolution of the perturbations are well described by linear perturbation theory.

• Linear perturbations theory breaks down when the density contrast gets larger than one: N-body simulations is needed to follow the late time small scale clustering of matter.

• We are going to look at some ways to generate initial conditions in order to perform N-body simulations

Page 4: Initial conditions for N-body simulations

Initial conditions

?

Page 5: Initial conditions for N-body simulations

Initial conditions• N-body simulations usually starts with fairly homogenous IC.

• There are different ways to place particles in the simulation box before we start the simulation. The main requirement is that the distribution is uniform.

• The most obvious is to put particles on a cubic grid.

• We can place particles in lattice cells, but at a random displacement from the centre of the cell. Can give large fluctuations which can lead to spurious clustering.

• Place particles randomly and then evolve the distribution with repulsive gravity (glass initial conditions).

Page 6: Initial conditions for N-body simulations

Linear perturbation theory• Remember the equations governing the evolution of the density contrast and the

velocity field:

Page 7: Initial conditions for N-body simulations

Linear perturbation theory• In the linear theory the density contrast and the velocity field is given in

terms of the gravitational potential.

• The problem of initial conditions reduces to generate the gravitational potential and using this to calculate the density contrast and the velocity field.

• In LCDM, the linear density contrast can be written: d = c1 a + c2 a-2/3.

• The Poisson equation can be written: din = ain D2Yin and (dd/da)in= -Dvin

• Which leads to d(a) = (1/5)(3D2Yin-2Dvin)a + (2/5)(D2Yin-Dvin)a-2/3

• For a system in the growing mode we see that vin=–DYin.

Page 8: Initial conditions for N-body simulations

Linear perturbation theory

• We can now generate the initial density field in two different ways:

1. Distribute particles uniformly and have the masses of the particles by proportional to the local density.

2. The velocity is given by the gradient of the potential.

Drawback: We have to carry an array

with information about the different masses around.

1. Distribute particles uniformly and then displace using the velocity for the growing mode.

2. Max displacements should be smaller than the average displacement. Large displacements can lead to an incorrect realization of P(k).

3. If this happens, recompute the gravitational potential and assign velocities again.

4. This method can be shown to reproduce the initial density field given that the initial distribution did not have any inhomogeneities.

Page 9: Initial conditions for N-body simulations

• The most widely used method to set up a quasi-linear initial condition for the N-body simulation.

• Zel’dovich approximation is the first order Lagrangian perturbation theory. Normally breaks down later than Eulerian linear theory (the usual perturbation theory).

• First proposed in the 1970 paper ‘Gravitational Instability: An approximate theory for large density perturbations’. Zel’dovich originally used this method to show that the first structures to form are sheets called Zel’dovich pancakes.

• Assumptions: Scales of interest are smaller than the size of the horizon. The universe is dominated by dust (pressure less matter).

Zel’dovich approximation

Page 10: Initial conditions for N-body simulations

Zel’dovich approximationStart with some particles. The comoving position of this particle as a function of its Lagrangian position (initial position) can be written:

Take the derivatives with respect to time and use perturbation theory yields:

Page 11: Initial conditions for N-body simulations

• From a power-spectrum P(k) we can make a random realization of the density field:

In practice

• Where Rk=Gauss(0,1). The potential is given by:

• Particles are displaced by using:

Page 12: Initial conditions for N-body simulations

Other initial conditions• In choosing the initial conditions we also have to choose the size of the

box, the number of particles and the start time. These values are not arbitrary:

1. We have to make sure the largest modes are in the linear regime. Starting to late can also introduce shell-crossing (to large displacements).

2. If we start to early the displacements are tiny which can lead to numerical noise (the grid will be extremely regular).

3. By choosing a boxsize and particle number we introduce a minimum and maximum scale we can simulate. Must make sure the interesting scales are within our reach.

4. The variance of the matter distribution should not be too large. The literature suggests: sbox < 0.1 – 0.2

Page 13: Initial conditions for N-body simulations

Other initial conditions

Page 14: Initial conditions for N-body simulations

Glass initial conditions• Place the particles at random (Poisson distribution)

• Evolve the system forward in time, but use negative gravity!

• Use the new positions as the Lagrangian positions q in the Zel’dovich approximation.

• Both the grid and the glass method are used in the literature. What is best for a given simulation is not clear.

Page 15: Initial conditions for N-body simulations

Glass initial conditions

Page 16: Initial conditions for N-body simulations

…problems?• Paper (arXiv:0503106 E. Sirko) claiming the usual way of imposing initial

conditions introduces a significant error in the real space statistical properties of the particles.

• Sampling the power-spectrum leads to a underestimate of the real space variance (in e.g. s8), correlation function and non-linear effects due to a finite box.

• As discussed above, a finite box means that we impose a cutoff in wavelengths in k-space.

• The finite size of the box can be taken into account by rescaling cosmic time (or the scale factor) in order to account for long wavelength modes.

Page 17: Initial conditions for N-body simulations

Summary• The Zel’dovich approximation is the most widely used method for

generating initial conditions.

• Several different ways to apply it: Different masses / grid / glass etc.

• All methods generates a random realization of the power-spectrum. Importantly, this creates sampling variance. To gain a good statistics, to compare with observations, one should run the code several times with different realizations.

• Initial conditions places some important constraints on the time we start the simulation.