Skip to content

Commit

Permalink
Merge pull request #1107 from TeamCOMPAS/CHeB-end-of-phase
Browse files Browse the repository at this point in the history
Change to CHeB end-of-phase core mass calculation
  • Loading branch information
ilyamandel committed May 3, 2024
2 parents 27221c4 + 1dd0223 commit 8d78e01
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/CHeB.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CHeB: virtual public BaseStar, public FGB {
double CalculateCOCoreMassOnPhase() const { return 0.0; } // McCO(CHeB) = 0.0

double CalculateConvectiveCoreRadius () const { return CalculateRemnantRadius (); } // Last paragraph of section 6 of Hurley+ 2000
double CalculateCoreMassAtPhaseEnd() const { return CalculateCoreMassAtBAGB(m_Mass0); } // Use class member variables
double CalculateCoreMassAtPhaseEnd() const { return CalculateCoreMassOnPhase(); } // Per Hurley sse code `hrdiag.f` lines 259-265
double CalculateCoreMassOnPhase(const double p_Mass, const double p_Tau) const;
double CalculateCoreMassOnPhase() const { return CalculateCoreMassOnPhase(m_Mass0, m_Tau); } // Use class member variables

Expand Down
7 changes: 3 additions & 4 deletions src/HeMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class HeMS: virtual public BaseStar, public TPAGB {
double CalculateCOCoreMassAtPhaseEnd() const { return CalculateCOCoreMassOnPhase(); } // Same as on phase
double CalculateCOCoreMassOnPhase() const { return 0.0; } // McCO(HeMS) = 0.0

double CalculateConvectiveCoreMass() const { return MainSequence::CalculateConvectiveCoreMass(); } // Temporary solution, until we have tested the rate at which the convective core recedes in HeMS stars
double CalculateConvectiveCoreRadius () const { return 0.5 * m_Radius; } // Temporary solution, until we have tested the core radii of HeMS stars
double CalculateConvectiveCoreMass() const { return MainSequence::CalculateConvectiveCoreMass(); } // Temporary solution, until we have tested the rate at which the convective core recedes in HeMS stars
double CalculateConvectiveCoreRadius () const { return 0.5 * m_Radius; } // Temporary solution, until we have tested the core radii of HeMS stars
double CalculateCoreMassAtPhaseEnd() const { return CalculateHeCoreMassOnPhase(); } // Same as on phase /*ILYA*/ To fix, not everything will become CO core
double CalculateCoreMassOnPhase() const { return 0.0; } // Mc(HeMS) = 0.0

Expand All @@ -78,8 +78,7 @@ class HeMS: virtual public BaseStar, public TPAGB {
double CalculateInitialSupernovaMass() const { return GiantBranch::CalculateInitialSupernovaMass(); } // Use GiantBranch

double CalculateLambdaDewi() const { return 0.5; }
double CalculateLambdaNanjingStarTrack(const double p_Mass,
const double p_Metallicity) const { return BaseStar::CalculateLambdaNanjingStarTrack(0.0, 0.0); } // Not supported - use BaseStar (0.0 are dummy values)
double CalculateLambdaNanjingStarTrack(const double p_Mass, const double p_Metallicity) const { return BaseStar::CalculateLambdaNanjingStarTrack(0.0, 0.0); } // Not supported - use BaseStar (0.0 are dummy values)
double CalculateLuminosityAtPhaseEnd(const double p_Mass) const { return CalculateLuminosityAtPhaseEnd_Static(p_Mass); }
double CalculateLuminosityAtPhaseEnd() const { return CalculateLuminosityAtPhaseEnd(m_Mass); } // Use class member variables
double CalculateLuminosityOnPhase(const double p_Mass, const double p_Tau) const { return CalculateLuminosityOnPhase_Static(p_Mass, p_Tau); }
Expand Down
7 changes: 5 additions & 2 deletions src/changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,13 @@
// - Secular evolution under the effect of tides follows Zahn, 1977, Eqs. (3.6) to (3.8)
// 02.44.01 JR - May 02, 2024 - Defect repairs, some code cleanup:
// - defect repairs to address issues #978 and #1075 (discontinuous radius evolution/fluctuating radii)
// - the repairs made here are an attempt to ensure that COMPAS stellar evolution matches Hurlet sse stellar evolution
// - the repairs made here are an attempt to ensure that COMPAS stellar evolution matches Hurley sse stellar evolution
// - see issue #978 for details of changes made and the reasons for the changes, as well as results of tests of the changes
// - a little code cleanup
// 02.44.02 JR - May 03, 2024 - Defect repair:
// - change to the core mass calculations at phase end for the CHeB phase - uses method from Hurley sse code rather Hurley et al. 2000
// prior to this change the CHeB core mass at phase end was > mass (which in turn caused a spike in luminosity and Teff).

const std::string VERSION_STRING = "02.44.01";
const std::string VERSION_STRING = "02.44.02";

# endif // __changelog_h__

0 comments on commit 8d78e01

Please sign in to comment.