22.2 Using the Cosmology unit

To include cosmological expansion in your FLASH executable, include the line

REQUESTS physics/Cosmology/
in your setup's Config file. At present the Cosmology unit in FLASH4 is built around the MatterLambdaKernel. This kernel assumes the contribution of radiation to be negligible in comparison with those of matter and the cosmological constant.

The runtime parameters available with the Cosmology unit are described in Table 22.1. Note that the total effective mass density is not explicitly specified but is inferred from the sum of the OmegaMatter, OmegaRadiation, and CosmologicalConstant parameters. The MaxScaleChange parameter sets the maximum allowed fractional change in the scale factor $ a$ during a single timestep. This behavior is enforced by the Cosmology_computeDt routine. The default value is set to the system's HUGE value for a double precision real floating point value to avoid interfering with non-cosmological simulations.


Table 22.1: Runtime parameters used with the Cosmology unit.
Parameter Type Default Description
useCosmology BOOLEAN .true. True if cosmology is to be used in this simulation
OmegaMatter REAL 0.3 Ratio of total mass density to critical density at the present epoch ($ \Omega_m$)
OmegaBaryon REAL 0.05 Ratio of baryonic (gas) mass density to critical density at the present epoch; must be $ \le$ OmegaMatter ($ \Omega_b$)
CosmologicalConstant REAL 0.7 Ratio of the mass density equivalent in the cosmological constant to the critical density at the present epoch ( $ \Omega_\Lambda$)
OmegaRadiation REAL $ 5\times 10^{-5}$ Ratio of the mass density equivalent in radiation to the critical density at the present epoch ($ \Omega_r$)
HubbleConstant REAL $ 2.1065\times 10^{-18}$ Value of the Hubble constant $ H_0$ in sec$ ^{-1}$
MaxScaleChange REAL HUGE(1.) Maximum permitted fractional change in the scale factor during each timestep


The MatterLambdaKernel supplies a number of functions and routines that are helpful in initializing, performing, and analyzing cosmological simulations. They should be accessed through the wrapper functions shown below.