Dark Matter Only Halo Profiles

Class providing dark matter-only halo density profiles, i.e. the profile a halo would have in the absence of baryonic effects. This returns a massDistributionClass object for the specified node. Common implementations include NFW and Einasto profiles parameterized by a scale radius or concentration. This class is used in calculations of dynamical friction, tidal stripping, and other processes where the unmodified dark matter profile is needed.

Default implementation: darkMatterProfileDMONFW

Methods

getclass(massDistributionClass)

Return the mass distribution of the dark matter-only profile.

  • type (treeNode ), intent(inout) :: node

  • type (enumerationWeightByType), intent(in ), optional :: weightBy

  • integer , intent(in ), optional :: weightIndex

darkMatterProfileDMOAccelerator

An accelerator wrapper for dark-matter-only profile classes that caches recently computed profile quantities (enclosed mass, density, potential, etc.) and returns interpolated estimates when the requested radius is close to a cached value, significantly speeding up calculations that repeatedly query the profile at nearby radii.

Methods

  • tabulate — Tabulate the mass function.

Parameters

  • [toleranceRelative] (real; default 1.0d-2) — The tolerance with which to accept accelerated estimates.

  • [factorRadiusMaximum] (real; default 3.0d0) — The maximum factor by which to interpolate in radius.

darkMatterProfileDMOAccretionFlowCorrelationFunction

An accretion flow class which models the accretion flow using the 2-halo correlation function by building massDistributionCorrelationFunction objects.

Parameters

  • [scaleFactorVelocity] (real; default 1.0d0) — A dimensionless multiplicative scale factor applied to the inflow velocities computed from the correlation-function-based accretion flow model, allowing calibration of the infall velocity amplitude relative to the two-point clustering prediction.

darkMatterProfileDMOAccretionFlowDiemerKravtsov2014

An accretion flow class which models the accretion flow using the fitting function of Diemer and Kravtsov (2014). Specifically, massDistributionDiemerKravtsov2014 objects are built with parameters chosen using fits to the redshift and \(\nu\) dependencies of the fitting parameters \(b_\mathrm{e}\) and \(s_\mathrm{e}\) chosen to match the results of their figure 18.

Parameters

  • [b0] (real; default +1.1250d0) — The parameter \(b_0\) in the fitting function \(b(\nu,z)=b_0 (1+z)^{b_z} \nu^{b_\nu}\) for the parameter \(b(\nu,z)\) appearing in equation (4) of Diemer and Kravtsov (2014).

  • [bz] (real; default +0.625d0) — The parameter \(b_z\) in the fitting function \(b(\nu,z)=b_0 (1+z)^{b_z} \nu^{b_\nu}\) for the parameter \(b(\nu,z)\) appearing in equation (4) of Diemer and Kravtsov (2014).

  • [bnu] (real; default -0.2250d0) — The parameter \(b_\nu\) in the fitting function \(b(\nu,z)=b_0 (1+z)^{b_z} \nu^{b_\nu}\) for the parameter \(b(\nu,z)\) appearing in equation (4) of Diemer and Kravtsov (2014).

  • [s0] (real; default +1.3925d0) — The parameter \(s_0\) in the fitting function \(s(\nu,z)=s_0 (1+z)^{s_z} \nu^{s_\nu}\) for the parameter \(s(\nu,z)\) appearing in equation (4) of Diemer and Kravtsov (2014).

  • [sz] (real; default -0.199d0) — The parameter \(s_z\) in the fitting function \(s(\nu,z)=s_0 (1+z)^{s_z} \nu^{s_\nu}\) for the parameter \(s(\nu,z)\) appearing in equation (4) of Diemer and Kravtsov (2014).

  • [snu] (real; default +0.0875d0) — The parameter \(s_\nu\) in the fitting function \(s(\nu,z)=s_0 (1+z)^{s_z} \nu^{s_\nu}\) for the parameter \(s(\nu,z)\) appearing in equation (4) of Diemer and Kravtsov (2014).

darkMatterProfileDMOAccretionFlowShi2016

A dark matter profile class which builds massDistributionShi2016 objects to model accretion flows using the model of Shi (2016).

Methods

  • solve — Solve for the structure of the accretion flow.

Parameters

  • [scaleFactorVelocity] (real; default 1.0d0) — A dimensionless multiplicative scale factor applied to the inflow velocities computed from the Shi (2016) splashback and accretion flow model, allowing calibration of the infall velocity amplitude relative to the theoretical prediction.

darkMatterProfileDMOBurkert

A dark matter only profile class which builds massDistributionBurkert objects to compute the (Burkert, 1995) density profile.

Methods

  • timeFreefallTabulate — Tabulate the freefall time as a function of radius in a scale-free Burkert mass distribution.

darkMatterProfileDMOCuspNFW

A dark matter profile DMO class which builds massDistributionCuspNFW objects to implement the cusp-NFW density profile (Delos, 2025), normalized such that the total mass of the node is enclosed with the virial radius and with the scale length \(r_\mathrm{s}\).

Parameters

  • [toleranceRelativeVelocityDispersion] (real; default 1.0d-6) — The relative tolerance to use in numerical solutions for the velocity dispersion.

  • [toleranceRelativeVelocityDispersionMaximum] (real; default 1.0d-3) — The maximum relative tolerance to use in numerical solutions for the velocity dispersion.

  • [velocityDispersionUseSeriesExpansion] (boolean; default .true.) — If true, radial velocity dispersion is computed using series expansion (but only for the case of \(y=0\), i.e. an NFW profile).

darkMatterProfileDMODecaying

A dark matter profile DMO class which builds massDistributionSphericalDecaying objects to account for dark matter particle decays in some other dark matter profile.

Methods

  • lifetime — Return the lifetime of the dark matter particle.

  • massSplitting — Return the mass splitting of the decay.

  • velocityKick — Return the velocity kick imparted by the decay.

Parameters

  • [toleranceRelativeVelocityDispersion] (real; default 1.0d-6) — The relative tolerance to use in numerical solutions for the velocity dispersion.

  • [toleranceRelativeVelocityDispersionMaximum] (real; default 1.0d-3) — The maximum relative tolerance to use in numerical solutions for the velocity dispersion.

  • [toleranceRelativePotential] (real; default 1.0d-3) — The relative tolerance to use in numerical solutions for the gravitational potential.

  • [tolerateEnclosedMassIntegrationFailure] (boolean; default .false.) — If true, tolerate failures to find the mass enclosed as a function of radius.

  • [tolerateVelocityMaximumFailure] (boolean; default .false.) — If true, tolerate failures to find the radius of the maximum circular velocity.

  • [toleratePotentialIntegrationFailure] (boolean; default .false.) — If true, tolerate failures to compute the potential.

darkMatterProfileDMOEinasto

A dark matter profile DMO class which builds massDistributionEinasto objects to compute the Einasto density profile (e.g. Cardone et al. 2005), normalized such that the total mass of the node is enclosed with the virial radius and with the characteristic length \(r_{-2} = r_\mathrm{virial}/c\) where \(c\) is the halo concentration (see darkMatterProfileConcentration). The shape parameter, \(\alpha\), is set using the density profile shape method (see darkMatterProfileShape).

Methods

  • timeFreefallTabulate — Tabulate the freefall time as a function of radius in a scale-free Einasto mass distribution.

  • timeFreefallMinimum — Compute the minimum freefall time in a scale-free Einasto mass distribution.

darkMatterProfileDMOFiniteResolution

A dark matter profile DMO class which builds massDistributionSphericalFiniteResolution objects to mimic the effects of finite resolution in an N-body simulation.

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

  • [lengthResolution] (real) — The spatial resolution length scale (in Mpc) below which the underlying density profile is softened to a flat core, mimicking the finite force resolution of an N-body simulation.

  • [massResolution] (real) — The mass resolution \(\Delta M\) (in \(\mathrm{M}_\odot\)) of the N-body simulation, representing the minimum halo mass that can be resolved; profiles of halos near this limit are softened to account for particle discreteness effects.

  • [resolutionIsComoving] (boolean) — If true, the resolution length is assumed to be fixed in comoving coordinates, otherwise in physical coordinates.

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available. If set to “fallThrough” then the solution ignoring heating is used, while if set to “numerical” then numerical solvers are used to find solutions.

darkMatterProfileDMOFiniteResolutionNFW

A dark matter profile DMO class which builds massDistributionSphericalFiniteResolutionNFW objects to mimic a finite resolution to an NFW density profile.

