-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussing Grackle's unit invariants #216
Comments
After reading this over again more carefully, I agree that all items 1-4 should be invariant and consequently, LU, DU, and TU should behave just as you describe. I'm also willing to take it as a given that
I think, despite my previous comments about other comoving unit systems in use in various simulation codes, there are probably very few implementations of grackle that are actually using comoving units in their grackle calls. All the ones I've seen are converting everything to proper first. |
Good catch. I fixed those typos. I might try to modify some the documentation to include this point.
To add to that, I recently learned that Cholla is definitely converting to proper units for the Grackle Calls. |
Overview
Recent discussions have made it clear that we (the core grackle developers) are not exactly sure whether grackle is compatible with any comoving unit system other than Enzo's comoving unit system.
code_units
struct (essentially, an Enzo-like comoving unit system is explicitly required). I would really like to refactor Grackle to more strongly enforce these requirements.Anybody who sees this is strongly encouraged to contribute to this discussion (ESPECIALLY if you have experience integrating Grackle into simulations with other unit systems!)
Throughout this issue,$LU$ , $TU$ , and $DU$ represent the conversion factor between code_units and cgs units (at a given $a$ ) for Length, Time, and Density, respectively.
The Invariants
As I understand it, the primary requirements for defining a unit-system compatible with Grackle stem from assumptions made about the units for the quantities computed during
initialize_chemistry_data
(orlocal_initialize_chemistry_data
). Essentially, grackle requires that the multiplicative factor that must be multiplied by each of the internal quantities, to convert from code-units to cgs units, is constant with respect to cosmological scale factor.To simplify things I will posit that
a_units
should be constant with respect to time. I am not sure if that is strictly required (but I suspect it probably is). Furthermore, I don't think that varying this provides the required flexibility to support other unit systems.Based on contents of the$VU = LU/(TU \times a)$ ), I believe we have 3(ish) invariants:
initialize_rates
function (and the fact that we explicitly define velocity units asI'm least confident about this last invariant. With that said, the constraints it places are redundant with the others
Consequences of the invariants:
Let's assume that the above invariants are correct.
This means that Grackle provides no flexibility with defining the
code_units
struct. In other words, at the contents of thecode_units
struct are precisely specified by the currenta_value
and the contents of thecode_units
struct that was passed toinitialize_chemistry_data
(orlocal_initialize_chemistry_data
).Discussion Points:
I guess there are 3 main points for discussion:
The text was updated successfully, but these errors were encountered: