Skip to content

Initial conditions

For exact parameter defaults, list completion, precedence, and validation rules, see Initial conditions and particles.

Basic generator

The basic generator creates initial data on the fly from linear transfer functions and a homogeneous particle template. It supports CDM, optional particle baryons, and non-CDM species.

The normal workflow is:

  1. Choose a supplied or custom Gadget-2 particle template.
  2. Set a tiling factor for each particle ensemble.
  3. Provide synchronous-gauge CLASS transfer functions through Tk file, or link CLASS and compute them on the fly.
  4. Set the primordial spectrum and cosmological parameters.
  5. Generate the particle displacement and momentum fields.

Use correct displacement = yes only with templates whose discrete symmetries are compatible with the simulation lattice.

Fixed-amplitude realisations

Compile with -DFIXED_ICS to generate fixed-amplitude, random-phase realisations with the basic IC generator. For each independent Fourier mode, the usual Box-Muller radial draw is replaced by \(\sqrt{2}\), while the random phase and PRNG sequence are retained:

\[ \sqrt{-2\ln U_1}\,e^{2\pi i U_2} \quad\longrightarrow\quad \sqrt{2}\,e^{2\pi i U_2}. \]

The \(\sqrt{2}\) amplitude preserves the Gaussian ensemble-average mode power. Fixed amplitudes suppress finite-volume sample variance, particularly at low wavenumber, but alter higher-order statistics. FIXED_ICS does not construct an opposite-phase paired realisation; paired runs require a separate phase shift in the IC workflow.

CLASS transfer functions

The basic generator expects synchronous-gauge transfer functions and converts the initial particle data to the gauge used by the simulation. A supplied transfer table must cover all Fourier scales present in the simulation.

When compiled with HAVE_CLASS, omit Tk file to run CLASS through its library interface. The gevolution settings file can also contain CLASS parameters; each parser ignores parameters it does not use.

If both mPk file and Tk file are present, the current parser selects mPk file. This forces baryon treatment = ignore and loses species-dependent transfer amplitudes and velocity information; prefer the CLASS interface or a synchronous-gauge Tk file.

Reading from disk

IC generator = read from disk loads particle data and optional metric fields. For relativistic simulations, particle phase-space coordinates must use Poisson gauge. Newtonian runs require appropriate Newtonian/N-body-gauge input.

When metric file is omitted, the current reader derives the initial \(\phi\) from the particle distribution using a linearised constraint. Disk input and legacy restart-style metadata are described in the detailed reference.

The express reader uses the disk-reading path with a specialised fast-input flag. Validate input counts, units, gauge, redshift, and field resolution before a production run.

Unsupported and optional generators

Generator gevolution 2.0 status
basic Supported
read from disk Supported
express Supported specialised reader
prevolution Removed
FalconIC Removed
LTB / spatial-curvature generator Not included in the GPU code
RELIC / second-order input Compile-time optional; not production-supported by default

Validation checks

  • Re-run a small case with identical seed and settings.
  • Confirm the initial power spectra against CLASS inputs.
  • Check particle counts and species density parameters.
  • Inspect maximum initial displacement and velocity messages.
  • Confirm the transfer table reaches beyond the simulation's maximum wavenumber.
  • Compare GR and Newtonian initial quantities using the intended gauge conventions.