-
PDF
- Split View
-
Views
-
Cite
Cite
Luke Conaboy, Ilian T Iliev, Anastasia Fialkov, Keri L Dixon, David Sullivan, Relative baryon-dark matter velocities in cosmological zoom simulations, Monthly Notices of the Royal Astronomical Society, Volume 525, Issue 4, November 2023, Pages 5479–5491, https://doi.org/10.1093/mnras/stad2699
- Share Icon Share
ABSTRACT
Supersonic relative motion between baryons and dark matter due to the decoupling of baryons from the primordial plasma after recombination affects the growth of the first small-scale structures. Large box sizes (greater than a few hundred Mpc) are required to sample the full range of scales pertinent to the relative velocity, while the effect of the relative velocity is strongest on small scales (less than a few hundred kpc). This separation of scales naturally lends itself to the use of ‘zoom’ simulations, and here we present our methodology to self-consistently incorporate the relative velocity in zoom simulations, including its cumulative effect from recombination through to the start time of the simulation. We apply our methodology to a large-scale cosmological zoom simulation, finding that the inclusion of relative velocities suppresses the halo baryon fraction by 46–23 per cent between z = 13.6 and 11.2, in qualitative agreement with previous works. In addition, we find that including the relative velocity delays the formation of star particles by ∼20 Myr on average (of the order of the lifetime of a ∼9 M⊙ Population III star) and suppresses the final stellar mass by as much as 79 per cent at z = 11.2.
1 INTRODUCTION
The cosmic microwave background (CMB) radiation carries an image of the Universe at the moment of recombination, when the first neutral atoms formed at zrec ≈ 1089. Prior to recombination, photons and baryons were tightly coupled and oscillated as a single plasma until they decoupled at zdec ≈ 1020. These oscillations, referred to as the baryon acoustic oscillations (BAO), are observed today as fluctuations of the CMB temperature (e.g. Planck Collaboration VI 2020). Acoustic oscillations in the baryons’ velocity at the moment of their decoupling lead to clumping in the distribution of baryons at later times, resulting in over and underdense regions. The initially tiny perturbations grew under the effect of gravity and are detected today in the distribution of galaxies on the largest cosmological scales (e.g. Alam et al. 2017).
Not only did the plasma oscillations lead to the BAO features in the post-recombination distribution of baryons, they also impacted the baryons’ velocities (Sunyaev & Zeldovich 1970). Tseliakhovich & Hirata (2010) were the first to point out that the BAO pattern is imprinted in the magnitude of the relative velocity between baryons and dark matter, because the latter was not coupled to the primordial plasma at the time of recombination. At decoupling, the relative velocity had a root-mean-square (RMS) of |$\langle v_{\rm bc}^2\rangle ^{\frac{1}{2}}\approx 30~\mathrm{km} \,\mathrm{s}^{-1}$|, or |$\sim 10^{-4}\, c$| with c the speed of light. There is a vast separation of scales relevant to the relative velocity. Over scales smaller than a few Mpc (the coherence scale), the relative velocity is roughly constant; however, box sizes greater than a few hundred Mpc are required to properly sample the relative velocity (see Fig. 1 of this work, and also fig. 1 in Tseliakhovich & Hirata 2010). At recombination the sound speed of the baryonic fluid dropped from being relativistic, |$\sim c/\sqrt{3}$|, to the thermal velocities of hydrogen atoms, ∼2 × 10−5 c, which is much smaller than the RMS value of vbc. Therefore, on average, at decoupling baryons were travelling with supersonic velocities relative to the underlying potential wells generated by dark matter haloes (Tseliakhovich & Hirata 2010). The relative velocity remained supersonic all the way down to z ∼ 15, sourcing shocks and entropy generation (Tseliakhovich & Hirata 2010; O’Leary & McQuinn 2012). The amplitude of the velocity field decayed with time as (1 + z), and thus the effect weakened as the Universe expanded. For instance, the signature of vbc in the low-z power spectrum of BOSS galaxies (Yoo & Seljak 2013; Beutler, Seljak & Vlah 2017) and the three-point correlation function of BOSS CMASS galaxies was found to be negligible (Slepian & Eisenstein 2015; Slepian et al. 2018).

