diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 641596f13f..2654ef4340 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -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 ` and `gh-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 ` and `gh-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. diff --git a/docs/source/known_bugs.rst b/docs/source/known_bugs.rst index 0cf5d174e9..6c81970cb7 100644 --- a/docs/source/known_bugs.rst +++ b/docs/source/known_bugs.rst @@ -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 `_. +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`` diff --git a/neu/private/mod_neu.f90 b/neu/private/mod_neu.f90 index 5108b3a6b7..1a992e35ee 100644 --- a/neu/private/mod_neu.f90 +++ b/neu/private/mod_neu.f90 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/neu/test/test_output b/neu/test/test_output index b8b7c4feeb..f8d41cf2d8 100644 --- a/neu/test/test_output +++ b/neu/test/test_output @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6737adf506508590246a8f04d909ac03ab8451f17262d8e8c76f45569266498f +oid sha256:02016e952fac1890d8b4ef7644a53b6912a0db7beec7971dd4dd357ed56948f7 size 8850000 diff --git a/star/test_suite/20M_z2m2_high_rotation/history_columns.list b/star/test_suite/20M_z2m2_high_rotation/history_columns.list index 18072db663..16e04ed8a9 100644 --- a/star/test_suite/20M_z2m2_high_rotation/history_columns.list +++ b/star/test_suite/20M_z2m2_high_rotation/history_columns.list @@ -138,7 +138,7 @@ ! you might want to get a more complete list of mixing regions by using the following - !mixing_regions ! 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 is the number of regions to report ! there will be 2* columns for this in the log file, 2 for each region. @@ -340,7 +340,7 @@ ! you might want to get a more complete list of burning regions by using the following - !burning_regions + burning_regions 20 ! the is the number of regions to report ! there will be 2* 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)))) diff --git a/star/test_suite/20M_z2m2_high_rotation/inlist_to_end_core_he_burn b/star/test_suite/20M_z2m2_high_rotation/inlist_to_end_core_he_burn index 37bb220948..562d626775 100644 --- a/star/test_suite/20M_z2m2_high_rotation/inlist_to_end_core_he_burn +++ b/star/test_suite/20M_z2m2_high_rotation/inlist_to_end_core_he_burn @@ -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 @@ -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 diff --git a/star/test_suite/ns_he/inlist_to_flash b/star/test_suite/ns_he/inlist_to_flash index d87b0b00f9..7b7c6e3000 100644 --- a/star/test_suite/ns_he/inlist_to_flash +++ b/star/test_suite/ns_he/inlist_to_flash @@ -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