Skip to content

Commit f0605e1

Browse files
authored
Merge pull request #1367 from yuzhesong/issue-1366
Fix to Issue #1366
2 parents a74da54 + 642ad08 commit f0605e1

File tree

7 files changed

+19
-32
lines changed

7 files changed

+19
-32
lines changed

online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-stellar.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,22 +1789,6 @@ same header string.`
17891789
* - Header Strings:
17901790
- Recycled_NS, Recycled_NS(1), Recycled_NS(2), Recycled_NS(SN), Recycled_NS(CP)
17911791

1792-
.. flat-table::
1793-
:widths: 25 75 1 1
1794-
:header-rows: 0
1795-
:class: aligned-text
1796-
1797-
* - :cspan:`2` **RLOF_ONTO_NS**
1798-
-
1799-
* - Data type:
1800-
- DOUBLE
1801-
* - COMPAS variable:
1802-
- `derived from` BaseStar::m_SupernovaDetails.events.past
1803-
* - Description:
1804-
- Flag to indicate whether the star transferred mass to a neutron star at any time prior to the current timestep.
1805-
* - Header Strings:
1806-
- RLOF->NS, RLOF->NS(1), RLOF->NS(2), RLOF->NS(SN), RLOF->NS(CP)
1807-
18081792
.. flat-table::
18091793
:widths: 25 75 1 1
18101794
:header-rows: 0

online-docs/pages/whats-new.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ 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.16.04 Apr 6, 2025**
7+
8+
* Neutron stars are now labelled as ``RecycledNS`` when undergoing mass transfer through common envelope (when ``--neutron-star-accretion-in-ce`` is not set to ``ZERO``).
9+
10+
* Removed output option ``RLOF_ONTO_NS`` as it can be retrieved from existing RLOF output info.
11+
612
**03.17.00 Mar 22, 2025**
713

814
* Added ENVELOPE_STATE_PRESCRIPTION::CONVECTIVE_MASS_FRACTION (default threshold of convective envelope by mass to label envelope

src/BaseBinaryStar.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,12 +2146,14 @@ void BaseBinaryStar::CalculateMassTransfer(const double p_Dt) {
21462146
}
21472147
}
21482148

2149-
// Check for recycled pulsars. Not considering CEE as a way of recycling NSs.
2150-
if (!m_CEDetails.CEEnow && m_Accretor->IsOneOf({ STELLAR_TYPE::NEUTRON_STAR })) { // accretor is a neutron star
2151-
m_Donor->SetRLOFOntoNS(); // donor donated mass to a neutron star
2149+
// Check for recycled pulsars. Not considering CEE as a way of recycling NSs.
2150+
if (!m_CEDetails.CEEnow && m_Accretor->IsOneOf({ STELLAR_TYPE::NEUTRON_STAR })) { // accretor is a neutron star, system is not in CE
21522151
m_Accretor->SetRecycledNS(); // accretor is (was) a recycled NS
2153-
}
2154-
2152+
}
2153+
else if (m_CEDetails.CEEnow && m_Accretor->IsOneOf({ STELLAR_TYPE::NEUTRON_STAR })
2154+
&& OPTIONS->NeutronStarAccretionInCE() != NS_ACCRETION_IN_CE::ZERO) { // accretor is a neutron star, system is in CE
2155+
m_Accretor->SetRecycledNS(); // accretor is (was) a recycled NS
2156+
}
21552157
}
21562158

21572159

src/BinaryConstituentStar.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ COMPAS_VARIABLE BinaryConstituentStar::StellarPropertyValue(const T_ANY_PROPERTY
7979
case ANY_STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_POST_COMMON_ENVELOPE: value = RadialExpansionTimescalePostCEE(); break;
8080
case ANY_STAR_PROPERTY::RADIAL_EXPANSION_TIMESCALE_PRE_COMMON_ENVELOPE: value = RadialExpansionTimescalePreCEE(); break;
8181
case ANY_STAR_PROPERTY::RECYCLED_NEUTRON_STAR: value = ExperiencedRecycledNS(); break;
82-
case ANY_STAR_PROPERTY::RLOF_ONTO_NS: value = ExperiencedRLOFOntoNS(); break;
8382
case ANY_STAR_PROPERTY::TEMPERATURE_POST_COMMON_ENVELOPE: value = TemperaturePostCEE() * TSOL; break;
8483
case ANY_STAR_PROPERTY::TEMPERATURE_PRE_COMMON_ENVELOPE: value = TemperaturePreCEE() * TSOL; break;
8584
case ANY_STAR_PROPERTY::THERMAL_TIMESCALE_POST_COMMON_ENVELOPE: value = ThermalTimescalePostCEE(); break;

src/BinaryConstituentStar.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ class BinaryConstituentStar: virtual public Star {
5050
m_CEDetails.postCEE.radialExpansionTimescale = DEFAULT_INITIAL_DOUBLE_VALUE;
5151

5252
m_Flags.recycledNS = false;
53-
m_Flags.rlofOntoNS = false;
54-
53+
5554
m_MassLossDiff = DEFAULT_INITIAL_DOUBLE_VALUE;
5655
m_MassTransferDiff = DEFAULT_INITIAL_DOUBLE_VALUE;
5756

@@ -151,7 +150,6 @@ class BinaryConstituentStar: virtual public Star {
151150

152151
bool ExperiencedRecycledNS() const { return m_Flags.recycledNS; }
153152
bool ExperiencedRLOF() const { return m_RLOFDetails.experiencedRLOF; }
154-
bool ExperiencedRLOFOntoNS() const { return m_Flags.rlofOntoNS; }
155153

156154
double HeCoreMassAtCEE() const { return m_CEDetails.HeCoreMass; }
157155

@@ -196,8 +194,6 @@ class BinaryConstituentStar: virtual public Star {
196194
void ClearRecycledNS() { m_Flags.recycledNS = false; }
197195
void SetRecycledNS() { m_Flags.recycledNS = true; }
198196

199-
void ClearRLOFOntoNS() { m_Flags.rlofOntoNS = false; }
200-
void SetRLOFOntoNS() { m_Flags.rlofOntoNS = true; }
201197

202198
void CalculateCommonEnvelopeValues();
203199

@@ -248,7 +244,6 @@ class BinaryConstituentStar: virtual public Star {
248244

249245
struct FLAGS { // Miscellaneous flags
250246
bool recycledNS; // Indicate whether the accretor was a recycled neutron star
251-
bool rlofOntoNS; // Indicates whether the donor donated mass to neutron star through RLOF
252247
} m_Flags;
253248

254249
double m_MassLossDiff;

src/LogTypedefs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH };
245245
RADIUS, \
246246
RANDOM_SEED, \
247247
RECYCLED_NEUTRON_STAR, \
248-
RLOF_ONTO_NS, \
249248
ROCKET_KICK_MAGNITUDE, \
250249
ROCKET_KICK_PHI, \
251250
ROCKET_KICK_THETA, \
@@ -393,7 +392,6 @@ const COMPASUnorderedMap<STAR_PROPERTY, std::string> STAR_PROPERTY_LABEL = {
393392
{ STAR_PROPERTY::RADIUS, "RADIUS" },
394393
{ STAR_PROPERTY::RANDOM_SEED, "RANDOM_SEED" },
395394
{ STAR_PROPERTY::RECYCLED_NEUTRON_STAR, "RECYCLED_NEUTRON_STAR" },
396-
{ STAR_PROPERTY::RLOF_ONTO_NS, "RLOF_ONTO_NS" },
397395
{ STAR_PROPERTY::ROCKET_KICK_MAGNITUDE, "ROCKET_KICK_MAGNITUDE" },
398396
{ STAR_PROPERTY::ROCKET_KICK_PHI, "ROCKET_KICK_PHI" },
399397
{ STAR_PROPERTY::ROCKET_KICK_THETA, "ROCKET_KICK_THETA" },
@@ -1321,7 +1319,6 @@ const std::map<ANY_STAR_PROPERTY, PROPERTY_DETAILS> ANY_STAR_PROPERTY_DETAIL = {
13211319
{ ANY_STAR_PROPERTY::RADIUS, { TYPENAME::DOUBLE, "Radius", "Rsol", 24, 15}},
13221320
{ ANY_STAR_PROPERTY::RANDOM_SEED, { TYPENAME::ULONGINT, "SEED", "-", 12, 1 }},
13231321
{ ANY_STAR_PROPERTY::RECYCLED_NEUTRON_STAR, { TYPENAME::BOOL, "Recycled_NS", "Event", 0, 0 }},
1324-
{ ANY_STAR_PROPERTY::RLOF_ONTO_NS, { TYPENAME::BOOL, "RLOF->NS", "Event", 0, 0 }},
13251322
{ ANY_STAR_PROPERTY::ROCKET_KICK_MAGNITUDE, { TYPENAME::DOUBLE, "Rocket_Kick_Magnitude", "kms^-1", 24, 15}},
13261323
{ ANY_STAR_PROPERTY::ROCKET_KICK_PHI, { TYPENAME::DOUBLE, "Rocket_Kick_Phi", "-", 24, 15}},
13271324
{ ANY_STAR_PROPERTY::ROCKET_KICK_THETA, { TYPENAME::DOUBLE, "Rocket_Kick_Theta", "-", 24, 15}},

src/changelog.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,10 @@
15261526
// 03.17.02 JR - Apr 11, 2025 - Defect Repair:
15271527
// - Remove extraneous debug print statement in MainSequence.h (inavertently added by me in v03.17.00)
15281528
// - fix description of return value for BaseStar::CalculateOmegaCHE()
1529-
const std::string VERSION_STRING = "03.17.02";
1529+
// 03.17.03 YS - Apr 6, 2025 - Enhancement:
1530+
// - Fix to issue #1366
1531+
// - Removed "RLOF_ONTO_NS" output option as it can be retrieved from RLOF Output info.
1532+
1533+
const std::string VERSION_STRING = "03.17.03";
15301534

15311535
# endif // __changelog_h__

0 commit comments

Comments
 (0)