Cosmology Functions

A class that provides various cosmological functions. The background cosmology describes the evolution of an isotropic, homogeneous Universe within which our calculations are carried out. For the purposes of Galacticus, the background cosmology is used to relate expansion factor/redshift to cosmic time and to compute the density of various components (e.g. dark matter, dark energy, etc.) at different epochs.

Default implementation: cosmologyFunctionsMatterLambda

Methods

epochValidate

Check the given cosmic epoch is valid (aborting otherwise) and, optionally, return time or expansion factor associated with the epoch.

  • double precision timeIn (optional) [in]

  • double precision expansionFactorIn (optional) [in]

  • logical collapsingIn (optional) [in]

  • double precision timeOut (optional) [out]

  • double precision expansionFactorOut (optional) [out]

  • logical collapsingOut (optional) [out]

cosmicTimedouble precision

Return the cosmological age (in Gyr) of the universe at the given expansion factor \(a\), computed by integrating the Friedmann equation from \(a=0\) to the specified value.

  • double precision expansionFactor [in]

  • logical collapsingPhase (optional) [in]

timeBigCrunchdouble precision

Return the cosmological age at Big Crunch (or a negative value if no Big Crunch occurs).

expansionFactordouble precision

Returns the expansion factor at cosmological time time.

  • double precision time [in]

expansionRatedouble precision

Returns the cosmological expansion rate, \(\dot{a}/a\) at expansion factor expansionFactor.

  • double precision expansionFactor [in]

hubbleParameterEpochaldouble precision

Returns the Hubble parameter at the requested cosmological time, time, or expansion factor, expansionFactor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

hubbleParameterRateOfChangedouble precision

Returns the rate of change of the Hubble parameter at the requested cosmological time, time, or expansion factor, expansionFactor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

densityScalingEarlyTime

Compute the scaling of density with expansion factor at early times in the universe.

  • double precision dominateFactor [in]

  • double precision densityPower [out]

  • double precision expansionFactorDominant [out]

  • double precision OmegaDominant (optional) [out]

omegaMatterEpochaldouble precision

Return the matter density parameter at expansion factor expansionFactor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

omegaMatterRateOfChangedouble precision

Return the rate of change of the matter density parameter at expansion factor expansionFactor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

omegaDarkEnergyEpochaldouble precision

Return the dark energy density parameter at expansion factor expansionFactor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

equationOfStateDarkEnergydouble precision

Return the equation of state parameter, \(w\), for the dark energy component.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

exponentDarkEnergydouble precision

Return the exponent of the dark energy density with expansion factor, i.e. \(\gamma\) in \(\rho_\mathrm{DE}(a) \propto a^\gamma\).

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

equalityEpochMatterDarkEnergydouble precision

Return the epoch of matter-dark energy magnitude equality (either expansion factor or cosmic time).

  • integer requestType (optional) [in]

equalityEpochMatterCurvaturedouble precision

Return the epoch of matter-curvature magnitude equality (either expansion factor or cosmic time).

  • integer requestType (optional) [in]

equalityEpochMatterRadiationdouble precision

Return the epoch of matter-radiation magnitude equality (either expansion factor or cosmic time).

  • integer requestType (optional) [in]

dominationEpochMatterdouble precision

Compute the epoch at which matter dominates over other forms of energy by a given factor.

  • double precision dominateFactor [in]

temperatureCMBEpochaldouble precision

Return the temperature of the cosmic microwave background at expansionFactor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

distanceParticleHorizonComovingdouble precision

Return the comoving distance to the particle horizon at the given time.

  • double precision time [in]

distanceComovingdouble precision

Return the comoving distance to the given cosmic time.

  • double precision time [in]

distanceLuminositydouble precision

Return the luminosity distance to the given cosmic time.

  • double precision time [in]

distanceAngulardouble precision

Return the angular diameter distance to the given cosmic time.

  • double precision time [in]

  • double precision timeOrigin (optional) [in]

timeAtDistanceComovingdouble precision

Return the cosmic time corresponding to the given comovingDistance.

  • double precision comovingDistance [in]

distanceComovingConvertdouble precision

Convert between different measures of comoving distance (luminosity distance, distance modulus, or k-corrected distance modulus) given an input distance or redshift, returning the requested output distance measure.

  • integer output [in]

  • double precision distanceLuminosity (optional) [in]

  • double precision distanceModulus (optional) [in]

  • double precision distanceModulusKCorrected (optional) [in]

  • double precision redshift (optional) [in]

redshiftFromExpansionFactordouble precision

Returns the cosmological redshift, typically \(z = 1/a - 1\), corresponding to the given expansion factor \(a\), where \(a=1\) corresponds to the present day (\(z=0\)).

  • double precision expansionFactor [in]

