Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Classes | Functions
cool_component Namespace Reference

Describes cooling components. More...

Classes

class  CloudyHeatAndCool
 A callable type that uses texture mapping to interpolate Cloudy cooling/heating. More...
 
class  PhotoelectricHeatingModel
 

Functions

__device__ Real primordial_cool (Real n, Real T)
 
__device__ Real analytic_creasey11_lambda (Real n, Real T)
 Cooling the cooling function from Creasey 2011.
 
__device__ __forceinline__ Real analytic_cie_lambda (Real log10T)
 computes the cooling rate, based on an analytic fit to a solar metallicity CIE cooling curve calculated using Cloudy. For log10T, this returns 0
 
__device__ __forceinline__ Real analytic_koyama_inutsuka_02_lambda (Real T)
 computes the cooling rate, based on an analytic fit provided in Koyama & Inutsuka (2002)
 
__device__ __forceinline__ Real combined_analytic_ti_cie_lambda (Real T)
 Analytic cooling function recipe that roughly matches the "TI" cooling runs shown in in Kim & Ostriker 2015
 

Detailed Description

Describes cooling components.

Note
Maybe we should call this namespace edot_component? (Since there's heating & cooling)

Each cooling recipe is composed of one or more cooling components. A cooling component is a "callable" (i.e. it's a function or it's a class that implements the appropriate method that let's be called just like a function).

Optimization Notes

It's important that that "core-logic" of each cooling component is implemented in a header file or in the same source file where a recipe actually invokes the "core logic". The "core-logic" includes code paths accessible through function-call syntax. To be more explicit,

We may also want to consider using __forceinline__. With that said, we should only use __forceinline__ if it explicitly provides a performance improvement (blindly using __forceinline__ can actually hurt performance)

In the future, if most heating and cooling contributiond need log10(n) and log10(T), we may want to consider pre-computing those values. In this scenario, we probably want to continue providing n and T. This could potentially improve performance in recipies using multiple independent contributions since log10 and pow are generally a lot more expensive than most other operations relevant for computing heating and cooling

Function Documentation

◆ analytic_cie_lambda()

__device__ __forceinline__ Real cool_component::analytic_cie_lambda ( Real  log10T)

computes the cooling rate, based on an analytic fit to a solar metallicity CIE cooling curve calculated using Cloudy. For log10T, this returns 0

Returns
The cooling rate, lambda, in units of erg s^-1 cm^3 (it is NEVER negative)
Note
It may not be necessary to use forceinline, I just used it to ensure I didn't harm existing performance
The actual formula for the fit is first described in the appendix of (Schneider & Robertson 2018)[https://ui.adsabs.harvard.edu/abs/2018ApJ...860..135S/abstract

◆ analytic_creasey11_lambda()

__device__ Real cool_component::analytic_creasey11_lambda ( Real  n,
Real  T 
)
inline

Cooling the cooling function from Creasey 2011.

This was historically used as a test function (it isn't currently used for anything)

Returns
The cooling rate, lambda, in units of erg s^-1 cm^3 (it is NEVER negative)

◆ analytic_koyama_inutsuka_02_lambda()

__device__ __forceinline__ Real cool_component::analytic_koyama_inutsuka_02_lambda ( Real  T)

computes the cooling rate, based on an analytic fit provided in Koyama & Inutsuka (2002)

Returns
The cooling rate, lambda, in units of erg s^-1 cm^3 (it is NEVER negative)
Note
It may not be necessary to use forceinline, I just used it to ensure I didn't harm existing performance
The actual formula for the fit is given as equations 4 and 5 in (Koyama & Inutsuka 2002)[https://ui.adsabs.harvard.edu/abs/2018ApJ...860..135S/abstract].

◆ combined_analytic_ti_cie_lambda()

__device__ __forceinline__ Real cool_component::combined_analytic_ti_cie_lambda ( Real  T)

Analytic cooling function recipe that roughly matches the "TI" cooling runs shown in in Kim & Ostriker 2015

For temperatures below 1e4 K:

  • We adopt the same analytic fitting formula as Kim & Ostriker 2015 for T < 1e4 K, which is an analytic fit to the results of Koyama & Inutsuka (2002).
  • a description of this fit is provided within Kim+2008 For temperatures above 1e4 K
  • we directly use the exact same analytic CIE fit as CoolRecipeCIE
Returns
The cooling rate, lambda, in units of erg s^-1 cm^3 (it is NEVER negative)
Note
It may not be necessary to use forceinline, I just used it to ensure I didn't harm existing performance
Warning
Be aware, that all of our cooling infrastructure probably does not properly account for changes in mean molecular weights. Historically, we just assumed a fixed mean molecular weight of 0.6 when we used a CIE analytic fit. In practice, the fit below 1e4 K is intended to be used with a mean molecular weight fixed to ~1.25

◆ primordial_cool()

__device__ Real cool_component::primordial_cool ( Real  n,
Real  T 
)
inline

Primordial hydrogen/helium cooling curve (derived according to Katz et al. 1996.)