You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// update mass of star1 according to mass loss and mass transfer, then update age accordingly
2134
2134
(void)m_Star1->UpdateAttributes(m_Star1->MassPrev() - m_Star1->Mass() + m_Star1->MassLossDiff() + m_Star1->MassTransferDiff(), 0.0); // update mass for star1
2135
-
m_Star1->UpdateInitialMass(); // update initial mass of star1 (MS, HG & HeMS) JR: todo: fix this kludge one day - mass0 is overloaded, and isn't always "initial mass"
2135
+
m_Star1->UpdateInitialMass(); // update effective initial mass of star1 (MS, HG & HeMS, HeHG)
2136
2136
m_Star1->UpdateAgeAfterMassLoss(); // update age of star1
2137
2137
m_Star1->ApplyMassTransferRejuvenationFactor(); // apply age rejuvenation factor for star1
2138
2138
m_Star1->UpdateAttributes(0.0, 0.0, true);
2139
2139
2140
2140
// rinse and repeat for star2
2141
2141
(void)m_Star2->UpdateAttributes(m_Star2->MassPrev() - m_Star2->Mass() + m_Star2->MassLossDiff() + m_Star2->MassTransferDiff(), 0.0); // update mass for star2
2142
-
m_Star2->UpdateInitialMass(); // update initial mass of star 2 (MS, HG & HeMS) JR: todo: fix this kludge one day - mass0 is overloaded, and isn't always "initial mass"
2142
+
m_Star2->UpdateInitialMass(); // update effective initial mass of star 2 (MS, HG & HeMS, HeHG)
2143
2143
m_Star2->UpdateAgeAfterMassLoss(); // update age of star2
2144
2144
m_Star2->ApplyMassTransferRejuvenationFactor(); // apply age rejuvenation factor for star2
double MZAMS_Mass = (m_MZAMS - m_Mass) / m_MZAMS;// Should m_ZAMS really be m_Mass0 (i.e., account for change in effective mass through mass loss in winds, MS mass transfer?)
* Deletermine if Helium Flash occurs, and if so modify the star accordingly.
209
-
* The attributes of the star are updated.
206
+
* Deletermine if Helium Flash occurs, and if so set m_Mass0 equal to current mass as described in Hurley+ (2000), last paragraph before start of 7.1.1.
210
207
*/
211
208
voidFGB::ResolveHeliumFlash() {
212
209
#definetimescales(x) m_Timescales[static_cast<int>(TIMESCALE::x)] // for convenience and readability - undefined at end of function
* Per Hurley et al. 2000, section 7.1, the effective initial mass on the HG tracks the stellar mass -- unless it would yield an unphysical decrease in the core mass
914
+
*
915
+
*
916
+
* void UpdateInitialMass()
917
+
*
918
+
*/
919
+
voidHG::UpdateInitialMass() {
920
+
if (utils::Compare(m_CoreMass,HG::CalculateCoreMassOnPhase(m_Mass, m_Age)) < 0 ) { //The current mass would yield a core mass larger than the current core mass -- i.e., no unphysical core mass decrease would ensure
Copy file name to clipboardExpand all lines: src/changelog.h
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -848,7 +848,11 @@
848
848
// 02.25.10 JR - Nov 19, 2021 - Defect repairs:
849
849
// - clamp timestep returned in BaseStar::CalculateTimestep() to NUCLEAR_MINIMUM_TIMESTEP
850
850
// - change NUCLEAR_MINIMUM_TIMESTEP to 1 year (from 100 years) in constants.h
851
+
// 02.26.00 IM - Nov 30, 2021 - Defect repairs:
852
+
// - only decrease effective initial mass for HG and HeHG stars on mass loss when this decrease would not drive an unphysical decrease in the core mass
853
+
// - change mass comparisons (e.g., mass vs. He flash mass threshold) to compare effective initial mass rather than current mass
0 commit comments