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¶
epochValidateCheck 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]
cosmicTime→double precisionReturn 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]
timeBigCrunch→double precisionReturn the cosmological age at Big Crunch (or a negative value if no Big Crunch occurs).
expansionFactor→double precisionReturns the expansion factor at cosmological time
time.double precision time[in]
expansionRate→double precisionReturns the cosmological expansion rate, \(\dot{a}/a\) at expansion factor
expansionFactor.double precision expansionFactor[in]
hubbleParameterEpochal→double precisionReturns 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]
hubbleParameterRateOfChange→double precisionReturns 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]
densityScalingEarlyTimeCompute 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]
omegaMatterEpochal→double precisionReturn the matter density parameter at expansion factor
expansionFactor.double precision time(optional) [in]double precision expansionFactor(optional) [in]logical collapsingPhase(optional) [in]
omegaMatterRateOfChange→double precisionReturn 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]
omegaDarkEnergyEpochal→double precisionReturn the dark energy density parameter at expansion factor
expansionFactor.double precision time(optional) [in]double precision expansionFactor(optional) [in]logical collapsingPhase(optional) [in]
equationOfStateDarkEnergy→double precisionReturn the equation of state parameter, \(w\), for the dark energy component.
double precision time(optional) [in]double precision expansionFactor(optional) [in]
exponentDarkEnergy→double precisionReturn 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]
equalityEpochMatterDarkEnergy→double precisionReturn the epoch of matter-dark energy magnitude equality (either expansion factor or cosmic time).
integer requestType(optional) [in]
equalityEpochMatterCurvature→double precisionReturn the epoch of matter-curvature magnitude equality (either expansion factor or cosmic time).
integer requestType(optional) [in]
equalityEpochMatterRadiation→double precisionReturn the epoch of matter-radiation magnitude equality (either expansion factor or cosmic time).
integer requestType(optional) [in]
dominationEpochMatter→double precisionCompute the epoch at which matter dominates over other forms of energy by a given factor.
double precision dominateFactor[in]
temperatureCMBEpochal→double precisionReturn the temperature of the cosmic microwave background at
expansionFactor.double precision time(optional) [in]double precision expansionFactor(optional) [in]logical collapsingPhase(optional) [in]
distanceParticleHorizonComoving→double precisionReturn the comoving distance to the particle horizon at the given
time.double precision time[in]
distanceComoving→double precisionReturn the comoving distance to the given cosmic
time.double precision time[in]
distanceLuminosity→double precisionReturn the luminosity distance to the given cosmic
time.double precision time[in]
distanceAngular→double precisionReturn the angular diameter distance to the given cosmic
time.double precision time[in]double precision timeOrigin(optional) [in]
timeAtDistanceComoving→double precisionReturn the cosmic time corresponding to the given
comovingDistance.double precision comovingDistance[in]
distanceComovingConvert→double precisionConvert 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]
redshiftFromExpansionFactor→double precisionReturns 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]
expansionFactorFromRedshift→double precisionReturns 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]
comovingVolumeElementRedshift→double precisionReturns 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]
comovingVolumeElementTime→double precisionReturns 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]
epochTime→double precisionConvenience 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]
matterDensityEpochal→double precisionConvenience 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
targetSelfSet a module-scope pointer to
self.exponentDarkEnergyDerivative→double precisionReturn the derivative of the dark energy exponent with respect to expansion factor.
double precision time(optional) [in]double precision expansionFactor(optional) [in]
initializeInitialize 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; default0.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; default0.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; default0.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 fromcosmologyFunctionsMatterDarkEnergy)
cosmologyFunctionsMatterLambda¶
Cosmological relations are computed assuming a universe that contains only collisionless matter and a cosmological constant.
(Default implementation)
Methods
distanceTabulateTabulate comoving distance as a function of cosmic time.
double precision time[in]
expansionFactorTabulateTabulate 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.