Available simulations for cosmological analyses

Yuuki Omori (KICP/UChicago)

mm-wave Universe 06/25/2025

Yuuki Omori (U.Chicago/KICP)

CosmoForward -- 02/10/26

Why do we need simulations?

  • Covariance
    • Real surveys have complex geometries (e.g., survey boundaries, masks) and instrumental systematics may be difficult to write down analytically.
    • Computing the covariance matrix for multiple probes, including cross-correlations, is analytically challenging due to the complex, interconnected nature of these signals.
       
  • Map validation & comparison with data
    • High-fidelity simulations needed for comparison with data.
       
  • As a modeling tool 
    • Nonlinear structure prediction.
    • Many realizations with varied cosmological/astrophysical parameters which are then interpolated (i.e., emulators).
       
  • For visualization

Types of cosmological simulations

Gaussian/lognormal map realizations

Fast approximate 

particle mesh

 Gravity-only N-body

Hydrodynamical

Computational

cost

Types of cosmological simulations

Gaussian/lognormal realizations

  • Gaussian simulations:
    • the fields are drawn so that their two-point statistics match a prescribed set of angular power spectra.
    • Simple and fast to generate.
  • Lognormal simulations:
    •  
    • Preserves large-scale correlations but enforces positivity of densities
    • Captures key non-Gaussian features: positive skewness, enhanced high-density tails.
    • Still simple and fast to generate.
  • Codes that do this: FLASK/GLASS
    • Supports galaxies, shear, convergence, and CMB fields

    • Widely used by CMB & LSS mock challenges.

X\equiv e^{Z}−\lambda,\ Z\sim\mathcal{N}(\mu,\sigma^{2})

Krause et al. 2017

Tessore et al .2023

Gravity-only N-body simulations

 

  • Dark matter is represented by particles interacting only via gravity.

  • Forces are evaluated with hierarchical tree (or TreePM) methods rather than purely grid-based schemes, enabling high force resolution into the nonlinear regime.

  • Computationally expensive, but conceptually simple: evolve only the collisionless gravitational dynamics, and scale efficiently to large volumes and particle counts.

  • Galaxies are added in post-processing via flexible galaxy–halo connection models (HOD, SHAM, semi-analytic models, or related prescriptions).

  • The workhorse simulation approach for precision cosmology.

Hydrodynamical simulations

  • In addition to gravitational forces, solves fluid equations governing gas pressure, shocks, cooling, and heating.
  • Incorporates subgrid prescriptions for unresolved physics such as star formation, supernova feedback, AGN feedback, and radiative cooling, which are calibrated to reproduce key observables (e.g., stellar mass functions, galaxy sizes).
  • Produces realistic galaxy populations with observable properties (luminosities, colors, morphologies, gas fractions) directly from the simulation.
  • Significantly more expensive than dark matter only runs, limiting them to smaller volumes and/or lower resolution (difficult to span large parameter space).

Frontiere et al. 2025

Approximate PM simulations

  • Solve gravity on a grid, where resolution is set by the mesh cell size.
    • Computationally much cheaper, but lose accuracy on small scales.
  • Newer codes written with automatic differentiation (i.e., in JAX)
    •  Every operation from initial conditions to final density field differentiable with respect to input cosmological parameters and/or initial conditions.
    • Enables gradient-based inference: cosmological parameters and high-dimensional initial condition fields can be optimized or sampled (e.g., via Hamiltonian Monte Carlo).

Approximate PM simulations

  • Solve gravity on a grid, where resolution is set by the mesh cell size.
    • Computationally much cheaper, but lose accuracy on small scales.
  • Newer codes written with automatic differentiation (i.e., in JAX)
    •  Every operation from initial conditions to final density field differentiable with respect to input cosmological parameters and/or initial conditions.
    • Enables gradient-based inference: cosmological parameters and high-dimensional initial condition fields can be optimized or sampled (e.g., via Hamiltonian Monte Carlo).
\sim1s

Novel approach of using the pixel values of a given map as a data vector instead of relying on summary statistics (powerful for studying late-time Universe).
 

 

Sampling (HMC/NUTS)

\equiv

Simulation

Sampled parameters

Compare model map with data map d

Output map     model

Field-level inference

Extremely powerful but also challenging !

Millea et al. 2021

(Explicit inference)

\mathcal{O}(10^4)\ {\rm simulations}
\theta_{1}
\theta_{2}
\theta_{3}

.....

\Omega_{\rm m}
S_{\rm 8}
  • This can be done using full-body simulation (although computationally heavy).
  • Sampling much easier compared to explicit inference.
  • Seems to work but somewhat of a blackbox.
    • Always a question of optimality in the compression step.

