.. _physics-criticalOverdensity: Critical Overdensity ==================== Object providing critical overdensities for gravitational collapse---the linear theory overdensity :math:`\delta_\mathrm{c}` that a region must have in order to have collapsed by a given cosmic time. In the Einstein-de Sitter cosmology :math:`\delta_\mathrm{c} \approx 1.686`; implementations may include corrections for dark energy, ellipsoidal collapse, or environmental density. The critical overdensity enters the Press-Schechter and excursion-set formalisms that predict the halo mass function and merger tree branching probabilities. **Default implementation:** ``criticalOverdensitySphericalCollapseClsnlssMttrCsmlgclCnstnt`` Methods ------- ``value`` → ``double precision`` Return the linear theory critical overdensity :math:`\delta_\mathrm{c}` for gravitational collapse at the specified cosmic time and optional halo mass, accepting either a cosmic time or expansion factor to identify the epoch. * ``double precision , intent(in ), optional :: time , expansionFactor`` * ``logical , intent(in ), optional :: collapsing`` * ``double precision , intent(in ), optional :: mass`` * ``type (treeNode), intent(inout), optional :: node`` ``timeOfCollapse`` → ``double precision`` Returns the time of collapse for a perturbation of linear theory overdensity ``criticalOverdensity``. * ``double precision , intent(in ) :: criticalOverdensity`` * ``double precision , intent(in ), optional :: mass`` * ``type (treeNode), intent(inout), optional, target :: node`` ``collapsingMass`` → ``double precision`` Return the mass :math:`M_*(t)` of halos just collapsing at the given cosmic time (or expansion factor), i.e.\ the mass at which :math:`\sigma(M_*,t) = \delta_\mathrm{c}(t)`. * ``double precision , intent(in ), optional :: time , expansionFactor`` * ``logical , intent(in ), optional :: collapsing`` * ``type (treeNode), intent(inout), optional, target :: node`` ``gradientTime`` → ``double precision`` Return the derivative with respect to time of the linear theory critical overdensity for collapse at the given cosmic time. * ``double precision , intent(in ), optional :: time , expansionFactor`` * ``logical , intent(in ), optional :: collapsing`` * ``double precision , intent(in ), optional :: mass`` * ``type (treeNode), intent(inout), optional :: node`` ``gradientMass`` → ``double precision`` Return the derivative with respect to mass of the linear theory critical overdensity for collapse at the given cosmic time. * ``double precision , intent(in ), optional :: time , expansionFactor`` * ``logical , intent(in ), optional :: collapsing`` * ``double precision , intent(in ), optional :: mass`` * ``type (treeNode), intent(inout), optional :: node`` ``isMassDependent`` → ``logical`` Return true if the critical overdensity :math:`\delta_\mathrm{c}` depends on halo mass (as in ellipsoidal collapse models), signalling that the mass argument must be supplied and cached values are mass-specific. ``isNodeDependent`` → ``logical`` Return true if the critical overdensity is dependent on the ``node`` object (not just the ``node%hostTree`` object). ``isTreeDependent`` → ``logical`` Return true if the critical overdensity is dependent on the ``node%hostTree`` object. .. _physics-criticalOverdensityBarkana2001WDM: ``criticalOverdensityBarkana2001WDM`` ------------------------------------- A critical overdensity for collapse class based on the :term:`WDM` modifier of :cite:t:`barkana_constraints_2001` applied to some other, :term:`CDM` critical overdensity class. Specifically, the critical overdensity is multiplied by a factor .. math:: \exp\left[ \left({M_\mathrm{J} \over 8 M}\right)^{1.40}+\left({M_\mathrm{J} \over 8 M}\right)^{0.45} \right], where :math:`M` is the mass in question, :math:`M_\mathrm{J}` is the effective Jeans mass of the warm dark matter as defined by :cite:author:`barkana_constraints_2001` [:cite:year:`barkana_constraints_2001`; their eqn. 10]: .. math:: M_\mathrm{J} = 3.06 \times 10^8 \left( {1+z_\mathrm{eq} \over 3000}\right)^{1.5} \left({\Omega_\mathrm{M} h_0^2 \over 0.15}\right)^{1/2} \left({g_\mathrm{X} \over 1.5} \right)^{-1} \left({m_\mathrm{X}/1.0\hbox{keV}}\right)^{-4}, the redshift of matter-radiation equality is given by .. math:: z_\mathrm{eq} = 3600 \left({\Omega_\mathrm{M} h_0^2 \over 0.15}\right)-1, and :math:`g_\mathrm{X}` and :math:`m_\mathrm{X}` are the effective number of degrees of freedom and the mass of the warm dark matter particle respectively. This fitting function has been found the fit the numerical results of :cite:t:`barkana_constraints_2001` well. **Parameters** * ``[useFittingFunction]`` (default ``.true.``) — Specifies whether the warm dark matter critical overdensity mass scaling should be computed from a fitting function or from tabulated data. .. _physics-criticalOverdensityEnvironmental: ``criticalOverdensityEnvironmental`` ------------------------------------ The critical overdensity for collapse is computed by taking the value from another critical overdensity class and multiplying it by an environment-dependent factor, allowing the collapse threshold to vary with local density environment. The environmental dependence is controlled by the ``[a]`` parameter. **Parameters** * ``[a]`` (default ``0.0d0``) — The linear coefficient :math:`a` that multiplies the large-scale environmental overdensity when computing the environment-dependent shift to the critical overdensity for halo collapse (a value of 0 gives no environmental dependence). .. _physics-criticalOverdensityFixed: ``criticalOverdensityFixed`` ---------------------------- A critical overdensity class in which the critical overdensity for gravitational collapse of dark matter halos is set to a constant, redshift-independent value given by the parameter ``[criticalOverdensity]``, irrespective of cosmological evolution. **Parameters** * ``[mass]`` (default ``100.0d0``) — The fixed mass (in :math:`\mathrm{M}_\odot`) assigned to all newly-formed seed black holes in this implementation, representing the initial black hole mass when a halo first forms a central black hole. * ``[spin]`` (default ``0.0d0``) — The dimensionless spin parameter (between :math:`-1` and :math:`+1`) assigned to all newly-formed seed black holes, where :math:`0` corresponds to a non-rotating Schwarzschild black hole and :math:`\pm 1` to a maximally rotating Kerr black hole. * ``[fraction]`` (default ``0.01d0``) — The fixed fraction :math:`f_\mathrm{outflow}` of the stellar energy input rate (normalized to a canonical :math:`1\,\mathrm{M}_\odot` population) that drives gas outflows, setting the mass loading factor for stellar feedback in the galaxy. * ``[escapeFraction]`` (default ``0.006d0``) — Escape fraction of ionizing photons from young HII regions. * ``[ageLimit]`` (default ``0.03d0``) — The age beyond which all ionizing photons are assumed to escape from HII regions. * ``[timescale]`` (default ``1.0d0``) — The timescale for star formation in the fixed timescale model. * ``[rateStarFormation]`` (default ``1.0d9``) — The rate of star formation in units of :math:`\mathrm{M}_\odot \hbox{Gyr}^{-1}`. * ``[proposalSize]`` — The fixed value of the proposal scaling parameter :math:`\gamma` used to scale the vector difference between two randomly selected chain states when forming differential evolution proposals. * ``[exponentValue]`` — The fixed value of the temperature-scaling exponent :math:`\alpha` by which the proposal size :math:`\gamma` is scaled as :math:`\gamma \propto T^{\alpha}` in tempered differential evolution runs. * ``[massResolution]`` (default ``5.0d9``) — The mass resolution to use when building merger trees. * ``[rootVariance]`` — The root variance of the random error distribution. * ``[velocityRadial]`` (default ``-0.90d0``) — The radial velocity (in units of the host virial velocity) to used for the fixed virial orbits distribution. Default value matches approximate peak in the distribution of :cite:t:`benson_orbital_2005`. * ``[velocityTangential]`` (default ``0.75d0``) — The tangential velocity (in units of the host virial velocity) to used for the fixed virial orbits distribution. Default value matches approximate peak in the distribution of :cite:t:`benson_orbital_2005`. * ``[rateCoefficient]`` — The rate coefficient (in units of cm\ :math:`^3` s\ :math:`^{-1}`) for radiative recombination. * ``[gamma]`` (default ``0.67d0``) — The multiplicative factor, :math:`\gamma`, used to compute the cooling coefficient. * ``[fractionLossAngularMomentum]`` (default ``0.3d0``) — Specifies the fraction of angular momentum that is lost from cooling/infalling gas. * ``[concentration]`` — The fixed NFW concentration parameter :math:`c = r_\mathrm{virial}/r_\mathrm{scale}` assigned to all halos regardless of mass or redshift, representing the ratio of the virial radius to the scale radius of the dark matter density profile. * ``[metallicity]`` — The metallicity (relative to Solar) of the :term:`IGM`. * ``[factor]`` (default ``sqrt(0.5d0)``) — The ratio of galaxy radius to :math:`\lambda r_\mathrm{vir}` in the "fixed" galactic structure radius solver algorithm. This will be applied to any component for which no component-specific value is provided. * ``[factorDisk]`` (default ``sqrt(0.5d0)``) — The ratio of galaxy radius to :math:`\lambda r_\mathrm{vir}` in the "fixed" galactic structure radius solver algorithm for disks. This will override the generic value supplied by ``[factor]`` for disks. * ``[factorSpheroid]`` (default ``sqrt(0.5d0)``) — The ratio of galaxy radius to :math:`\lambda r_\mathrm{vir}` in the "fixed" galactic structure radius solver algorithm for spheroids. This will override the generic value supplied by ``[factor]`` for spheroids. * ``[radiusFixed]`` (default ``var_str('virial')``) — The radius to use in the "fixed" galactic structure radius solver algorithm. Allowed options are "virial" and "turnaround". * ``[overdensity]`` — The fixed linear overdensity :math:`\delta` of the large-scale environment assigned uniformly to all halos; a positive value places halos in an overdense region, while negative values simulate voids. * ``[radiusEnvironment]`` (default ``0.0d0``) — The radius of the sphere used to determine the variance in the environmental density. * ``[massEnvironment]`` (default ``1.0d15``) — The mass within the sphere sphere used to determine the variance in the environmental density. * ``[densityContrastValue]`` (default ``200.0d0``) — The virial density contrast to use in the fixed value model. * ``[densityType]`` (default ``var_str('critical')``) — The reference density to use in the fixed value virial density contrast model. Either of ``critical`` and ``mean`` are allowed. * ``[turnAroundOverVirialRadius]`` (default ``2.0d0``) — The ratio of the turnaround to virial radii in the fixed value model. * ``[criticalOverdensity]`` (default ``(3.0d0/20.0d0)*(12.0d0*Pi)**(2.0d0/3.0d0)``) — The value to use for the critical overdensity for collapse of dark matter halos when using a fixed value. .. _physics-criticalOverdensityKitayamaSuto1996: ``criticalOverdensityKitayamaSuto1996`` --------------------------------------- A critical overdensity class based on the fitting functions of :cite:t:`kitayama_semianalytic_1996`, which is therefore valid only for flat cosmological models (an error will be reported in non-flat models). Specifically, .. math:: \delta_\mathrm{crit} (t) = {3 (12 \pi)^{2/3} \over 20} [1 + 0.0123 \log_{10}\left\{\Omega_\mathrm{matter}(t)\right\}]/D(t). .. _physics-criticalOverdensityMarsh2016FDM: ``criticalOverdensityMarsh2016FDM`` ----------------------------------- A critical overdensity for collapse class based on the :term:`FDM` modifier of :cite:t:`marsh_warmandfuzzy_2016` applied to some other, :term:`CDM` critical overdensity class. Specifically, the critical overdensity is multiplied by a factor .. math:: h_\mathrm{F}(x) \exp [a_3 x^{-a_4}]+[1-h_\mathrm{F}(x)]\exp [a_5 x^{-a_6}], where :math:`x=M/M_J` with :math:`M` the mass in question, :math:`M_\mathrm{J}` the effective Jeans mass of the fuzzy dark matter as defined by :cite:author:`marsh_warmandfuzzy_2016` [:cite:year:`marsh_warmandfuzzy_2016`; their eqn. 18]: .. math:: M_\mathrm{J} = a_1\times 10^8 \left(\frac{m_a}{10^{-22}\text{ eV}}\right)^{-3/2}\left(\frac{\Omega_m h^2}{0.14} \right)^{1/4} h^{-1}M_{\odot}, the function :math:`h_\mathrm{F}` is given by .. math:: h_\mathrm{F}(x) =(1/2)\{1-\tanh [M_J(x-a_2)]\}. The best-fit parameters :math:`a_i` are :math:`\{a_1,a_2,a_3,a_4,a_5,a_6\}=\{3.4,1.0,1.8,0.5,1.7,0.9\}`. **Parameters** * ``[redshift]`` (default ``cosmologyFunctions_%redshiftFromExpansionFactor(cosmologyFunctions_%equalityEpochMatterRadiation(requestTypeExpansionFactor))``) — The redshift of the epoch at which the transfer function is defined. * ``[useFittingFunction]`` (default ``.true.``) — Specifies whether the fuzzy dark matter critical overdensity mass scaling should be computed from a fitting function or from tabulated data. .. _physics-criticalOverdensityPeakBackgroundSplit: ``criticalOverdensityPeakBackgroundSplit`` ------------------------------------------ The critical overdensity is given by some other critical overdensity class offset by the halo environmental overdensity. **Methods** * ``varianceBackground`` — Compute the variance of the background at this time. **Parameters** * ``[factorMassEnvironment]`` (default ``1.0d0``) — The background variance is computed as :math:`\sigma(\alpha M_\mathrm{env})^2` where :math:`M_\mathrm{env}` is the environment mass and :math:`\alpha=`\ ``[factorMassEnvironment]``. .. _physics-criticalOverdensityRenormalize: ``criticalOverdensityRenormalize`` ---------------------------------- A critical overdensity class which renormalizes another class based on the ratio of two mass variance classes. This is intended to allow different window functions to be used for :math:`\sigma(M)` while retaining the same ratio :math:`\delta_\mathrm{c}/\sigma(M)` (and, therefore, the same halo mass function) on a mass scale :math:`M_\mathrm{match}`. Specifically, the renormalized critical overdensity, :math:`\delta^\prime_\mathrm{c}`, is given by :math:`\delta^\prime_\mathrm{c} = n \delta_\mathrm{c}`, where :math:`\delta_\mathrm{c}` is the original critical overdensity, and .. math:: n=\sigma(M_\mathrm{match})/\sigma_\mathrm{r}(M_\mathrm{match}), with :math:`\sigma(M)` being the cosmological mass variance (computed with whatever window function is required), :math:`\sigma_\mathrm{r}(M)` is the reference cosmological mass variance (typically computed using a top-hat window function), and :math:`M_\mathrm{match}` is the mass at which to match the mass variance. The mass variances are evaluated at the present epoch. The matching scale is given by :math:`M_\mathrm{match}=`\ ``[massMatch]`` if this parameter is present. Otherwise :math:`M_\mathrm{match}=M_*` is used, where :math:`\sigma(M_*)=\delta_\mathrm{crit}`, computed at the present epoch. **Parameters** * ``[massMatch]`` — The halo mass (:math:`\mathrm{M}_\odot`) at which the renormalized critical overdensity is matched to the reference value; if absent, normalization is matched at the cosmic mean density scale. .. _physics-criticalOverdensitySphericalCollapseBrynsDrkMttrDrkEnrgy: ``criticalOverdensitySphericalCollapseBrynsDrkMttrDrkEnrgy`` ------------------------------------------------------------ Critical overdensity for the gravitational collapse of dark matter halos, computed by numerically solving the spherical collapse model in a universe containing baryons, collisionless dark matter, and dark energy. Baryons may be treated as non-clustering relative to dark matter. The normalization of the result can be adjusted via ``[normalization]``, and tabulation can be stored to file for efficiency. **Methods** * ``retabulate`` — Tabulate spherical collapse critical overdensity. **Parameters** * ``[tableStore]`` (default ``.true.``) — If true, store/restore the tabulated solution to/from file when possible. * ``[energyFixedAt]`` (default ``var_str('turnaround')``) — 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 :cite:author:`percival_cosmological_2005` :cite:year:`percival_cosmological_2005`; Section 8.) * ``[tablePointsPerOctave]`` (default ``300``) — The number of points per octave of time at which to tabulate solutions. * ``[normalization]`` (default ``1.0d0``) — A multiplicative normalization factor applied to the spherical collapse critical overdensity :math:`\delta_\mathrm{c}` returned by this class, allowing calibration against simulations or fitting functions. * ``[tableStore]`` (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]`` (default ``var_str('turnaround')``) — 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 :cite:author:`percival_cosmological_2005` :cite:year:`percival_cosmological_2005`; Section 8.) * ``[tablePointsPerOctave]`` (default ``300``) — 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. * ``[countTimeCollapsePerUnit]`` — The number of points per unit :math:`w(t)=\delta_\mathrm{c}(t)/D(t)` at which to tabulate the time of collapse. .. _physics-criticalOverdensitySphericalCollapseClsnlssMttrCsmlgclCnstnt: ``criticalOverdensitySphericalCollapseClsnlssMttrCsmlgclCnstnt`` ---------------------------------------------------------------- Critical overdensity for collapse based on the spherical collapse in a matter plus cosmological constant universe (see, for example, :cite:author:`percival_cosmological_2005` :cite:year:`percival_cosmological_2005`). **(Default implementation)** **Methods** * ``retabulate`` — Tabulate spherical collapse critical overdensity. **Parameters** * ``[tableStore]`` (default ``.true.``) — If true, store/restore the tabulated solution to/from file when possible. * ``[normalization]`` (default ``1.0d0``) — A multiplicative normalization factor applied to the spherical collapse critical overdensity :math:`\delta_\mathrm{c}` returned by this class, allowing calibration against simulations or fitting functions. * ``[tableStore]`` (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. * ``[countTimeCollapsePerUnit]`` — The number of points per unit :math:`w(t)=\delta_\mathrm{c}(t)/D(t)` at which to tabulate the time of collapse. .. _physics-criticalOverdensitySphericalCollapseClsnlssMttrDrkEnrgy: ``criticalOverdensitySphericalCollapseClsnlssMttrDrkEnrgy`` ----------------------------------------------------------- Critical overdensity for gravitational collapse of dark matter halos, computed numerically via the spherical collapse model in a universe containing collisionless matter and dark energy. The normalization of the result can be adjusted via ``[normalization]``, and tabulated solutions can be stored to and restored from file for computational efficiency. **Parameters** * ``[tableStore]`` (default ``.true.``) — If true, store/restore the tabulated solution to/from file when possible. * ``[energyFixedAt]`` (default ``var_str('turnaround')``) — 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 :cite:author:`percival_cosmological_2005` :cite:year:`percival_cosmological_2005`; Section 8.) * ``[normalization]`` (default ``1.0d0``) — A multiplicative normalization factor applied to the spherical collapse critical overdensity :math:`\delta_\mathrm{c}` returned by this class, allowing calibration against simulations or fitting functions. * ``[tableStore]`` (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. * ``[countTimeCollapsePerUnit]`` — The number of points per unit :math:`w(t)=\delta_\mathrm{c}(t)/D(t)` at which to tabulate the time of collapse.