## Grackle cooling (resampled)

The units of the cooling rates in the Grackle tables are confusing. Document here what they actually are.

## Photoelectric heating

The file `photoelectric_heating_from_sfh.csv` is a table of the photoelectric heating rate in units of `erg / s / H / (Msun/kpc^2)` as a function of age (years), generated by the SLUG code. The weight function has been normalised so that if you define `dM` = change in stellar mass per unit area in units of `Msun/kpc^2`, then the photoelectric heating rate produced by those stars `dM` of age `t` is

```
d_Gamma_PE = w(t) * d_M
```

That is, the instantaneous photoelectric heating rate is given by

$$
\Gamma_{\rm PE} (t) = \int_{0}^{t} w(t - t') \Sigma_{\rm SF}(t') dt'.
$$

Here is how one	could compute the PE heating rate in practice. If your box cross section is `area_kpc2`, you can just record in your table the time `t` (in years) and stellar mass `Mstar` (in solar mass) at each time, and then compute the instantaneous photoelectric heating rate as

```
Gamma_PE = sum_i * (Mstar_{i+1} - Mstar_i) / area_kpc2 * w(t_current - t_{i})
```

and get the photoelectric heating rate in units of `erg / s / H`. The normalisation has been chosen so that the solar neighbourhood SFR per unit area (`2.5 x 10^-3 Msun / kpc^2 / yr`) corresponds to `Gamma_PE = 2e-26 erg/s/H`.

The structure of the csv file follows Quokka's DataTable format (https://github.com/quokka-astro/quokka/pull/1373).