Methods

  • radiusEnclosingDensityTabulate — Tabulate the radius enclosing a given density as a function of density and core radius.

  • radiusEnclosingMassTabulate — Tabulate the radius enclosing a given mass as a function of density and core radius.

  • energyTabulate — Tabulate the energy as a function of concentration and core radius.

  • densityScaleFree — The density of the profile in units where the mass and scale length are both 1.

  • massEnclosedScaleFree — The mass enclosed of the profile in units where the mass and scale length are both 1.

  • storeDensityTable — Store the tabulated radius-enclosing-density to file.

  • restoreDensityTable — Attempt to restore the tabulated radius-enclosing-density from file, returning true if successful.

  • storeMassTable — Store the tabulated radius-enclosing-mass to file.

  • restoreMassTable — Attempt to restore the tabulated radius-enclosing-mass from file, returning true if successful.

  • storeEnergyTable — Store the tabulated energy to file.

  • restoreEnergyTable — Attempt to restore the tabulated energy from file, returning true if successful.

  • suffix — Return a file name suffix (containing a source code digest.

Parameters

  • [lengthResolution] (real) — The spatial resolution length scale (in Mpc) of the N-body simulation being modeled; sets the minimum effective radius below which the NFW density profile is softened.

  • [massResolution] (real) — The mass resolution \(\Delta M\) (in \(\mathrm{M}_\odot\)) of the N-body simulation, used to determine the finite-resolution softening of the NFW profile for halos near the resolution limit.

  • [resolutionIsComoving] (boolean) — If true, the resolution length is assumed to be fixed in comoving coordinates, otherwise in physical coordinates.

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available. If set to “fallThrough” then the solution ignoring heating is used, while if set to “numerical” then numerical solvers are used to find solutions.

darkMatterProfileDMOHeated

A dark matter profile DMO class which builds massDistributionSphericalHeated objects to account for heating of some other dark matter 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

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available. If set to “fallThrough” then the solution ignoring heating is used, while if set to “numerical” then numerical solvers are used to find solutions.

  • [velocityDispersionApproximate] (boolean; default .true.) — If true, radial velocity dispersion is computed using an approximate method in which we assume that \(\sigma_\mathrm{r}^2(r) \rightarrow \sigma_\mathrm{r}^2(r) - (2/3) \epsilon(r)\), where \(\epsilon(r)\) is the specific heating energy. If false then radial velocity dispersion is computed by numerically solving the Jeans equation.

  • [tolerateEnclosedMassIntegrationFailure] (boolean; default .false.) — If true, tolerate failures to find the mass enclosed as a function of radius.

  • [tolerateVelocityDispersionFailure] (boolean; default .false.) — If true, tolerate failures to compute the velocity dispersion.

  • [tolerateVelocityMaximumFailure] (boolean; default .false.) — If true, tolerate failures to find the radius of the peak in the rotation curve.

  • [toleratePotentialIntegrationFailure] (boolean; default .false.) — If true, tolerate failures to compute the potential.

  • [toleranceRelativeVelocityDispersion] (real; default 1.0d-6) — The relative tolerance to use in numerical solutions for the velocity dispersion in dark-matter-only density profiles.

  • [toleranceRelativeVelocityDispersionMaximum] (real; default 1.0d-3) — The maximum relative tolerance to use in numerical solutions for the velocity dispersion in dark-matter-only density profiles.

  • [fractionRadiusFinalSmall] (real; default 1.0d-3) — The initial radius is limited to be no smaller than this fraction of the final radius. This can help avoid problems in profiles that are extremely close to being disrupted.

  • [toleranceRelativePotential] (real; default 1.0d-3) — The maximum allowed relative tolerance to use in numerical solutions for the gravitational potential in dark-matter-only density profiles before aborting.

darkMatterProfileDMOHeatedMonotonic

A dark matter profile DMO class in which builds massDistributionSphericalHeatedMonotonic objects to account for heating of some other dark matter profile.

Methods

  • computeSolution — Compute a solution for the heated profile.

Parameters

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available. If set to “fallThrough” then the solution ignoring heating is used, while if set to “numerical” then numerical solvers are used to find solutions.

  • [toleranceRelativeVelocityDispersion] (real; default 1.0d-6) — The relative tolerance to use in numerical solutions for the velocity dispersion in dark-matter-only density profiles.

  • [toleranceRelativeVelocityDispersionMaximum] (real; default 1.0d-3) — The maximum relative tolerance to use in numerical solutions for the velocity dispersion in dark-matter-only density profiles.

darkMatterProfileDMOIsothermal

A dark matter profile DMO class in which builds massDistributionIsothermal objects to implement isothermal density profiles, normalized such that the total mass of the node is enclosed with the virial radius.

darkMatterProfileDMOMultiple

A dark matter profile DMO class in which the density profiles of the host halo and the satellite halo can be set separately to any other darkMatterProfileDMO available.

darkMatterProfileDMONFW

A dark matter profile DMO class which builds massDistributionNFW objects to implement the NFW density profile (Navarro et al., 1997), normalized such that the total mass of the node is enclosed with the virial radius and with the scale length \(r_\mathrm{s} = r_\mathrm{virial}/c\) where \(c\) is the halo concentration (see darkMatterProfileConcentration).

(Default implementation)

Methods

  • radiusEnclosingDensityTabulate — Tabulate the radius enclosing a given density as a function of density and core radius.

  • radiusEnclosingMassTabulate — Tabulate the radius enclosing a given mass as a function of density and core radius.

  • energyTabulate — Tabulate the energy as a function of concentration and core radius.

  • densityScaleFree — The density of the profile in units where the mass and scale length are both 1.

  • massEnclosedScaleFree — The mass enclosed of the profile in units where the mass and scale length are both 1.

  • storeDensityTable — Store the tabulated radius-enclosing-density to file.

  • restoreDensityTable — Attempt to restore the tabulated radius-enclosing-density from file, returning true if successful.

  • storeMassTable — Store the tabulated radius-enclosing-mass to file.

  • restoreMassTable — Attempt to restore the tabulated radius-enclosing-mass from file, returning true if successful.

  • storeEnergyTable — Store the tabulated energy to file.

  • restoreEnergyTable — Attempt to restore the tabulated energy from file, returning true if successful.

  • suffix — Return a file name suffix (containing a source code digest.

Parameters

  • [velocityDispersionUseSeriesExpansion] (boolean; default .true.) — If true, radial velocity dispersion is computed using series expansion.

darkMatterProfileDMOPenarrubia2010

A dark matter profile DMO class which builds massDistributionZhao1996 to implement the Peñarrubia et al. (2010) density profile.

Parameters

  • [alpha] (real) — The parameter \(\alpha\) of the Zhao (1996) dark matter density profile.

  • [beta] (real) — The parameter \(\beta\) of the Zhao (1996) dark matter density profile.

  • [betaStripped] (real; default 5.0d0) — The parameter \(\beta_\mathrm{stripped}\) of the Peñarrubia et al. (2010) dark matter density profile. This is the \(\beta\) exponent of the Zhao (1996) dark matter density profile for cases where significant stripping of the profile has occurred.

  • [gamma] (real) — The parameter \(\gamma\) of the Zhao (1996) dark matter density profile.

  • [muRadius] (real) — The parameter \(\mu\) of the Peñarrubia et al. (2010) tidal track for \(r_\mathrm{max}\).

  • [etaRadius] (real) — The parameter \(\eta\) of the Peñarrubia et al. (2010) tidal track for \(r_\mathrm{max}\).

  • [muVelocity] (real) — The parameter \(\mu\) of the Peñarrubia et al. (2010) tidal track for \(V_\mathrm{max}\).

  • [etaVelocity] (real) — The parameter \(\eta\) of the Peñarrubia et al. (2010) tidal track for \(V_\mathrm{max}\).

darkMatterProfileDMOSIDMCoreNFW

Cored-NFW dark matter halo profiles to approximate the effects of SIDM based on the model of Jiang et al. (2023) are built via massDistributionSphericalSIDMCoreNFW objects.

Methods

  • radiusCore — Computes the core radius of halo.

Parameters

  • [factorRadiusCore] (real; default 0.45d0) — The factor \(\alpha\) appearing in the definition of the core radius, \(r_\mathrm{c}=\alpha r_1\) where \(r_1\) is the radius at which an SIDM particle has had, on average, 1 interaction.

darkMatterProfileDMOSIDMIsothermal

Dark matter halo profiles for self-interacting dark matter following the “isothermal” model of Jiang et al. (2023) are built via the massDistributionSphericalSIDMIsothermal mass distribution class.

darkMatterProfileDMOSIDMParametric

Dark matter halo profiles for self-interacting dark matter following the “SIDM parametric” model of Yang et al. (2024) are built via the massDistributionSIDMParametricProfile class.

Parameters

  • [beta] (real; default 4.0d0) — The value \(\beta\) in a SIDMParametric-model mass distribution.

darkMatterProfileDMOSolitonNFW

A dark matter profile DMO class which builds massDistributionSolitonNFW objects to implement the FDM profile. The core-halo mass relation and core radius are computed following Chan et al. (2022), while the core density normalization follows Schive et al. (2014).

Methods

  • computeProperties — Compute properties of the mass distribution.

  • calculationReset — Reset memoized calculations.

Parameters

  • [toleranceRelativeVelocityDispersion] (real; default 1.0d-6) — The relative tolerance to use in numerical solutions for the velocity dispersion.

  • [toleranceRelativeVelocityDispersionMaximum] (real; default 1.0d-3) — The maximum relative tolerance to use in numerical solutions for the velocity dispersion.

  • [scatterFractional] (real; default 0.5d0) — The fractional scatter in the solitonic core-halo mass relation (default corresponds to a 50% fractional scatter).

darkMatterProfileDMOSolitonNFWHeated

A dark matter profile DMO class which builds massDistributionSolitonNFWHeated objects to implement the FDM profile. The inner region follows the soliton solution, while the outer region transitions to a heated NFW envelope. The core-halo mass relation and core radius are computed following Chan et al. (2022), while the core density normalization follows Schive et al. (2014).

Methods

  • computeProperties — Compute properties of the mass distribution.

  • calculationReset — Reset memoized calculations.

Parameters

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available. If set to “fallThrough” then the solution ignoring heating is used, while if set to “numerical” then numerical solvers are used to find solutions.

  • [tolerateEnclosedMassIntegrationFailure] (boolean; default .false.) — If true, tolerate failures to find the mass enclosed as a function of radius.

  • [tolerateVelocityMaximumFailure] (boolean; default .false.) — If true, tolerate failures to find the radius of the maximum circular velocity.

  • [toleratePotentialIntegrationFailure] (boolean; default .false.) — If true, tolerate numerical failures when computing the gravitational potential of the heated soliton-NFW dark matter profile (e.g. due to extreme heating), allowing the calculation to proceed with a fallback result.

  • [velocityDispersionApproximate] (boolean; default .true.) — If true, radial velocity dispersion is computed using an approximate method in which we assume that \(\sigma_\mathrm{r}^2(r) \rightarrow \sigma_\mathrm{r}^2(r) - (2/3) \epsilon(r)\), where \(\epsilon(r)\) is the specific heating energy. If false then radial velocity dispersion is computed by numerically solving the Jeans equation.

  • [toleranceRelativeVelocityDispersion] (real; default 1.0d-6) — The relative tolerance to use in numerical solutions for the velocity dispersion.

  • [toleranceRelativeVelocityDispersionMaximum] (real; default 1.0d-3) — The maximum relative tolerance to use in numerical solutions for the velocity dispersion.

  • [fractionRadiusFinalSmall] (real; default 1.0d-3) — The initial radius is limited to be no smaller than this fraction of the final radius. This can help avoid problems in profiles that are extremely close to being disrupted.

  • [toleranceRelativePotential] (real; default 1.0d-3) — The relative tolerance used in numerical ODE solutions for the gravitational potential of the heated soliton-NFW composite profile.

  • [scatterFractional] (real; default 0.5d0) — The fractional scatter in the solitonic core-halo mass relation (default corresponds to a 50% fractional scatter).

darkMatterProfileDMOTruncated

Truncated dark matter halo profiles are built via the massDistributionSphericalTruncated mass distribution class.

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

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available. If set to “fallThrough” then the solution ignoring heating is used, while if set to “numerical” then numerical solvers are used to find solutions.

  • [radiusFractionalTruncateMinimum] (real; default 2.0d0) — The minimum radius (in units of the virial radius) to begin truncating the density profile.

  • [radiusFractionalTruncateMaximum] (real; default 4.0d0) — The maximum radius (in units of the virial radius) to finish truncating the density profile.

darkMatterProfileDMOTruncatedExponential

Exponentially truncated dark matter halo profiles Kazantzidis et al. (2006) are constructed via the massDistributionSphericalTruncatedExponential mass distribution class.

Parameters

  • [nonAnalyticSolver] (string; one of fallThrough, numerical; default fallThrough) — Selects how solutions are computed when no analytic solution is available.

  • [radiusFractionalDecay] (real; default 1.0d0) — The truncation scale radius expressed as a fraction of the virial radius; the exponentially truncated dark matter profile decays as \(\exp(-r/r_\mathrm{trunc})\) for \(r > r_\mathrm{trunc} =\) [radiusFractionalDecay] \(\times r_\mathrm{virial}\), suppressing the profile at large radii.

darkMatterProfileDMOZhao1996

A dark matter profile DMO class which builds massDistributionZhao1996 objects.

Methods

  • timeFreefallTabulate — Tabulate the freefall time as a function of radius in a scale-free Zhao1996 mass distribution.

Parameters

  • [alpha] (real) — The parameter \(\alpha\) of the Zhao1996 profile.

  • [beta] (real) — The parameter \(\beta\) of the Zhao1996 profile.

  • [gamma] (real) — The parameter \(\gamma\) of the Zhao1996 profile.