Skip to content

Commit d8df345

Browse files
author
Ilya Mandel
committed
Merge branch 'dev' into Matlab
2 parents 0007c69 + 88415fb commit d8df345

File tree

5 files changed

+86
-17
lines changed

5 files changed

+86
-17
lines changed

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

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -291,22 +291,6 @@ Following is an alphabetical list of stellar properties available for inclusion
291291
- Mass CO_Core@\ CO, Mass_CO_Core@CO(1), Mass_CO_Core@CO(2), Mass_CO_Core@CO(SN), Mass_CO_Core@CO(CP)
292292

293293

294-
.. flat-table::
295-
:widths: 25 75 1 1
296-
:header-rows: 0
297-
:class: aligned-text
298-
299-
* - :cspan:`2` **COMPONENT_SPEED**
300-
-
301-
* - Data type:
302-
- DOUBLE
303-
* - COMPAS variable:
304-
- BaseStar::m_ComponentVelocity
305-
* - Description:
306-
- Velocity of single star, equal to binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
307-
* - Header String:
308-
- ComponentSpeed
309-
310294
.. flat-table::
311295
:widths: 25 75 1 1
312296
:header-rows: 0
@@ -1913,6 +1897,24 @@ same header string.`
19131897
* - Header Strings:
19141898
- SN_Type, SN_Type(1), SN_Type(2), SN_Type(SN), SN_Type(CP)
19151899

1900+
1901+
.. flat-table::
1902+
:widths: 25 75 1 1
1903+
:header-rows: 0
1904+
:class: aligned-text
1905+
1906+
* - :cspan:`2` **SPEED**
1907+
-
1908+
* - Data type:
1909+
- DOUBLE
1910+
* - COMPAS variable:
1911+
- BaseStar::m_ComponentVelocity.Magnitude()
1912+
* - Description:
1913+
- Magnitude of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
1914+
* - Header String:
1915+
- ComponentSpeed
1916+
1917+
19161918
.. flat-table::
19171919
:widths: 25 75 1 1
19181920
:header-rows: 0
@@ -2249,6 +2251,56 @@ or the other is printed in any file, but not both. If both are printed then the
22492251

22502252
.. _stellar-props-V:
22512253

2254+
:ref:`Back to Top <stellar-props-top>`
2255+
2256+
.. flat-table::
2257+
:widths: 25 75 1 1
2258+
:header-rows: 0
2259+
:class: aligned-text
2260+
2261+
* - :cspan:`2` **VELOCITY_X**
2262+
-
2263+
* - Data type:
2264+
- DOUBLE
2265+
* - COMPAS variable:
2266+
- BaseStar::m_ComponentVelocity.xValue()
2267+
* - Description:
2268+
- X-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
2269+
* - Header String:
2270+
- VelocityX
2271+
2272+
.. flat-table::
2273+
:widths: 25 75 1 1
2274+
:header-rows: 0
2275+
:class: aligned-text
2276+
2277+
* - :cspan:`2` **VELOCITY_Y**
2278+
-
2279+
* - Data type:
2280+
- DOUBLE
2281+
* - COMPAS variable:
2282+
- BaseStar::m_ComponentVelocity.yValue()
2283+
* - Description:
2284+
- Y-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
2285+
* - Header String:
2286+
- VelocityY
2287+
2288+
.. flat-table::
2289+
:widths: 25 75 1 1
2290+
:header-rows: 0
2291+
:class: aligned-text
2292+
2293+
* - :cspan:`2` **VELOCITY_Z**
2294+
-
2295+
* - Data type:
2296+
- DOUBLE
2297+
* - COMPAS variable:
2298+
- BaseStar::m_ComponentVelocity.zValue()
2299+
* - Description:
2300+
- Z-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
2301+
* - Header String:
2302+
- VelocityZ
2303+
22522304
.. _stellar-props-W:
22532305

22542306
.. _stellar-props-X:

src/BaseStar.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ COMPAS_VARIABLE BaseStar::StellarPropertyValue(const T_ANY_PROPERTY p_Property)
387387
case ANY_STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION: value = SN_TotalRadiusAtCOFormation(); break;
388388
case ANY_STAR_PROPERTY::TRUE_ANOMALY: value = SN_TrueAnomaly(); break;
389389
case ANY_STAR_PROPERTY::TZAMS: value = TZAMS() * TSOL; break;
390+
case ANY_STAR_PROPERTY::VELOCITY_X: value = VelocityX(); break;
391+
case ANY_STAR_PROPERTY::VELOCITY_Y: value = VelocityY(); break;
392+
case ANY_STAR_PROPERTY::VELOCITY_Z: value = VelocityZ(); break;
390393
case ANY_STAR_PROPERTY::ZETA_HURLEY: value = CalculateZetaAdiabaticHurley2002(m_CoreMass); break;
391394
case ANY_STAR_PROPERTY::ZETA_HURLEY_HE: value = CalculateZetaAdiabaticHurley2002(m_HeCoreMass); break;
392395
case ANY_STAR_PROPERTY::ZETA_SOBERMAN: value = CalculateZetaAdiabaticSPH(m_CoreMass); break;

src/BaseStar.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ class BaseStar {
177177
double Timescale(TIMESCALE p_Timescale) const { return m_Timescales[static_cast<int>(p_Timescale)]; }
178178
double TotalMassLossRate() const { return m_TotalMassLossRate; }
179179
double TZAMS() const { return m_TZAMS; }
180+
double VelocityX() const { return m_ComponentVelocity.xValue(); }
181+
double VelocityY() const { return m_ComponentVelocity.yValue(); }
182+
double VelocityZ() const { return m_ComponentVelocity.zValue(); }
180183
virtual ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return ACCRETION_REGIME::ZERO; }
181184
double XExponent() const { return m_XExponent; }
182185

src/LogTypedefs.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH };
274274
TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \
275275
TRUE_ANOMALY, \
276276
TZAMS, \
277+
VELOCITY_X, \
278+
VELOCITY_Y, \
279+
VELOCITY_Z, \
277280
ZETA_HURLEY, \
278281
ZETA_HURLEY_HE, \
279282
ZETA_SOBERMAN, \
@@ -424,6 +427,9 @@ const COMPASUnorderedMap<STAR_PROPERTY, std::string> STAR_PROPERTY_LABEL = {
424427
{ STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" },
425428
{ STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" },
426429
{ STAR_PROPERTY::TZAMS, "TZAMS" },
430+
{ STAR_PROPERTY::VELOCITY_X, "VELOCITY_X" },
431+
{ STAR_PROPERTY::VELOCITY_Y, "VELOCITY_Y" },
432+
{ STAR_PROPERTY::VELOCITY_Z, "VELOCITY_Z" },
427433
{ STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" },
428434
{ STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" },
429435
{ STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" },
@@ -1407,6 +1413,9 @@ const std::map<ANY_STAR_PROPERTY, PROPERTY_DETAILS> ANY_STAR_PROPERTY_DETAIL = {
14071413
{ ANY_STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, { TYPENAME::DOUBLE, "Radius_Total@CO", "Rsol", 24, 15}},
14081414
{ ANY_STAR_PROPERTY::TRUE_ANOMALY, { TYPENAME::DOUBLE, "True_Anomaly(psi)", "-", 24, 15}},
14091415
{ ANY_STAR_PROPERTY::TZAMS, { TYPENAME::DOUBLE, "Teff@ZAMS", "K", 24, 15}},
1416+
{ ANY_STAR_PROPERTY::VELOCITY_X, { TYPENAME::DOUBLE, "VelocityX", "kms^-1", 24, 15}},
1417+
{ ANY_STAR_PROPERTY::VELOCITY_Y, { TYPENAME::DOUBLE, "VelocityY", "kms^-1", 24, 15}},
1418+
{ ANY_STAR_PROPERTY::VELOCITY_Z, { TYPENAME::DOUBLE, "VelocityZ", "kms^-1", 24, 15}},
14101419
{ ANY_STAR_PROPERTY::ZETA_HURLEY, { TYPENAME::DOUBLE, "Zeta_Hurley", "-", 24, 15}},
14111420
{ ANY_STAR_PROPERTY::ZETA_HURLEY_HE, { TYPENAME::DOUBLE, "Zeta_Hurley_He", "-", 24, 15}},
14121421
{ ANY_STAR_PROPERTY::ZETA_SOBERMAN, { TYPENAME::DOUBLE, "Zeta_Soberman", "-", 24, 15}},

src/changelog.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,8 +1597,10 @@
15971597
// - Fix for issue #400; correct Zsol values are now used in stellar wind prescriptions
15981598
// - To avoid ambiguous ZSOL, we now use ZSOL_HURLEY = 0.02, ZSOL_ANDERS = 0.019, and ZSOL_ASPLUND = 0.0142
15991599
// - Fixed error in MainSequence::CalculateInitialMainSequenceCoreMass()
1600+
// 03.20.09 RTW - Jun 30, 2025 - Enhancement:
1601+
// - Added individual velocity components for stars to the LogTypedefs file so they can be included in the output (as ANY_STAR_PROPERTY::VELOCITY_X, or Y, Z)
16001602

1601-
const std::string VERSION_STRING = "03.20.08";
1603+
const std::string VERSION_STRING = "03.20.09";
16021604

16031605

16041606
# endif // __changelog_h__

0 commit comments

Comments
 (0)