Generate and return the full-sky ( \(4\pi\) Steradian) cosmological Comoving Volume normalized to Hubble Volume, given the user-specified cosmological parameters.
The comoving volume \(V_C\) is the volume measure in which number densities of non-evolving objects locked into Hubble Flow are constant with redshift.
It is the proper volume times three factors of the relative scale factor now to then, or \((1 + z)^3\).
The derivative of comoving distance with redshift is \(\frac{dD_C}{dz} = \frac{1}{E(z)}\) where \(E(z)\) is the Dimensionless Hubble Parameter.
Assuming \((\Omega_M, \Omega_\Lambda, \Omega_R, \Omega_K)\) represent the normalized densities of Dark Matter, Dark Energy, Radiation Energy, and Curvature in a Universe with negligible neutrino mass such that \(\Omega_M + \Omega_\Lambda + \Omega_R + \Omega_K = 1\), the all-sky Comoving Volume \(V_C\) out to a given cosmological redshift \(z\) is defined as (e.g., Peebles, 1993),
\begin{equation}
\large
V_C(z; \Omega_M, \Omega_\Lambda, \Omega_R, \Omega_K)
\begin{cases}
\bigg(\frac{4\pi V_H}{2\Omega_K}\bigg) ~ \bigg[ \frac{D_M}{D_H} \sqrt{1 + \Omega_K \bigg(\frac{D_M}{D_H}\bigg)^2} - \frac{1}{\sqrt{|\Omega_K|}}\mathrm{arcsinh}\bigg(\sqrt{|\Omega_K|}\frac{D_M}{D_H}\bigg) \bigg] &, \Omega_K > 0 ~, \\
\bigg(\frac{4\pi V_H}{2\Omega_K}\bigg) ~ \bigg[ \frac{D_M}{D_H} \sqrt{1 + \Omega_K \bigg(\frac{D_M}{D_H}\bigg)^2} - \frac{1}{\sqrt{|\Omega_K|}}\arcsin\bigg(\sqrt{|\Omega_K|}\frac{D_M}{D_H}\bigg) \bigg] &, \Omega_K < 0 ~, \\
\frac{4\pi}{3} D_M^3 &, \Omega_K = 0 ~,
\end{cases}
\end{equation}
where
- \(V_C(z; \cdots)\) is the cosmological Comoving Volume out to redshift \(z\),
- \(D_M(z; \cdots)\) is the cosmological Transverse Comoving Distance as a function of redshift,
- \(\Omega_K\) is the Curvature Density,
- \(D_H = \frac{C}{H_0}\) is the Hubble Distance,
- \(V_H = D_H^3\) is the Hubble Volume,
- \(H_0\) is the Hubble Constant.
- \(C\) is the speed of light,
- \(z\) is the redshift,
The value returned by the procedures under this generic interface is \(\frac{V_C}{V_H}\), that is, normalized to the Hubble Volume.
- Parameters
-
[in] | disComTransNormed | : The input scalar or array of the same rank as other array-like arguments, of type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128) representing the Dimensionless (Normalized) Transverse Comoving Distance at the desired redshift for which the full-sky Comoving Volume must be computed.
This argument can be readily obtained by taking the square of the output of getDisComTransNormed.
See the examples below for usage.
|
[in] | omegaK | : The input scalar or array of the same rank as other array-like arguments, of the same type and kind as the input argument disComTransNormed representing the normalized curvature density of the universe.
(optional, default = OMEGA_K. It must be present if and only if sqrtAbsOmegaK is also present.) |
[in] | sqrtAbsOmegaK | : The input scalar or array of the same rank as other array-like arguments, of the same type and kind as the input argument disComTransNormed representing the square root of the normalized curvature density of the universe sqrt(omegaK) .
This argument is requested as an input to avoid the redundant costly sqrt(OmegaK) operation within the algorithm when the procedure is to be called repeatedly with the same omegaK .
(optional, it must be present if and only if omegaK is also present.) |
- Returns
volComNormed
: The output scalar or array of the same rank as other array-like arguments, of the same type and kind as the input argument disComTransNormed
containing the cosmological full-sky Comoving Volume at the desired redshift normalized to the Hubble Distance.
Possible calling interfaces ⛓
Generate and return the full-sky ( Steradian) cosmological Comoving Volume normalized to Hubble Volu...
This module contains procedures and generic interfaces and constants for cosmological calculations.
- Warning
- The input arguments must be computed for the same redshift and cosmological parameters.
The equivalence and consistencies of the input arguments are not verified within the algorithm because such validations require extra information that is not provided as input.
- Note
- Dropping all optional arguments corresponds to a flat Universe.
- See also
- getVolComDiffNormed
getHubbleParamNormedSq
getDisComTransNormed
getDisLumNormed
getDisAngNormed
getDisComNormed
LOG_HUBBLE_CONST
HUBBLE_DISTANCE_MPC
HUBBLE_CONST
OMEGA_M
OMEGA_L
OMEGA_R
OMEGA_K
Example usage ⛓
10 type(display_type) :: disp
15 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
16 call disp%show(
"!Compute the Comoving Volume in units of Hubble Volume.")
17 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
21 call disp%show(
"getVolComNormed(getDisComTransNormed(zplus1 = 1., reltol = sqrt(epsilon(0.))))")
26 call disp%show(
"getVolComNormed(getDisComTransNormed(zplus1 = 1.1, reltol = sqrt(epsilon(0.))))")
31 call disp%show(
"getVolComNormed(getDisComTransNormed(zplus1 = [ 2., 3.], omegaM = 0.4, omegaL = 0.6, reltol = 0.0001))")
36 call disp%show(
"getVolComNormed(getDisComTransNormed(zplus1 = [ 2., 3.], omegaM = 0.4, omegaL = 0.4, omegaR = 0.2, reltol = 0.0001))")
41 call disp%show(
"getVolComNormed(getDisComTransNormed(zplus1 = [ 2., 3.], omegaM = 0.4, omegaL = 0.4, omegaR = 0.4, omegaK = -0.2, sqrtAbsOmegaK = sqrt(0.2), reltol = 0.0001), omegaK = -0.2, sqrtAbsOmegaK = sqrt(0.2))")
42 call disp%show(
getVolComNormed(
getDisComTransNormed(zplus1
= [
2.,
3.], omegaM
= 0.4, omegaL
= 0.4, omegaR
= 0.4, omegaK
= -0.2, sqrtAbsOmegaK
= sqrt(
0.2), reltol
= 0.0001), omegaK
= -0.2, sqrtAbsOmegaK
= sqrt(
0.2)) )
53 real,
allocatable :: zplus1(:), OmegaM(:), OmegaL(:)
54 integer :: fileUnit, i
56 OmegaM
= [
1.,
0.3, .
05]
58 zplus1
= 1. + getLogSpace(
log(
0.0001),
log(
10000.),
500_IK)
60 open(newunit
= fileUnit, file
= "getVolComNormed.RK.txt")
61 write(fileUnit,
"(*(g0,:,','))")
"z", (
"DisLum_"//getStr(OmegaM(i),
"(g0.1)")
//"_"//getStr(OmegaL(i),
"(g0.1)"), i
= 1,
size(OmegaM))
62 do i
= 1,
size(zplus1)
Generate count evenly spaced points over the interval [x1, x2] if x1 < x2, or [x2,...
Generate count evenly-logarithmically-spaced points over the interval [base**logx1,...
Generate and return the cosmological Transverse Comoving Distance normalized to Hubble Distance,...
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
Generate and return the conversion of the input value to an output Fortran string,...
This module contains procedures and generic interfaces for generating arrays with linear or logarithm...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
This module contains the generic procedures for converting values of different types and kinds to For...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
16+1.63183689,
+5.88282585
20+1.05825138,
+3.08515620
23getVolComNormed(
getDisComTransNormed(zplus1
= [
2.,
3.], omegaM
= 0.4, omegaL
= 0.4, omegaR
= 0.4, omegaK
= -0.2, sqrtAbsOmegaK
= sqrt(
0.2), reltol
= 0.0001), omegaK
= -0.2, sqrtAbsOmegaK
= sqrt(
0.2))
24+0.837794662,
+2.19578910
Postprocessing of the example output ⛓
3import matplotlib.pyplot
as plt
15xlab = {
"CK" :
"redshift: Z ( real/imaginary components )"
16 ,
"IK" :
"redshift: Z ( integer-valued )"
17 ,
"RK" :
"redshift: Z ( real-valued )"
19legends = [
"$\Omega_M = 1.0, \Omega_\Lambda = 0.0$"
20 ,
"$\Omega_M = 0.3, \Omega_\Lambda = 0.7$"
21 ,
"$\Omega_M = .05, \Omega_\Lambda = .95$"
24for kind
in [
"IK",
"CK",
"RK"]:
26 pattern =
"*." + kind +
".txt"
27 fileList = glob.glob(pattern)
28 if len(fileList) == 1:
30 df = pd.read_csv(fileList[0], delimiter =
",")
32 fig = plt.figure(figsize = 1.25 * np.array([6.4, 4.8]), dpi = 200)
36 plt.plot( df.values[:, 0]
37 , df.values[:,1:len(legends)+1]
41 plt.plot( df.values[:,1]
42 , df.values[:,1:len(legends)+1]
47 plt.plot( df.values[:, 0]
48 , df.values[:,1:len(legends)+1]
56 plt.xticks(fontsize = fontsize - 2)
57 plt.yticks(fontsize = fontsize - 2)
58 ax.set_xlabel(xlab[kind], fontsize = 17)
59 ax.set_ylabel(
"Comoving Volume / Hubble Volume", fontsize = 17)
60 plt.grid(visible =
True, which =
"both", axis =
"both", color =
"0.85", linestyle =
"-")
61 ax.tick_params(axis =
"y", which =
"minor")
62 ax.tick_params(axis =
"x", which =
"minor")
66 plt.savefig(fileList[0].replace(
".txt",
".png"))
68 elif len(fileList) > 1:
70 sys.exit(
"Ambiguous file list exists.")
Visualization of the example output ⛓
- Test:
- test_pm_cosmology
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, September 1, 2012, 12:00 AM, National Institute for Fusion Studies, The University of Texas at Austin
Definition at line 3897 of file pm_cosmology.F90.