Learn R Programming

celestial (version 1.4.6)

cosgrow: Cosmological growth and evolution calculations

Description

These functions allow various properties of the expansion of the Universe to be calculated: e.g. OmegaM/OmegaL/OmegaR/OmegaK for ay redshift, growth rate and growth factor, sigma8, and RhoCrit and RhoMean. They use curvature correctly, calculated internally using the relation OmegaM+OmegaL+OmegaR+OmegaK=1, but by default they assume a flat Universe where only OmegaM needs to be specified and OmegaR=0 (so no radiation pressure at any epoch).

Usage

cosgrow(z=1, H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0 = -1, wprime = 0,
  Sigma8=0.8, fSigma8=FALSE, Dist='Co',
  Mass='Msun', ref)
  cosgrowz(z = 1)
  cosgrowa(z = 1)
  cosgrowH(z=1, H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0,
  ref)
  cosgrowCoVel(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1,
  wprime=0, ref)
  cosgrowPecVel(z=1, zob=1)
  cosgrowOmegaM(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0, ref)
  cosgrowOmegaL(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0, ref)
  cosgrowOmegaR(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0, ref)
  cosgrowOmegaK(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0, ref)
  cosgrowDecelq(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0, ref)
  cosgrowEoSwDE(z=1, w0=-1, wprime=0)
  cosgrowRhoDE(z=1,w0=-1, wprime=0, rhoDE=1)
  cosgrowFactor(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0, ref)
  cosgrowRate(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0,
  Sigma8=0.8, fSigma8=FALSE, ref)
  cosgrowSigma8(z=1, OmegaM=0.3,OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0,
  Sigma8=0.8, ref)
  cosgrowFactorApprox(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0,
  ref)
  cosgrowRateApprox(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0,
  Sigma8=0.8, fSigma8=FALSE, ref)
  cosgrowSigma8Approx(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0,
  Sigma8=0.8, ref)
  cosgrowRhoCrit(z=1, H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1,
  wprime=0, Dist='Co', Mass='Msun', ref)
  cosgrowRhoMean(z=1, H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1,
  wprime=0, Dist='Co', Mass='Msun', ref)
  cosgrowDeltaVir(z=1, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, ref)

Arguments

z

Cosmological redshift, where z must be > -1 (can be a vector).

zob

Observed redshift, where z must be > -1 (can be a vector). Essentially a combination of the cosmological redshift z and the peculiar velocity of the objects with respect to this.

H0

Hubble constant as defined at z=0 (default is H0=100 (km/s)/Mpc).

OmegaM

Omega matter (default is 0.3).

OmegaL

Omega Lambda (default is for a flat Universe with OmegaL = 1-OmegaM-OmegaR = 0.7).

OmegaR

Omega Radiation (default is 0, but ~OmegaM/3400 is typical).

w0

The value of dark energy equation of state at z=0.

wprime

The evolution term that governs how the dark energy equation of state evolves with redshift.

rhoDE

The z=0 reference energy density for dark energy.

Sigma8

The value of Sigma8 to use if fsigma8=TRUE (by default this is a reasonable 0.8 for simplicity).

fSigma8

Logical to express whether the growth rate of structure calculated by cosgrow, cosgrowRate or cosgrowRateApprox is given as f*Sigma8 (TRUE) or simply f (FALSE). This is useful for redshift space distortion comparisons (RSD), since RSD strictly measures f*Sigma8.

Dist

Determines the distance type, i.e. whether the Rho critical energy or mean mass densities are calculated with respect to angular / physical distances (Ang), with respect to comoving distances (Co) or with respect to physical metres (m).

Mass

Determines the mass type, i.e. whether Rho critical energy or mean mass densities are calculated with respect to solar masses (Msun) or with respect to kilograms (kg).

ref

The name of a reference cosmology to use, one of 137 / 737 / Planck / Planck13 / Planck15 / Planck18 / WMAP / WMAP9 / WMAP7 / WMAP5 / WMAP3 / WMAP1 / Millennium / GiggleZ. Planck = Planck18 and WMAP = WMAP9. The usage is case insensitive, so wmap9 is an allowed input. See cosref for details. This overrides any other settings for H0/ OmegaM and OmegaL. If ref=137 or ref=737 no specific Sigma8 is assumed, instead Sigma8 is set to whatever the input value is set to (by default this is 0.8).

Value

cosgrow

Returns a data.frame (even if only 1 redshift if requested) with the following parameters evaluated at the respective redshift/s:

ll z Requested redshift a Universe expansion factor, as given by a=1/(1+z) H Hubble expansion rate in units of (km/s)/Mpc CoVel Cosmological recession velocity in units of km/s OmegaM Omega Matter OmegaL Omega Lambda OmegaR Omega Radiation OmegaK Omega K(c)urvature Decelq Traditional deceleration parameter q Factor Exact growth factor (g, see cosgrowFactor below for details) Rate Exact growth rate (f or f*Sigma8, see cosgrowRate below for details) Sigma8 Power spectrum fluctuation amplitude on the scale 8 Mpc/z RhoCrit Critical energy density of the Universe at z, where \(\rho_{crit}=(3.H(z)^2)/(8.\pi.G)\), in units of \(M_{\odot}/Mpc^3\) RhoMean Mean mass density of the Universe at z, where \(\rho_{mean}=\rho_{crit}.\Omega_{M}(z)\), in units of \(M_{\odot}/Mpc^3\)

The outputs of the standalone functions are:

cosgrowz

Returns the input redshift (only included for clarity).

cosgrowa

Returns the Universe expansion factor, as given by a=1/(1+z).

cosgrowH

Returns the value of the Hubble expansion rate at z, in units of km/s/Mpc.

cosgrowCoVel

Returns the value of the cosmological recession velocity of the object in units of km/s.

cosgrowPecVel

Returns the value of the peculiar velocity of the object in units of km/s.

cosgrowOmegaM

Returns the value of Omega Matter at z.

cosgrowOmegaL

Returns the value of Omega Lambda at z.

cosgrowOmegaR

Returns the value of Omega Radiation at z.

cosgrowOmegaK

Returns the value of Omega K(c)urvature at z.

cosgrowDecelq

Returns the traditional deceleration parameter q, given by q=OmegaM/2+Omegar-OmegaL.

cosgrowEoSwDE

Returns w for the dark energy equation of state, where \(P=w.\rho_{DE}.c^2\) and \(w=w_0+2.w'.(1-1/(1+z))\), as described in Wright (2006).

cosgrowRhoDE

Returns the energy density for dark energy, given by \(\rho_{DE}.e^{-6.w'.(1-1/(1 + z))}/(1 + z)^{-(3 + 3.w_0 + 6.w')}\), as described in Wright (2006)..

cosgrowFactor

Returns the exact value of the growth factor (typically referred to as 'g' in the astronomy literature), at z. This is defined such that it equals 1 at z=Inf and is less than 1 at lower z.

cosgrowRate

Returns either the true (typically referred to as 'f' in the astronomy literature) or RSD type (f*Sigma8) value of the growth rate of structure, at z. This is defined such that it equals 1 at z=Inf and is less than 1 at lower z.

cosgrowSigma8

Returns the power spectrum fluctuation amplitude on the scale 8 Mpc/z at z, and is unitless.

cosgrowFactorApprox

Returns the approximate value of the growth factor (typically referred to as 'g' in the astronomy literature), at z. This is defined such that it equals 1 at z=Inf and is less than 1 at lower z.

cosgrowRateApprox

Returns either the approximate true (typically referred to as 'f' in the astronomy literature) or approximate RSD type (f*Sigma8) value of the growth rate of structure, at z. This is defined such that it equals 1 at z=Inf and is less than 1 at lower z.

cosgrowSigma8Approx

Returns the approximate power spectrum fluctuation amplitude on the scale 8 Mpc/z at z, and is unitless.

cosgrowRhoCrit

Returns the critical energy density of the Universe at z, where \(\rho_{crit}=(3.H(z)^2)/(8.\pi.G)\), in units of \(M_{\odot}/Mpc^3\).

cosgrowRhoMean

Returns the mean mass density of the Universe at z, where \(\rho_{mean}=\rho_{crit}.\Omega_{M}(z)\), in units of \(M_{\odot}/Mpc^3\).

cosgrowDeltaVir

Returns the delta-critical virial radius overdensity criterion for a range of flat Universes with varying OmegaM. Taken from Eqn. 6 of Bryan & Norman (1998).

Details

The above functions are heavily based on the equations in Hamilton A.J.S., 2001, MNRAS 322 419 and Lahav O., et al., 1991, MNRAS, 251, 136.

Negative value of z> -1 are allowed, which produces future predictions based on present day cosmology.

The approximation routines are generally accurate to sub 1 percent, and since they do not involve numerical integration they are substantially faster when computing large grids of numbers, i.e. they are recommended for plots, since the accuracy is sub the line width.

References

Based on the equations in:

Bryan & Norman, 1998, ApJ, 495, 80

Davis T.M. & Lineweaver, Charles H., 2004, PASA, 21, 97

Davis T.M. & Scrimgeour M.I., 2014, MNRAS, 442, 1117

Hamilton A.J.S., 2001, MNRAS 322 419

Lahav O., et al., 1991, MNRAS, 251, 136

