[newchem-cpp] Cleanup initialization of kcol_rate_tables#413
Conversation
6cef850 to
046e49e
Compare
kcol_rate_tableskcol_rate_tables
|
@brittonsmith -- this should be ready to go |
| // The following comment has been adapted from earlier versions of Grackle | ||
| // The rate comes from an experiment (297-3532 K). | ||
| // We refrain to extrapolate it to high temperatures. | ||
| // | ||
| // There are 2 issues here (that were not apparent in older Grackle versions): | ||
| // 1. Does this comment just apply to kz22? Or does it apply to kz22 and some | ||
| // of the subsequent rates? (which ones?) Or all of the subsequent rates? | ||
| // 2. The statement "We refrain to extrapolate it to high temperatures" needs | ||
| // to be clarified... | ||
| // - I assume that it should read "we refrain from extrapolating it to high | ||
| // temperatures" | ||
| // - but, we don't obviously do that. It seems like we use the values at ALL | ||
| // temperatures. |
There was a problem hiding this comment.
I have done a much deeper literature search than I thought I would (more than 10 papers) and have yet to find a reference to this experiment or that temperature range. Dalgarno & Black (1976) equation 2.28 had several references that I chased down, but at that point I can no longer see the rate appear in the same functional form.
This all begins with Omukai (2000), which is the primary source for nearly all the gas-phase reaction rates (as I think this model was explicitly derived from that). Nonetheless, I agree that I see no evidence that we are applying any form of truncation of this rate.
There was a problem hiding this comment.
UPDATE: a googling of the temperature range itself turned up this:
https://www.aanda.org/articles/aa/full_html/2017/11/aa30388-17/aa30388-17.html
I don't have time to dig deeper into the context here, but it looks like this comes from a UMIST database (which is ironically the first place I went after Omukai 2000.
Again, it doesn't look like we're actually doing anything with this information. I'm going to leave this here as I really REALLY have to get home now. Feel free to update the comment (or not) and I'll merge this in the morning.
This PR must be reviewed after #411 is merged
Overview
At a high-level this PR:
In more detail, all functionality that was previously in initialize_metal_chemistry_rates.cpp has been split between init_misc_species_cool_rates.cpp and collisional_rate_props.cpp.
Let's talk more about collisional_rate_props.cpp:
As part of this PR:
k1_rate,k2_rate, ...)1grackle::impl::visit_rate_propsfunction that effectively iterates through all standardized collisional reaction rate functions. This includes all of the existingprimordial_chemistry=1,2, and 3 functions as well as the newprimordial_chemistry=4andmetal_chemistry=1rates.grackle::impl::visit_rate_propsto actually initialize the standardized collisional reaction rate functions.Overall, I think this leads to much cleaner code. Now that we have ~882 of the standardized collisional reaction rate functions. I have structured it in the current manner for reasons that should become apparent once #415 is finished
Footnotes
I left comments that explain the work that should be done before we are ready to expose all the new rate functions as part of the public API ↩
At the moment, I'm taking a very broad definition of "standard". In the future, one might imagine treating a handful of rates more specially again. Examples of such rates include: k13 (due to the existence of k13dd), k56 (since we use it to infer a deuterium rate), as well as the 3 body rates. ↩