Minor Changes to Neutrino Cooling Rate#998
Open
gchauhan42 wants to merge 2 commits into
Open
Conversation
Changes to Neutrino Cooling Rate File
Member
yes. i own this bug as its even present in my originating source code. thanks for the clear fix! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been working on a project (along with Mathieu Renzo and Cecilia Lunardini) involving the effect of Beyond-the-Standard-Model neutrino physics on stellar evolution. This requires changing the existing neutrino cooling implementation in MESA. To achieve this, I used the flag (s% other_neu) in run_star_extras.f90. My modified neutrino cooling rate is based directly on the standard MESA neutrino cooling rate implemented in mod_neu.f90 at the main GitHub page for MESA (https://github.com/MESAHub/mesa/tree/main/neu/private).
I want to report two issues that I found during this time :
However, I found that the dependence on (cv, cvp) for the plasma-neutrino process is explicitly hard-coded : value of 0.93153d0 (lines 1582,1583). The expression for this pre-factor is in equation(4.1) of Itoh1996. If evaluated for weinberg_theta used in Itoh1996 (see eqns 2.2-2.4) and set n=2, we get exactly 0.93153. Therefore, if any global change is done for weinberg_theta and/or num_neu_fam, the change is not reflected in the plasma-neutrino process. Moreover, in const_def.f90, definition of weinberg_theta = 0.22290d0 (line 111). While plasma-neutrino process (the hard-coded constant) uses Itoh et. al.'s value of weinberg_theta = 0.2319.
Fix is to define a new factor (around line 37-38)--> real(dp), parameter :: tfac0 = cvcv + (num_neu_fam-1.0d0) * (cvpcvp)
Original line 1582 : a2 = 0.93153d0 * 3.0d21 * input% xl9
Original line 1583 : a3 = 0.93153d0 * 3.0d21 * 9.0d0input% xl8input% xldt
Fix for line 1582 : a2 = tfac0 * 3.0d21 * input% xl9
Fix for line 1582 : a3 = tfac0 * 3.0d21 * 9.0d0input% xl8input% xldt
Original line 240 : if (T <= 0d0) then
Fix for line 240 : if (temp <= 0d0) then
Original line 246 : logtemp = log10(T)
Fix for line 246 : logtemp = log10(temp)
The original lines are wrong because when MESA passes T = arg_not_provided and only supplies logT instead. In that case, T is a sentinel, not the actual temperature. Similarly for density,
Original line 266 : if (Rho <= 0) then
Fix for line 266 : if (den <= 0d0) then
Original line 272 : logden = log10(Rho)
Fix for line 272 : logden = log10(den)
The code after the above-mentioned changes does show some differences compared to the older results, but they seem quite minimal.