-
Notifications
You must be signed in to change notification settings - Fork 1
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
Set interior structure by: total planet mass, radius #272
Conversation
… components. Can optionally set it by radius in config. Generalised structure wrapper somewhat
# This function takes R_int as the input value, and returns the mass residual | ||
def _resid(x): | ||
hf_row["R_int"] = x | ||
|
||
log.debug("Try R = %.2e m = %.3f R_earth"%(x,x/R_earth)) | ||
|
||
# Use interior model to get dry mass from radius | ||
run_interior(dirs, config, IC_INTERIOR, hf_all, hf_row, verbose=False) | ||
if solve_g: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a case in which solve_g
would be meaningfully turned off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so. Leaving it set to true works entirely fine for both Dummy and SPIDER, and will update the surface gravity self-consistently with mass and radius of the interior.
The reason this flag is here is because Aragog will crash when it is set to true - I think related to this issue with density that @planetmariana is working on. We should try to remove this as soon as possible.
tests/data/integration/physical/plot_population_time_density.png
Outdated
Show resolved
Hide resolved
tests/data/integration/physical/plot_population_mass_radius.png
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor suggestions to improve readability, looks feasible otherwise.
Thanks a lot, @timlichtenberg! We should definitely look into this structure stuff more deeply, but I think that this is better than the previous implementation of over-specifying the mass and radius. |
Reworks the methods by which the user can set the interior structure. Previously, they would specify the dry interior mass, and the interior models would be used to inversely solve for the interior radius.
This is now offset by the total volatile inventory, such that the user only has to specify the total planet mass. This is what would be probed by RV or TTV measurements, so it is much easier to specify for the user. Closes #269.
Additionally, the user can avoid the whole mass -> radius conversion by setting the interior radius directly in the configuration file. Closes #267.
The physical test (which uses Aragog) now sets the structure using the planet radius (hence the test updates). The dummy test (which uses the Dummy interior) sets the structure using the total planet mass.
Minor things:
reset_vmr
flag with the more obviousrainout
flag. This PR includes a minor change to handle this accordingly.