diff --git a/src/BaseBinaryStar.cpp b/src/BaseBinaryStar.cpp index c1cbc3f41..7cd90c864 100644 --- a/src/BaseBinaryStar.cpp +++ b/src/BaseBinaryStar.cpp @@ -1465,6 +1465,8 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { double periastronRsol = PeriastronRsol(); // periastron, Rsol (before CEE) double rRLd1Rsol = periastronRsol * CalculateRocheLobeRadius_Static(m_Star1->Mass(), m_Star2->Mass()); // Roche-lobe radius at periastron in Rsol at the moment where CEE begins, seen by star1 double rRLd2Rsol = periastronRsol * CalculateRocheLobeRadius_Static(m_Star2->Mass(), m_Star1->Mass()); // Roche-lobe radius at periastron in Rsol at the moment where CEE begins, seen by star2 + double omegaSpin1_pre_CE = m_Star1->Omega(); // star1 spin (before CEE) + double omegaSpin2_pre_CE = m_Star2->Omega(); // star2 spin (before CEE) bool isDonorMS = false; // check for main sequence donor if (OPTIONS->AllowMainSequenceStarToSurviveCommonEnvelope()) { // allow main sequence stars to survive CEE? @@ -1642,11 +1644,13 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() { if (envelopeFlag1) { m_Star1->ResolveEnvelopeLossAndSwitch(); // resolve envelope loss for star1 and switch to new stellar type + m_Star1->SetOmega(omegaSpin1_pre_CE); // keep the rotation frequency of the core equal to the pre-envelope-loss rotation frequency m_MassTransferTrackerHistory = MT_TRACKING::CE_1_TO_2_SURV; } if (envelopeFlag2) { m_Star2->ResolveEnvelopeLossAndSwitch(); // resolve envelope loss for star1 and switch to new stellar type + m_Star2->SetOmega(omegaSpin2_pre_CE); // keep the rotation frequency of the core equal to the pre-envelope-loss rotation frequency m_MassTransferTrackerHistory = MT_TRACKING::CE_2_TO_1_SURV; } diff --git a/src/Star.cpp b/src/Star.cpp index db2cf1559..1ef0bb660 100644 --- a/src/Star.cpp +++ b/src/Star.cpp @@ -180,16 +180,11 @@ bool Star::RevertState() { * * Resolve the loss of an envelope, including switching the stellar type. * - * Keep the rotation frequency of the core equal to the pre-envelope-loss rotation frequency - * (envelope loss is rapid, so no time for angular momentum transport) - * * void ResolveEnvelopeLossAndSwitch() * */ void Star::ResolveEnvelopeLossAndSwitch() { - double omega = Omega(); (void)SwitchTo(m_Star->ResolveEnvelopeLoss(true)); - SetOmega(omega); } diff --git a/src/changelog.h b/src/changelog.h index 72eadee86..178ae9fbf 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1391,7 +1391,8 @@ // - Added new critical mass ratio tables for He stars from Ge et al. team // - Cleaned up the stability calculation for H-rich stars as well, specifically implementing nearest neighbor for extrapolation // - Now all of their results from Papers I-V are included (including those requested in private comm.) - -const std::string VERSION_STRING = "03.08.02"; +// 03.08.03 VK - Nov 20, 2024 - Defect repairs +// - Fixed behavior for core spin to be retained after envelope loss. +const std::string VERSION_STRING = "03.08.03"; # endif // __changelog_h__