Virial Density Contrasts¶
Class providing dark matter halo virial mean density contrasts, \(\Delta_\mathrm{vir}\). The virial radius of a halo is defined as the radius within which the mean enclosed density equals \(\Delta_\mathrm{vir}\) times the background matter density (or critical density, depending on convention). Different cosmologies and spherical-collapse approximations lead to different values of \(\Delta_\mathrm{vir}(z)\).
Default implementation: virialDensityContrastSphericalCollapseClsnlssMttrCsmlgclCnstnt
Methods¶
densityContrast→double precisionReturns the virial density contrast at the given epoch.
double precision, intent(in ) :: massdouble precision, intent(in ), optional :: time , expansionFactorlogical , intent(in ), optional :: collapsing
densityContrastRateOfChange→double precisionReturns the rate of change of virial density contrast at the given epoch.
double precision, intent(in ) :: massdouble precision, intent(in ), optional :: time , expansionFactorlogical , intent(in ), optional :: collapsing
turnAroundOverVirialRadii→double precisionReturns the ratio of turnaround and virial radii at the given epoch.
double precision, intent(in ) :: massdouble precision, intent(in ), optional :: time , expansionFactorlogical , intent(in ), optional :: collapsing
isMassDependent→logicalReturns true if the virial density contrast is mass-dependent.
virialDensityContrastBryanNorman1998¶
A dark matter halo virial density contrast class using the fitting functions given by Bryan and Norman (1998). As such, it is valid only for \(\Omega_\Lambda=0\) or \(\Omega_\mathrm{M}+\Omega_\Lambda=1\) cosmologies and will either abort on other cosmologies (if [allowUnsupportedCosmology]=false), or revert to a numerical solution from top-hat collapse (if [allowUnsupportedCosmology]=true).
Parameters
[allowUnsupportedCosmology](boolean; default.false.) — If true, unsupported cosmologies revert to using a numerical solution from the top-hat collapse model. Otherwise, unsupported cosmologies result in an error.
virialDensityContrastFixed¶
A dark matter halo virial density contrast class which uses a fixed virial density contrast of [densityContrastValue], defined relative to critical or mean density as specified by [densityType].
Parameters
[densityContrastValue](real; default200.0d0) — The virial density contrast to use in the fixed value model.[densityType](string; one ofcritical,mean; defaultcritical) — The reference density to use in the fixed value virial density contrast model. Either ofcriticalandmeanare allowed.[turnAroundOverVirialRadius](real; default2.0d0) — The ratio of the turnaround to virial radii in the fixed value model.
virialDensityContrastFriendsOfFriends¶
Dark matter halo virial density contrasts based on the friends-of-friends algorithm linking length. The virial density contrast is computed consistent with a given friends-of-friends algorithm linking length. According to Lacey and Cole (1994), the friends-of-friends algorithm selects objects bounded by an isodensity contour of density contrast
where \(b=\)[virialDensityContrastFoFLinkingLength] is the dimensionless linking length of the algorithm (i.e. the linking length in units of the mean interparticle spacing). The virial density contrast is then given by:
where \(\bar{\rho}_\mathrm{vir}\) is the mean density inside the virial radius and \(\rho(r_\mathrm{vir})\) is the density at the virial radius. The ratio \(\bar{\rho}_\mathrm{vir} / \rho(r_\mathrm{vir})\) is specified via the parameter [virialDensityContrastFoFDensityRatio]. Its default value of \(4.688\) is appropriate for an NFW halo of concentration \(c=6.88\) which is the concentration found by Prada et al. (2012) for halos with \(\sigma=1.686\) which is the approximate critical overdensity for collapse).
Parameters
[linkingLength](real; default0.2d0) — The friends-of-friends linking length algorithm to use in computing virial density contrast.[densityRatio](real; default4.688d0) — The ratio of mean virial density to density at the virial radius to assume when setting virial density contrasts in the friends-of-friends model.
virialDensityContrastKitayamaSuto1996¶
A virial density contrast class using the fitting formula of Kitayama and Suto (1996), and so is valid only in flat cosmological models (an error will be reported in non-flat models). Specifically,
virialDensityContrastPercolation¶
A dark matter halo virial density contrast class based on the percolation analysis of More et al. (2011). The virial density contrast is computed to be consistent with a given friends-of-friends algorithm linking length using the percolation-theory-motivated calibration of More et al. (2011). Specifically, the friends-of-friends algorithm is assumed to link together particles forming an isodensity surface of density \(\rho = \bar{\rho} n_\mathrm{c}/b^3\), where \(\bar{\rho}\) is the mean density of the universe, \(n_\mathrm{c}=0.652960\) is a critical density for percolation as given by More et al. (2011), and \(b\) is the linking length. Given this bounding density, the virial density contrast is found by requiring that the halo contain the required mass within such a bounding density, given the halo density profile.
Methods
tabulate— Tabulate the virial density contrast as a function of mass and time.restoreTable— Restore a tabulated solution from file.storeTable— Store a tabulated solution to file.
Parameters
[linkingLength](real; default0.2d0) — The friends-of-friends linking length to use in computing virial density contrasts with the percolation analysis of More et al. (2011).
virialDensityContrastSphericalCollapseBrynsDrkMttrDrkEnrgy¶
Dark matter halo virial density contrasts based on the spherical collapse in a matter plus cosmological constant universe.
Methods
retabulate— Tabulate spherical collapse critical overdensity.
Parameters
[tableStore](boolean; default.true.) — If true, store the tabulated spherical collapse solutions to a file and restore them on subsequent runs to avoid recomputing the numerical ODE integration from scratch.[energyFixedAt](string; one ofundefined,turnaround,virialization; defaultturnaround) — Selects the epoch at which the energy of a spherical top hat perturbation in a dark energy cosmology should be “fixed” for the purposes of computing virial density contrasts. (See the discussion in Percival 2005; Section 8.)[tablePointsPerOctave](integer; default300) — The number of evenly-spaced tabulation points per octave of cosmic time used when building the look-up table of spherical collapse critical overdensity vs.time; higher values give greater interpolation accuracy at the cost of longer initialization time.
virialDensityContrastSphericalCollapseClsnlssMttrCsmlgclCnstnt¶
A class implementing dark matter halo virial density contrasts based on the spherical collapse model in a universe which contains collisionless matter and a cosmological constant (see, for example, Percival 2005).
(Default implementation)
Methods
retabulate— Tabulate spherical collapse critical overdensity.
Parameters
[tableStore](boolean; default.true.) — If true, store the tabulated spherical collapse solutions to a file and restore them on subsequent runs to avoid recomputing the numerical ODE integration from scratch.
virialDensityContrastSphericalCollapseClsnlssMttrDrkEnrgy¶
Dark matter halo virial density contrasts based on the spherical collapse in a matter plus dark energy universe.
Parameters
[tableStore](boolean; default.true.) — If true, store the tabulated spherical collapse solutions to a file and restore them on subsequent runs to avoid recomputing the numerical ODE integration from scratch.[energyFixedAt](string; one ofundefined,turnaround,virialization; defaultturnaround) — Selects the epoch at which the energy of a spherical top hat perturbation in a dark energy cosmology should be “fixed” for the purposes of computing virial density contrasts. (See the discussion in Percival 2005; Section 8.)