Cosmology
The cosmological calculations are based on four cosmological models, with increasing level of complexity:
a flat $\Lambda$CDM model;
a non-flat $\Lambda$CDM model;
a Friedmann-Lemaître cosmology with a constant dark-energy equation of state and curvature;
a Friedmann-Lemaître cosmology with a dark-energy equation of state following a linear form in the expansion parameter: $w(z) = w_0 + w_a (a - 1) = w_0 + w_a z / (1+z)$.
Gravity.CDMCosmology — Type
CDMCosmology(h, Ωₖ, Ωᵥ, Ωₘ, Ωᵣ, w₀, wₐ)A general cosmological model.
Members
h: the timensionless Hubble constant, i.e., $H_0 / (100 \, \mbox{km s}^{-1} \mbox{ Mpc}^{-1]})$Ωₖ: the curvature densityΩᵥ: the dark-energy (vacuum) densityΩₘ: the matter densityΩᵣ: the radiation densityw₀: the dark-energy equation of state parameterwₐ: evolution of the dark-energy equation of state parameter
Note that the dark-energy equation of state is parametrized as $w(a) = w₀ + w_\mathrm{a} (1 - a)$, or, equivalently, $w(z) = w₀ + wₐ z / (1 + z)$.
Gravity.cosmology — Function
cosmology(; h=0.6766, Ωₘ=0.30966, Tᵧ=2.7255, Nₑ=3.046, ...)Return a [CDMCosmology] structure properly initialized.
By default, the returned cosmology is the one used by the Planck 2018. Moreover, the cosmology is taken to be a flat ΛCDM model with a constant equation of state parameter w = -1.
Parameters
h: the dimensionless Hubble constant [0.6766]Ωₖ: the curvature density Ωₖ [0.0]Ωₘ: the matter density Ωₘ [0.30966]Ωᵣ: the radiation density Ωᵣ; if unspecified is automatically computed fromTᵧandNₑ[9.13896115012328e-5]Ωᵥ: the dark-energy density Ωᵥ; if unspecified is automatically computed fromΩₖ,Ωₘ, andΩᵣ[1 - Ωₖ - Ωₘ - Ωᵣ]Tᵧ: the CMB temperature in Kelvin [2.7255]Nₑ: the effective number of massless neutrino species [3.046]w₀: the dark-energy equation of state parameter [-1.0]wₐ: the evolution of the dark-energy equation of state parameter [0.0]
Examples
julia> c = Gravity.cosmology()
Gravity.CDMCosmology{Float64}(h=0.6766, Ωₖ=0.0, Ωᵥ=0.6888086103884988, Ωₘ=0.3111, Ωᵣ=9.13896115012328e-5, w₀=-1.0, wₐ=0.0)
julia> c = Gravity.cosmology(Ωₖ=0.1)
Gravity.CDMCosmology{Float64}(h=0.6766, Ωₖ=0.1, Ωᵥ=0.5888086103884987, Ωₘ=0.3111, Ωᵣ=9.13896115012328e-5, w₀=-1.0, wₐ=0.0)
julia> c = Gravity.cosmology(Ωₘ=0.25, Ωᵥ=0.75, Ωᵣ=0)
Gravity.CDMCosmology{Float64}(h=0.6766, Ωₖ=0.0, Ωᵥ=0.75, Ωₘ=0.25, Ωᵣ=0.0, w₀=-1.0, wₐ=0.0)Gravity.comoving_radial_dist — Function
comoving_radial_dist(c::AbstractCosmology, [z₁,] z₂)Compute the comoving radial distance.
The result is expressed in Mpc and is computed for the cosmology c at redshift z₂. If z₁ is provided, the result is the comoving distance of z₂ as seen by an observer at z₁. Redshift z₁ defaults to 0 if omitted.
Gravity.comoving_transverse_dist — Function
comoving_transverse_dist(c::AbstractCosmology, [z₁,] z₂)Compute the comoving transverse distance.
The result is expressed in Mpc and is computed for the cosmology c at redshift z₂. If z₁ is provided, the result is the comoving transverse distance of z₂ as seen by an observer at z₁. Redshift z₁ defaults to 0 if omitted.
Gravity.angular_diameter_dist — Function
angular_diameter_dist(c::AbstractCosmology, [z₁,] z₂)Compute the angular diameter distance.
The result is expressed in Mpc and is computed for the cosmology c at redshift z₂. If z₁ is provided, the result is the angular diameter distance of z₂ as seen by an observer at z₁. Redshift z₁ defaults to 0 if omitted.
Gravity.luminosity_dist — Function
luminosity_dist(c::AbstractCosmology, z)Compute the (bolometric) luminosity distance.
The result is expressed in Mpc and is computed for the cosmology c at redshift z.
Gravity.distmod — Function
distmod(c::AbstractCosmology, z)Compute the distance modulus in magnitudes at redshift z.