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

add neutrino cooling routines #628

Merged
merged 30 commits into from Nov 6, 2023
Merged

Conversation

zingale
Copy link
Member

@zingale zingale commented Sep 10, 2023

this will allow us to compute ignition curves

this will allow us to compute ignition curves
@zingale zingale changed the title add neutrino cooling routines [WIP] add neutrino cooling routines Sep 10, 2023
@zingale
Copy link
Member Author

zingale commented Sep 12, 2023

Here's a plot made by this new functionality:

neutrinos

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@zingale zingale changed the title [WIP] add neutrino cooling routines add neutrino cooling routines Sep 12, 2023
@zingale
Copy link
Member Author

zingale commented Sep 12, 2023

okay there are unit tests and documentation now. I think this is ready for review.

Note: I reorganized the docs a bit -- making more sections. I anticipate the NSE and neutrino sections growing as we add more discussions there.

Copy link
Collaborator

@zhichen3 zhichen3 left a comment

Choose a reason for hiding this comment

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

someone else can also double check if needed.

pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
@yut23
Copy link
Collaborator

yut23 commented Oct 25, 2023

It's probably a good idea to pull the different contributions out into helper functions/closures. That should limit the scope of the temporary variables, and help pylint figure out what's unused.

@zingale
Copy link
Member Author

zingale commented Oct 25, 2023

I think I removed all the terms Zhi flagged

I agree that this needs to be refactored, but I wanted to get something in and tested before doing that. I'd like to do the same with the C++ version.

Copy link
Collaborator

@yut23 yut23 left a comment

Choose a reason for hiding this comment

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

A couple more

pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
pynucastro/neutrino_cooling/sneut5.py Outdated Show resolved Hide resolved
@zingale
Copy link
Member Author

zingale commented Oct 25, 2023

updated

def zfermim12(x):
"""apply a rational function expansion to get the fermi-dirac
integral of order -1/2 evaluated at x. maximum error is 1.23e-12_rt.
reference: antia apjs 84,101 1993"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this entire function can be removed

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@zingale
Copy link
Member Author

zingale commented Nov 1, 2023

fixed the remaining ones

@zingale zingale merged commit f806050 into pynucastro:main Nov 6, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants