Grackle cooling for primordial chemistry > 0 needs checking and fixing
I was trying to re-create the cooling I use in the RT part with just the cooling module, and have found several problems. E.g. for any flag --with-cooling=grackle_N
for N
> 0, the code wouldn't even compile. (fixed with !1522 (merged) ) This means that all the grackle cooling using primordial networks N
> 0 haven't been tested or even compiled in quite a while. Somebody needs to check whether it's working as intended.
Secondly, during initialization for N
> 0, the grackle cooling tries to set up ionization equilibrium using a call to a grackle function. Since this is called during first_init_part
, the particle density is estimated using a magical formula, which may fail spectacularly. This also needs fixing. I haven't investigated this issue further, there might be more problems with it. For reference, I do the same thing in RT using my own functions, not grackle's, and by adding a loop over all particles after the initial fake time step, where the correct densities are available.