Skip to content

fix: erroneous formulae in neu module - #1103

Open
AstroBarker wants to merge 6 commits into
mainfrom
blb/fix-neu
Open

AstroBarker wants to merge 6 commits into
mainfrom
blb/fix-neu

Conversation

@AstroBarker

@AstroBarker AstroBarker commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An error in the neu module was reported on the mailing list pointing out issues in the expressions for tfermi and its derivative used in the neutrino Bremsstrahlung routines. This impacts the regime chosen to model the cooling.

For example, the plot below shows the old ("Erroneous") and new ("corrected") formulae for a range of densities at ye of 0.5. Notice that the old form can lead to a negative Fermi temperature when $$\rho_6 y_e$$ < 1.0.
tfermi

I have also incorporated an additional correction pointed out by @Debraheem where we old expressions that were corrected in Itoh 1996.

TODO

  • This causes build-time test failures due to changes in the neu module.
  • Update the changelog

@Debraheem Debraheem added bug Something isn't working neu Neutrino loss rates module labels Nov 2, 2026
@Debraheem Debraheem assigned AstroBarker and Debraheem and unassigned Debraheem Nov 2, 2026
@Debraheem

Copy link
Copy Markdown
Member

awesome! Thanks for taking this up. We just need some testing to make sure this doesn't spell doom for anything and a changelog entry to mark these few bugs that have been corrected.

@Debraheem

Copy link
Copy Markdown
Member

hi, i just want to note that the last failure occuring on this branch is not at all related to the branch itself, rather this minor perturbation is bring remeshing failures to light that have been lurking for some time. In fact, i don't think the failure on the make_o_ne_wd is dissimilar at all the failures that keep reappearing in the hb_2m test case. I think both of these are coming out of remeshi induced transients in the

I share the logs of the failure here
make_o_ne_wd_56ba519_Yale_Bouchet_out.txt
P/T profile of the models.

and here is an image showing what remeshing does to the model in the exact region where the model fails.

pressure_before_after_remesh_model_1232

that being said. I think this branch is probably fine to merge. In a way, i think it's good that these failures are coming out now, so we can address them directly in their own prs instead of targeting perfection out of the test_suite.

I have been working on a new branch that should address most of these failures directly, with direct improvements to MESA's remeshing algorithm.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working neu Neutrino loss rates module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants