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_star) MAJOR cleanup of setup_star into neat subroutines with high level functions #297

Merged
merged 11 commits into from
Jun 6, 2022

Conversation

danieljprice
Copy link
Owner

@danieljprice danieljprice commented Jun 3, 2022

Type of PR:
cleanup of setup_star routine

Description:
Shifted most of the functionality done in setup_star.f90 into a new helper module called set_star.f90 which also replaced and incorporates set_stellar_core.f90. The aim is twofold:

  • Outputs from the relax-o-matic procedure are now useable as starting files, even if stopped half-way through the relaxation. For this we needed to put the setting of the thermal energy of the particles into a new set_star_thermalenergy routine. I kept going from there to clean up the entire routine.

  • in principle it should now be possible to more easily set up stars from other code modules (e.g. moddump or setup_tde.f90) with the full functionality of setup_star: namely being able to map and relax tabulated MESA stars

  • with a few tweaks one could now in principle setup and relax several stars in sequence before placing them in orbits

  • setup_star.f90 is now easier to read and maintain, basically just a shell handling the options read/write from the .setup file

Bug fixes / other changes:

Testing:

  • checked relaxation of a polytrope
  • checked read-and-relax of star from Kepler
  • checked read-and-relax of Passy (2012) star from MESA table (P12_Phantom_Profile.data)
  • checked and debugged replace-core-with-sink procedure using an example file supplied by @themikelau

Did you run the bots? yes

@danieljprice danieljprice merged commit 77ade49 into master Jun 6, 2022
@danieljprice danieljprice deleted the set_star branch June 6, 2022 06:53
s-neilson pushed a commit to s-neilson/phantom that referenced this pull request Mar 18, 2023
(set_star) MAJOR cleanup of setup_star into neat subroutines with high level functions
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.

1 participant