From 34220be33f1e66f3dbd4dd59c3b9cf945a530a9e Mon Sep 17 00:00:00 2001 From: Jeff Riley Date: Fri, 17 Jan 2025 09:15:11 +1100 Subject: [PATCH 1/3] Defect repair: (partial?) fix for issue #1149 - remove conditional from TPAGB::IsSupernova() --- src/TPAGB.cpp | 8 ++++---- src/changelog.h | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/TPAGB.cpp b/src/TPAGB.cpp index a72465c10..7ef8b9235 100755 --- a/src/TPAGB.cpp +++ b/src/TPAGB.cpp @@ -968,6 +968,7 @@ double TPAGB::ChooseTimestep(const double p_Time) const { #undef timescales } + /* * Determine if star should continue evolution as a Supernova * @@ -977,9 +978,8 @@ double TPAGB::ChooseTimestep(const double p_Time) const { * @return Boolean flag: true if star has gone Supernova, false if not */ bool TPAGB::IsSupernova() const { - if(utils::SNEventType(m_SupernovaDetails.events.current) != SN_EVENT::NONE) - return true; // already labeled as going through a SN right now - double snMass = CalculateInitialSupernovaMass(); // calculate SN initial mass - return ( utils::Compare(m_COCoreMass, m_GBParams[static_cast(GBP::McSN)]) >=0 && utils::Compare(snMass, OPTIONS->MCBUR1()) >= 0 && utils::Compare(m_COCoreMass, m_Mass) < 0 ); // no supernova if CO core mass is too low or helium core mass is too low at base of AGB or the envelope has already been removed + return utils::Compare(m_COCoreMass, m_GBParams[static_cast(GBP::McSN)]) >=0 && + utils::Compare(CalculateInitialSupernovaMass(), OPTIONS->MCBUR1()) >= 0 && + utils::Compare(m_COCoreMass, m_Mass) < 0; } diff --git a/src/changelog.h b/src/changelog.h index d977012a1..c39909f64 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1427,7 +1427,7 @@ // - fix for issue #1317 - SN events not always logged in BSE SN file when evolving MS merger products // - added code to ensure final BSE detailed output file TIMESTEP_COMPLETED record is always logged // (may duplicate FINAL_STATE record, but logging TIMESTEP_COMPLETED is consistent, and it's what most people look for) -// 03.10.06 VK - Jan 13, 2025 - Enhancement: +// 03.10.06 VK - Jan 13, 2025 - Enhancement: // - Modified the KAPIL2024 tides to ignore quadratic 'e' terms (for spin and separation evolution) if they spin up an already synchronized star. // 03.11.00 VK - Jan 14, 2025 - Enhancement, Defect repair: // - Fix for issue #1303 - Reduction in production of BHBH from CHE, other CHE-related improvements. @@ -1441,7 +1441,9 @@ // ZERO (main sequence core mass set to zero, no treatment) // - Added new luminosity prescription for main sequence stars from Shikauchi et al. (2024) // - Added treatment for rejuvenation of main sequence accretors when the new prescription is used +// 03.12.01 JR - Jan 17, 2025 - Defect repair: +// - (partial?) fix for issue #1149 - remove conditional from TPAGB::IsSupernova(). Whether it fixes issue 1149 completely or not, the conditional shouldn't be there... -const std::string VERSION_STRING = "03.12.00"; +const std::string VERSION_STRING = "03.12.01"; # endif // __changelog_h__ From c4fc5a22ffddfbc1545bef10b83188dd62e897da Mon Sep 17 00:00:00 2001 From: Jeff Riley Date: Fri, 17 Jan 2025 09:17:05 +1100 Subject: [PATCH 2/3] Fix typo --- src/TPAGB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TPAGB.cpp b/src/TPAGB.cpp index 7ef8b9235..f3fde9bca 100755 --- a/src/TPAGB.cpp +++ b/src/TPAGB.cpp @@ -979,7 +979,7 @@ double TPAGB::ChooseTimestep(const double p_Time) const { */ bool TPAGB::IsSupernova() const { // no supernova if CO core mass is too low or helium core mass is too low at base of AGB or the envelope has already been removed - return utils::Compare(m_COCoreMass, m_GBParams[static_cast(GBP::McSN)]) >=0 && + return utils::Compare(m_COCoreMass, m_GBParams[static_cast(GBP::McSN)]) >= 0 && utils::Compare(CalculateInitialSupernovaMass(), OPTIONS->MCBUR1()) >= 0 && utils::Compare(m_COCoreMass, m_Mass) < 0; } From c44c9a1d2a5c67a71f9c8d33a5384991ff24ef9e Mon Sep 17 00:00:00 2001 From: Jeff Riley Date: Fri, 17 Jan 2025 10:07:00 +1100 Subject: [PATCH 3/3] Minor formatting fix --- online-docs/pages/whats-new.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/online-docs/pages/whats-new.rst b/online-docs/pages/whats-new.rst index 596f8e811..d6882cd63 100644 --- a/online-docs/pages/whats-new.rst +++ b/online-docs/pages/whats-new.rst @@ -4,6 +4,7 @@ What's new Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``. **03.12.00 Jan 16, 2025** + * Added convective core mass prescription for main sequence stars from Shikauchi+ (2024), describing how the core mass evolves under mass loss and mass gain. * New command line option ``--main-sequence-core-mass-prescription`` with arguments ``SHIKAUCHI`` (new prescription), ``MANDEL`` (replaces the functionality of ``--retain-core-mass-during-caseA-mass-transfer``), and ``ZERO`` (core mass set to zero, no treatment). * Added new luminosity prescription for main sequence stars from Shikauchi+ (2024).