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

Generalise stellar wrapper, dummy star module #220

Merged
merged 20 commits into from
Oct 21, 2024
Merged

Generalise stellar wrapper, dummy star module #220

merged 20 commits into from
Oct 21, 2024

Conversation

nichollsh
Copy link
Contributor

@nichollsh nichollsh commented Oct 21, 2024

This PR adds a dummy star module. It calculates the stellar spectrum and bolometric luminosity assuming that the star emits like a blackbody with a temperature and radius specified by the user. Added dummy_star.toml configuration to demonstrate this, but there isn't a test for this yet. Closes #202.

It also reworks the stellar module handling to generalise calculations between the mors and dummy modules. This mostly means moving functions into src/proteus/star/ and calling these from proteus.py. This also meant moving a lot of variables in proteus.py into the Proteus class, which will also be useful for later work (e.g. #204, #162).

Minor things:

  • Fixes numerical issue when volatile elemental inventory is small. Sometimes floating point errors mean that 0 kg of a given element can become ~1e-13 kg or so, which is problematic.
  • Renamed Lbol config variable to lum_now, to make it clear that this is the modern luminosity of the star.
  • Added phys.py for containing physics functions.
  • Removed start_proteus.py since it is made redundant by the CLI.
  • Fixes some of the deprecation warnings when accessing the config.

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.

Looks good to me, but @lsoucasse should also give it a quick check.

@nichollsh nichollsh requested review from lsoucasse and removed request for stefsmeets October 21, 2024 10:28
Copy link
Member

@lsoucasse lsoucasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes! I will probably extend the baraffe_track property of proteus into a star_track to store either spada or baraffe data for the whole run.

The dummy star simulation seens to run fine on my laptop.

@nichollsh
Copy link
Contributor Author

nichollsh commented Oct 21, 2024

That makes sense - I guess this is covered by #167 ?

@nichollsh
Copy link
Contributor Author

Thanks both!

@nichollsh nichollsh merged commit 3a9e1ca into main Oct 21, 2024
5 checks passed
@nichollsh nichollsh deleted the star branch October 21, 2024 11:55
@stefsmeets stefsmeets mentioned this pull request Oct 21, 2024
2 tasks
@lsoucasse
Copy link
Member

That makes sense - I guess this is covered by #167 ?

Yes!

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.

Dummy star module
3 participants