.. _physics-coolingTime: Cooling Times ============= Class providing models of the cooling time (in Gyr) for gas in the hot halo surrounding a galaxy, defined as the ratio of the thermal energy density to the radiative cooling rate. Given temperature, density, elemental abundances, chemical species densities, and an ambient radiation field, implementations typically evaluate :math:`t_\mathrm{cool} = (3/2) n k_\mathrm{B} T / \mathcal{L}`. The logarithmic gradients with respect to density and temperature are also provided for use in implicit ODE solvers that integrate the cooling flow equations. **Default implementation:** ``coolingTimeSimple`` Methods ------- ``time`` → ``double precision`` Returns the cooling time for gas in the hot atmosphere surrounding the galaxy in units of Gyr. * ``type (treeNode ), intent(inout) :: node`` * ``double precision , intent(in ) :: temperature , density`` * ``type (abundances ), intent(in ) :: gasAbundances`` * ``type (chemicalAbundances ), intent(in ) :: chemicalDensities`` * ``class (radiationFieldClass), intent(inout) :: radiation`` ``gradientDensityLogarithmic`` → ``double precision`` Returns the logarithmic derivative of cooling time with respect to density for gas in the hot atmosphere surrounding the galaxy. * ``type (treeNode ), intent(inout) :: node`` * ``double precision , intent(in ) :: temperature , density`` * ``type (abundances ), intent(in ) :: gasAbundances`` * ``type (chemicalAbundances ), intent(in ) :: chemicalDensities`` * ``class (radiationFieldClass), intent(inout) :: radiation`` ``gradientTemperatureLogarithmic`` → ``double precision`` Returns the logarithmic derivative of cooling time with respect to temperature for gas in the hot atmosphere surrounding the galaxy. * ``type (treeNode ), intent(inout) :: node`` * ``double precision , intent(in ) :: temperature , density`` * ``type (abundances ), intent(in ) :: gasAbundances`` * ``type (chemicalAbundances ), intent(in ) :: chemicalDensities`` * ``class (radiationFieldClass), intent(inout) :: radiation`` .. _physics-coolingTimeSimple: ``coolingTimeSimple`` --------------------- A cooling time class in which the cooling time is simply .. math:: t_\mathrm{cool} = {N \over 2} {\mathrm{k}_\mathrm{B} T n_\mathrm{tot} \over \Lambda}, where :math:`N=`\ ``[degreesOfFreedom]`` is the number of degrees of freedom in the cooling gas which has temperature :math:`T` and total particle number density (including electrons) :math:`n_\mathrm{tot}` and :math:`\Lambda` is the cooling function. **(Default implementation)** **Methods** * ``calculationReset`` — Reset memoized calculations. **Parameters** * ``[degreesOfFreedom]`` (real; default ``3.0d0``) — Number of degrees of freedom to assume when computing the energy density of cooling gas in the "simple" cooling time class.