Skip to content

Commit f8c34bd

Browse files
authored
Merge pull request #1386 from TeamCOMPAS/improve_WD
Updates to WD accretion to address issue #1384
2 parents cd88f0f + f8d6856 commit f8c34bd

22 files changed

+229
-170
lines changed

online-docs/pages/whats-new.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ What's new
33

44
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``.
55

6+
**03.20.01 May 26, 2025**
7+
8+
* Updates to mass accretion for massive ONe WD
9+
* Changed white dwarf mass-radius relation to use expression from Eggleton 1986, suitable for extremely low-mass white dwarfs.
10+
611
**03.20.00 May 25, 2025**
712

813
* Replaced the name of the ``KAPIL2024`` tides prescription with ``KAPIL2025``.
914
* Updated the equilibrium and dynamical tides equations to match the paper.
1015
* New outputs for BSE_DETAILED_OUTPUT from tidal evolution, including ``CIRCULARIZATION_TIMESCALE``, ``SYNCHRONIZATION_TIMESCALE_1``, ``SYNCHRONIZATION_TIMESCALE_2``, ``TIDAL_POTENTIAL_LOVE_NUMBER_22_1``, ``TIDAL_POTENTIAL_LOVE_NUMBER_10_EQ_1``, and ``TIDAL_POTENTIAL_LOVE_NUMBER_32_DYN_2``
1116

12-
1317
**03.19.00 May 22, 2025**
1418

1519
* Added functionality to create new System Snapshot logfile |br|

src/BaseBinaryStar.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,8 +1673,8 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() {
16731673
THROW_ERROR(ERROR::UNKNOWN_CE_FORMALISM); // throw error
16741674
}
16751675

1676-
double rRLdfin1 = m_SemiMajorAxis * CalculateRocheLobeRadius_Static(m_Mass1Final, m_Mass2Final); // Roche-lobe radius in AU after CEE, seen by star1
1677-
double rRLdfin2 = m_SemiMajorAxis * CalculateRocheLobeRadius_Static(m_Mass2Final, m_Mass1Final); // Roche-lobe radius in AU after CEE, seen by star2
1676+
double rRLdfin1 = m_SemiMajorAxis * CalculateRocheLobeRadius_Static(m_Mass1Final, m_Mass2Final); // Roche-lobe radius in AU after CEE, seen by star1
1677+
double rRLdfin2 = m_SemiMajorAxis * CalculateRocheLobeRadius_Static(m_Mass2Final, m_Mass1Final); // Roche-lobe radius in AU after CEE, seen by star2
16781678
double rRLdfin1Rsol = rRLdfin1 * AU_TO_RSOL; // Roche-lobe radius in Rsol after CEE, seen by star1
16791679
double rRLdfin2Rsol = rRLdfin2 * AU_TO_RSOL; // Roche-lobe radius in Rsol after CEE, seen by star2
16801680
m_Eccentricity = 0.0; // we assume that a common envelope event (CEE) circularises the binary
@@ -1684,13 +1684,13 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() {
16841684

16851685
// update stellar type after losing its envelope. Star1, Star2 or both if double CEE.
16861686

1687-
if (isDonorMS || (!envelopeFlag1 && !envelopeFlag2)) { // stellar merger
1687+
if (isDonorMS || (!envelopeFlag1 && !envelopeFlag2) || (m_Star1->IsRLOF() && m_Star1->IsOneOf(WHITE_DWARFS)) || (m_Star2->IsRLOF() && m_Star2->IsOneOf(WHITE_DWARFS))) { // stellar merger
16881688
m_MassTransferTrackerHistory = MT_TRACKING::MERGER;
16891689
m_Flags.stellarMerger = true;
16901690
}
16911691
else if ((m_Star1->DetermineEnvelopeType()==ENVELOPE::RADIATIVE && !m_Star1->IsOneOf(ALL_MAIN_SEQUENCE)) ||
16921692
(m_Star2->DetermineEnvelopeType()==ENVELOPE::RADIATIVE && !m_Star2->IsOneOf(ALL_MAIN_SEQUENCE)) ) { // check if we have a non-MS radiative-envelope star
1693-
if (!OPTIONS->AllowRadiativeEnvelopeStarToSurviveCommonEnvelope() && OPTIONS->CommonEnvelopeFormalism()!=CE_FORMALISM::TWO_STAGE) { // stellar merger
1693+
if (!OPTIONS->AllowRadiativeEnvelopeStarToSurviveCommonEnvelope() && OPTIONS->CommonEnvelopeFormalism() != CE_FORMALISM::TWO_STAGE) { // stellar merger
16941694
m_CEDetails.optimisticCE = true;
16951695
m_MassTransferTrackerHistory = MT_TRACKING::MERGER;
16961696
m_Flags.stellarMerger = true;
@@ -1702,7 +1702,7 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() {
17021702
m_Flags.stellarMerger = true;
17031703
}
17041704

1705-
if (!m_Flags.stellarMerger) { // stellar merger?
1705+
if (!m_Flags.stellarMerger) { // stellar merger?
17061706
// no - continue evolution
17071707
STELLAR_TYPE stellarType1 = m_Star1->StellarType(); // star 1 stellar type before resolving envelope loss
17081708
STELLAR_TYPE stellarType2 = m_Star2->StellarType(); // star 2 stellar type before resolving envelope loss
@@ -1731,7 +1731,7 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() {
17311731

17321732
m_Star1->SetPostCEEValues(); // squirrel away post CEE stellar values for star 1
17331733
m_Star2->SetPostCEEValues(); // squirrel away post CEE stellar values for star 2
1734-
SetPostCEEValues(m_SemiMajorAxis * AU_TO_RSOL, semiMajorAxisAfterStage1 * AU_TO_RSOL, m_Eccentricity, rRLdfin1Rsol, rRLdfin2Rsol); // squirrel away post CEE binary values (checks for post-CE RLOF, so should be done at end)
1734+
SetPostCEEValues(m_SemiMajorAxis * AU_TO_RSOL, semiMajorAxisAfterStage1 * AU_TO_RSOL, m_Eccentricity, rRLdfin1Rsol, rRLdfin2Rsol); // squirrel away post CEE binary values (checks for post-CE RLOF, so should be done at end)
17351735

17361736
if (m_RLOFDetails.immediateRLOFPostCEE == true && !OPTIONS->AllowImmediateRLOFpostCEToSurviveCommonEnvelope()) {// is there immediate post-CE RLOF which is not allowed?
17371737
m_MassTransferTrackerHistory = MT_TRACKING::MERGER;

src/BaseStar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ class BaseStar {
300300

301301
void ClearCurrentSNEvent() { m_SupernovaDetails.events.current = SN_EVENT::NONE; } // Clear supernova event/state for current timestep
302302

303-
virtual ACCRETION_REGIME DetermineAccretionRegime(const bool p_HeRich,
304-
const double p_DonorThermalMassLossRate) { return ACCRETION_REGIME::ZERO; } // Placeholder, use inheritance for WDs
303+
virtual ACCRETION_REGIME DetermineAccretionRegime(const double p_DonorThermalMassLossRate,
304+
const bool p_HeRich) { return ACCRETION_REGIME::ZERO; } // Placeholder, use inheritance for WDs
305305

306306
virtual ENVELOPE DetermineEnvelopeType() const { return ENVELOPE::REMNANT; } // Default is REMNANT - but should never be called
307307
virtual MT_CASE DetermineMassTransferTypeAsDonor() const { return MT_CASE::OTHER; } // Not A, B, C, or NONE

src/CHeB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class CHeB: virtual public BaseStar, public FGB {
7676
double CalculateCoreMassOnPhase(const double p_Mass, const double p_Tau) const;
7777
double CalculateCoreMassOnPhase() const { return CalculateCoreMassOnPhase(m_Mass0, m_Tau); } // Use class member variables
7878

79-
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return 0.33; } // As coded in BSE. Using the inverse owing to how qCrit is defined in COMPAS. See Hurley et al. 2002 sect. 2.6.1 for additional details.
79+
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_MS_GT_07; }
8080

8181
double CalculateHeCoreMassAtPhaseEnd() const { return m_CoreMass; }
8282

src/COWD.cpp

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,5 @@
11
#include "COWD.h"
22

3-
/* For COWDs, calculate:
4-
*
5-
* (a) the maximum mass acceptance rate of this star, as the accretor, during mass transfer, and
6-
* (b) the retention efficiency parameter
7-
*
8-
*
9-
* For a given mass transfer rate, this function computes the amount of mass a WD would retain after
10-
* flashes, as given by appendix B of Claeys+ 2014.
11-
* https://ui.adsabs.harvard.edu/abs/2014A%26A...563A..83C/abstract
12-
*
13-
*
14-
* DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate, const bool p_IsHeRich)
15-
*
16-
* @param [IN] p_DonorMassRate Mass transfer rate from the donor
17-
* @param [IN] p_IsHeRich Material is He-rich or not
18-
* @return Tuple containing the Maximum Mass Acceptance Rate (Msun/yr) and Retention Efficiency Parameter
19-
*/
20-
DBL_DBL COWD::CalculateMassAcceptanceRate(const double p_DonorMassRate, const bool p_IsHeRich) {
21-
22-
m_AccretionRegime = DetermineAccretionRegime(p_IsHeRich, p_DonorMassRate);
23-
24-
double acceptanceRate = 0.0; // acceptance mass rate - default = 0.0
25-
double fractionAccreted = 0.0; // accretion fraction - default = 0.0
26-
27-
acceptanceRate = p_DonorMassRate * CalculateEtaHe(p_DonorMassRate);
28-
if (!p_IsHeRich) acceptanceRate *= CalculateEtaH(p_DonorMassRate);
29-
30-
fractionAccreted = acceptanceRate / p_DonorMassRate;
31-
32-
return std::make_tuple(acceptanceRate, fractionAccreted);
33-
}
34-
35-
36-
/*
37-
* Determine the WD accretion regime based on the MT rate and whether the donor is He rich. Also,
38-
* initialize He-Shell detonation or Off-center ignition when necessary, by changing the value
39-
* of m_HeShellDetonation or m_OffCenterIgnition (respectively).
40-
*
41-
* The accretion regime is one of the options listed in enum ACCRETION_REGIME (constants.h)
42-
*
43-
* Note that we have merged the different flashes regimes from Piersanti+ 2014 into a single regime.
44-
*
45-
* ACCRETION_REGIME DetermineAccretionRegime(const bool p_HeRich, const double p_DonorMassLossRate)
46-
*
47-
* @param [IN] p_HeRich Whether the accreted material is helium-rich or not
48-
* @param [IN] p_DonorMassLossRate Donor mass loss rate, in units of Msol / Myr
49-
* @return Current WD accretion regime
50-
*/
51-
ACCRETION_REGIME COWD::DetermineAccretionRegime(const bool p_HeRich, const double p_DonorMassLossRate) {
52-
53-
double logMdot = log10(p_DonorMassLossRate / MYR_TO_YEAR); // logarithm of the accreted mass (M_sun/yr)
54-
ACCRETION_REGIME regime = ACCRETION_REGIME::ZERO;
55-
56-
if (p_HeRich) {
57-
// The following coefficients in logMassTransfer limits come from table A1 in Piersanti+ 2014.
58-
double logMassTransferCrit = WD_LOG_MT_LIMIT_PIERSANTI_RG_SS_0 + WD_LOG_MT_LIMIT_PIERSANTI_RG_SS_1 * m_Mass;
59-
double logMassTransferStable = WD_LOG_MT_LIMIT_PIERSANTI_SS_MF_0 + WD_LOG_MT_LIMIT_PIERSANTI_SS_MF_1 * m_Mass; // Piersanti+2014 has several Flashes regimes. Here we group them into one.
60-
double logMassTransferDetonation = WD_LOG_MT_LIMIT_PIERSANTI_SF_Dt_0 + WD_LOG_MT_LIMIT_PIERSANTI_SF_Dt_1 * m_Mass; // critical value for double detonation regime in Piersanti+ 2014
61-
if (utils::Compare(logMdot, logMassTransferStable) < 0) {
62-
if (utils::Compare(logMdot, logMassTransferDetonation) > 0) {
63-
regime = ACCRETION_REGIME::HELIUM_FLASHES;
64-
}
65-
else {
66-
regime = ACCRETION_REGIME::HELIUM_ACCUMULATION;
67-
if ((utils::Compare(m_Mass, MASS_DOUBLE_DETONATION_CO) >= 0) && (utils::Compare(m_HeShell, WD_HE_SHELL_MCRIT_DETONATION) >= 0)) {
68-
m_HeShellDetonation = true;
69-
}
70-
}
71-
}
72-
else if (utils::Compare(logMdot, logMassTransferCrit) > 0) {
73-
regime = ACCRETION_REGIME::HELIUM_OPT_THICK_WINDS;
74-
}
75-
else {
76-
regime = ACCRETION_REGIME::HELIUM_STABLE_BURNING;
77-
if ((utils::Compare(logMdot, COWD_LOG_MDOT_MIN_OFF_CENTER_IGNITION) > 0) && (utils::Compare(m_Mass, COWD_MASS_MIN_OFF_CENTER_IGNITION) > 0)) {
78-
m_OffCenterIgnition = true;
79-
}
80-
}
81-
}
82-
else {
83-
// The following coefficients in logMassTransfer limits come from quadratic fits to Nomoto+ 2007 results (table 5) in Mass vs log10 Mdot space, to cover the low-mass end.
84-
double m_Mass_2 = m_Mass * m_Mass;
85-
double logMassTransferCrit = WD_LOG_MT_LIMIT_NOMOTO_REDGIANT_0 + WD_LOG_MT_LIMIT_NOMOTO_REDGIANT_1 * m_Mass + WD_LOG_MT_LIMIT_NOMOTO_REDGIANT_2 * m_Mass_2;
86-
double logMassTransferStable = WD_LOG_MT_LIMIT_NOMOTO_STABLE_0 + WD_LOG_MT_LIMIT_NOMOTO_STABLE_1 * m_Mass + WD_LOG_MT_LIMIT_NOMOTO_STABLE_2 * m_Mass_2;
87-
88-
if (utils::Compare(logMdot, logMassTransferStable) < 0) {
89-
regime = ACCRETION_REGIME::HYDROGEN_FLASHES;
90-
}
91-
else if (utils::Compare(logMdot, logMassTransferCrit) > 0) {
92-
regime = ACCRETION_REGIME::HYDROGEN_OPT_THICK_WINDS;
93-
}
94-
else {
95-
regime = ACCRETION_REGIME::HYDROGEN_STABLE_BURNING;
96-
}
97-
}
98-
99-
return regime;
100-
}
101-
102-
1033
/*
1044
* Specifies next stage, if the star changes its phase.
1055
*

src/COWD.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ class COWD: virtual public BaseStar, public WhiteDwarfs {
4343
p_Metallicity,
4444
WD_Baryon_Number.at(STELLAR_TYPE::CARBON_OXYGEN_WHITE_DWARF)); }
4545

46-
ACCRETION_REGIME DetermineAccretionRegime(const bool p_HeRich, const double p_DonorThermalMassLossRate); // Get the current accretion regime. Can also change flags related to SN events.
47-
4846
protected:
4947

5048
void Initialise() {
@@ -69,12 +67,7 @@ class COWD: virtual public BaseStar, public WhiteDwarfs {
6967
const double p_Metallicity) const { return CalculateLuminosityOnPhase_Static(p_Mass, p_Time, p_Metallicity); }
7068
double CalculateLuminosityOnPhase() const { return CalculateLuminosityOnPhase(m_Mass, m_Age, m_Metallicity); } // Use class member variables
7169

72-
DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate,
73-
const bool p_IsHeRich);
74-
DBL_DBL CalculateMassAcceptanceRate(const double p_DonorMassRate,
75-
const double p_AccretorMassRate,
76-
const bool p_IsHeRich) { return CalculateMassAcceptanceRate(p_DonorMassRate, p_IsHeRich); } // Ignore the input accretion rate for WDs
77-
70+
7871
STELLAR_TYPE EvolveToNextPhase();
7972
bool IsSupernova() const { return m_HeShellDetonation || IsMassAboveChandrasekhar(); };
8073
bool ShouldEvolveOnPhase() const { return m_OffCenterIgnition ? false : !IsSupernova(); }; // From https://ui.adsabs.harvard.edu/abs/2017MNRAS.472.1593W/abstract around the end of section 3.2. Also, allows SN.

src/HG.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class HG: virtual public BaseStar, public GiantBranch {
8181
double CalculateCoreMassOnPhaseIgnoringPreviousCoreMass(const double p_Mass, const double p_Time) const; // Ignore previous core mass constraint when computing expected core mass
8282

8383
double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const;
84-
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return 0.25; } // As coded in BSE. Using the inverse owing to how qCrit is defined in COMPAS. See Hurley et al. 2002 sect. 2.6.1 for additional details.
84+
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_HG; }
8585

8686
double CalculateHeCoreMassAtPhaseEnd() const { return m_CoreMass; } // McHe(HG) = Core Mass
8787
double CalculateHeCoreMassOnPhase() const { return m_CoreMass; } // McHe(HG) = Core Mass

src/HeGB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class HeGB: virtual public BaseStar, public HeHG {
5959

6060
// member functions - alphabetically
6161
double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const ;
62-
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return 1.28; } // From BSE. Using the inverse owing to how qCrit is defined in COMPAS. See Hurley et al. 2002 sect. 2.6.1 for additional details.
62+
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_HE_GIANT; }
6363

6464
double CalculateLuminosityOnPhase(const double p_CoreMass, const double p_GBPB, const double p_GBPD) const { return CalculateLuminosityOnPhase_Static(p_CoreMass, p_GBPB, p_GBPD); }
6565
double CalculateLuminosityOnPhase() const { return CalculateLuminosityOnPhase(m_CoreMass, m_GBParams[static_cast<int>(GBP::B)], m_GBParams[static_cast<int>(GBP::D)]); }

src/HeHG.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class HeHG: virtual public BaseStar, public HeMS {
6969
double CalculateCoreMassOnPhase() const { return m_COCoreMass; } // Mc(HeMS) = McCOMass
7070

7171
double CalculateCriticalMassRatioClaeys14(const bool p_AccretorIsDegenerate) const;
72-
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return 1.28; } // From BSE. Using the inverse owing to how qCrit is defined in COMPAS. See Hurley et al. 2002 sect. 2.6.1 for additional details.
72+
double CalculateCriticalMassRatioHurleyHjellmingWebbink() const { return HURLEY_HJELLMING_WEBBINK_QCRIT_HE_GIANT; }
7373

7474
void CalculateGBParams(const double p_Mass, DBL_VECTOR &p_GBParams);
7575
void CalculateGBParams() { CalculateGBParams(m_Mass0, m_GBParams); } // Use class member variables

0 commit comments

Comments
 (0)