Cooling Function

Class providing radiative cooling functions of gas, \(\Lambda(\rho,T,\mathbf{Z})\), in units of erg cm\(^{-3}\) s\(^{-1}\). The cooling function encodes the rate at which gas loses energy per unit volume through line emission, bremsstrahlung, and other radiative processes, as a function of hydrogen number density, temperature, and metal abundances. Implementations may assume collisional ionization equilibrium (CIE) or account for photoionization by a radiation field. The logarithmic slopes with respect to density and temperature are also provided.

Default implementation: coolingFunctionAtomicCIECloudy

Methods

coolingFunctiondouble precision

Return the cooling function at the given temperature and hydrogen density for the specified set of abundances and radiation field. Units of the returned cooling function are the traditional ergs cm\(^{-3}\) s\(^{-1}\). Note that the cooling function here is defined per unit volume, rather than per unit hydrogen as is often the case.

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

  • double precision , intent(in ) :: numberDensityHydrogen, temperature

  • type (abundances ), intent(in ) :: gasAbundances

  • type (chemicalAbundances ), intent(in ) :: chemicalDensities

  • class (radiationFieldClass), intent(inout) :: radiation

coolingFunctionFractionInBanddouble precision

Return the fraction of the total cooling function due to emission in the the given energy range, specified by energyLow and energyHigh (in units of keV).

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

  • double precision , intent(in ) :: numberDensityHydrogen, temperature

  • type (abundances ), intent(in ) :: gasAbundances

  • type (chemicalAbundances ), intent(in ) :: chemicalDensities

  • class (radiationFieldClass), intent(inout) :: radiation

  • double precision , intent(in ) :: energyLow , energyHigh

coolingFunctionDensityLogSlopedouble precision

Return \(\d\ln\Lambda/\d\ln\rho\) for a cooling function at the given temperature and hydrogen density for the specified set of abundances and radiation field.

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

  • double precision , intent(in ) :: numberDensityHydrogen, temperature

  • type (abundances ), intent(in ) :: gasAbundances

  • type (chemicalAbundances ), intent(in ) :: chemicalDensities

  • class (radiationFieldClass), intent(inout) :: radiation

coolingFunctionTemperatureLogSlopedouble precision

Return \(\d\ln\Lambda/\d\ln T\) for a cooling function at the given temperature and hydrogen density for the specified set of abundances and radiation field.

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

  • double precision , intent(in ) :: numberDensityHydrogen, temperature

  • type (abundances ), intent(in ) :: gasAbundances

  • type (chemicalAbundances ), intent(in ) :: chemicalDensities

  • class (radiationFieldClass), intent(inout) :: radiation

coolingFunctionAtomicCIECloudy

A cooling function class that computes the cooling function using the Cloudy code and under the assumption of collisional ionization equilibrium with no molecular contribution. Abundances are Solar, except for zero metallicity calculations which use Cloudy’s primordial metallicity. The helium abundance for non-zero metallicity is scaled between primordial and Solar values linearly with metallicity. The Cloudy code will be downloaded and run to compute the cooling function as needed, which will then be stored for future use. As this process is slow, a precomputed table is provided with Galacticus. If metallicities outside the range tabulated in this file are required it will be regenerated with an appropriate range.

(Default implementation)

Methods

  • tabulate — Run Cloudy to tabulate the cooling function as necessary.

coolingFunctionCIEFile

A cooling function class providing a cooling function interpolated from a table read from file. The HDF5 file containing the table should have the following form:

HDF5 "coolingFunction.hdf5" {
GROUP "/" {
   ATTRIBUTE "fileFormat" {
      DATATYPE  H5T_STRING {
         STRSIZE 1;
         STRPAD H5T_STR_NULLTERM;
         CSET H5T_CSET_ASCII;
         CTYPE H5T_C_S1;
      }
      DATASPACE  SCALAR
      DATA {
      (0): "1"
      }
   }
   DATASET "coolingRate" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 7, 8 ) / ( 7, 8 ) }
   }
   DATASET "metallicity" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 8 ) / ( 8 ) }
      ATTRIBUTE "extrapolateHigh" {
         DATATYPE  H5T_STRING {
            STRSIZE 3;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
         DATASPACE  SCALAR
         DATA {
         (0): "fix"
         }
      }
      ATTRIBUTE "extrapolateLow" {
         DATATYPE  H5T_STRING {
            STRSIZE 3;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
         DATASPACE  SCALAR
         DATA {
         (0): "fix"
         }
      }
   }
   DATASET "temperature" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 7 ) / ( 7 ) }
      ATTRIBUTE "extrapolateHigh" {
         DATATYPE  H5T_STRING {
            STRSIZE 8;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
         DATASPACE  SCALAR
         DATA {
         (0): "powerLaw"
         }
      }
      ATTRIBUTE "extrapolateLow" {
         DATATYPE  H5T_STRING {
            STRSIZE 8;
            STRPAD H5T_STR_NULLTERM;
            CSET H5T_CSET_ASCII;
            CTYPE H5T_C_S1;
         }
         DATASPACE  SCALAR
         DATA {
         (0): "powerLaw"
         }
      }
   }
   DATASET "energyContinuum" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 7 ) / ( 7 ) }
   }
   DATASET "powerEmittedFractionalCumulative" {
      DATATYPE  H5T_IEEE_F64LE
      DATASPACE  SIMPLE { ( 7, 8, 10 ) / ( 7, 8, 10 ) }
   }
}
}

The temperature dataset should specify temperature (in Kelvin), while the metallicity dataset should give the logarithmic metallicity relative to Solar (a value of -999 or less is taken to imply zero metallicity). The coolingRate dataset should specify the cooling function (in ergs cm\(^3\) s\(^{-1}\) computed for a hydrogen density of 1 cm\(^{-3}\)) respectively at each temperature/metallicity pair. The extrapolateLow and extrapolateHigh attributes of the temperature and metallicity datasets specify how the cooling rate should be extrapolated in the low and high vale limits. Allowed options for these attributes are:

zero

The cooling function is set to zero beyond the relevant limit.

fixed

The cooling function is held fixed at the value at the relevant limit.

powerLaw

The cooling function is extrapolated assuming a power-law dependence beyond the relevant limit. This option is only allowed if the cooling function is everywhere positive.

If the cooling function is everywhere positive the interpolation will be done in the logarithm of temperature, metallicityfootnoteThe exception is if the first cooling function is tabulated for zero metallicity. In that case, a linear interpolation in metallicity is always used between zero and the first non-zero tabulated metallicity. and cooling function. Otherwise, interpolation is linear in these quantities. The cooling function is scaled assuming a quadratic dependence on hydrogen density.

The energyContinuum and powerEmittedFractionalCumulative are optional. If present, powerEmittedFractionalCumulative gives the cumulative emitted power as a function of energy for each tabulated metallicity and temperature. The energies at which the emitted power is tabulated are given by energyContinuum.

Methods

  • readFile — Read the named chemical state file.

  • interpolatingFactors — Compute interpolating factors in a CIE chemical state file.

  • interpolate — Interpolate in the given density table.

Parameters

  • [fileName] — The name of the file containing a tabulation of the collisional ionization equilibrium cooling function.

  • [fileName] — The name of the file containing a tabulation of the collisional ionization equilibrium chemical state.

coolingFunctionCMBCompton

A cooling function class that computes the cooling function due to Compton scattering off of CMB photons:

\[\Lambda = {4 \sigma_\mathrm{T} \mathrm{a} \mathrm{k}_\mathrm{B} n_\mathrm{e } \over m_\mathrm{e} \clight} T_\mathrm{CMB}^4 \left( T - T_\mathrm{CMB} \right),\]

where \(\sigma_\mathrm{T}\) is the Thompson cross-section, \(a\) is the radiation constant, \(\mathrm{k}_\mathrm{B}\) is Boltzmann’s constant, \(n_\mathrm{e}\) is the number density of electrons, \(m_\mathrm{e}\) is the electron mass, \(\clight\) is the speed of light, \(T_\mathrm{CMB}\) is the CMB temperature at the current cosmic epoch and \(T\) is the temperature of the gas. The electron density is computed from the selected chemical state method (see chemicalState).

coolingFunctionMolecularHydrogenGalliPalla

A cooling function class that computes the cooling function due to molecular hydrogen using the results of Galli and Palla (1998). For the H–H\(_2\) cooling function, the fitting functions from Galli and Palla (1998) are used. For the H\(_2^+\)–e\(^-\) and H–H\(_2^+\) cooling functions fitting functions to the results plotted in Suchkov and Shchekinov (1978) are used:

(4)\[\log_{10}\left({\Lambda(T) \over \hbox{erg s}^{-1} \hbox{cm}^3}\right) = C_0 + C_1 \log_{10} \left({T\over\hbox{K}}\right) + C_2 \left[\log_{10} \left({T\over\hbox{K}}\right)\right]^2,\]

where the coefficients \(C_{0-2}\) are given in Table 2.

Table 2 Coefficients of H\(_2^+\) cooling functions as appearing in the fitting function, eq. (4).

Coefficient

Interaction

\(C_0\)

\(C_1\)

\(C_2\)

H\(_2^+\)–e\(^-\)

-33.33

5.565

-0.4675

H–H\(_2^+\)

-35.28

5.862

-0.5124

Methods

  • coolingFunctionH_H2 — Compute the cooling function due to H–H\(_2\).

  • coolingFunctionH2Plus_Electron — Compute the cooling function due to H\(_2^+\)–e\(^-\).

  • coolingFunctionH_H2Plus — Compute the cooling function due to H–H\(_2^+\).

  • commonFactors — Compute common factors.

coolingFunctionSummation

Computes the total cooling function as a sum over multiple coolingFunctionClass objects, enabling construction of composite cooling functions from individual contributions (e.g., atomic cooling plus CMB Compton scattering).

Methods

  • list — Return a list of all sub-components.

coolingFunctionVelocityCutOff

A cooling function class which suppresses the cooling function of another class in halos with virial velocities below [velocityCutOff] and at redshifts before or after [redshiftCutOff], as selected by [whenCutOff]. The formation or current node virial velocity is used depending on [useFormationNode].

Methods

  • isCutOff — Returns true if the cooling function is cut off.

Parameters

  • [useFormationNode] (default .false.) — Specifies whether to use the virial velocity of the formation node or current node in the cooling rate “cut-off” modifier.

  • [velocityCutOff] (default 0.0d0) — The velocity below which cooling is suppressed in the “cut-off” cooling rate modifier method.

  • [redshiftCutOff] (default 0.0d0) — The redshift below which cooling is suppressed in the “cut-off” cooling rate modifier method.

  • [whenCutOff] (default var_str('after')) — Specifies whether cooling is cut off before or after [redshiftCutOff].