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
confused about units #103
Comments
@zingale -- Thanks for working this out. The documentation is correct. I think the confusion stems from connecting the parameter GravitationalConstant to G. It is not -- it is simply defined to be 4 pi G. This is because, for historical reasons, the factor of 4 pi in Poisson's equation (d^2 phi = 4 pi G rho) was swallowed up by this poorly named coefficient (some history: with Enzo's original cosmology unit definitions that constant is 1 and so this was added in this somewhat confusing fashion later when the non-comoving coordinate system was added). Effectively, in the context of your example above, this means there is a modification to the force law that changes Kepler's law. The documentation is quite explicit on what you should do, and is correct, but much less clear on why. Maybe it would be useful to add this explanation to the documentation? |
okay, thanks. I did find that section confusing, so if you can clarify it, that might help the next person. You can close this if you wish. |
Thanks @zingale @gregbryan . I will close this issue. |
I have issued PR #114 to try and make the documentation a bit clearer. |
Closing after #114 was merged. |
Looking at: https://enzo.readthedocs.io/en/enzo-2.6/reference/EnzoInternalUnits.html
for the gravitational constant, it says:
I'm a little confused by this scaling. If I start with Kepler's law for the solar system:
4 pi^2 R^3 / G = M_sun P^2
and work in units of solar masses, years, and AU, then Kepler's law becomes
R^3 = P^2
and G = 4 pi^2
If I follow the discussion in the next paragraph:
but going back to Kepler's law, I have
4 pi^2/G (R^3/M) (1/P^2) = 1
or
4 pi^2/G (1/DensityUnits) (1/TimeUnits^2) = 1
so this suggests setting G to 4 pi^2 G_cgs * DensityUnits * TimeUnits^2 -- note the additional factor of pi.
Am I missing something? or are the docs off by a factor of pi here?
The text was updated successfully, but these errors were encountered: