Open Access
Issue
A&A
Volume 672, April 2023
Article Number A59
Number of page(s) 8
Section Cosmology (including clusters of galaxies)
DOI https://doi.org/10.1051/0004-6361/202245211
Published online 29 March 2023

© The Authors 2023

Licence Creative CommonsOpen Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

This article is published in open access under the Subscribe to Open model. Subscribe to A&A to support open access publication.

1. Introduction

Large-scale galaxy surveys are important probes to test the standard Lambda cold dark matter (ΛCDM) model of cosmology in addition to alternative cosmologies. Past surveys, such as the Automated Plate Measurement (APM) galaxy survey (Maddox et al. 1990; Baugh & Efstathiou 1994), 2dF (Percival et al. 2001), Two Micron All-Sky Survey (2MASS; Allgood et al. 2001), Sloan Digital Sky Survey (SDSS; Tegmark et al. 2004), Dark Energy Survey (DES; The Dark Energy Survey Collaboration 2005), Dark Energy Spectroscopic Instrument (DESI; DESI Collaboration 2016), and the Panoramic Survey Telescope and Rapid Response System (Pan-STARRS; Chambers et al. 2016), have provided valuable data regarding the evolution of the matter in our Universe. The upcoming Rubin (LSST Science Collaboration 2009), Roman (Green et al. 2012), Spectro-Photometer for the History of the Universe, Epoch of Reionization, and ices Explorer (SPHEREx) (Doré et al. 2014) and Euclid (Tutusaus et al. 2020) surveys will greatly extend these observations by mapping unprecedented volumes with previously unseen etendue. Constraints on cosmological parameters are derived by comparing observations and theoretical predictions using statistical quantities such as the power spectrum, halo mass function, or the cosmic-shear two-point correlation function. Cosmological N-body simulations are widely used for calculating these quantities at late times (e.g., Valdarnini & Borgani 1991; Rimes & Hamilton 2006; Jenkins et al. 2001; Casarini et al. 2012). To answer the demands of the large surveys, simulations were run to calculate the nonlinear evolution of the 3D matter distribution inside large volumes with high precision over the years, such as the Millennium run (Springel et al. 2005), Millennium-II (Boylan-Kolchin et al. 2009), Bolshoi (Klypin et al. 2011), Millennium-XXL (Angulo et al. 2012), MultiDark (Klypin et al. 2016), the Euclid flagship simulation (Potter et al. 2017), and the Outer Rim Simulation (Heitmann et al. 2019). The results of these simulations have been used in hundreds of research projects and are still regularly used today.

Both observations and cosmological simulations are affected by cosmic variance, because they are both only sampling a finite volume of the cosmic density field (Driver & Robotham 2010; Moster et al. 2011; Schneider et al. 2016). The most straightforward method to estimate the effects of cosmic variance is to use an ensemble of cosmological simulations such as the LasDamas (McBride et al. 2009), the Indra (Falck et al. 2021) or the ABACUSSUMMIT (Maksimova et al. 2021) simulation suites. By comparing the results of hundreds of simulations, the cosmic mean and variance can be directly calculated for a given quantity. Paired (Pontzen et al. 2016) and paired-and-fixed (Angulo & Pontzen 2016) initial conditions can effectively reduce the cosmic variance in simulations. Detailed descriptions of these initial conditions are presented in Sects. 2.1 and 2.2, respectively. By running just two simulations, the results of the paired-and-fixed initial conditions method can closely match the average of the ensembles of 300 simulations for density distribution, power spectrum, and bispectrum. Although the statistics of the average dark matter clustering are precise in these simulations, the covariances from paired-and-fixed simulations are suppressed, and as a consequence, these cannot be used for generating mock galaxy catalogs as shown in Klypin et al. (2020). Harnois-Déraps et al. (2019) pointed out that reducing the effects of cosmic variance on the cosmic shear covariance calculation is possible with matched pairs of simulations.

Our aim is to extend the techniques shown above by proposing alternative ways to generate initial conditions for cosmological simulations. The outline of this paper is as follows: In Sect. 2, we overview the traditional algorithm used to generate initial conditions and propose modifications to this in order to reduce the cosmic variance. Then, in Sect. 3, we compare the different simulations that started from the modified initial conditions. In Sect. 4, we demonstrate our new best performing method on the original Millennium simulation by running its complementary pair. Using this new simulation, we estimate the effect of cosmic variance on the original Millennium power spectrum. Finally, we summarize our results.

2. Initial conditions for cosmological simulations

The main goal of initial-condition creation is to represent a δ ( x ) = ρ ( x ) / ρ ¯ 1 $ \delta(\boldsymbol{x}) = \rho(\boldsymbol{x})/\overline{\rho} -1 $ overdensity field with discrete particles. For cosmological simulations, this field should be consistent with the Ptarget(k) initial power spectrum. The first step in this process is to generate the Fourier transform of the overdensity field (Hockney & Eastwood 1988; Sirko 2005):

δ ( k ) = δ ( x ) e i k x d 3 x . $$ \begin{aligned} \delta (\boldsymbol{k}) = \int \delta (\boldsymbol{x}) \mathrm{e}^{-i\boldsymbol{k}\boldsymbol{x}} \mathrm{d}^3x. \end{aligned} $$(1)

As this is a complex field, it can be written as

δ ( k ) = a ( k ) + i · b ( k ) = A ( k ) · e i φ ( k ) , $$ \begin{aligned} \delta (\boldsymbol{k}) = a(\boldsymbol{k}) + i \cdot b(\boldsymbol{k}) = A(\boldsymbol{k})\cdot \mathrm{e}^{i\varphi (\boldsymbol{k})}, \end{aligned} $$(2)

and it should satisfy the usual Hermitian constraints, because its inverse Fourier transform is a real field. For a random Gaussian realization of a target Ptarget(k) initial power spectrum, a(k) and b(k) should be drawn independently from a Gaussian distribution (Klypin & Holtzman 1997)

P G ( a ) d a = 1 σ ( k ) 2 π e a 2 2 σ ( k ) 2 d a , $$ \begin{aligned} P_{\rm G}(a)\mathrm{d}a = \frac{1}{\sigma (k)\sqrt{2\pi }}\mathrm{e}^{- \frac{a^2}{2\sigma (k)^2}}\mathrm{d}a, \end{aligned} $$(3)

for every resolved k wavenumber vector. Equivalent to this is to generate the magnitude A(k) from the Rayleigh distribution

P R ( A ) d A = A σ ( k ) 2 e A 2 2 σ ( k ) 2 d A , $$ \begin{aligned} P_{\rm R}(A)\mathrm{d} A=\frac{A}{\sigma (k)^2}\mathrm{e}^{-\frac{A^2}{2\sigma (k)^2}}\mathrm{d}A, \end{aligned} $$(4)

and the corresponding phase φ(k) is chosen randomly from a uniform distribution on a range between 0 and 2π independently (Sirko 2005), where σ(k)2 = VPtarget(k)/(2π)3, V is the volume of the simulation, and k = |k|. After the initial field is generated in Fourier space, the δ(x) overdensity field is calculated using the inverse Fourier transform. In the last step of the initial-condition generation, this Eulerian density is transformed into a Lagrangian representation of particles using the Zel’dovich approximation (Zel’dovich 1970) or the second-order Lagrangian perturbation theory (2LPT; Crocce et al. 2006; Jenkins 2010). The power spectrum of the traditional initial conditions,

P IC ( k 1 ) = ( 2 π ) 3 V δ k 1 , k 2 δ ( k 1 ) δ ( k 2 ) = ( 2 π ) 3 V A ( k ) 2 | k | = k 1 , $$ \begin{aligned} P_{\rm IC}(k_1) = \frac{(2\pi )^3}{V}\delta _{\boldsymbol{k}_1,\boldsymbol{k}_2}\langle \delta (\boldsymbol{k}_1)\delta ^*(\boldsymbol{k}_2)\rangle = \frac{(2\pi )^3}{V}\langle A(\boldsymbol{k}\prime )^2\rangle _{|\boldsymbol{k}\prime |=k_1} ,\end{aligned} $$(5)

will not be equal to Ptarget(k), because the initial amplitudes are drawn from a Rayleigh distribution, and this is the main source of the cosmic variance in simulations. In this article, we use | k | = k $ \langle\rangle_{|\boldsymbol{k}^\prime|=k} $ to denote the average value of the |k′| = k surface in Fourier space. In the rest of this paper, we discuss modifications to this traditional method and show how these modifications can reduce the effects of cosmic variance in cosmological N-body simulations.

2.1. Inverted initial conditions

This method was proposed by Pontzen et al. (2016) and can be used to create a density-inverted counterpart to an existing initial condition. This can be achieved by running the same initial condition generator again with the same parameters and random seed, but with φ(k) phases shifted by π. As a consequence of this phase shift, the initial δ(x) overdensity fields are inverted in the counterpart, that is, underdensities are substituted for overdensities and vice versa. The simulations that start from the pairs of these initial conditions are called Paired simulations. The power spectrum of the original and the inverted initial condition are the same, because they only differ in the phases. Despite the fact that the pair have the same initial power spectrum, the cosmic variance can still be reduced by averaging the results of paired simulations, as the averaging cancels phase correlations that emerge from the late-time nonlinear evolution of the density field (Villaescusa-Navarro et al. 2018).

2.2. Fixed and paired-and-fixed initial conditions

The next step in reducing cosmic variance was developed by Angulo & Pontzen (2016). In their approach, the amplitudes of the initial conditions are fixed to the expected mean value by setting

A ( k ) = V P target ( | k | ) ( 2 π ) 3 . $$ \begin{aligned} A(\boldsymbol{k}) = \sqrt{\frac{VP_{\rm target}(|\boldsymbol{k}|)}{(2\pi )^3}}. \end{aligned} $$(6)

The simulations that start from this initial condition are called Fixed simulations. A further reduction of the cosmic variance can be achieved by combining this technique with the paired simulation method described in Sect. 2.1 (Angulo & Pontzen 2016). These paired-and-fixed (PF) simulations can reduce the variance of the power spectrum by factors as large as 106. A detailed description of the statistical properties of the paired and PF simulations can be found in Villaescusa-Navarro et al. (2018). Although the PF method is very effective in reducing the variance of the power spectrum, the halo mass function, and the bispectrum, Klypin et al. (2020) found that the covariances are significantly suppressed, in contrast to the series of traditional simulations with normal Gaussian initial conditions. The main source of this bias is the fact that the initial conditions are missing the random amplitude fluctuations. As this is a well known and very effective method for reducing the cosmic variance, we use the PF simulations as a reference when we compare the different power spectra in this paper.

2.3. Matched pairs

An independent approach was used by Harnois-Déraps et al. (2019) to reduce cosmic variance in cosmic-shear covariance calculations. These authors generated a large ensemble of independent initial conditions and chose two from the set that had an average that was closest to Ptarget(k). This pair of initial conditions was used as the starting point for a pair of simulations. Unlike the Paired simulations described in Sect. 2.2, the effects of phase correlations are not canceled out during the averaging of these simulations, as the φ(k) phases are completely independent in these pairs.

2.4. Paired-and-mean initial conditions

The first new method we propose in this article is the paired-and-mean (PM) initial conditions. According to this method, the initial δ(k) field is generated in the traditional way in the first step, but the initial amplitudes are scaled by

A PM ( k ) = A ( k ) · V P target ( k ) ( 2 π ) 3 A ( k ) 2 | k | = k , $$ \begin{aligned} A_{\rm PM}(\boldsymbol{k}) = A(\boldsymbol{k})\cdot \sqrt{\frac{VP_{\rm target}(k)}{(2\pi )^3\langle A(\boldsymbol{k}^\prime )^2\rangle _{|\boldsymbol{k}^\prime |=k}}}, \end{aligned} $$(7)

where APM(k) are the new PM amplitudes used in the initial condition, and A(k) are the amplitudes generated with the traditional technique. This transformation guarantees that the initial power spectrum is equal to Ptarget(k), while there are still fluctuations in the amplitudes. We propose that these simulations be run in inverted pairs in order to reduce the effect of phase correlations.

In practice, PM initial conditions can be generated using traditional initial-condition generators such as NGen_IC (Springel 2015) or 2LPTic (Crocce et al. 2012, 2006) using the following target power spectrum:

P input , PM ( k ) = P target ( k ) 2 P IC ( k ) , $$ \begin{aligned} P_{\rm input, PM}(k) = \frac{P_{\rm target}(k)^2}{P_{\rm IC}(k)}, \end{aligned} $$(8)

where PIC(k) is the power spectrum of a traditional initial condition generated with the same code, parameters, and random seed. As the Zel’dovich or 2LPT approximations also have an effect on the final power spectrum (Crocce et al. 2006), PIC(k) should be calculated from the generated particle distribution.

2.5. Complementary initial conditions

Our aim is to use pairs of simulations as part of this new technique, where the initial condition of the first simulation is generated in the traditional way, while the second has modified initial amplitudes and phases. We refer to the former as the “original” simulation, and the latter as the “complementary” simulation. We choose the initial AC(k) values in the complementary initial condition so that the average of the two initial P(k) matches the Ptarget(k) power spectrum. This constraint can be written as

A C ( k ) 2 | k | = k = 2 V ( 2 π ) 3 P target ( k ) A ( k ) 2 | k | = k , $$ \begin{aligned} \langle A_{\rm C}(\boldsymbol{k}^{\prime })^2\rangle _{|\boldsymbol{k}^{\prime }|=k} = \frac{2V}{(2\pi )^3}P_{\rm target}(k) - \langle A(\boldsymbol{k}^{\prime })^2\rangle _{|\boldsymbol{k}^{\prime }|=k}, \end{aligned} $$(9)

where AC(k) is the amplitude in the complementary initial condition at k wavenumber. This can only be satisfied for the k wavenumbers, where

2 · P IC ( k ) < P target ( k ) , $$ \begin{aligned} 2 \cdot P_{\rm IC}(k) < P_{\rm target}(k), \end{aligned} $$(10)

because A C ( k ) 2 | k | = k $ \langle A_{\mathrm{C}}(\boldsymbol{k}^\prime)^2\rangle_{|\boldsymbol{k}^\prime|=k} $ must be a positive. Although this cannot be done for the entire |k|=k surface, this technique can lead to a significant reduction in the variance of the power spectrum by compensating amplitudes that satisfy this criterion. There are an infinite number of AC(k) fields that satisfy Eq. (9) when Eq. (10) is true. In this study, we chose to generate these fields with the following formula:

A C ( k ) | 2 · P IC ( k ) < P target ( k ) = A ( k ) V P target ( k ) ( 2 π ) 3 A ( k ) 2 | k | = k ( 2 ( 2 π ) 3 A ( k ) 2 | k | = k V P target ( k ) ) = A PM ( k ) · ( 2 ( 2 π ) 3 A ( k ) 2 | k | = k V P target ( k ) ) . $$ \begin{aligned}&A_{\rm C}(\boldsymbol{k}) \biggr |_{2 \cdot P_{\rm IC}(k) < P_{\rm target}(k)} \nonumber \\&= A(\boldsymbol{k})\sqrt{\frac{VP_{\rm target}(k)}{(2\pi )^3\langle A(\boldsymbol{k}^\prime )^2\rangle _{|\boldsymbol{k}^\prime |=k}} \left(2 - \frac{(2\pi )^3\langle A(\boldsymbol{k}^\prime )^2\rangle _{|\boldsymbol{k}^\prime |=k}}{VP_{\rm target}(k)}\right)} \\&= A_{\rm PM}(\boldsymbol{k})\cdot \sqrt{\left(2 - \frac{(2\pi )^3\langle A(\boldsymbol{k}^\prime )^2\rangle _{|\boldsymbol{k}^\prime |=k}}{VP_{\rm target}(k)}\right)}.\nonumber \end{aligned} $$(11)

