From 264630620c48b5b3d1e85b44e5e4c242e3475a9e Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Wed, 23 Sep 2026 15:34:46 +1000 Subject: [PATCH 1/3] Pulsational (L/M threshold) mass loss --- src/BaseBinaryStar.cpp | 11 ++++++++++- src/changelog.h | 10 +++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/BaseBinaryStar.cpp b/src/BaseBinaryStar.cpp index 83b551bf2..c8864af4e 100644 --- a/src/BaseBinaryStar.cpp +++ b/src/BaseBinaryStar.cpp @@ -2179,6 +2179,15 @@ void BaseBinaryStar::CalculateMassTransfer(const double p_Dt) { massDiffDonor = -envMassDonor; isEnvelopeRemoved = true; } + if (m_MassTransferTimescale == MT_TIMESCALE::THERMAL && OPTIONS->ExpelConvectiveEnvelopeAboveLuminosityThreshold() && m_Donor->DetermineEnvelopeType() == ENVELOPE::CONVECTIVE) { + // check if pulsations remove envelope in the middle of mass transfer; if so, only remove envelope up to that point during mass transfer, leave pulsation itself to next time step + double massPulsation = m_Donor->Luminosity() / PPOW(10.0, OPTIONS->LuminosityToMassThreshold()); // mass at which the pulsation threshold would be passed, log_10 (L/M) = LuminosityToMassThreshold, assumes unchanged L + if(massPulsation > m_Donor->CoreMass()) { + massDiffDonor = m_Donor->Mass() - massPulsation; + isEnvelopeRemoved = false; + } + } + else massDiffDonor = -massDiffDonor; // set mass difference } @@ -2626,7 +2635,7 @@ void BaseBinaryStar::ResolveMassChanges() { // assume the entire envelope was lost on timescales long relative to the orbit if (m_Star1->EnvelopeJustExpelledByPulsations() || m_Star2->EnvelopeJustExpelledByPulsations()) { // update separation in response to pulsational mass loss - m_SemiMajorAxis /= (2.0 - ((m_Star1->MassPrev() + m_Star2->MassPrev()) / (m_Star1->Mass() + m_Star2->Mass()))); + m_SemiMajorAxis *= ((m_Star1->MassPrev() + m_Star2->MassPrev()) / (m_Star1->Mass() + m_Star2->Mass())); // conserve a*M m_Star1->ResetEnvelopeExpulsationByPulsations(); m_Star2->ResetEnvelopeExpulsationByPulsations(); } diff --git a/src/changelog.h b/src/changelog.h index 20cd4638c..b63d6d212 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1703,8 +1703,12 @@ // - Fixed HeSDs not being recorded in the Supernovae logs (mentioned in issue 1350). // 03.29.04 IM - April 19, 2026 - Enhancement: // - Corrected the M&M NS remnant mass prescription to never return a remnant mass larger than the CO core mass (see issue #1468) -// 03.29.05 AG - May 26, 2026 - Defect repair: -// - Fix for generalized issue #1378: reinstate "false" fallback option for SN kick angle options (mistakenly changed to "true" in v03.00.00) +// 03.29.05 AG - May 26, 2026 - Defect repair: +// - Fix for generalized issue #1378: reinstate "false" fallback option for SN kick angle options (mistakenly changed to "true" in v03.00.00) +// 03.30.00 IM - Sep 23, 2026 - Enhancement: +// - Include the possibility of pulsational (L/M threshold) mass loss in the middle of a thermal-timescale mass transfer episode that removes entire envelope +// - Defect repair: +// - Corrected orbital separation re-computation following pulsational (L/M threshold) mass loss // // Version string format is MM.mm.rr, where // @@ -1715,7 +1719,7 @@ // if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made // if mm is incremented, set rr to 00, even if defect repairs were also made -const std::string VERSION_STRING = "03.29.05"; +const std::string VERSION_STRING = "03.30.00"; # endif // __changelog_h__ From a0e1bc898a80908a81e93077d47fc54b70a8b636 Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Fri, 25 Sep 2026 07:37:11 +0800 Subject: [PATCH 2/3] Add option (MIN) to lose specific angular momentum during non-conservative mass transfer that is the smaller of isotropic re-emission and Jeans mode mass loss --- .../program-options-list-defaults.rst | 13 +++++++++++-- src/BaseBinaryStar.cpp | 2 ++ src/changelog.h | 1 + src/typedefs.h | 5 +++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst index b624a849f..c86d69f76 100644 --- a/online-docs/pages/User guide/Program options/program-options-list-defaults.rst +++ b/online-docs/pages/User guide/Program options/program-options-list-defaults.rst @@ -207,6 +207,15 @@ Default = ZERO Recombination energy density (erg gāˆ’1). |br| Default = :math:`1.5 \times 10^{13}` +**common-envelope-second-stage-beta** |br| +The fraction of the mass lost during the second stage of a 2-stage common envelope that is accreted. |br| +Default = 0 + +**--common-envelope-second-stage-gamma-prescription** |br| +The specific angular momentum prescription for mass lost during the second stage of a 2-stage common envelope event. |br| +Options: { JEANS, ISOTROPIC, CIRCUMBINARY, KLENCKI_LINEAR, MACLEOD_LINEAR, ARBITRARY, MIN } |br| +Default = ISOTROPIC + **--common-envelope-slope-kruckow** |br| Slope for the Kruckow lambda (see Kruckow et al. 2016 as implemented by Vigna-Gomez et al. 2018). |br| Default = āˆ’0.833333 @@ -894,7 +903,7 @@ Default = THERMAL **--mass-transfer-angular-momentum-loss-prescription** |br| Mass Transfer Angular Momentum Loss prescription. |br| -Options: { JEANS, ISOTROPIC, CIRCUMBINARY, KLENCKI_LINEAR, MACLEOD_LINEAR, ARBITRARY } |br| +Options: { JEANS, ISOTROPIC, CIRCUMBINARY, KLENCKI_LINEAR, MACLEOD_LINEAR, ARBITRARY, MIN } |br| Default = ISOTROPIC **--mass-transfer-fa** |br| @@ -1571,7 +1580,7 @@ Go to :ref:`the top of this page ` for the full alphabetical --common-envelope-lambda-nanjing-use_rejuvenated-mass, --common-envelope-allow-main-sequence-survive, --common-envelope-allow-radiative-envelope-survive, --common-envelope-allow-immediate-RLOF-post-CE-survive, --common-envelope-mass-accretion-prescription, --common-envelope-mass-accretion-constant, --common-envelope-mass-accretion-min, --common-envelope-mass-accretion-max, --common-envelope-recombination-energy-density, --maximum-mass-donor-nandez-ivanova, ---revised-energy-formalism-nandez-ivanova +--revised-energy-formalism-nandez-ivanova, common-envelope-second-stage-beta, common-envelope-second-stage-gamma-prescription :ref:`Back to Top ` diff --git a/src/BaseBinaryStar.cpp b/src/BaseBinaryStar.cpp index c8864af4e..c7b235989 100644 --- a/src/BaseBinaryStar.cpp +++ b/src/BaseBinaryStar.cpp @@ -1864,6 +1864,8 @@ double BaseBinaryStar::CalculateGammaAngularMomentumLoss_Static(const double p_D case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::JEANS : gamma = p_AccretorMass / p_DonorMass; break; // vicinity of the donor case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ISOTROPIC_RE_EMISSION: gamma = p_DonorMass / p_AccretorMass; break; // vicinity of the accretor + + case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::MIN: gamma = std::min(p_AccretorMass / p_DonorMass, p_DonorMass / p_AccretorMass); break; // the smaller of isotropic re-emission and Jeans mode mass loss case MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ARBITRARY : gamma = OPTIONS->MassTransferJloss(); break; diff --git a/src/changelog.h b/src/changelog.h index b63d6d212..23d1e033a 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1707,6 +1707,7 @@ // - Fix for generalized issue #1378: reinstate "false" fallback option for SN kick angle options (mistakenly changed to "true" in v03.00.00) // 03.30.00 IM - Sep 23, 2026 - Enhancement: // - Include the possibility of pulsational (L/M threshold) mass loss in the middle of a thermal-timescale mass transfer episode that removes entire envelope +// - Add option (MIN) to lose specific angular momentum during non-conservative mass transfer that is the smaller of isotropic re-emission and Jeans mode mass loss // - Defect repair: // - Corrected orbital separation re-computation following pulsational (L/M threshold) mass loss // diff --git a/src/typedefs.h b/src/typedefs.h index 7d16ddbe9..d8a2ddc6d 100755 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -651,14 +651,15 @@ const COMPASUnorderedMap MT_A }; // mass transfer angular momentum loss prescriptions -enum class MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION: int { JEANS, ISOTROPIC_RE_EMISSION, CIRCUMBINARY_RING, MACLEOD_LINEAR, KLENCKI_LINEAR, ARBITRARY }; +enum class MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION: int { JEANS, ISOTROPIC_RE_EMISSION, CIRCUMBINARY_RING, MACLEOD_LINEAR, KLENCKI_LINEAR, ARBITRARY, MIN }; const COMPASUnorderedMap MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION_LABEL = { { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::JEANS, "JEANS" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ISOTROPIC_RE_EMISSION, "ISOTROPIC" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::CIRCUMBINARY_RING, "CIRCUMBINARY" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::MACLEOD_LINEAR, "MACLEOD_LINEAR" }, { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::KLENCKI_LINEAR, "KLENCKI_LINEAR" }, - { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ARBITRARY, "ARBITRARY" } + { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::ARBITRARY, "ARBITRARY" }, + { MT_ANGULAR_MOMENTUM_LOSS_PRESCRIPTION::MIN, "MIN" } }; // mass transfer cases From 4903bd7ca0a334ae77c7e68d0f0c16dd9ad6ff27 Mon Sep 17 00:00:00 2001 From: Ilya Mandel Date: Wed, 28 Oct 2026 17:35:59 +1100 Subject: [PATCH 3/3] Corrected sign on mass change; tested. --- src/BaseBinaryStar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaseBinaryStar.cpp b/src/BaseBinaryStar.cpp index c7b235989..19b575eb6 100644 --- a/src/BaseBinaryStar.cpp +++ b/src/BaseBinaryStar.cpp @@ -2185,7 +2185,7 @@ void BaseBinaryStar::CalculateMassTransfer(const double p_Dt) { // check if pulsations remove envelope in the middle of mass transfer; if so, only remove envelope up to that point during mass transfer, leave pulsation itself to next time step double massPulsation = m_Donor->Luminosity() / PPOW(10.0, OPTIONS->LuminosityToMassThreshold()); // mass at which the pulsation threshold would be passed, log_10 (L/M) = LuminosityToMassThreshold, assumes unchanged L if(massPulsation > m_Donor->CoreMass()) { - massDiffDonor = m_Donor->Mass() - massPulsation; + massDiffDonor = massPulsation - m_Donor->Mass(); isEnvelopeRemoved = false; } }