Skip to content

Simulation and solver settings

Mesh and time stepping

Parameter Default Behaviour
boxsize required Comoving box length in Mpc/h. Must be positive.
Ngrid required Mesh points per dimension. Spatial resolution is \(\Delta x=\mathtt{boxsize}/\mathtt{Ngrid}\).
Courant factor 1 Global gravity time step in grid units, \(\Delta\tau/\Delta x\).
time step limit 1 Maximum \(\Delta\tau\) in units of the current Hubble time; overrides the Courant step when smaller.
move limit Ngrid before domain clamping Maximum grid cells a non-CDM particle may move per particle update.

The current process layout additionally requires:

n >= 2
m >= 2
Ngrid % n == 0
(Ngrid / m) % 2 == 0

Startup validation also requires the launched rank count to equal n * m. These checks run before large simulation allocations.

Courant factor, time step limit, and move limit must be finite and strictly positive. Zero values are rejected because they can cause division by zero or a simulation that never advances.

CDM and baryons have no separate particle Courant criterion. Non-CDM updates are subdivided as needed to satisfy move limit, but the metric remains at the global gravity time resolution. At runtime, move limit is also capped so particles cannot cross farther than an adjacent local domain.

Gravity solver

Parameter Default Behaviour
gravity theory GR GR evolves the weak-field relativistic system; Newton evolves Newtonian equations while retaining relativistic diagnostics and outputs where implemented.
vector method parabolic Selects parabolic or elliptic computation of the vector metric perturbation.
relaxation redshift initial redshift Above this redshift the frame-dragging force is omitted from particle dynamics.

The parabolic vector method is faster and is the default. Rapidly varying or relativistic sources can cause convergence or stability problems. The elliptic method uses the momentum constraint and requires an additional particle-mesh projection.

A build with CHECK_B computes the alternative vector solution for diagnostics only; it does not change which solution drives the dynamics.

Radiation and additional fluids

Parameter Default Behaviour
radiation treatment background only CLASS enables linear perturbations; background or ignore retains only background evolution.
fluid treatment background only CLASS enables linear perturbations of the additional fluid; background omits them.
switch delta_rad 0 Below this redshift, linear ultra-relativistic density perturbations are ignored.
switch delta_ncdm per-species Above each value, use CLASS linear density; below it, use the particle projection.
switch B ncdm corresponding switch delta_ncdm Below each value, use the species' particle curl source; above it, omit that contribution to avoid shot noise.
switch linear chi gravity/species dependent Above this value, use linear radiation/non-CDM contributions to \(\chi\); below it, use non-CDM particles and omit ultra-relativistic contributions.

CLASS choices require HAVE_CLASS. Without CLASS, requested linear treatments fall back to background-only with a warning. Supplying independent Tk file or mPk file data while using CLASS linear radiation or fluid perturbations can create inconsistent realisations; calling CLASS directly is recommended.

For switch delta_ncdm, omitted values default to initial redshift for species with a particle ensemble and 0 for species without one. If a provided list is short, its last value is repeated. switch B ncdm follows the same list-repetition rule.

In GR, an omitted switch linear chi begins at 0 and is raised to the largest non-CDM density-switch redshift. In Newtonian mode it begins at 0.011, is similarly raised, and any explicitly supplied value at or below 0.01 is corrected to 0.011.

CLASS fluid range

CLASS is not designed to provide fluid transfer functions beyond redshift zero. This can also affect interpolation around \(z=0\) in builds using EXACT_OUTPUT_REDSHIFTS.