For the modes that cannot be compensated, instead of setting them at zero, we chose

A C ( k ) | 2 · P IC ( k ) P target ( k ) = A ( k ) V P target ( k ) ( 2 π ) 3 A ( k ) 2 | k | = k = A PM ( k ) · V P target ( k ) ( 2 π ) 3 A ( k ) 2 | k | = k $$ \begin{aligned}&A_{\rm C}(\boldsymbol{k})\biggr |_{2 \cdot P_{\rm IC}(k) \ge P_{\rm target}(k)}= A(\boldsymbol{k})\frac{VP_{\rm target}(k)}{(2\pi )^3\langle A(\boldsymbol{k}^{\prime })^2\rangle _{|\boldsymbol{k}^{\prime }|=k}} \nonumber \\&= A_{\rm PM}(\boldsymbol{k})\cdot \sqrt{\frac{VP_{\rm target}(k)}{(2\pi )^3\langle A(\boldsymbol{k}^\prime )^2\rangle _{|\boldsymbol{k}^\prime |=k}}} \end{aligned} $$(12)

in order to avoid introducing any strong unwanted beat-coupling effects (Hamilton et al. 2006). The advantage of this choice is that the complementary initial condition can be generated with the usual codes simply by setting the target power spectrum to

P input , C ( k ) | 2 · P IC ( k ) < P target ( k ) = 2 P target ( k ) 2 P IC ( k ) P target ( k ) = P input , PM ( k ) · ( 2 P IC ( k ) P target ( k ) ) , $$ \begin{aligned}&P_{\rm input, C}(k)\biggr |_{2 \cdot P_{\rm IC}(k) < P_{\rm target}(k)} = 2\frac{P_{\rm target}(k)^2}{P_{\rm IC}(k)}-P_{\rm target}(k) \nonumber \\&= P_{\rm input, PM}(k) \cdot \left(2 - \frac{P_{\rm IC}(k)}{P_{\rm target}(k)}\right) , \end{aligned} $$(13)

P input , C ( k ) | 2 · P IC ( k ) P target ( k ) = P input , PM ( k ) · ( P target ( k ) P IC ( k ) ) , $$ \begin{aligned}&P_{\rm input, C}(k)\biggr |_{2 \cdot P_{\rm IC}(k) \ge P_{\rm target}(k)} = P_{\rm input, PM}(k) \cdot \left(\frac{P_{\rm target}(k)}{P_{\rm IC}(k)}\right), \end{aligned} $$(14)

with the same random seed and parameters, but shifted phases. With this new method, it is possible to provide complementary simulations for existing simulations. By averaging the results of these pairs, a significant reduction in the cosmic variance can be expected, which is similar to the results of the PF simulations. We call these pairs original-complementary (O–C) pairs. It is possible to generate initial conditions without a phase shift, and these are called original-complementary amplitude (O–CA) pairs.

3. Comparing the different simulation methods

To test the effects of the new initial-condition-generation techniques, we ran four sets of cosmological N-body simulations. A summary of the simulations is provided in Table 1. All simulations were run with GADGET-4 (Springel et al. 2021), and two had the Planck 2018 cosmological parameters (Planck Collaboration VI 2020), while two used the parameters of the Millennium run (Springel et al. 2005). In the Lbox = 260.0 Mpc h−1 and Lbox = 800.0 Mpc h−1 sets of simulations, there were a few modes where Eq. (10) was not satisfied: only one mode in the Lbox = 260.0 Mpc h−1 set and two modes in the Lbox = 800.0 Mpc h−1 series. To compare the power spectra of the different simulation techniques, we used the PF power spectrum as a reference in the Lbox = 260.0 Mpc h−1 and Lbox = 800.0 Mpc h−1 simulation sets, and calculated the

χ ν 2 ( z ) = 1 ν i ( P M ( k i , z ) P PF ( k i , z ) ) 2 σ 2 ( k i , z ) $$ \begin{aligned} \chi ^2_{\nu }(z) = \frac{1}{\nu }\sum \limits _i \frac{(P_{M}(k_i,z)-P_{\rm PF}(k_i,z))^2}{\sigma ^2(k_i,z)} \end{aligned} $$(15)

Table 1.

Parameters of simulations.

reduced χ2 for each M method, where ν is the total number of ki bins, ΔNm, i is the number modes per bin, and

σ ( k i , z ) = 2 Δ N m , i P ( k ) $$ \begin{aligned} \sigma (k_i,z) = \sqrt{\frac{2}{\Delta N_{\mathrm{m},i}}}P(k) \end{aligned} $$(16)

is the expected statistical error originating from the sample variance (Schneider et al. 2016). The choice of binning has a small impact on the calculated χ ν 2 (z) $ \chi^2_{\nu}(z) $ quantity, as the contribution of each bin in Eq. (15) is weighted by ΔNm, i. The calculated reduced chi-squared statistic as a function of the redshift is plotted in the top panel of Fig. 1. The same quantity was calculated for the L = 800 Mpc h−1 simulation set, and this can be seen in the bottom panel of the same figure. Although the original simulations in both sets were close to χ O 2 1 $ \chi^2_{\rm O}\simeq1 $ at early times, this value increased quickly as the matter field evolved. The power spectra from the P and O–CA simulations perform significantly better than the original simulations, but their χ2 values are still above 1 at a redshift of z = 0. As expected, the PM and O–C simulations perform best during these tests: the χ PM 2 $ \chi_{\rm PM}^2 $ and χ OC 2 $ \chi_{{\rm O}{-}{\rm C}}^2 $ values remain below 1 throughout the entire simulated redshift range. An additional visualization of the effect of the new method on the power spectrum is shown in Fig. 2, which shows the ratio of the O–C pair and the PF power spectrum for the L = 800 Mpc h−1 simulations with 1% and 1σ deviations. The complementary simulation method significantly reduces the cosmic variance of the power spectrum at all simulated redshifts, and has a sub-percent accuracy for all compensated modes, even at the largest resolved scales.

thumbnail Fig. 1.

Reduced chi-squared statistics of the power spectrum. If this quantity is close to one, the power spectrum of the given method is consistent with the PF method. While the original simulation becomes inconsistent with the cosmic average power spectrum at late times, the average power spectrum of the PM and O–C simulations is a good match to the PF results. We used all available k ≤ 1.5 Mpc h−1 modes when we calculated these χ ν 2 (z) $ \chi^2_{\nu}(z) $ functions.

thumbnail Fig. 2.

Ratio of the O–C and PF power spectra in the L = 800 Mpc h−1 simulation set. The red shaded regions show the ranges where uncompensated modes were present in the complementary simulation. Although these modes were not fully compensated in the average, we included these in the χ ν 2 (z) $ \chi^2_{\nu}(z) $ statistics plotted in Fig. 1.

The final simulation set contains a single O–C pair. Each simulation in the pair has L = 500 Mpc h−1 linear size with 10 billion particles and requires 0.74 million CPU hours to run. We used this set in Sect. 4 to measure the differences between two independent O–C realizations of the same cosmology. We call this simulation pair “NewMillennium”.

4. Complementary Millennium-run

To further demonstrate the effectiveness of the O–C pair method in reducing cosmic variance, we planned to run the complementary pair of the original Millennium run. This dark matter only TreePM simulation contains 21603 particles in a periodic box with a linear size of Lbox = 500 Mpc h−1, and follows the evolution of cosmic structures from redshift z = 127 to z = 0 with more than 10 000 time steps. The cosmological parameters are the following: Ωm = 0.25, Ωb = 0.045, h = 0.73, ΩΛ = 0.75, n = 1, and σ8 = 0.9. As using the same Lean-Gadget-2 code (Springel et al. 2005; Springel 2005) that was used to run the original simulation is not possible on modern systems, we chose to use the more recent Gadget-4 for this task. To estimate the effects of using a different simulation code, we re-simulated the small volume version of the Millennium run called “Milli-Millennium” with Gadget-4. We find a percent-level discrepancy in the power spectrum at the final state between the results of the LeanGadget-2 and Gadget-4 simulations. We conclude that these differences emerge from a restart of the original simulation, and from some unknown differences in the default setups for the transition between the particle mesh and tree force calculations. As we were unable to minimize the effects emerging from using different versions of the same code, we re-simulated the original Millennium run with Gadget-4. We used the resources of the Texas Advanced Computing Center (TACC) to run the Millennium simulation and its complementary pair.

During the initial condition creation of the complementary pair, we were able to compensate all modes of the original initial condition, because all ki bins satisfy Eq. (10). The mass distributions of both simulations are plotted in Fig. 3. The dimensionless power spectrum of both simulation and the estimated cosmic average power spectrum can be seen in Fig. 4. To further show that the new simulation method produces consistent results, we compared the power spectrum of the Millennium complementary pair with the average power spectrum of the NewMillennium simulation set in Fig. 5. Using the complementary pair, we estimated the bias of the power spectrum of the original Millennium run due to the initial sampling variance and mode coupling by calculating the weighted mean power spectrum ratio

W = k min < k i < k max Δ N m , i P mill ( k i ) / P OC ( k i ) k min < k i < k max Δ N m , i , $$ \begin{aligned} W = \frac{\sum \limits _{k_{\rm min}<k_i<k_{\rm max}} \Delta N_{\mathrm{m},i} P_{\rm mill}(k_i)/P_{\rm OC}(k_i)}{\sum \limits _{k_{\rm min} < k_i < k_{\rm max}}\Delta N_{\mathrm{m},i}}, \end{aligned} $$(17)

thumbnail Fig. 3.

Dark matter density field of the Millennium run (left) and its complementary pair (right) at z = 0 redshift. The bottom row is a zoom onto the region outlined by the red boxes in the figures in the top row. As the φ(k) phases are shifted by π in the initial condition, a region that collapses to a halo in the original Millennium run tends to expand into a void in the corresponding complementary pair and vice versa, which is similar to the paired simulation method.

thumbnail Fig. 4.

The Δ2(k) = P(k)k3/(2π2) dimensionless power spectrum of the Millennium run and its complementary pair at z = 0 redshift. The dashed line represents the shot-noise limit. We plot the linear power spectrum with a gray solid line for the different redshifts. The average dimensionless power spectrum of the pair initially matched this linear spectrum. The complementary pair compensates for the fluctuations around the linear input spectrum due to Rayleigh sampling at all scales initially.

thumbnail Fig. 5.

Estimated standard deviation (top) and bias (bottom) of the Millennium simulation and its complementary pair. We used the NewMillennium simulation pair as a reference. For this plot, we used 1100 wave number bins with Δk = 9 × 10−3h Mpc−1 bin size in 0.0125 h Mpc−1 < k < 10.0 h Mpc−1 range. While individually the two simulations show significant variance in this wave number range and binning, the average of the pair matches the independent NewMillennium average power spectrum with sub-percent accuracy.

where Pmill(k) is the Millennium power spectrum, and POC(k) is the averaged O–C power spectrum. We find that the original Millennium run, on average, underestimated the power spectrum by 0.997% for k ≤ 1.0 h Mpc−1 scales and by 0.0881% for 50 h Mpc−1 ≥ k > 1.0 h Mpc−1 wavenumbers at the z = 0 redshift.

While by itself the original simulation is not large enough to resolve the baryonic wiggles in the power spectrum due to the sample variance at the low-k modes, the average of the two new complementary simulations is able to effectively follow the evolution of these baryon acoustic oscillation (BAO) features, as it can be seen in Fig. 6 with the linear and estimated nonlinear spectrum calculated by Code for Anisotropies in the Microwave Background (CAMB; Lewis et al. 2000). We calculated similar results from the original simulation, but this was only achievable by rescaling the linear initial power spectrum by the estimated scale-dependent nonlinear growth function of the Millennium run.

thumbnail Fig. 6.

Power spectra of the dark matter density field in the Millennium run and its complementary pair at the BAO scales. All data points have been divided by a linear dark matter-only power spectrum. While the original Millennium simulation cannot resolve these scales by itself due to sample variance, the average spectrum of the original and complementary run can efficiently follow the evolution of the BAO features and matches well at the linear scales with the linear CAMB power spectra.

The new Millennium run and its complementary pair are available to the public on the SciServer platform1 hosted by the Institute for Data Intensive Engineering and Science at the Johns Hopkins University (Taghizadeh-Popp et al. 2020). We made all particle data, halo (Davis et al. 1985) and subhalo (Springel et al. 2001) catalogs, and power spectra available here.

5. Conclusions

  • 1.

    We reviewed the traditional initial condition generation method, and propose two new techniques for pairs of simulations with reduced cosmic variance: the paired-and-mean and the complementary simulation method.

  • 2.

    We compared the power spectrum calculated from the new methods with the paired-and-fixed method, and show that the paired-and-mean and original-complementary pairs produce similar results to the paired-and-fixed method.

  • 3.

    A covariance estimation is left to future work, but based on the fact that the initial amplitudes are not fixed in the new methods, we can expect more precise results than those achievable with the paired-and-fixed method.

  • 4.

    We show that complementary pairs for existing simulations can be generated, and the sample-variance errors of the original run can be estimated with this pair due to the fact that structures are evolving in the opposite way in the new simulation.

  • 5.

    To demonstrate the effectiveness of the original-complementary method, we generated the complementary pair of the Millennium-run. Using this new simulation, we show that the original simulation underestimates the power spectrum at all scales at the sub-percent level. The average power spectrum of these two simulations is able to directly resolve the BAO features of the power spectrum.

In this paper, we demonstrated that our new methods can effectively reduce the cosmic variance in N-body simulations. These new methods will be useful in making predictions for future surveys, testing cosmological models, and estimating errors of independent cosmological simulations.


Acknowledgments

GR’s research was supported by an appointment to the NASA Postdoctoral Program administered by Oak Ridge Associated Universities under contract with NASA. GR and AK were supported by JPL, which is run under contract by California Institute of Technology for NASA. This work was supported by the Ministry of Innovation and Technology NRDI Office grants OTKA NN 129148 and the MILAB Artificial Intelligence National Laboratory Program. IS acknowledges support from the National Science Foundation (NSF) award 1616974. The authors thank Volker Springel for significant help with the original and complementary Millennium initial conditions, and for assistance in the comparison of the different Gadget versions. We thank Gerard Lemson for making it possible to store the simulation data in the SciServer platform. The authors acknowledge the Texas Advanced Computing Center (TACC) at The University of Texas at Austin for providing HPC and visualization resources that have contributed to the research results reported within this paper, URL: http://www.tacc.utexas.edu

References

  1. Allgood, B., Blumenthal, G., & Primack, J. R. 2001, ArXiv e-prints [arXiv:astro-ph/0109403] [Google Scholar]
  2. Angulo, R. E., & Pontzen, A. 2016, MNRAS, 462, L1 [NASA ADS] [CrossRef] [Google Scholar]
  3. Angulo, R. E., Springel, V., White, S. D. M., et al. 2012, MNRAS, 426, 2046 [NASA ADS] [CrossRef] [Google Scholar]
  4. Baugh, C. M., & Efstathiou, G. 1994, MNRAS, 267, 323 [NASA ADS] [Google Scholar]
  5. Boylan-Kolchin, M., Springel, V., White, S. D. M., Jenkins, A., & Lemson, G. 2009, MNRAS, 398, 1150 [Google Scholar]
  6. Casarini, L., Bonometto, S. A., Borgani, S., et al. 2012, A&A, 542, A126 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  7. Chambers, K. C., Magnier, E. A., Metcalfe, N., et al. 2016, ArXiv e-prints [arXiv:1612.05560] [Google Scholar]
  8. Crocce, M., Pueblas, S., & Scoccimarro, R. 2006, MNRAS, 373, 369 [NASA ADS] [CrossRef] [Google Scholar]
  9. Crocce, M., Pueblas, S., & Scoccimarro, R. 2012, Astrophysics Source Code Library [record ascl:1201.005] [Google Scholar]
  10. Davis, M., Efstathiou, G., Frenk, C. S., & White, S. D. M. 1985, ApJ, 292, 371 [Google Scholar]
  11. DESI Collaboration (Aghamousa, A., et al.) 2016, ArXiv e-prints [arXiv:1611.00036] [Google Scholar]
  12. Doré, O., Bock, J., Ashby, M., et al. 2014, ArXiv e-prints [arXiv:1412.4872] [Google Scholar]
  13. Driver, S. P., & Robotham, A. S. G. 2010, MNRAS, 407, 2131 [Google Scholar]
  14. Falck, B., Wang, J., Jenkins, A., et al. 2021, MNRAS, 506, 2659 [NASA ADS] [CrossRef] [Google Scholar]
  15. Green, J., Schechter, P., Baltay, C., et al. 2012, ArXiv e-prints [arXiv:1208.4012] [Google Scholar]
  16. Hamilton, A. J. S., Rimes, C. D., & Scoccimarro, R. 2006, MNRAS, 371, 1188 [Google Scholar]
  17. Harnois-Déraps, J., Giblin, B., & Joachimi, B. 2019, A&A, 631, A160 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  18. Heitmann, K., Finkel, H., Pope, A., et al. 2019, ApJS, 245, 16 [NASA ADS] [CrossRef] [Google Scholar]
  19. Hockney, R. W., & Eastwood, J. W. 1988, Computer Simulation Using Particles (Bristol: Hilger) [Google Scholar]
  20. Jenkins, A. 2010, MNRAS, 403, 1859 [NASA ADS] [CrossRef] [Google Scholar]
  21. Jenkins, A., Frenk, C. S., White, S. D. M., et al. 2001, MNRAS, 321, 372 [Google Scholar]
  22. Klypin, A., & Holtzman, J. 1997, ArXiv e-prints [arXiv:astro-ph/9712217] [Google Scholar]
  23. Klypin, A. A., Trujillo-Gomez, S., & Primack, J. 2011, ApJ, 740, 102 [NASA ADS] [CrossRef] [Google Scholar]
  24. Klypin, A., Yepes, G., Gottlöber, S., Prada, F., & Heß, S. 2016, MNRAS, 457, 4340 [Google Scholar]
  25. Klypin, A., Prada, F., & Byun, J. 2020, MNRAS, 496, 3862 [NASA ADS] [CrossRef] [Google Scholar]
  26. Lewis, A., Challinor, A., & Lasenby, A. 2000, ApJ, 538, 473 [Google Scholar]
  27. LSST Science Collaboration (Abell, P. A., et al.) 2009, ArXiv e-prints [arXiv:0912.0201] [Google Scholar]
  28. Maddox, S. J., Sutherland, W. J., Efstathiou, G., & Loveday, J. 1990, MNRAS, 243, 692 [NASA ADS] [Google Scholar]
  29. Maksimova, N. A., Garrison, L. H., Eisenstein, D. J., et al. 2021, MNRAS, 508, 4017 [NASA ADS] [CrossRef] [Google Scholar]
  30. McBride, C., Berlind, A., Scoccimarro, R., et al. 2009, Am. Astron. Soc. Meet. Abstr., 213, 425.06 [NASA ADS] [Google Scholar]
  31. Moster, B. P., Somerville, R. S., Newman, J. A., & Rix, H.-W. 2011, ApJ, 731, 113 [Google Scholar]
  32. Percival, W. J., Baugh, C. M., Bland-Hawthorn, J., et al. 2001, MNRAS, 327, 1297 [Google Scholar]
  33. Planck Collaboration VI. 2020, A&A, 641, A6 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  34. Pontzen, A., Slosar, A., Roth, N., & Peiris, H. V. 2016, Phys. Rev. D, 93, 103519 [NASA ADS] [CrossRef] [Google Scholar]
  35. Potter, D., Stadel, J., & Teyssier, R. 2017, Computat. Astrophys. Cosmol., 4, 2 [NASA ADS] [CrossRef] [Google Scholar]
  36. Rimes, C. D., & Hamilton, A. J. S. 2006, MNRAS, 371, 1205 [NASA ADS] [CrossRef] [Google Scholar]
  37. Schneider, A., Teyssier, R., Potter, D., et al. 2016, J. Cosmol. Astropart. Phys., 2016, 047 [NASA ADS] [CrossRef] [Google Scholar]
  38. Sirko, E. 2005, ApJ, 634, 728 [NASA ADS] [CrossRef] [Google Scholar]
  39. Springel, V. 2005, MNRAS, 364, 1105 [Google Scholar]
  40. Springel, V. 2015, Astrophysics Source Code Library [record ascl:1502.003] [Google Scholar]
  41. Springel, V., White, S. D. M., Tormen, G., & Kauffmann, G. 2001, MNRAS, 328, 726 [Google Scholar]
  42. Springel, V., White, S. D. M., Jenkins, A., et al. 2005, Nature, 435, 629 [Google Scholar]
  43. Springel, V., Pakmor, R., Zier, O., & Reinecke, M. 2021, MNRAS, 506, 2871 [NASA ADS] [CrossRef] [Google Scholar]
  44. Taghizadeh-Popp, M., Kim, J. W., Lemson, G., et al. 2020, Astron. Comput., 33, 100412 [NASA ADS] [CrossRef] [Google Scholar]
  45. Tegmark, M., Blanton, M. R., Strauss, M. A., et al. 2004, ApJ, 606, 702 [Google Scholar]
  46. The Dark Energy Survey Collaboration 2005, ArXiv e-prints [arXiv:astro-ph/0510346] [Google Scholar]
  47. Tutusaus, I., Martinelli, M., Cardone, V. F., et al. 2020, A&A, 643, A70 [EDP Sciences] [Google Scholar]
  48. Valdarnini, R., & Borgani, S. 1991, MNRAS, 251, 575 [NASA ADS] [CrossRef] [Google Scholar]
  49. Villaescusa-Navarro, F., Naess, S., Genel, S., et al. 2018, ApJ, 867, 137 [NASA ADS] [CrossRef] [Google Scholar]
  50. Zel’dovich, Y. B. 1970, A&A, 5, 84 [NASA ADS] [Google Scholar]

