# Cosmological initial conditions

Before we describe the numerical techniques that are needed to model the dynamics of our cosmological fluid, we first need to discuss how to generate the initial conditions. Primordial density fluctuations have been observed and characterized with great precision as a Gaussian random field. Gaussian random fluctuations in space can be defined as white noise convolved by a transfer function. This transfer function encodes the spatial correlations of these random fluctuations due to their evolution as a function of time within the expanding universe. To describe this time evolution, we have to solve the Boltzmann equation for the primordial multicomponent cosmic plasma and obtain the transfer function. There are currently two codes freely available and regularly maintained to compute the transfer function describing the density fluctuations: camb (Lewis and Challinor, 2011) and class (Blas et al., 2011). These codes are believed to compute the theoretical transfer function to a precision better than 0.1%. Once we are equipped with the transfer function, it is straightforward to convolve the white noise field by the transfer function and obtain our Gaussian random field. Although this convolution seems easy to perform for large periodic boxes using Fourier techniques,^{[1]} this is not true for zoom-in initial conditions.

For zoom-in simulations, we need to proceed in two steps: first, we run a large periodic box and identify a halo of interest. The material in this halo is then (second step) traced back to the initial conditions, defining a region called the Lagrangian volume of the halo. This region is usually quasispherical, but with fuzzy boundaries and sometimes holes. The Lagrangian volume has to be cleaned, using the convex hull for example, and transformed into a simple geometrical domain, such as an ellipse or a rectangle. This simple domain defines what is referred to as the high-resolution region. We first generate a white noise field at the required resolution within this region, and then generate a nested hierarchy of white noise fields in concentric shells of larger and larger sizes but coarser and coarser resolution, until we entirely cover the initial large periodic box. We are left with a nested hierarchy of concentric white noise spatial arrays, which we need to convolve with the transfer function. This last step (the convolution) is quite challenging to perform on this now very complex data structure. Publicly available codes can perform these complex operations at a reasonable computational cost: grafic2 (Bertschinger, 2001), grafic++, and music, (Hahn and Abel, 2011).

- [1] Publicly available codes providing initial conditions include graficl (Bertschinger, 2001) andmpgrafic (Prunet et al., 2008)