Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Classes | Functions
cooling_cuda.cu File Reference

Functions to calculate cooling rate for a given rho, P, dt. More...

#include <math.h>
#include "../cooling/cool_components.h"
#include "../cooling/cooling_cuda.h"
#include "../cooling/load_cloudy_texture.h"
#include "../global/global.h"
#include "../global/global_cuda.h"
#include "../utils/error_handling.h"
#include "../utils/gpu.hpp"
Include dependency graph for cooling_cuda.cu:

Classes

class  CoolingUpdateExecutor< CoolingRecipe >
 Instances of this class template are callables that serve as callback functions for applying cooling to the grid. More...
 
struct  CoolRecipeCIE
 Analytic fit to a solar metallicity CIE cooling curve calculated using Cloudy. More...
 
class  CoolRecipeCloudy
 Uses texture mapping to interpolate Cloudy cooling/heating tables at z = 0 with solar metallicity and an HM05 UV background. More...
 
class  CoolRecipeCloudyAndPhotoHeating
 
class  CoolRecipeTIAndCIE
 Analytic cooling/heating recipe that roughly matches the "TI" cooling runs shown in Kim & Ostriker 2015 More...
 
class  CoolRecipeTIAndCIEAndPhotoHeating
 Analytic cooling/heating recipe that roughly matches the "TI" cooling runs shown in in Kim & Ostriker 2015 And that includes constributions from photoelectric Heating. More...
 

Functions

template<typename CoolingRecipe >
__global__ void cooling_kernel (Real *dev_conserved, int nx, int ny, int nz, int n_ghost, int n_fields, Real dt, Real gamma, CoolingRecipe recipe)
 
std::function< void(Grid3D &)> configure_cooling_callback (std::string kind, ParameterMap &pmap)
 

Detailed Description

Functions to calculate cooling rate for a given rho, P, dt.

Nearly all of the functionality implemented in this file follow a common strategy. At this time of writing, there is essentially 1 functions that deviates from the strategy (primordial_cool), which are is left over from earlier implementations.

Interface

In detail, the configure_cooling_callback function produces a std::function, which serves as a callback that performs cooling

Implementation Strategy

At this time of writing, we implement cooling functionality with some basic template-machinery

Our idea revolves around the concept of a CoolingRecipe.

To perform cooling with a given recipe, we an instance of the cooling_recipe to the global function, cooling_kernel. The concrete type of the CoolingRecipe is a template parameter, cooling_kernel, so that invocations of kernels are effectively specialized for each type of recipe.

The CoolingUpdateExecutor class template simply serves as a nice way to package the particular kind of CoolingRecipe (and and cooling-recipe-specific parameters) with the logic for launching cooling_kernel.

Function Documentation

◆ configure_cooling_callback()

std::function< void(Grid3D &)> configure_cooling_callback ( std::string  kind,
ParameterMap pmap 
)

construct a callback that performs heating/cooling (to approximate the impact of chemistry).

The returned callback can be used as the chemistry_callback