RMS vbc at z = 200 as a function of box size, calculated by integrating the vbc power spectrum |$\Delta _{{v_{\rm bc}}}^2$| (computed for the cosmological parameters listed in Section 1) from 2π/L to 3365 h Mpc−1. The RMS vbc converges for L ≳ 400 h−1 Mpc, since |$\Delta ^2_{v_{\rm bc}}$| drops to zero at small-k, and so box sizes of this or larger are needed to capture all the relevant scales.
In the post-recombination Universe, growth of structure on large cosmological scales is generally described by linear perturbation theory, which follows the evolution of density and velocity fields to the leading order in perturbations. Despite being formally second-order contributions, terms that involve the supersonic relative velocity can actually be as large as the first order terms. Moreover, on scales below the coherence scale, vbc is position-independent and the second-order terms become effectively linear (Tseliakhovich & Hirata 2010). Using such a ‘quasi-linear’ approach, analytical methods were employed to explore implications of vbc in the cosmological context. Supersonic relative velocities modulate the abundance of minihaloes and their gas content on the BAO scale (e.g. Tseliakhovich & Hirata 2010; Tseliakhovich, Barkana & Hirata 2011; Fialkov et al. 2012; Ahn 2016; Ahn & Smith 2018), affecting fluctuations of the 21-cm signal of neutral hydrogen (e.g. Dalal, Pen & Seljak 2010; McQuinn & O’Leary 2012; Visbal et al. 2012; Fialkov et al. 2013; Cohen, Fialkov & Barkana 2016; Fialkov, Barkana & Cohen 2018; Muñoz 2019; Cain et al. 2020; Long, Givans & Hirata 2022; Muñoz et al. 2022).
Numerical simulations were used to explore non-linear effects of vbc on scales well-below its coherence scale. Such simulations typically employ boxes of several comoving Mpc or less and assume a position-independent velocity field. These simulations demonstrated that vbc suppresses formation of small dark matter haloes (Naoz, Yoshida & Gnedin 2012, 2013; O’Leary & McQuinn 2012), induces shocks (O’Leary & McQuinn 2012), affects the formation of first stars (e.g. Greif et al. 2011; Maio, Koopmans & Ciardi 2011; Stacy, Bromm & Loeb 2011; Schauer et al. 2019, 2021) and black holes (e.g. Hirano et al. 2017; Schauer et al. 2017), and may even influence shaping globular clusters (Naoz & Narayan 2014; Chiou et al. 2018, 2019, 2021; Druschke et al. 2020; Lake et al. 2021).
Finally, a hybrid approach was used to incorporate the non-linear effects into the large-scale cosmological picture by tiling regions of fixed vbc together (e.g. Visbal et al. 2012; Fialkov et al. 2013). In such studies, the distribution of vbc on scales larger than the ‘pixel’ size was generated from the corresponding density field using the continuity equation, while star formation in each ‘pixel’ was calibrated to numerical simulations (Greif et al. 2011; Maio et al. 2011; Stacy et al. 2011; Naoz et al. 2012, 2013). This method was applied to the 21-cm signal of neutral hydrogen revealing enhanced BAO patterns (Visbal et al. 2012; Fialkov et al. 2013).
To fully capture the non-linear effect of vbc in the cosmological context, it is necessary to properly include the velocity effect in the initial conditions (ICs) of N-body and hydrodynamical simulations. Such a task would require an accurate non-linear treatment of dark matter, baryons, and radiation, starting at zrec and following the growth of structure all the way down to the lowest simulated redshift. This treatment is not possible due to the large dynamical range: the amplitude of density fluctuations at recombination is smaller than the precision of many commonly used integration schemes. Today, state-of-the-art numerical simulations are typically initialized at zini ∼ 200 with fields that do not incorporate the effect of the relative velocity.
Recently, Ahn & Smith (2018) introduced a new cosmological IC generator bccomics, based on a code that solves the quasi-linear equations between zrec and zini for fixed values of large-scale density, δ, and vbc at decoupling (Ahn 2016). Next, the solver is applied to a larger cosmic volume divided in regions of fixed δ and vbc. The code simulates the growth of small-scale structure inside density peaks and voids, by treating each patch of fixed δ and vbc as a separate universe. They do this because the evolution equations from Tseliakhovich & Hirata (2010) are only valid at mean density, and Ahn (2016) found that structure formation was boosted (suppressed) in overdense (underdense) patches. They estimated the effect of vbc and δ on the abundance of small haloes and, in some cases, reported qualitative disagreement with prior works.
Here, we take an independent approach and develop a new ICs generator. Our approach differs from that of bccomics as, instead of treating small patches as separate universes, we follow small patches embedded in a larger cosmological volume through the use of zoom simulations. We compensate for the lacking effect of vbc between zrec and zini = 200 through the use of a bias factor, described in Section 3.3. After this compensation, the effect of vbc from zini = 200 is naturally included by the simulation, through initializing the simulations with separate transfer functions for the baryon and dark matter velocities. Unlike Ahn (2016), we do not account for the large-scale density environment, since our simulation focuses on a patch with very near to mean density and so we can safely ignore the impact on structure formation due to non-zero overdensity. Our methodology employs the widely used code music (Hahn & Abel 2011) to generate high-resolution ‘zoom’ ICs (Bertschinger 2001) in large cosmic volumes and by design is well-matched to AMR simulations. We demonstrate the performance by generating ICs in a 400 h−1 Mpc box before extracting a 100 h−1 Mpc subbox, which is used to run a simulation from zini = 200 to the final redshift of 11.2 with the AMR code ramses (Teyssier 2002). We explore the performance by computing the effects of vbc on the number of haloes formed, baryon fraction, and star formation.
The paper is organized as follows: in Section 2, we recap the theoretical background and discuss why large simulation box sizes are needed; in Section 3, we discuss the simulation setup and our methodology for incorporating the effect of the vbc through a scale-dependent bias parameter b(k, vbc); in Section 4, we present the results of a first demonstration of our methodology and discuss the findings in Sections 5 and 6. We present a comparison of our methodology to some previous works in Appendix A. Throughout this paper, we assume a flat ΛCDM cosmology consistent with the Planck 2018 results (Planck Collaboration VI 2020) with parameters: Ωm = 0.314, ΩΛ = 0.686, Ωb = 0.049, ns = 0.965, σ8 = 0.812, and h = 0.673.1
2 THEORY
In this section, we briefly review the relevant theoretical background, directing the reader to Fialkov (2014) and Barkana (2016) for more comprehensive reviews.
In the non-linear regime, the evolution of the density and velocity of baryons and dark matter is governed by:
where δb and δc are dimensionless perturbations in baryonic and dark matter densities, respectively, |$\boldsymbol { v}_{\rm b}$| and |$\boldsymbol { v}_{\rm c}$| are the velocities of baryonic and dark matter, respectively, a is the scale factor, |$H \equiv \dot{a}/a$| is the Hubble parameter, Φ is the gravitational potential, p is the baryonic pressure, and |$\bar{\rho }_{\rm b}$| and |$\bar{\rho }_{\rm m}$| are the average densities of baryons and total matter, respectively.
Following Tseliakhovich & Hirata (2010), we split the velocities into a coherent bulk motion, |$\boldsymbol {v}_{\rm bc}$| (of magnitude vbc), and random velocity perturbations, |$\boldsymbol {u}_{\rm b}$| and |$\boldsymbol {u}_{\rm c}$|, so that in the cold dark matter frame, the velocities can be written as |$\boldsymbol {v}_{\rm b} = \boldsymbol {v}_{\rm bc}+ \boldsymbol {u}_{\rm b}$| and |$\boldsymbol {v}_{\rm c} = \boldsymbol {u}_{\rm c}$|.
Though they are second-order terms, components involving |$\boldsymbol {v}_{\rm bc}$| are large for typical values of vbc at high redshifts. In addition, these terms become effectively first order on scales, where vbc is coherent. In this quasi-linear regime, perturbations in density (δb and δc) and velocities (|$\boldsymbol {u}_{\rm b}$| and |$\boldsymbol {u}_{\rm c}$|) evolve according to the following set of equations:
where |$\theta _i = a^{-1}\nabla \cdot {\boldsymbol {u}_i}$| is the velocity divergence in comoving coordinates (though contrary to Tseliakhovich & Hirata 2010, we work in the rest frame of the dark matter; see also the appendix of O’Leary & McQuinn 2012), δT is the fluctuation in the baryons’ temperature, kB is the Boltzmann constant, μ is the mean molecular weight, and mp is the mass of the proton. Both the baryon and dark matter density parameters Ωb and Ωc are functions of t (we drop the explicit dependence for clarity).
The importance of baryonic pressure for the growth of density modes was stressed by Naoz & Barkana (2005, 2007), which requires solving an extra equation to track fluctuations in the temperature δT. We follow Bovy & Dvorkin (2013) and Ahn (2016) in neglecting tracking fluctuations in photon density and temperature within the evolution equations, since they are sub-dominant at most of our scales and redshifts of interest. We then add the equation for the temperature fluctuations
to equations (2), where
and |$\bar{T}_\gamma =2.726\ {\mathrm{K}}/a$| is the mean photon temperature, xe(t) is the electron fraction out of the total number density, of gas particles at time t, |$\bar{T}$| is the mean gas temperature, |$\bar{\rho }_{\gamma ,0}$| is the mean photon energy density at z = 0, σT is the Thomson scattering cross-section for an electron and me is the mass of an electron. Both xe(t) and |$\bar{T}$| are calculated using recfast+ + (Seager, Sasselov & Scott 1999; Chluba, Vasil & Dursi 2010; Chluba & Thomas 2011). The ICs for δT are set as in Naoz & Barkana (2005) by requiring that |$\partial (\delta _T-\delta _{T_\gamma })/\partial t = 0$| at the initial redshift z = 1000, where |$\partial \delta _{T_\gamma }/\partial t$| is calculated from camb (Lewis, Challinor & Lasenby 2000). The above set of linearized equations can be solved using a publicly available code, e.g. cicsass (O’Leary & McQuinn 2012). We reimplement a python version of cicsass, which complements our methodology. In the current implementation, for simplicity, we ignore the directionality of |$\boldsymbol {v}_{\rm bc}$| when solving this set of equations, instead taking |$\boldsymbol {v}_{\rm bc}\cdot \boldsymbol { k}=v_{\rm bc}k~\mathrm{cos}\theta =v_{\rm bc}k$| (i.e. assuming |$\boldsymbol {v}_{\rm bc}$| is parallel to |$\boldsymbol {k}$|). Future implementations will take the directionality of |$\boldsymbol {v}_{\rm bc}$| into account.
Tseliakhovich & Hirata (2010) showed that most of the contributions to the variance of vbc come from scales between 0.005 and 0.5 h Mpc−1. In a similar fashion to Pontzen et al. (2020), we can compute the RMS vbc inside a box of size L by integrating the power spectrum of vbc fluctuations from the fundamental mode of the box kmin = 2π/L to infinity. The mean square vbc in a box of size L is given by
where |$\Delta _{{v_{\rm bc}}}^2$| is the dimensionless power spectrum of the vbc, taken from camb and, in theory, the upper limit kmax of the integral in equation (5) should be the maximum wavenumber of the box, dictated by the number of simulation elements. In practice, however, any upper limit kmax ≫ 0.5 h Mpc−1 is sufficient, since the vbc power spectrum drops off rapidly above this value. Fig. 1 shows the RMS vbc, calculated as the square root of equation (5), where the oscillatory nature of |$\Delta _{v_{\rm bc}}^2$| at low-k (cf. fig. 1 in Tseliakhovich & Hirata 2010) is clearly visible. From Fig. 1, we can see that even in a box size of 100 h−1 Mpc, we do not capture all of the scales relevant to vbc. The curve only begins to plateau around ∼400 h−1 Mpc, so using a box size smaller than this means that we may miss out on some of the effect, for example by not sampling extreme values of vbc. Simultaneously simulating this large-scale box and the very high-resolution zoom region needed to observe the effect would be computationally infeasible. In Section 3.2, we discuss our solution to this problem.
3 METHODS
3.1 Simulations
We follow the evolution of dark matter, gas, and stars in the cosmological context using ramses,2 which employs a second-order Godunov method to solve the equations of hydrodynamics. Gas states are computed at cell interfaces using the Harten–Lax–van Leer-contact Riemann solver, with a MinMod slope limiter. Dark matter and stars are modelled as a collisionless N-body system, described by the Vlasov–Poisson equations. Grid refinement is performed whenever a cell contains more than eight high-resolution dark matter particles, or has the equivalent amount of baryonic mass scaled by Ωb/Ωm. We allow the AMR grid to refine from the coarsest level ℓmin = 8 to the finest level ℓmax = 23, but in practice grid hold-back within ramses means that the finest level reached is ℓ = 21, corresponding to a maximum comoving resolution of 47.7 h−1 pc.3
Star formation is allowed whenever the gas density of a cell is greater than n⋆ = 1 cm−3 in units of the number density of hydrogen atoms and when the local overdensity is greater than 200 ρcr, where the latter condition prevents spurious star formation at extremely high redshift. We impose a polytropic temperature function with index g⋆ = 2 and |$T_0=1050\, \mathrm{K}$|, which ensures that the Jeans length is always resolved by at least eight cells. We do not rigorously calibrate the star formation parameters to reproduce any stellar mass–halo mass relation, since we are interested only in the differences between simulations. Star particles, which represent a population of stars, form with a mass of 108.0 h−1 M⊙. Supernova feedback is included using the kinetic feedback model of Dubois & Teyssier (2008), with a mass fraction ηSN = 0.1 and a metal yield of 0.1. We allow gas cooling and follow the advection of metals. We do not include molecular hydrogen in this simulation so, to attempt to compensate for this missing cooling channel, we initialize the zoom region with a metallicity of Z = 10−3 Z⊙, where Z⊙ = 0.02 in ramses.
3.2 ICs
As described in Section 2, large box sizes of |$\gtrsim 400~h^{-1} \mathrm{Mpc}$| are required in order to capture all of the scales pertaining to vbc. By performing calibration runs, we found that very high resolution (a cell size of |$\Delta x \lesssim 2~h^{-1} \mathrm{kpc}$|) is needed in the ICs in order to properly resolve the effect. To this end, we employ ‘zoom’ ICs, generating density and velocity fields at zini = 200 first in a 400 h−1 Mpc box using music (Hahn & Abel 2011). The ICs are refined from the base level ℓmin = 10 (10243) up to ℓ = 18 (262 1443 effective) in a cube of side length 543 h−1 kpc at the finest level. Such extremely high resolution is required because vbc suppresses structure formation on very small scales. We found that the resolution we used in this work is the minimum necessary to observe the effect of vbc, and using lower resolution largely misses the effect. Since the zoom region is very small compared to the box size, we use extra padding between zoom levels, increasing the number of padding cells on each side for each dimension from the typical value of 4 to 32. We use transfer functions from camb (Lewis et al. 2000), which gives distinct density and velocity fields for the baryons and dark matter.
In order to make the simulation tractable, we extract a 100 h−1 Mpc (ℓmin = 82563) base grid from the 400 h−1 Mpc (ℓmin = 10, 10243) box and use this as our coarsest level, meaning that the maximum refinement level in the zoom region also drops two levels from ℓ = 18 to ℓ = 16 (65 5363 effective). In principle, this methodological choice could introduce some error around the edges of the box due to using periodic boundary conditions with non-periodic ICs, though in practice we expect the impact of this to be negligible since we are concerned with a sub-h−1 Mpc region in the centre of the box. Additionally, these errors will be common between runs, so their effect will wash out when comparing between runs.
Table 1 details the sets of ICs used in this work. We selected a region for zoom-in with vbc, ini = 20.09 km s−1 at z = 200, corresponding to vbc, rec = 100.07 km s−1, or |$\sim 3.3\sigma _{v_{\rm bc}}$|, at recombination. The no vbc case is often used in cosmological simulations, for example when using transfer functions that do not have separate amplitudes for the baryon and dark matter velocity fields (in fact, it is the default behaviour for older versions of ramses, where the dark matter velocity field is used to initialize both the dark matter and baryon velocities). The vbc–ini case is where the simulation is initialized using separate transfer functions for the baryon and dark matter velocity fields, such as by generating ICs using music with transfer functions from camb. In this case, vbc is included from the start time of the simulation zini, but the effect of vbc on density and velocity perturbations between recombination and zini is missed. In the final, and most realistic, case, vbc–rec, we include the contributions from vbc across all z by computing a bias factor, which is applied to the ICs. The methodology for computing the bias factor is detailed in Section 3.3.
The sets of ICs used for the main zoom simulation. The columns list the name of each case, which velocity fields are used for the baryons (|$\boldsymbol {v}_{\rm b}$|), whether the baryon fields have been modified and the magnitude of vbc at z = 1000 (vbc, rec), and z = 200 (vbc, ini) in km s−1. If a value is present for vbc, ini, but not vbc, rec, then vbc is only included from the start time of the simulation.
Case . | |$\boldsymbol {v}_{\rm b}$| . | Modified? . | vbc, rec . | vbc, ini (km s−1) . |
---|---|---|---|---|
no vbc | |$\boldsymbol {v}_{\rm c}$| | No | 0.0 | 0.0 |
vbc–ini | |$\boldsymbol {v}_{\rm b}$| | No | 0.0 | 20.09 |
vbc–rec | |$\boldsymbol {v}_{\rm b}$| | Yes | 100.07 | 20.09 |
Case . | |$\boldsymbol {v}_{\rm b}$| . | Modified? . | vbc, rec . | vbc, ini (km s−1) . |
---|---|---|---|---|
no vbc | |$\boldsymbol {v}_{\rm c}$| | No | 0.0 | 0.0 |
vbc–ini | |$\boldsymbol {v}_{\rm b}$| | No | 0.0 | 20.09 |
vbc–rec | |$\boldsymbol {v}_{\rm b}$| | Yes | 100.07 | 20.09 |
The sets of ICs used for the main zoom simulation. The columns list the name of each case, which velocity fields are used for the baryons (|$\boldsymbol {v}_{\rm b}$|), whether the baryon fields have been modified and the magnitude of vbc at z = 1000 (vbc, rec), and z = 200 (vbc, ini) in km s−1. If a value is present for vbc, ini, but not vbc, rec, then vbc is only included from the start time of the simulation.
Case . | |$\boldsymbol {v}_{\rm b}$| . | Modified? . | vbc, rec . | vbc, ini (km s−1) . |
---|---|---|---|---|
no vbc | |$\boldsymbol {v}_{\rm c}$| | No | 0.0 | 0.0 |
vbc–ini | |$\boldsymbol {v}_{\rm b}$| | No | 0.0 | 20.09 |
vbc–rec | |$\boldsymbol {v}_{\rm b}$| | Yes | 100.07 | 20.09 |
Case . | |$\boldsymbol {v}_{\rm b}$| . | Modified? . | vbc, rec . | vbc, ini (km s−1) . |
---|---|---|---|---|
no vbc | |$\boldsymbol {v}_{\rm c}$| | No | 0.0 | 0.0 |
vbc–ini | |$\boldsymbol {v}_{\rm b}$| | No | 0.0 | 20.09 |
vbc–rec | |$\boldsymbol {v}_{\rm b}$| | Yes | 100.07 | 20.09 |
3.3 Bias factor
Using transfer functions that have distinct amplitudes for the baryon and dark matter velocity fluctuations naturally yields the vbc field at the start time of the simulation zini. First, we interpolate the dark matter particle velocities onto the same grid as the baryons, then take the difference of these two fields to calculate the magnitude as |$v_{\rm bc}= \left| \boldsymbol {v}_{\rm b}-\boldsymbol {v}_{\rm c} \right|$|. A 0.39 h−1 Mpc thick slice through the resultant vbc field is shown in Fig. 2.

