Skip to content
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

Merged
merged 8 commits into from
Nov 19, 2024
Merged

Conversation

nichollsh
Copy link
Contributor

@nichollsh nichollsh commented Nov 19, 2024

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:

  • AGNI has been updated to 0.11.0, which replaces the reset_vmr flag with the more obvious rainout flag. This PR includes a minor change to handle this accordingly.

@nichollsh nichollsh marked this pull request as ready for review November 19, 2024 10:43
input/aragog.toml Outdated Show resolved Hide resolved
input/default.toml Outdated Show resolved Hide resolved
input/dummy.toml Outdated Show resolved Hide resolved
input/hd63433d.toml Outdated Show resolved Hide resolved
input/k218b.toml Outdated Show resolved Hide resolved
# 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:
Copy link
Collaborator

@timlichtenberg timlichtenberg Nov 19, 2024

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?

Copy link
Contributor Author

@nichollsh nichollsh Nov 19, 2024

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.

Copy link
Collaborator

@timlichtenberg timlichtenberg left a 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.

@nichollsh
Copy link
Contributor Author

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.

@nichollsh nichollsh merged commit 4da3795 into main Nov 19, 2024
5 checks passed
@nichollsh nichollsh deleted the hn/radius branch November 19, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offset input planet mass by volatile mass Allow user to set interior structure by radius as well as mass
2 participants