Peacock J.A., 1999, Cosmological Physics, Cambridge University Press

Wright E.L., 2006, PASP, 118, 1711

See Also

cosvol, cosmap, cosdist, cosref, coshalo

Examples

Run this code
# NOT RUN {
  cosgrow(0.3)
  cosgrow(0.3,ref='Planck')
  cosgrowz(0.3)
  cosgrowa(0.3)
  cosgrowH(0.3)
  cosgrowCoVel(0.3)
  cosgrowPecVel(0.3,0.31)
  cosgrowOmegaM(0.3)
  cosgrowOmegaL(0.3)
  cosgrowOmegaK(0.3)
  sum(cosgrowOmegaM(0.3)+cosgrowOmegaL(0.3)+cosgrowOmegaK(0.3)) #Still 1.
  cosgrowDecelq(0.3)
  cosgrowEoSwDE(0.3)
  cosgrowFactor(0.3)
  cosgrowFactorApprox(0.3) #Approximation better than 1% for reasonable cosmologies.
  cosgrowRate(0.3)
  cosgrowRateApprox(0.3) #Approximation better than 1% for reasonable cosmologies.
  cosgrowRhoCrit(0.3)
  cosgrowRhoMean(0.3)
  cosgrowRhoMean(0)-cosgrowRhoMean(2,Dist='Ang')/(1+2)^3 #Mass is conserved in co-vol
  cosgrowRhoMean(0)-cosgrowRhoMean(10,Dist='Co') #Mass is conserved in co-vol
  
  # Various recessional velocities (see Figure 2 of Davis & Lineweaver 2004):
  
  plot(10^seq(-1,4,by=0.01), cosgrowCoVel(10^seq(-1,4,by=0.01), ref='planck')
  /299792.458, type='l', log='x', xlab='z', ylab='Cosmological Recession Velocity / c')
  lines(10^seq(-1,4,by=0.01), cosgrowPecVel(0,10^seq(-1,4,by=0.01))/299792.458, col='red')
  lines(10^seq(-1,4,by=0.01), 10^seq(-1,4,by=0.01), col='blue')
  abline(h=1,v=1.5,lty=2)
  legend('topleft', legend=c('GR', 'SR', 'Approx (cz)', 'Superluminal'), lty=c(1,1,1,2),
  col=c('black','red','blue','black'))
  
  # Comparison of the various energy densities that make up the Universe for Planck 2013:
  
  plot(cosdistUniAgeAtz(10^seq(-3,4.9,by=0.1), ref='Planck')*1e9,
  cosgrowRhoCrit(10^seq(-3,4.9,by=0.1), ref='Planck', Dist='m', Mass='kg')*
  cosgrowOmegaR(10^seq(-3,4.9,by=0.1), ref='Planck'), type='l',log='xy',
  xlab='Years since Universe formed', ylab=expression('Energy Density'*(kg/m^3)))
  
  lines(cosdistUniAgeAtz(10^seq(-3,4.9,by=0.1), ref='Planck')*1e9,
  cosgrowRhoCrit(10^seq(-3,4.9,by=0.1), ref='Planck', Dist='m', Mass='kg')*
  cosgrowOmegaM(10^seq(-3,4.9,by=0.1), ref='Planck'), col='red')
  
  lines(cosdistUniAgeAtz(10^seq(-3,4.9,by=0.1), ref='Planck')*1e9,
  cosgrowRhoCrit(10^seq(-3,4.9,by=0.1), ref='Planck', Dist='m', Mass='kg')*
  cosgrowOmegaL(10^seq(-3,4.9,by=0.1), ref='Planck'), col='blue')

  abline(v=cosdistUniAgeAtz(0.33,ref='Planck')*1e9,lty=2) # Matter = Vacuum
  abline(v=cosdistUniAgeAtz(3391,ref='Planck')*1e9,lty=2) # Matter = Radiation
  
  legend('topright', legend=c('Radiation Energy Density', 'Matter Energy Density',
  'Vacuum Energy Density'), lty=1, col=c('black','red','blue'))
  
  # Where's the acceleration?
  plot(seq(0,2,len=1e3),cosgrowH(seq(0,2,len=1e3)),type='l',xlab='z',
  ylab='H(z) / km/s / pMpc')
  # There it is!
  plot(seq(0,2,len=1e3),cosgrowH(seq(0,2,len=1e3))/(1+seq(0,2,len=1e3)),
  type='l',xlab='z',ylab='H(z) / km/s / cMpc')
  #When does it start accelerating?
  accel.loc=which.min(abs(cosgrowDecelq(seq(0,2,len=1e3))))
  abline(v=seq(0,2,len=1e3)[accel.loc],lty=2)
# }

Run the code above in your browser using DataLab