A slice through the large-scale |$v_{\rm bc}=|\boldsymbol {v}_{\rm b}-\boldsymbol {v}_{\rm c}|$| field in the full 400 h−1 Mpc ICs at zini = 200. Each pixel corresponds to a cell width of 0.39 h−1 Mpc and the slice has a thickness of one cell width. Also shown (white square) is the position of the extracted 100 h−1 Mpc subbox, centred on the peak vbc in the ICs. The zoom region is located in the centre of the subbox. The colour shows the magnitude of the vbc at zini = 200, where light pink is high vbc and dark blue is low vbc.
With the vbc field in hand, we split our ICs into cubic patches, aiming for a patch extent of 0.5 h−1 Mpc, though the actual extent depends upon how many patches can be fit in each level of the grafic files. The size of these patches is chosen to be smaller than the scale over which vbc is coherent (Tseliakhovich & Hirata 2010). Within each patch, the average value of vbc is calculated and used as vbc in equations (2). The initial values for equations (2) are set using the transfer functions from camb at z = 1000, and the equations are integrated from z = 1000 to z = 200 using the lsoda ordinary differential equation solver. Equations (2) are solved for the average patch value of vbc and also for vbc = 0 km s−1, which yields power spectra for the baryon perturbations both with and without vbc. We use these power spectra to calculate a ‘bias’ factor at zini = 200 that depends both upon scale k and the magnitude of the relative velocity vbc
where the square root arises from P ∝ |δ2|. In Fig. 3, we show the bias factor for the baryon and dark matter densities (δb and δc) and velocities (vb and vc), computed for the average vbc in our zoom region. The strongest suppression is seen in the baryons and in particular the baryon density, while the dark matter is hardly affected. We do not expect the oscillatory features in b(k, vbc) at the very small scales to have much, if any, impact since the power spectrum of fluctuations in the baryon density contrast begins to fall rapidly for k ≳ 300 h Mpc−1, while for the velocity most of the power is at much larger scales. Ali-Haïmoud, Meerburg & Yuan (2014) also found oscillatory features in the small-scale baryon perturbations, and we have checked that we find similar oscillations for typical values of vbc and also find that increasing the magnitude of vbc increases the frequency of oscillations for the larger-scale (≳ 100 h Mpc−1) modes too. For a detailed study into the origin of these small-scale oscillations, we defer the reader to Ali-Haïmoud et al. (2014). This factor is then convolved with the Fourier transform of the corresponding patch of baryon overdensity
to give individual patches of biased overdensity |$\hat{\delta }_{\rm b}$|, which are then stitched together to generate the vbc–rec set of ICs. In this way, the bias factor compensates for the suppression of baryon perturbations between z = 1000 and zini that is missing if vbc is included only from zini. We only modify the baryons, since as discussed earlier, they are much more strongly affected than the dark matter, as can be seen from Fig. 3.

The bias factors |$b(k\, v_{\rm bc})$| at zini = 200 for the average vbc in the zoom region, scaled back to its value at recombination vbc, rec = 100.07 km s−1, which is a |$\sim 3.3\sigma _{v_{\rm bc}}$| value. We show b(k, vbc) for baryon and dark matter overdensities and peculiar velocities. These are the bias factors that are applied to the perturbations in the zoom region. Note how the perturbations in the baryon overdensity (dark blue, short-dashed) are strongly suppressed for k > 40 h Mpc−1, while the perturbations in the dark matter overdensity (dark red, long-dashed) are largely unaffected, to the few per cent level. Note that we show b(k, vbc) for the peculiar velocities for the full range of k, but the velocity field is dominated by large-scale (small-k) modes. Therefore, b(k, vbc) will have little if any impact on the small scales (large-k) of the velocity field.
We deal with the peculiar velocity field for the baryons in a similar way, by first converting the velocity divergence to peculiar velocities as |$\boldsymbol {v}_{\rm b}(k) = -{\rm i}a\boldsymbol {k}\theta _{\rm b}(k)/k^2$|. Note again that we do not include directionality when solving the evolution equations, and therefore, the bias factor is applied to each direction of |$\boldsymbol {v}_{\rm b}$| equally. In reality, there would be preferential directions for the bias factor, depending on the direction of |$\boldsymbol {v}_{\rm bc}$|, but we defer that implementation to future work.
Fig. 4 shows a 1.53 h−1 kpc thick slice through the highest resolution level of the zoom ICs directly from music (‘unmodified’, left-hand column) and after the bias factor b(k, vbc) has been applied (‘modified’, right-hand column). For δb (top row), the unmodified ICs contain a lot of small-scale structure, which is almost totally washed out after applying b(k, vbc). Most of what remains is in the form of lower amplitude, larger scale fluctuations. For vb, i (bottom rows),4 there is less small-scale structure to begin with, since the peculiar velocity fields are dominated by large scales. The effect of b(k, vbc) on vb, i is therefore much less striking than on the δb, with the main effect being smoothing and a slight reduction in amplitude.

