Skip to content
Merged
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
4 changes: 4 additions & 0 deletions src/BaseBinaryStar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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;
}

Expand Down
5 changes: 0 additions & 5 deletions src/Star.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
5 changes: 3 additions & 2 deletions src/changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Loading