Skip to content

Commit 1cc22dd

Browse files
changed from SPEED_X to VELOCITY_X and same for Y and Z for stars
1 parent 3b4b379 commit 1cc22dd

File tree

5 files changed

+66
-67
lines changed

5 files changed

+66
-67
lines changed

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

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,57 +1915,6 @@ same header string.`
19151915
- ComponentSpeed
19161916

19171917

1918-
.. flat-table::
1919-
:widths: 25 75 1 1
1920-
:header-rows: 0
1921-
:class: aligned-text
1922-
1923-
* - :cspan:`2` **SPEED_X**
1924-
-
1925-
* - Data type:
1926-
- DOUBLE
1927-
* - COMPAS variable:
1928-
- BaseStar::m_ComponentVelocity.xValue()
1929-
* - Description:
1930-
- X-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
1931-
* - Header String:
1932-
- ComponentSpeedX
1933-
1934-
1935-
.. flat-table::
1936-
:widths: 25 75 1 1
1937-
:header-rows: 0
1938-
:class: aligned-text
1939-
1940-
* - :cspan:`2` **SPEED_Y**
1941-
-
1942-
* - Data type:
1943-
- DOUBLE
1944-
* - COMPAS variable:
1945-
- BaseStar::m_ComponentVelocity.yValue()
1946-
* - Description:
1947-
- Y-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
1948-
* - Header String:
1949-
- ComponentSpeedY
1950-
1951-
1952-
.. flat-table::
1953-
:widths: 25 75 1 1
1954-
:header-rows: 0
1955-
:class: aligned-text
1956-
1957-
* - :cspan:`2` **SPEED_Z**
1958-
-
1959-
* - Data type:
1960-
- DOUBLE
1961-
* - COMPAS variable:
1962-
- BaseStar::m_ComponentVelocity.zValue()
1963-
* - Description:
1964-
- Z-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`).
1965-
* - Header String:
1966-
- ComponentSpeedZ
1967-
1968-
19691918
.. flat-table::
19701919
:widths: 25 75 1 1
19711920
:header-rows: 0
@@ -2302,6 +2251,56 @@ or the other is printed in any file, but not both. If both are printed then the
23022251

23032252
.. _stellar-props-V:
23042253

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+
23052304
.. _stellar-props-W:
23062305

23072306
.. _stellar-props-X:

src/BaseStar.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,6 @@ COMPAS_VARIABLE BaseStar::StellarPropertyValue(const T_ANY_PROPERTY p_Property)
372372
case ANY_STAR_PROPERTY::RZAMS: value = RZAMS(); break;
373373
case ANY_STAR_PROPERTY::SN_TYPE: value = SN_Type(); break;
374374
case ANY_STAR_PROPERTY::SPEED: value = Speed(); break;
375-
case ANY_STAR_PROPERTY::SPEED_X: value = SpeedX(); break;
376-
case ANY_STAR_PROPERTY::SPEED_Y: value = SpeedY(); break;
377-
case ANY_STAR_PROPERTY::SPEED_Z: value = SpeedZ(); break;
378375
case ANY_STAR_PROPERTY::STELLAR_TYPE: value = StellarType(); break;
379376
case ANY_STAR_PROPERTY::STELLAR_TYPE_NAME: value = STELLAR_TYPE_LABEL.at(StellarType()); break;
380377
case ANY_STAR_PROPERTY::STELLAR_TYPE_PREV: value = StellarTypePrev(); break;
@@ -390,6 +387,9 @@ COMPAS_VARIABLE BaseStar::StellarPropertyValue(const T_ANY_PROPERTY p_Property)
390387
case ANY_STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION: value = SN_TotalRadiusAtCOFormation(); break;
391388
case ANY_STAR_PROPERTY::TRUE_ANOMALY: value = SN_TrueAnomaly(); break;
392389
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;
393393
case ANY_STAR_PROPERTY::ZETA_HURLEY: value = CalculateZetaAdiabaticHurley2002(m_CoreMass); break;
394394
case ANY_STAR_PROPERTY::ZETA_HURLEY_HE: value = CalculateZetaAdiabaticHurley2002(m_HeCoreMass); break;
395395
case ANY_STAR_PROPERTY::ZETA_SOBERMAN: value = CalculateZetaAdiabaticSPH(m_CoreMass); break;

src/BaseStar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@ class BaseStar {
170170
SN_EVENT SN_Type() const { return utils::SNEventType(m_SupernovaDetails.events.current); }
171171
double SN_KickMagnitudeRandom() const { return m_SupernovaDetails.kickMagnitudeRandom; }
172172
double Speed() const { return m_ComponentVelocity.Magnitude(); }
173-
double SpeedX() const { return m_ComponentVelocity.xValue(); }
174-
double SpeedY() const { return m_ComponentVelocity.yValue(); }
175-
double SpeedZ() const { return m_ComponentVelocity.zValue(); }
176173
COMPAS_VARIABLE StellarPropertyValue(const T_ANY_PROPERTY p_Property) const;
177174
double Tau() const { return m_Tau; }
178175
double Temperature() const { return m_Temperature; }
179176
double Time() const { return m_Time; }
180177
double Timescale(TIMESCALE p_Timescale) const { return m_Timescales[static_cast<int>(p_Timescale)]; }
181178
double TotalMassLossRate() const { return m_TotalMassLossRate; }
182179
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(); }
183183
virtual ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return ACCRETION_REGIME::ZERO; }
184184
double XExponent() const { return m_XExponent; }
185185