Gatti et al. 2023

d

Field-level inference

(Implicit inference)

AI/ML assisted maps

Density field generation using conditional flow matching (work by Kevin Hong)

See also Han et al. 2021

Raw simulations to observables

CMB observables

  • Observables we are interested in:
    • CMB lensing 
    • tSZ
    • kSZ
    • CIB
    • radio
    • CO/CII
    • reionization
    • Galactic dust
y(\hat n)=\frac{\sigma_{\rm T}}{m_{\rm e}c^2}\int_{\rm LOS} dl\ P_{\rm e}
\left(\frac{\Delta T}{T}\right)_{\rm kSZ}=-\frac{\sigma_{\rm T}}{c}\int_{\rm LOS} dl\ n_{\rm e}\ v_{\rm LOS}
\bold{A}_{k}=I-\sum_{i}^{k-1}\frac{D_{ik}}{D_{k}}\bold{U}_{i}\bold{A}_{i}
L_{(1+z)\nu} (M,z) = L_{0} \Phi(z)\Sigma(M,z)\Theta[(1+z)\nu,T_{\rm d}(z)]
\Sigma(M,z)=\frac{M}{(2\pi\sigma_{L/M})^{1/2}}\exp \left[ - \frac{ (\log_{10} M - \log_{10} M_{\rm M_{\rm eff} }) }{2\sigma_{L/M}^{2}} \right]
\Phi(z)=(1+z)^{\delta_{\rm CIB}}
\Theta(\nu,z) \propto \begin{cases} \nu^{\beta} B_{\nu}(T_{\rm d}) \nu<\nu_{0}\\ \nu^{-\gamma} \nu\geq\nu_{0} \end{cases}

Raytracing:

Born:

P_e(M_{\rm vir}, r) = \frac{\rho_{\rm gas}(M_{\rm vir}, r)}{m_p\,\mu_e} k_B\,T_{\rm gas}(M_{\rm vir}, r)
n_e(M_{\rm vir}, r) = \frac{\rho_{\rm gas}(M_{\rm vir}, r)}{m_p\,\mu_e}
L_{\rm IR} = \frac{\mathrm{SFR}} {K_{\rm IR} + K_{\rm UV}\,10^{-\log_{10}\!\bigl(\mathrm{IRX}(M_\ast)\bigr)}}
\Phi(\nu, T_d) = \begin{cases} \left[\exp\!\left(\dfrac{h\nu}{k_B T_d}\right) - 1\right]^{-1} \,\nu^{\beta_d+3}, & \nu \le \nu', \\[6pt] \left[\exp\!\left(\dfrac{h\nu'}{k_B T_d}\right) - 1\right]^{-1} \,\nu'^{\beta_d+3} \left(\dfrac{\nu}{\nu'}\right)^{-\alpha_d}, & \nu > \nu'. \end{cases}
T_d = A_d \left( \frac{L_{\rm IR}}{M_{\rm dust}} \right)^{\frac{1}{4+\beta_d}}

CMB observables

  • Just implementing the astrophysical components is not enough.
  • We need to pass the real through real analysis pipelines to make sure that sims are correct. 

Omori 2024

LSS observables

  • Observables we are interested in:
    • Source galaxy shapes (galaxy weak lensing): 
      • Via raytracing like CMB lensing.
    • Lens galaxies:
      • Cardinal (DES): subhalo abundance matching (SHAM) including orphan galaxies and mass-dependent scatter, plus improved color assignment and small-scale lensing treatment.
      • CosmoDC2/SkySim5000 (Rubin): resampling galaxies from MDPL2 whose galaxy properties come from UniverseMachine (an observation-calibrated empirical galaxy-halo model) + enriching photometric properties using a Galacticus library. 
      • Flagship (Euclid): populates halos with galaxies using HOD + abundance matching, calibrated to observed correlations and basic galaxy properties, (fluxes/SEDs, sizes/shapes, redshifts).
    • Galaxy clusters:
      • Requires accurate colours.

Summary

  • Cosmological simulations serve multiple roles: covariance estimation, map validation, forward modelling, and visualization.
     
  • A hierarchy of simulation approaches exists, trading computational cost for physical accuracy: Gaussian/lognormal realizations → approximate PM → gravity-only N-body → hydrodynamical.
     
  • Gravity-only N-body simulations remain the workhorse for precision cosmology, with flexible post-processing (HOD, SHAM) to connect dark matter halos to observable CMB foregrounds & galaxies.
     
  • Translating raw simulations into realistic observables (CMB lensing, tSZ, kSZ, CIB, galaxies) requires extensive astrophysical modelling, calibration though data and validation through real analysis pipelines.
     
  • No single simulation meets all needs (yet).