expansionFactorFromRedshiftdouble precision

Returns the cosmological expansion factor, typically \(a = 1/(1+z)\), corresponding to the given redshift \(z\), where \(a=1\) at the present day and \(a\rightarrow 0\) at the Big Bang.

  • double precision redshift [in]

comovingVolumeElementRedshiftdouble precision

Returns the differential comoving volume element \(\mathrm{d}V/\mathrm{d}z = r_\mathrm{c}^2(t) \mathrm{c} H^{-1}(t)\) (where \(r_\mathrm{c}\) is the comoving distance to time \(t\) and \(H(t)\) is the Hubble parameter at that time) for unit solid angle at the specified time.

  • double precision time [in]

comovingVolumeElementTimedouble precision

Returns the differential comoving volume element \(\mathrm{d}V/\mathrm{d}t = r_\mathrm{c}^2(t) \mathrm{c} a(t)\) (where \(r_\mathrm{c}\) is the comoving distance to time \(t\) and \(a(t)\) is the expansion at that time) for unit solid angle at the specified time.

  • double precision time [in]

epochTimedouble precision

Convenience function that returns the time corresponding to an epoch specified by time or expansion factor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

matterDensityEpochaldouble precision

Convenience function that returns the matter density at the specified epoch.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

  • logical collapsingPhase (optional) [in]

cosmologyFunctionsMatterDarkEnergy

Cosmological relations are computed assuming a universe that contains only collisionless matter and dark energy with an equation of state \(w(a)=w_0+w_1a(1-a)\) (Jassal et al., 2005), with \(w_0=\)[darkEnergyEquationOfStateW0], and \(w_1=\)[darkEnergyEquationOfStateW1].

Methods

targetSelf

Set a module-scope pointer to self.

exponentDarkEnergyDerivativedouble precision

Return the derivative of the dark energy exponent with respect to expansion factor.

  • double precision time (optional) [in]

  • double precision expansionFactor (optional) [in]

initialize

Initialize the state of the object, including the root finders and the expansion factor table.

Parameters

  • [darkEnergyEquationOfStateW0] (real; default -1.0d0) — The equation of state parameter for dark energy, \(w_0\), defined such that \(P=\rho^w\) with \(w(a)=w_0+w_1 a (1-a)\).

  • [darkEnergyEquationOfStateW1] (real; default 0.0d0) — The equation of state parameter for dark energy, \(w_1\), defined such that \(P=\rho^w\) with \(w(a)=w_0+w_1 a (1-a)\).

cosmologyFunctionsMatterDarkEnergyCPL

Cosmological relations are computed assuming a universe that contains only collisionless matter and dark energy with an equation of state \(w(a)=w_0+w_\mathrm{a}(1-a)\) (Chevallier and Polarski, 2001, Linder, 2003), with \(w_0=\)[darkEnergyEquationOfStateW0], and \(w_\mathrm{a}=\)[darkEnergyEquationOfStateWA]. This parameterization is commonly referred to as the “CPL” (Chevallier-Polarski-Linder) form. All functionality is inherited from the cosmologyFunctionsMatterDarkEnergy class—only the dark energy equation of state, and the corresponding dark energy density exponent, are changed.

Parameters

  • [darkEnergyEquationOfStateW0] (real; default -1.0d0) — The equation of state parameter for dark energy, \(w_0\), defined such that \(P=\rho^w\) with \(w(a)=w_0+w_\mathrm{a}(1-a)\).

  • [darkEnergyEquationOfStateWA] (real; default 0.0d0) — The equation of state parameter for dark energy, \(w_\mathrm{a}\), defined such that \(P=\rho^w\) with \(w(a)=w_0+w_\mathrm{a}(1-a)\).

  • [darkEnergyEquationOfStateW1] (real; default 0.0d0) — The equation of state parameter for dark energy, \(w_1\), defined such that \(P=\rho^w\) with \(w(a)=w_0+w_1 a (1-a)\). (inherited from cosmologyFunctionsMatterDarkEnergy)

cosmologyFunctionsMatterLambda

Cosmological relations are computed assuming a universe that contains only collisionless matter and a cosmological constant.

(Default implementation)

Methods

distanceTabulate

Tabulate comoving distance as a function of cosmic time.

  • double precision time [in]

expansionFactorTabulate

Tabulate expansion factor as a function of cosmic time.

  • double precision time (optional) [in]

cosmologyFunctionsStaticUniverse

A cosmology functions class for static universes. Intended for testing purposes. Time is arbitrary (as there is no Big Bang), and expansion factor is fixed at \(1\). Attempts to compute time from expansion factor will cause fatal errors. Expansion rates and the Hubble constant are set to zero.