src/LogTypedefs.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@ enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH };
255255
RZAMS, \
256256
SN_TYPE, \
257257
SPEED, \
258-
SPEED_X, \
259-
SPEED_Y, \
260-
SPEED_Z, \
261258
STELLAR_TYPE, \
262259
STELLAR_TYPE_NAME, \
263260
STELLAR_TYPE_PREV, \
@@ -277,6 +274,9 @@ enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH };
277274
TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \
278275
TRUE_ANOMALY, \
279276
TZAMS, \
277+
VELOCITY_X, \
278+
VELOCITY_Y, \
279+
VELOCITY_Z, \
280280
ZETA_HURLEY, \
281281
ZETA_HURLEY_HE, \
282282
ZETA_SOBERMAN, \
@@ -408,9 +408,6 @@ const COMPASUnorderedMap<STAR_PROPERTY, std::string> STAR_PROPERTY_LABEL = {
408408
{ STAR_PROPERTY::RZAMS, "RZAMS" },
409409
{ STAR_PROPERTY::SN_TYPE, "SN_TYPE" },
410410
{ STAR_PROPERTY::SPEED, "SPEED" },
411-
{ STAR_PROPERTY::SPEED_X, "SPEED_X" },
412-
{ STAR_PROPERTY::SPEED_Y, "SPEED_Y" },
413-
{ STAR_PROPERTY::SPEED_Z, "SPEED_Z" },
414411
{ STAR_PROPERTY::STELLAR_TYPE, "STELLAR_TYPE" },
415412
{ STAR_PROPERTY::STELLAR_TYPE_NAME, "STELLAR_TYPE_NAME" },
416413
{ STAR_PROPERTY::STELLAR_TYPE_PREV, "STELLAR_TYPE_PREV" },
@@ -430,6 +427,9 @@ const COMPASUnorderedMap<STAR_PROPERTY, std::string> STAR_PROPERTY_LABEL = {
430427
{ STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" },
431428
{ STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" },
432429
{ 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" },
433433
{ STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" },
434434
{ STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" },
435435
{ STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" },
@@ -1393,9 +1393,6 @@ const std::map<ANY_STAR_PROPERTY, PROPERTY_DETAILS> ANY_STAR_PROPERTY_DETAIL = {
13931393
{ ANY_STAR_PROPERTY::RZAMS, { TYPENAME::DOUBLE, "Radius@ZAMS", "Rsol", 24, 15}},
13941394
{ ANY_STAR_PROPERTY::SN_TYPE, { TYPENAME::SN_EVENT, "SN_Type", "-", 4, 1 }},
13951395
{ ANY_STAR_PROPERTY::SPEED, { TYPENAME::DOUBLE, "ComponentSpeed", "kms^-1", 24, 15}},
1396-
{ ANY_STAR_PROPERTY::SPEED_X, { TYPENAME::DOUBLE, "ComponentSpeedX", "kms^-1", 24, 15}},
1397-
{ ANY_STAR_PROPERTY::SPEED_Y, { TYPENAME::DOUBLE, "ComponentSpeedY", "kms^-1", 24, 15}},
1398-
{ ANY_STAR_PROPERTY::SPEED_Z, { TYPENAME::DOUBLE, "ComponentSpeedZ", "kms^-1", 24, 15}},
13991396
{ ANY_STAR_PROPERTY::STELLAR_TYPE, { TYPENAME::STELLAR_TYPE, "Stellar_Type", "-", 4, 1 }},
14001397
{ ANY_STAR_PROPERTY::STELLAR_TYPE_NAME, { TYPENAME::STRING, "Stellar_Type", "-", 42, 1 }},
14011398
{ ANY_STAR_PROPERTY::STELLAR_TYPE_PREV, { TYPENAME::STELLAR_TYPE, "Stellar_Type_Prev", "-", 4, 1 }},
@@ -1416,6 +1413,9 @@ const std::map<ANY_STAR_PROPERTY, PROPERTY_DETAILS> ANY_STAR_PROPERTY_DETAIL = {
14161413
{ ANY_STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, { TYPENAME::DOUBLE, "Radius_Total@CO", "Rsol", 24, 15}},
14171414
{ ANY_STAR_PROPERTY::TRUE_ANOMALY, { TYPENAME::DOUBLE, "True_Anomaly(psi)", "-", 24, 15}},
14181415
{ 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}},
14191419
{ ANY_STAR_PROPERTY::ZETA_HURLEY, { TYPENAME::DOUBLE, "Zeta_Hurley", "-", 24, 15}},
14201420
{ ANY_STAR_PROPERTY::ZETA_HURLEY_HE, { TYPENAME::DOUBLE, "Zeta_Hurley_He", "-", 24, 15}},
14211421
{ ANY_STAR_PROPERTY::ZETA_SOBERMAN, { TYPENAME::DOUBLE, "Zeta_Soberman", "-", 24, 15}},

src/changelog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@
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()
16001600
// 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::SPEED_X, or Y, Z)
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)
16021602

16031603
const std::string VERSION_STRING = "03.20.09";
16041604

0 commit comments

Comments
 (0)