Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Bug Fixes

Important bug fix for ``r26.4.1`` identified by Emily Sandford and Louis Siebenaler: the ``lowT_Freedman11`` opacity option used ``[M/H]`` labels as the metal mass fraction when interpolating in ``Z``, resulting in incorrect opacities. We recommend users who use these low-temperature opacities, such as in planet models, update to the latest MESA version or employ the fixes in :ref:`the known bugs entry <freedman_lowt_z_bug>` and `gh-993 <https://github.com/MESAHub/mesa/pull/993>`_.

The plasmon neutrino cooling rate used a hardcoded prefactor calculated with a Weinberg angle of 0.2319, while all other neutrino cooling processes used calculated prefactors taking the Weinberg angle as input, with default value 0.22290. Thus, modifying the value of the Weinberg angle resulted in changes to neutrino cooling processes except for the plasmon neutrinos. This affects all previous MESA versions, and was found and fixed by user Garv Chauhan, see :ref:`the known bugs entry <plasmon_weinberg_angle_bug>` and `gh-998 <https://github.com/MESAHub/mesa/pull/998>`_. Plasmon neutrinos now use the same Weinberg angle as all other processes and changing its value will affect the corresponding cooling rate. Changes to the plasmon neutrino prefactor for MESA's default Weinberg angle result in small numerical differences for stars where plasmon neutrino cooling is significant.

Fixed a bug where RSP photo restarts did not immediately reconstruct ``s% L``,
which could leave ``s% L(1)`` with an uninitialized near-zero value and crash
MESA when the KH timescale was recalculated on restart.
Expand Down
16 changes: 16 additions & 0 deletions docs/source/known_bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ issue, but it may not be complete.
r26.4.1
=======

.. _plasmon_weinberg_angle_bug:

Neu: plasmon neutrino cooling used a hardcoded Weinberg angle
-------------------------------------------------------------

The plasmon neutrino cooling rate used a hardcoded prefactor calculated with a
Weinberg angle of 0.2319, while all other neutrino cooling processes used
calculated prefactors taking the Weinberg angle as input, with default value
0.22290. Thus, modifying the value of the Weinberg angle resulted in changes to
neutrino cooling processes except for the plasmon neutrinos.

This affects all released MESA versions through ``r26.4.1`` and was found and
fixed by user Garv Chauhan in `gh-998 <https://github.com/MESAHub/mesa/pull/998>`_.
Plasmon neutrinos now use the same Weinberg angle as all other processes, and
changing its value will affect the corresponding cooling rate. Changes to the plasmon neutrino prefactor for MESA's default Weinberg angle result in small numerical differences for stars where plasmon neutrino cooling is significant.

.. _freedman_lowt_z_bug:

Kap: ``lowT_Freedman11`` used ``[M/H]`` labels as ``Z``
Expand Down
13 changes: 7 additions & 6 deletions neu/private/mod_neu.f90
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module mod_neu
real(dp), parameter :: cvp = 1.0d0 - cv
real(dp), parameter :: ca = 0.5d0
real(dp), parameter :: cap = 1.0d0 - ca
real(dp), parameter :: tfac0 = cv*cv + (num_neu_fam-1.0d0) * (cvp*cvp)
real(dp), parameter :: tfac1 = cv*cv + ca*ca + (num_neu_fam-1.0d0) * (cvp*cvp+cap*cap)
real(dp), parameter :: tfac2 = cv*cv - ca*ca + (num_neu_fam-1.0d0) * (cvp*cvp - cap*cap)
real(dp), parameter :: tfac3 = tfac2/tfac1
Expand Down Expand Up @@ -237,13 +238,13 @@ subroutine neutrinos(T, logT, Rho, logRho, abar, zbar, log10_Tlim, &
temp = T
end if

if (T <= 0) then
if (temp <= 0) then
info = -1
return
end if

if (logT == arg_not_provided) then
logtemp = log10(T)
logtemp = log10(temp)
else
logtemp = logT
end if
Expand All @@ -263,13 +264,13 @@ subroutine neutrinos(T, logT, Rho, logRho, abar, zbar, log10_Tlim, &
den = Rho
end if

if (Rho <= 0) then
if (den <= 0) then
info = -1
return
end if

if (logRho == arg_not_provided) then
logden = log10(Rho)
logden = log10(den)
else
logden = logRho
end if
Expand Down Expand Up @@ -1579,8 +1580,8 @@ subroutine plas_neu(splas,splasdt,splasdd,splasda,splasdz, input)
splasdz = a2*splasdz + a3*gl2dz*a1


a2 = 0.93153d0 * 3.0d21 * input% xl9
a3 = 0.93153d0 * 3.0d21 * 9.0d0*input% xl8*input% xldt
a2 = tfac0 * 3.0d21 * input% xl9
a3 = tfac0 * 3.0d21 * 9.0d0*input% xl8*input% xldt

a1 = splas
splas = a2*a1
Expand Down
2 changes: 1 addition & 1 deletion neu/test/test_output
Git LFS file not shown
4 changes: 2 additions & 2 deletions star/test_suite/20M_z2m2_high_rotation/history_columns.list
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

! you might want to get a more complete list of mixing regions by using the following

!mixing_regions <integer> ! note: this includes regions where the mixing type is no_mixing.
mixing_regions 20 ! note: this includes regions where the mixing type is no_mixing.

! the <integer> is the number of regions to report
! there will be 2*<integer> columns for this in the log file, 2 for each region.
Expand Down Expand Up @@ -340,7 +340,7 @@

! you might want to get a more complete list of burning regions by using the following

!burning_regions <integer>
burning_regions 20
! the <integer> is the number of regions to report
! there will be 2*<integer> columns for this in the log file, 2 for each region.
! the first column for a region gives int(sign(val)*log10(max(1,abs(val))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
set_initial_model_number = .true.
initial_model_number = 0

pgstar_flag = .false.
!pgstar_flag = .true.
pgstar_flag = .true.

/ ! end of star_job namelist

Expand Down Expand Up @@ -219,6 +218,7 @@
warn_rates_for_high_temp = .true.
max_safe_logT_for_rates = 10.5d0

use_superad_reduction = .true.

Pextra_factor = 2 ! for atm

Expand Down
2 changes: 1 addition & 1 deletion star/test_suite/ns_he/inlist_to_flash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
new_cumulative_energy_error = 0d0

set_initial_dt = .true.
seconds_for_initial_dt = 1d-8
seconds_for_initial_dt = 1d-4

set_initial_model_number = .true.
initial_model_number = 0
Expand Down