Slices of the unmodified (left-hand column) and modified (through convolution with the bias factor, as in equation (7), right-hand column) baryon overdensity (top row), peculiar velocity in the x-direction (second row), y-direction (third row), and z-direction (bottom row) in the high-resolution zoom region, of side length 543 h−1 kpc. Each pixel corresponds to a cell width of 1.53 h−1 kpc and the slice has a thickness of one cell width. The effect of applying b(k, vbc), defined in equation (6), can be clearly seen in the baryon overdensity, in that it washes out the small-scale fluctuations. The effect is less pronounced in the peculiar velocities, which are dominated by large-scale modes.
3.4 Haloes
After the ICs have been correctly initialized with vbc, we can characterize the effect of vbc on structure formation, principally by exploring how haloes are affected. Haloes are identified using ahf (Gill, Knebe & Gibson 2004; Knollmann & Knebe 2009), which supports multiresolution data sets and calculates baryonic properties of haloes. In order to use ahf with a ramses data set, we use the supplied ramses2gadget tool to convert leaf cells of the AMR hierarchy into gas pseudo-particles placed at the centre of each cell. This conversion is a standard recipe in the analysis of AMR data sets (e.g. Wu et al. 2015) and allows us to conveniently assign gas to haloes. We ignore the internal energy of the gas and do not allow ahf to perform any unbinding, as this has been shown to remove most of the gas from subhaloes in a manner that is dependent upon the choice of halo finder (Knebe et al. 2013). We define the halo overdensity with respect to the critical density ρcr, such that the average density inside the halo is 200 ρcr.
Guided by the resolution study of Naoz & Barkana (2007), we perform our analysis on haloes that have ≥500 particles, as they found that this is the level at which the baryon fraction is resolved with a scatter of ∼20 per cent when compared to higher resolution simulations.
We only use haloes comprised entirely of high-resolution dark matter particles, since contaminant low-resolution particles can disrupt the dynamics of haloes (Oñorbe et al. 2014). Due to the small size of the zoom region, it is often the case that haloes, which were initially solely composed of high-resolution particles can become contaminated by low-resolution particles as the simulation progresses. If contaminated haloes are removed at each timestep, then haloes can ‘disappear’ if they become contaminated between one timestep and the next. To counter this effect, we generate merger trees using consistent-trees (Behroozi et al. 2013) and only keep haloes that have never been contaminated at any point in the simulation. Then, when exploring the effect on halo properties (such as when looking at their gas content), we go one step further and match haloes between the simulations. We do this using ahf’s MergerTree tool to correlate the particle IDs between each run. This allows us to isolate the effect on identical haloes, as opposed to also capturing the impact on the global population of haloes. The difficulties in exploring the impact on the global population of haloes (e.g. through the cumulative number of haloes) are explored in Section 4.1.
4 RESULTS
4.1 Halo abundances
Throughout this section, we calculate the cumulative number of haloes N(> M) as the number of haloes with a total mass greater than M and estimate the Poisson uncertainty on N(> M) for each case as |$\sqrt{N(\gt M)}$|. To begin with, we ignore the conditions described in Section 3.4, instead considering the cumulative number of all haloes formed in the simulation Nall(> M), shown in Fig. 5. Aside from a slight suppression in Nall(> M) for the vbc–rec case below 106 h−1 M⊙ at z = 14.2, the vbc–ini and vbc–rec cases are consistent both with each other and with the no vbc case at the 1σ level. Analysing the haloes in this fashion (i.e. by performing no cleaning on the catalogue) gives a picture of the global impact of vbc on halo abundance, however, this picture is inaccurate because a significant fraction of the haloes are contaminated by, or formed entirely of, lower-resolution particles, affecting the accuracy of their properties (see Section 3.4 for a discussion of contamination).

Ratio of the cumulative number of haloes Nall(> M) in the vbc–ini (pink short-dashed) and the vbc–rec (blue dotted) cases to the no vbc case at z = 14.2 (top), 12.6 (middle), and 11.2 (bottom). All the haloes found by ahf are included in Nall(> M). The shaded regions indicate the 1σ Poisson uncertainty on the ratio. Nall(> M) is broadly the same between all three sets of simulations, except for a suppression in the number of haloes with M < 106 h−1 M⊙ at z = 14.2 in the vbc–rec case compared to the no vbc case.
If we now apply the conditions described in Section 3.4, namely that we do not include in our analysis any haloes that are contaminated at any point in the simulation, we are left with a reduced catalogue. In Fig. 6, we show the cumulative number of haloes in this cleaned catalogue Nclean(> M), which shows a much more striking suppression of Nclean(> M) for the vbc–rec case and an apparent increase in the abundance of low-mass (M < 106 h−1 M⊙) haloes for the vbc–ini case at z = 11.2 (though still consistent with no difference to the no vbc case at the 1σ level).

As in Fig. 5, but this time Nclean(> M) includes only haloes that have been selected by the process detailed in Section 3.4. Selecting never-contaminated haloes in this fashion leads to the removal of an unequal and inconsistent number of haloes between each run – this leads to the odd behaviour of the vbc–ini curve, which jumps from a suppression to a boost in the number of haloes with M < 2 × 106 h−1 M⊙ between z = 12.6 and 11.2.
To highlight the effect of the cleaning procedure we also show the raw cumulative number of haloes at z = 14.2 and z = 11.2 in Fig. 7. The impact of the cleaning process described in Section 3.4 can be clearly seen in the bottom panel of Fig. 7, which shows the ratio of the cleaned catalogue to the full catalogue Nclean(> M)/Nall(> M). Comparing the different runs, it can be clearly seen that a different fraction of haloes is removed between each run at each of the times shown.

