Accretion Onto Halos¶
Class providing rates of accretion of gas from the IGM onto halos. This is expected to depend on (at least) the rate at which that halo mass is growing, the depth of its potential well and the thermodynamical properties of the accreting gas.
Default implementation: accretionHaloSimple
Methods¶
branchHasBaryons→logicalReturns
trueif this tree branch may accrete baryons, andfalseotherwise.type(treeNode), intent(inout), target :: node
accretionRate→double precisionReturns the rate (in units of \(\mathrm{M}_\odot\) Gyr\(^{-1}\)) of accretion of mass from the IGM onto
nodein the givenaccretionMode.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
accretedMass→double precisionReturns the mass (in units of \(\mathrm{M}_\odot\)) of accreted from the IGM onto
nodein the givenaccretionMode. Used to initialize nodes.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
failedAccretionRate→double precisionReturns the rate (in units of \(\mathrm{M}_\odot\) Gyr\(^{-1}\)) of failed accretion of mass from the IGM onto
nodein the givenaccretionMode.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
failedAccretedMass→double precisionReturns the mass (in units of \(\mathrm{M}_\odot\)) that failed to accrete from the IGM onto
nodein the givenaccretionMode. Used to initialize nodes.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
accretionRateMetals→type(abundances)Returns the rate (in units of \(\mathrm{M}_\odot\) Gyr\(^{-1}\)) of accretion of metals from the IGM onto
nodein the givenaccretionMode.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
accretedMassMetals→type(abundances)Returns the mass of metals (in units of \(\mathrm{M}_\odot\)) of accreted from the IGM onto
nodein the givenaccretionMode. Used to initialize nodes.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
failedAccretionRateMetals→type(abundances)Returns the rate (in units of \(\mathrm{M}_\odot\) Gyr\(^{-1}\)) of failed accretion of metals from the IGM onto
nodein the givenaccretionMode.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
failedAccretedMassMetals→type(abundances)Returns the mass of metals (in units of \(\mathrm{M}_\odot\)) that failed to accrete from the IGM onto
nodein the givenaccretionMode. Used to initialize nodes.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
accretionRateChemicals→type(chemicalAbundances)Returns the rate (in units of \(\mathrm{M}_\odot\) Gyr\(^{-1}\)) of accretion of chemicals from the IGM onto
nodein the givenaccretionMode.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
accretedMassChemicals→type(chemicalAbundances)Returns the mass of chemicals (in units of \(\mathrm{M}_\odot\)) of accreted from the IGM onto
nodein the givenaccretionMode. Used to initialize nodes.type(treeNode ), intent(inout) :: nodetype(enumerationAccretionModeType), intent(in ) :: accretionMode
accretionHaloBertschinger¶
Accretion onto halos using simple truncation to mimic the effects of reionization, and the Bertschinger mass to define available mass.
accretionHaloColdMode¶
Accretion onto halos using simple truncation to mimic the effects of reionization and accounting for cold mode accretion. This class extends the simple class by dividing the accretion into hot and cold mode components. The cold mode fraction follows the approximation introduced by Benson and Bower (2010), namely:
where \(\delta=\)[accretionColdModeShockStabilityTransitionWidth], \(r = \epsilon_\mathrm{crit}/\epsilon\), and
where \(r_\mathrm{s}\) is the accretion shock radius, \(\Lambda\) is the post-shock cooling function, \(\rho_\mathrm{s}\) is the pre-shock density, \(v_\mathrm{s}\) is the pre-shock velocity, and \(\epsilon_\mathrm{crit}=\)[accretionColdModeShockStabilityThreshold]. The pre-shock radius is set equal to the halo virial radius, the pre-shock velocity is set equal to the halo virial velocity, while the pre-shock density is given by
where \(M\) is the total halo mass, \(\gamma(=5/3)\) is the adiabatic index of the gas, and \(\alpha\) is the exponent of the initial power-law density perturbation (\(\alpha=0\) is assumed). The post-shock density and temperature are found assuming the strong-shock limit.
Methods
initialize— Initialize after construction.calculationReset— Reset memoized calculations.chemicalMasses— Returns the total accretion rate from the IGM onto a halo (including dark matter).coldModeFraction— Returns the total accretion rate from the IGM onto a halo (including dark matter).
Parameters
[thresholdStabilityShock](default0.0126d0) — The threshold value, \(\epsilon_\mathrm{s,crit}\), for shock stability in the model of Birnboim and Dekel (2003).[widthTransitionStabilityShock](default0.01d0) — The width of the transition from stability to instability for cold mode accretion (Benson and Bower, 2010).
accretionHaloIsocurvature¶
An accretion onto halos decorator class which reduces the mass accreted to account for the effects of isocurvature perturbations following the model of Jessop et al. (2026). CLASS is used to compute perturbations in baryons and cold dark matter, \(\delta_\mathrm{b}\) and \(\delta_\mathrm{c}\) respectively, as a function of wavenumber. The correlation between these two is then computed using (Jessop et al., 2026):
where \(\delta_\mathrm{bc} = \delta_\mathrm{b}-\delta_\mathrm{c}\), and \(\tilde{W}(k|M)\) is the Fourier transform of a top-hat window function for mass scale \(M\).
The fraction of mass accreted into a halo is then reduced by a factor (Jessop et al., 2026):
where \(\bar{f}_\mathrm{b}\) is the universal baryon fraction, \(\delta_\mathrm{c}(t)\) is the critical overdensity for halo collapse, and \(D(t)\) is the linear growth factor.
Methods
fraction— Returns the fraction of baryons for halos of this mass, relative to the universal baryon fraction.
Parameters
[countPerDecade](default100) — The number of points per decade of wavenumber to compute in the CLASS perturbations. A value of 0 allows CLASS to choose what it considers to be optimal spacing of wavenumbers.
accretionHaloNaozBarkana2007¶
Accretion of baryonic onto halos is compute using the filtering mass prescription of Naoz and Barkana (2007). Specifically, Naoz and Barkana (2007) assume that the gas mass content of halos is given by \(M_\mathrm{g}(M_\mathrm{200b},M_\mathrm{F}) = (\Omega_\mathrm{b} / \Omega_\mathrm{M}) f(M_\mathrm{200b}/M_\mathrm{F}) M_\mathrm{200b}\) where \(M_\mathrm{F}\) is the filtering mass, as first introduced by Gnedin (2000) but defined following Naoz and Barkana (2007), \(M_\mathrm{200b}\) is the halo mass defined by a density threshold of 200 times the mean background, and
The accretion rate onto the halo is therefore assumed to be
This would result in a precise match to the Naoz and Barkana (2007) assumption if:
The filtering mass is constant in time;
\(M_\mathrm{total}\) corresponds to \(M_\mathrm{200b}\); and
The growth of halos occurs through smooth accretion, not through merging of smaller halos.
In practice all three assumptions are violated. As such, the mass fraction in the halo will differ from \(f(M_\mathrm{200b}/M_\mathrm{F})\). To address this issue, mass is additionally assumed to flow from the hot halo reservoir to the unaccreted mass reservoir at a rate:
where \(\alpha_\mathrm{adjust} =\)[rateAdjust].
Methods
calculationReset— Reset memoized calculations.initialize— Initialize the object after construction.filteredFraction— Returns the fraction of potential accretion onto a halo from the IGM which succeeded.filteredFractionRate— Returns the fraction of potential accretion rate onto a halo from the IGM which succeeds.filteredFractionCompute— Returns the fraction of potential accretion onto a halo from the IGM which succeeded given the halo and filtering masses.rateCorrection— Compute the rate (in units of Gyr\(^{-1}\)) for the corrective flow of mass between accreted and unaccreted reservoirs.
Parameters
[rateAdjust](default0.3d0) — The dimensionless multiplier for the rate at which the halo gas content adjusts to changes in the filtering mass.[massMinimum](default0.0d0) — The minimum mass of gas accreted into a halo below which the mass is truncated to zero.
accretionHaloSimple¶
Accretion onto halos using simple truncation to mimic the effects of reionization. The accretion rate of baryons into a halo is given by:
where \(z_\mathrm{reionization}=\)[redshiftReionization] is the redshift at which the Universe is reionized (alternatively, the optical depth to reionization can be specified via [opticalDepthReionization] and the corresponding redshift will be computed) and \(V_\mathrm{reionization}=\)[velocitySuppressionReionization] is the virial velocity below which accretion is suppressed after reionization. Setting \(V_\mathrm{reionization}\) to zero will effectively switch off the effects of reionization on the accretion of baryons. This algorithm attempts to offer a simple prescription for the effects of reionization and has been explored by multiple authors (e.g. Benson et al. 2002). In particular, Font et al. (2010) show that it produces results in good agreement with more elaborate treatments of reionization. For halos below the accretion threshold, any accretion rate that would have otherwise occurred is instead placed into the “failed” accretion rate. For halos which can accrete, and which have some mass in their “failed” reservoir, that mass will be added to the regular accretion rate at a rate equal to the mass of the “failed” reservoir times the specific growth rate of the halo. The gas accreted is assumed to be from a pristine IGM and so has zero abundances. Chemical abundances are computed from the chemical state functions (see chemicalState).
Note that, if \(\dot{M}_\mathrm{halo} < 0\) then negative accretion rates of gas into the node can result. This can be prevented by setting [accretionNegativeAllowed]\(=\)false.
By default, gas is accreted whenever the halo is growing in total mass. However, setting [accretionNewGrowthOnly]\(=\)true causes accretion to occur only if the node mass is growing and exceeds the previous maximum node mass achieved along this branch of the merger tree. This requires use of a basic component which tracks the maximum mass along the branch (i.e. the massMaximum property).
(Default implementation)
Methods
calculationReset— Reset memoized calculations.
Parameters
[efficiencyWind](default2.2157d-3) — The coupling efficiency of the black hole accretion-driven wind, defined as the fraction of the accreted rest-mass energy that is deposited as kinetic or thermal energy into the surrounding gas via AGN-driven outflows.[redshiftReionization](default9.97d0) — The redshift of reionization below which baryonic accretion onto halos is suppressed due to the ionizing background heating the intergalactic medium and preventing gas from accreting onto low-mass halos.[opticalDepthReionization]— The optical depth to electron scattering below which baryonic accretion is suppressed.[velocitySuppressionReionization](default35.0d0) — The velocity scale below which baryonic accretion is suppressed.[accretionNegativeAllowed](default.true.) — Specifies whether negative accretion (mass loss) is allowed in the simple halo accretion model.[accretionNewGrowthOnly](default.false.) — Specifies whether accretion from the IGM is allowed only when a halo is growing past its previous greatest mass.[acceptedStateCount](default100) — The number of states to use in acceptance rate statistics.[timeStepRelative](default0.1d0) — The maximum allowed relative change in time for a single step in the evolution of a node.[timeStepAbsolute](default1.0d0) — The maximum allowed absolute change in time (in Gyr) for a single step in the evolution of a node.[timeStepMinimum](default1.0d-6) — The smallest timestep to use in profiling ODE solver steps.[timeStepMaximum](default1.0d+1) — The largest timestep to use in profiling ODE solver steps.[timeStepPointsPerDecade](default3) — The number of bins per decade of timestep to use when profiling ODE solver steps.[wavelength](default1.0d4) — The wavelength of the photon packet (in AA).[wavelengthMinimum](default0.5d4) — The minimum wavelength of the photon packet (in AA).[wavelengthMaximum](default2.0d4) — The maximum wavelength of the photon packet (in AA).[luminosity](default1.0d0) — The luminosity of the photon packet (in \(L_\odot\)).[massRatioMajorMerger](default0.25d0) — The mass ratio above which mergers are considered to be “major”.[destinationGasMinorMerger](defaultvar_str('spheroid')) — The component to which satellite galaxy gas moves to as a result of a minor merger.[destinationStarsMinorMerger](defaultvar_str('spheroid')) — The component to which satellite galaxy stars move to as a result of a minor merger.[degreesOfFreedom](default3.0d0) — Number of degrees of freedom to assume when computing the energy density of cooling gas in the “simple” cooling time class.[timeScale](default1.0d0) — The timescale (in Gyr) for cooling in the simple cooling rate model.[reionizationRedshift](default9.97d0) — The redshift of reionization in the simple IGM state model.[reionizationTemperature](default1.0d4) — The post-reionization temperature (in units of Kelvin) in the simple IGM state model.[preReionizationTemperature](default10.0d0) — The pre-reionization temperature (in units of Kelvin) in the simple IGM state model.[useFormationHalo](default.false.) — Specifies whether or not the “formation halo” should be used when solving for the radii of galaxies.[solveForInactiveProperties](default.true.) — If true, galactic structure is solved for during evaluation of inactive property integrals. Otherwise, structure is not solved for during this phase—this should only be used if the inactive property integrands do not depend on galactic structure.[rateFractionalMaximum](default10.0d0) — The maximum fractional mass loss rate per dynamical time in the simple model of mass loss due to tidal stripping.[beta](default1.0d0) — The scaling factor which multiplies the tidal mass loss rate.[OmegaMatter](default0.3153d0) — The density of matter in the Universe in units of the critical density.[OmegaBaryon](default0.04930d0) — The density of baryons in the Universe in units of the critical density.[OmegaDarkEnergy](default0.6847d0) — The density of dark energy in the Universe in units of the critical density.[temperatureCMB](default2.72548d0) — The present day temperature of the CMB in units of Kelvin.[HubbleConstant](default67.36d0) — The present day value of the Hubble parameter in units of km/s/Mpc.
accretionHaloZero¶
A null implementation of halo accretion that assumes zero accretion of baryonic matter from the intergalactic medium onto halos at all times. Useful for isolating other physical processes or testing purposes.