All Tables

Table 1.

Parameters of simulations.

All Figures

thumbnail Fig. 1.

Reduced chi-squared statistics of the power spectrum. If this quantity is close to one, the power spectrum of the given method is consistent with the PF method. While the original simulation becomes inconsistent with the cosmic average power spectrum at late times, the average power spectrum of the PM and O–C simulations is a good match to the PF results. We used all available k ≤ 1.5 Mpc h−1 modes when we calculated these χ ν 2 (z) $ \chi^2_{\nu}(z) $ functions.

In the text
thumbnail Fig. 2.

Ratio of the O–C and PF power spectra in the L = 800 Mpc h−1 simulation set. The red shaded regions show the ranges where uncompensated modes were present in the complementary simulation. Although these modes were not fully compensated in the average, we included these in the χ ν 2 (z) $ \chi^2_{\nu}(z) $ statistics plotted in Fig. 1.

In the text
thumbnail Fig. 3.

Dark matter density field of the Millennium run (left) and its complementary pair (right) at z = 0 redshift. The bottom row is a zoom onto the region outlined by the red boxes in the figures in the top row. As the φ(k) phases are shifted by π in the initial condition, a region that collapses to a halo in the original Millennium run tends to expand into a void in the corresponding complementary pair and vice versa, which is similar to the paired simulation method.

In the text
thumbnail Fig. 4.

The Δ2(k) = P(k)k3/(2π2) dimensionless power spectrum of the Millennium run and its complementary pair at z = 0 redshift. The dashed line represents the shot-noise limit. We plot the linear power spectrum with a gray solid line for the different redshifts. The average dimensionless power spectrum of the pair initially matched this linear spectrum. The complementary pair compensates for the fluctuations around the linear input spectrum due to Rayleigh sampling at all scales initially.

In the text
thumbnail Fig. 5.

Estimated standard deviation (top) and bias (bottom) of the Millennium simulation and its complementary pair. We used the NewMillennium simulation pair as a reference. For this plot, we used 1100 wave number bins with Δk = 9 × 10−3h Mpc−1 bin size in 0.0125 h Mpc−1 < k < 10.0 h Mpc−1 range. While individually the two simulations show significant variance in this wave number range and binning, the average of the pair matches the independent NewMillennium average power spectrum with sub-percent accuracy.

In the text
thumbnail Fig. 6.

Power spectra of the dark matter density field in the Millennium run and its complementary pair at the BAO scales. All data points have been divided by a linear dark matter-only power spectrum. While the original Millennium simulation cannot resolve these scales by itself due to sample variance, the average spectrum of the original and complementary run can efficiently follow the evolution of the BAO features and matches well at the linear scales with the linear CAMB power spectra.

In the text

Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.

Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.

Initial download of the metrics may take a while.