Cumulative number of haloes (top panel) for the raw catalogue Nall(> M) (solid) and the catalogue cleaned according to the prescription in Section 3.4 Nclean(> M) (long-dashed) and the ratio of Nclean(> M) to Nall(> M) (bottom panel) at each z. We show N(> M) at z = 14.2 (thin) and 11.2 (thick). From the top panel, it can be seen that Nall(> M) is very similar between all runs at each z shown, except for a slight suppression in the abundance of haloes in the vbc–rec case at z = 14.2. The huge reduction in the number of haloes after cleaning the catalogue is abundantly clear, as is the difference in fraction of haloes removed between each run.
4.2 Baryon fraction
We allow star formation in these runs, so the total baryon fraction of a given halo is defined as follows:
where Mg is the gas, M⋆ the stellar, and Md the dark matter mass in each halo. We upweight the best resolved (i.e. most massive) haloes by calculating the mass-weighted average baryon fraction as
and the associated mass-weighted standard deviation as
where the sum is over all haloes that satisfy the conditions in Section 3.4. Fig. 8 shows 〈fb〉M and associated 1σ errorbars as function of z. We show each z where ≥30 haloes have formed that satisfy the criteria in Section 3.4, starting from z = 13.6 where we are able to match 38 haloes between the three cases. The gas fraction is suppressed at all z for the vbc–ini and vbc–rec cases compared to the no vbc case. At earlier z, the suppression is stronger, though even by the final snapshot at z = 11.2, 〈fb〉M for both the vbc–rec and vbc–ini cases are not within 1σ of the no vbc case. Notably, at all z, 〈fb〉M in vbc–ini and vbc–rec cases are almost indistinguishable from, and certainly consistent with, one another.

Mass-weighted average baryon fraction fb as a function of redshift z, normalized to the cosmic mean Ωb/Ωm. The average is shown for all z where more than 30 haloes have formed. The errorbars show the 1σ standard deviation as calculated using equation (10). We find a suppression in both the |$\rm{v_{\rm bc}--ini}$| and |$\rm{v_{\rm bc}--rec}$| cases compared to the no vbc run, though between the two runs with vbc there is little difference.
4.3 Star formation
In Fig. 9, we show the cumulative M⋆ formed in the simulation, not accounting for mass loss due to supernovae, and the corresponding number of stellar particles N⋆, which each have a mass of 108.0 h−1 M⊙. In each case, all of the star particles in the simulation formed inside a single halo. In total, 29 star particles formed by z = 11.2 in the no vbc case, 10 in the vbc–ini case, and seven in the vbc–rec case. This hierarchy persists across all z, with more star particles having formed in the no vbc case than in the vbc–ini case and fewer still in the vbc–rec case.

Cumulative stellar mass M⋆ formed as function of redshift z. Also, shown is the corresponding number of stellar particles N⋆. Despite the small number of stars formed in this simulation, there is a clear hierarchy in how many stars each forms, with the no vbc run forming the most, followed by |$\rm{v_{\rm bc}--ini}$|, and then |$\rm{v_{\rm bc}--rec}$|. There is also a clear delay in the onset of star formation, which follows a similar trend, with the |$\rm{v_{\rm bc}--rec}$| run starting to form stars the latest.
In the following, all times quoted in Myr are measured relative to the Big Bang. To quantify how vbc impacts star formation in our simulations, we can calculate the delay in formation time of the nth star tn for each run with vbc compared to the no vbc run |$t_{n,\, \text{no}~v_{\rm bc}}$| as |$\Delta t_n = t_n-t_{n,\, \text{no}~v_{\rm bc}}$|. For the vbc–ini case, the smallest (largest) delay of 8.6 Myr (35.5 Myr) occurs for the formation of the fourth (second) star particle, while for the vbc–rec case we find a delay of 23.4 Myr (49.4 Myr) for the sixth (second) star particle to form.
Star formation in ramses (like in other simulation codes) is a stochastic process, hence the large fluctuations in delay times. We can reduce the impact this stochasticity has on our results by averaging over delay times, as opposed to considering the delay times for individual star particles. We find a mean delay time of 〈Δt〉 = 19.4 Myr and 34.9 Myr for the vbc–ini and vbc–rec cases, respectively.
5 DISCUSSION
To understand the perceived uptick in vbc–ini haloes in Fig. 6, we need to explore the raw cumulative number of haloes, shown in Fig. 7 at z = 14.2 and z = 11.2. The key point is that while only keeping haloes that are never contaminated ensures that haloes do not disappear between timesteps of the same run, it also means that different numbers of haloes will be removed between different runs at any given timestep. This discrepancy in the number of haloes removed is responsible for the apparent low-mass boost in the vbc–ini case, because over the mass range 3 × 105 < M h−1 M⊙ < 106 fewer haloes are removed in the vbc–ini case than in the no vbc case. Since the cumulative numbers of haloes are already very similar, removing a smaller number of haloes in the vbc–ini case manifests itself as a boost relative to the no vbc case, when in fact it is simply an artefact of the cleaning procedure.
Given the difficulties in extracting a sample of haloes that is both free from contamination and comparable between runs, we will not draw any quantitative conclusions on the impact of vbc on global properties like the number of haloes formed. We retain this discussion of the well-known impact of contamination and, crucially, the importance of verifying any mitigation techniques as it may prove helpful for other works employing zoom simulations.
Including vbc also significantly affects the baryon fraction fb, where we see that the mass-weighted baryon fraction 〈fb〉M is suppressed at all redshifts in both cases, with the suppression stronger at higher redshift. Even by z = 11.2, the vbc–ini and vbc–rec cases are still not in agreement with the no vbc case, though the difference between the two populations has decreased. Again, this is likely due to the decay in the magnitude of vbc, which allows the haloes to accrete more gas. Interestingly, 〈fb〉M is almost indistinguishable between the vbc–ini and vbc–rec cases, suggesting that including vbc from zini is sufficient to observe its impact on halo baryon fraction, though a larger sample is required to confirm this. The suppression in 〈fb〉M when vbc is included is in qualitative agreement with previous studies.
This decrement in baryon fraction for the vbc–ini and vbc–rec cases is reflected in the cumulative stellar mass formed, as fewer star particles formed in both cases than in the no vbc case. Not only do they form fewer star particles, they also start forming star particles later since the effect of vbc is to wash out the peaks (and troughs) in the baryon density contrast, meaning that it takes longer for gas to reach the densities required for star formation. The mean delay for forming star particles is 19.4 Myr for the vbc–ini case and 34.9 Myr for the vbc–rec case. From Schaerer (2002), we find that these delays are all of the order of the lifetime of a 9 M⊙ first-generation Population (Pop) III star, which has a lifetime of 20.02 Myr (table 3 in Schaerer 2002). More massive Pop III stars have even shorter lifetimes, for example a 120 M⊙ Pop III star lives for only 2.52 Myr. Pop III stars form from initially pristine gas, and their death pollutes their immediate surroundings with metals, introducing new cooling channels into the high-redshift Universe. Any delay in this introduction of metals will delay the transition between Pop III and Pop II (i.e. from metal-enriched gas), which can, for example, affect the 21-cm signal (Magg et al. 2022). In our case, though we do not form Pop III stars, chemical enrichment is still vitally important for star formation to get properly underway, particularly as all of the star particles form in the same halo.
Despite there being almost no difference in 〈fb〉M between the vbc–ini and vbc–rec cases at most redshifts, there is a clear hierarchy in the amount of stars formed – no vbc forms the most, vbc–ini forms fewer, and vbc–rec forms the least – albeit on the order of a few star particles. This effect is expected, since the bias factor washes out baryonic density peaks, and there are slightly more haloes (i.e. star formation locations) present in the vbc–ini case than in the vbc–rec case.
6 CONCLUSIONS
We have performed the first cosmological zoom simulations that self-consistently sample the relative baryon-dark matter velocity vbc from a large 400 h−1 Mpc box. This relative velocity naturally arises when simulations are initialized using transfer functions that have separate amplitudes for the baryon and dark matter velocities, and we have shown that a box roughly as large as this is required to properly sample all of the scales associated with the relative velocity. However, solely initializing simulations in this manner misses out on the effect of the relative velocities from z = 1000 to the start time of the simulation, zini. We developed a methodology that compensates for the effect of vbc on baryon density and velocity perturbations by computing a ‘bias’ factor b(k, vbc), which is convolved with the ICs. We verified that our methodology performs as expected by comparing to previous works (see Appendix A).
As a first demonstration of our methodology, we applied it to an extremely high-resolution zoom region in a 100 h−1 Mpc subbox, extracted from the main 400 h−1 Mpc box. The zoom region is centred on the region with the largest relative velocity in the 400 h−1 Mpc box, which has an RMS value of vbc = 100.07 km s−1 at z = 1000, corresponding to |$\sim 3.3\sigma _{v_{\rm bc}}$|. We find qualitative agreement with previous works, namely a reduction in the halo baryon fraction, a delay in the onset of star formation at high redshift, and a suppression of the final stellar mass. The strength of the effect decreases with redshift, but the two simulations still exhibit some differences by z = 11.2. We find that the delay in the onset of star formation is of the order of the lifetime of a ∼9 M⊙ Pop III star. We also test the effect of incorporating the bias factor by running a simulation that includes the relative velocity from the start time of the simulation only. In this case, we find that more stars are formed when compared to the simulation that includes the bias factor, but there is almost no change in the average baryon fraction, except at the earliest redshift. Due to the small size of our zoom region, the vast majority of haloes in our simulation are contaminated with low-resolution particles, and we are thus unable to draw any robust conclusions regarding the halo mass function.
Our code for producing these compensated ICs is publicly available,5 and we hope will be of use for studying this effect in the full cosmological context.
ACKNOWLEDGEMENTS
We thank the anonymous referee for constructive feedback, which improved this paper. LC thanks Antony Lewis and Joakim Rosdahl for helpful discussions. LC was supported by a Science and Technology Facilities Council studentship and acknowledges the indirect support of a Royal Society Dorothy Hodgkin Fellowship and a Royal Society Enhancement Award. ITI was supported by the Science and Technology Facilities Council (grant numbers ST/I000976/1 and ST/T000473/1) and the Southeast Physics Network. AF is supported by the Royal Society University Research Fellowship URF/R1/180523. This work used the DiRAC@Durham facility managed by the Institute for Computational Cosmology on behalf of the STFC DiRAC HPC Facility (www.dirac.ac.uk). The equipment was funded by BEIS capital funding via STFC capital grants ST/K00042X/1, ST/P002293/1, ST/R002371/1, and ST/S002502/1, Durham University and STFC operations grant ST/R000832/1. DiRAC is part of the National e-Infrastructure. The authors gratefully acknowledge the Gauss Centre for Supercomputing e.V. (www.gauss-centre.eu) for funding this project by providing computing time through the John von Neumann Institute for Computing (NIC) on the GCS Supercomputer JUWELS at Jülich Supercomputing Centre (JSC). We acknowledge that the results of this research have been achieved using the PRACE Research Infrastructure resource Galileo based in Italy at CINECA. We acknowledge PRACE for awarding us access to Beskow/Dardel hosted by the PDC Center for High Performance Computing, KTH Royal Institute of Technology, Sweden. This work made use of the following software packages: numpy (Harris et al. 2020), matplotlib (Hunter 2007), scipy (Virtanen et al. 2020), yt (Turk et al. 2011); ytree (Smith & Lang 2019), hmf (Murray, Power & Robotham 2013) and cmasher (van der Velden 2020).
DATA AVAILABILITY
The code for computing and applying the bias factor b(k, vbc) is available at https://github.com/lconaboy/drft. The data underlying this article will be shared on reasonable request to the corresponding author.
Footnotes
Wherever units are expressed in terms of h, it can be taken to be this value.
The version used here is commit aa56bc01 from the master branch. Note that older versions of ramses may not use separate fields for dark matter and baryon velocities by default.
Releasing higher levels of AMR grids at specified steps in scale factor (‘grid hold-back’) is a technique employed in ramses to ensure that the physical (as opposed to comoving) resolution remains roughly constant over an entire simulation, which is desirable for e.g. ensuring that cells at high redshift do not over-refine and end up containing too little mass to form stars. Snaith et al. (2018) performed a detailed study of the effects of grid hold-back on simulation properties, finding, among other results, that the sudden release of high-resolution grids can lead to spikes in the star formation rate. Our simulation reaches its highest refinement level ℓ = 21 before any star formation occurs, and so is not impacted by these grid hold-back effects on star formation.
Note that we show the vb for each direction for completeness, but the effect is independent of direction in our methodology.
When lengths and masses are quoted in units of h, we use h = 0.673 from our choice of cosmology.
The Naoz et al. (2012) simulations are actually initialized at zini = 199 but the vbc would only have decreased by 0.5 per cent in this time, so we ignore this difference.
References
APPENDIX A: COMPARISON TO PREVIOUS WORKS
We run a series of test simulations set up as in Naoz et al. (2012, 2013).6 The specific case shown here has a base resolution ℓmin = 9 (5123 dark matter particles and, initially, cells), in a 471.1 h−1 kpc periodic box. The simulations in Naoz et al. (2012, 2013) were performed using the SPH code gadget2 (Springel 2005), while we use the AMR code ramses. We allow the AMR grid to refine freely up to ℓmax = 14, corresponding to a maximum comoving resolution of 28.9 h−1 pc, comparable to the gravitational softening length of 45.8 h−1 pc comoving used in Naoz et al. (2012). We use our fiducial cosmology (Section 3.1), whereas Naoz et al. (2012) used a cosmology consistent with Komatsu et al. (2009) with parameters: Ωm = 0.28, ΩΛ = 0.72, Ωb = 0.046, h = 0.7,7 and a boosted σ8 = 1.4. We adopt the boosted σ8 = 1.4 as used in the original studies. We initialize the simulations at zini = 2008 both with and without a relative velocity of |$1.7\sigma _{v_{\rm bc}}=10~\text{km~s}^{-1}$| at zini. We also compute and apply the bias factor b(k, vbc) to the baryonic component of the ICs, while the Naoz et al. (2012) simulations are initialized by computing transfer functions, which explicitly include the effect of the vbc. Following Naoz et al. (2012), we set both of the velocity fields to that of the dark matter and apply the vbc to the x-component of the baryon velocity as follows:
Including the vbc in this manner is justified by the box size being much smaller than the coherence scale of the vbc. We do not allow star formation in these runs. Haloes are identified as described in Section 3.4, noting that although Naoz et al. (2012) define their halo overdensity with respect to the background matter density |$\bar{\rho }_{\rm m}$|, we are working in the period of matter domination so the difference will be small. While the final halo masses in Naoz et al. (2012) are defined using a spherical overdensity method, the initial halo finding is done using a friend-of-friends method, which could be susceptible to ‘overlinking’ (e.g. Davis et al. 1985), whereby disparate groups of particles are spuriously connected by a diffuse particle bridge. Their redefinition of the halo mass using the spherical overdensity method will go some way to alleviating the impact (if any) of overlinking.
To calculate the effect of the vbc, we compare to simulations without vbc, where the velocity field of the baryons is equal to that of the dark matter. In order to quantify this effect, we calculate the fractional difference of a quantity A as follows:
First, we look at the effect on the cumulative halo mass function N(> M), as in Naoz et al. (2012). Fig. A1 shows the decrement in N(> M) for the case with vbc compared to the case without, both for our simulations and for the Naoz et al. (2012) run. We see qualitatively similar behaviour, observing a decrement between ∼0 per cent and 50 per cent at all redshifts shown and for almost all masses.

The fractional difference ΔN in halo mass function N(> M) for the vbc, ini = 10 km s−1 case, calculated with equation (A2). We show ΔN at z = 25 (top), 19 (centre), and z = 15 (bottom) for our simulations (red solid) and for the Naoz et al. (2012) work (grey dashed). The shaded regions indicate the 1σ Poisson uncertainty on the ratio. At most masses we are consistent with Naoz et al. (2012), though there is some disagreement for M < 6 × 104 h−1 M⊙, which could arise because of the friends-of-friends algorithm used to initially find haloes in Naoz et al. (2012).
However, the overall shape of our ΔN is slightly different to Naoz et al. (2012); we match well below ∼3 × 105 h−1 M⊙ but show more relative suppression above this mass. This discrepancy is due, at least in part, to the different simulation codes used and the different white noise fields in the ICs. One further significant source of difference is the cosmologies used. Fig. A2 shows the difference expected at z = 15 by comparing the analytic Watson et al. (2013) N(> M) mass functions (magenta solid). From this, we would expect the Naoz et al. (2012) simulation to have ∼9 per cent more haloes with M > 3 × 105 h−1 M⊙. This increase in the number of haloes increases with mass and for M > 1 × 107 h−1 M⊙, we would expect ∼11 per cent more haloes in the Naoz et al. (2012) simulation. Indeed this is borne out by the simulations (cyan dashed), which show that the Naoz et al. (2012) simulations do produce more haloes at all masses. At higher masses, ΔN diverges as the absolute number of haloes becomes small. As discussed earlier, Naoz et al. (2012) use the friends-of-friends groups as a starting point, which could be a source of the high-mass discrepancy in Fig. A2.

Comparison of the fractional difference ΔN in halo mass function N(> M) between our simulations and the simulations from Naoz et al. (2012) (cyan short-dashed) and between the Watson et al. (2013) curve, which is fit to N-body simulations, for the cosmology used in our work and the one used in Naoz et al. (2012) (magenta solid). The fractional difference is calculated as ΔN = (N1 − N0)/N0, where N0 are the data corresponding to our work and N1 to Naoz et al. (2012), so ΔN > 0 means there are more haloes in Naoz et al. (2012). Neither run includes vbc. The shaded cyan region indicates the combined 1σ Poisson uncertainty on N(> M) from the simulations. For M ≲ 4 × 106 h−1 M⊙ the difference in N(> M) between the simulations is mostly consistent with the expected difference due to cosmology and halo mass definitions (i.e. the difference between the Watson et al. 2013 curves). Potential sources of the high-mass (M ≳ 4 × 106 h−1 M⊙) discrepancy are discussed in the text.
Next, we turn our attention to the gas fraction of haloes, as studied in Naoz et al. (2013). Since we do not include star formation in these runs, the baryon fraction is simply the halo gas mass divided by the total halo mass as follows:
Fig. A3 shows the binned gas fractions (top panel) for our and for the Naoz et al. (2013) simulations, each normalized to the cosmic mean Ωb/Ωm for the appropriate cosmology, and the decrement (bottom panel) as defined in equation (A2). We take the mid-point of the mass bin to be the mean of all the mass values in that bin. The binned gas fractions for Naoz et al. (2013) are slightly higher than in this work, though they exhibit roughly the same mass dependence. The agreement between the two simulations for the decrement is striking – they have an extremely similar mass dependence. There is some difference in the binned baryon fractions, in particular we find slightly more suppression at lower masses. This is likely due to differences in code used since, as mentioned previously, Naoz et al. (2013) used gadget2 (Springel 2005), where we use ramses. There are well-documented differences between Lagrangian (e.g. SPH) and Eulerian (e.g. AMR) codes (e.g. Agertz et al. 2007), and indeed it has been shown that numerical diffusion due to baryon-grid relative velocities can artificially smooth densities in Eulerian codes (Pontzen et al. 2020). In any case, we are not interested in comparing the merits of different codes, so by calculating the difference between the runs with and without vbc, we can remove artefacts due to the choice of code.

Binned baryon fraction fb (top panels) and relative fractional difference |$\Delta _{f_{\rm b}}$| between each run with vbc to the run without, calculated with equation (A2) (bottom panels). We show data from our simulations (red triangles, points, and plusses) and from the Naoz et al. (2013) work (grey squares, stars, and crosses). The panels show z = 25 (left-hand panel), 19 (centre panel), and 15 (right-hand panel). The errorbars indicate the 1σ standard deviation in each mass bin (top panels) and the combined 1σ uncertainty (bottom panels). We find excellent agreement in the relative difference between our work and Naoz et al. (2013), and broad agreement in the absolute value of fb. Some slight disagreement in the absolute value could be due to the different choice of simulation methodology, since we employ an Eulerian code where Naoz et al. (2013) use a Lagrangian code.