diff --git a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-stellar.rst b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-stellar.rst index beec8aa35..0fb1b63da 100644 --- a/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-stellar.rst +++ b/online-docs/pages/User guide/COMPAS output/standard-logfiles-record-specification-stellar.rst @@ -291,22 +291,6 @@ Following is an alphabetical list of stellar properties available for inclusion - Mass CO_Core@\ CO, Mass_CO_Core@CO(1), Mass_CO_Core@CO(2), Mass_CO_Core@CO(SN), Mass_CO_Core@CO(CP) -.. flat-table:: - :widths: 25 75 1 1 - :header-rows: 0 - :class: aligned-text - - * - :cspan:`2` **COMPONENT_SPEED** - - - * - Data type: - - DOUBLE - * - COMPAS variable: - - BaseStar::m_ComponentVelocity - * - Description: - - Velocity of single star, equal to binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`). - * - Header String: - - ComponentSpeed - .. flat-table:: :widths: 25 75 1 1 :header-rows: 0 @@ -1913,6 +1897,24 @@ same header string.` * - Header Strings: - SN_Type, SN_Type(1), SN_Type(2), SN_Type(SN), SN_Type(CP) + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **SPEED** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseStar::m_ComponentVelocity.Magnitude() + * - Description: + - Magnitude of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`). + * - Header String: + - ComponentSpeed + + .. flat-table:: :widths: 25 75 1 1 :header-rows: 0 @@ -2249,6 +2251,56 @@ or the other is printed in any file, but not both. If both are printed then the .. _stellar-props-V: +:ref:`Back to Top ` + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **VELOCITY_X** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseStar::m_ComponentVelocity.xValue() + * - Description: + - X-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`). + * - Header String: + - VelocityX + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **VELOCITY_Y** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseStar::m_ComponentVelocity.yValue() + * - Description: + - Y-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`). + * - Header String: + - VelocityY + +.. flat-table:: + :widths: 25 75 1 1 + :header-rows: 0 + :class: aligned-text + + * - :cspan:`2` **VELOCITY_Z** + - + * - Data type: + - DOUBLE + * - COMPAS variable: + - BaseStar::m_ComponentVelocity.zValue() + * - Description: + - Z-component of the velocity of a single star, or the binary's Systemic Velocity for a bound binary (\ :math:`km s^{-1}`). + * - Header String: + - VelocityZ + .. _stellar-props-W: .. _stellar-props-X: diff --git a/src/BaseStar.cpp b/src/BaseStar.cpp index c8a27267b..ddb060fd6 100755 --- a/src/BaseStar.cpp +++ b/src/BaseStar.cpp @@ -387,6 +387,9 @@ COMPAS_VARIABLE BaseStar::StellarPropertyValue(const T_ANY_PROPERTY p_Property) case ANY_STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION: value = SN_TotalRadiusAtCOFormation(); break; case ANY_STAR_PROPERTY::TRUE_ANOMALY: value = SN_TrueAnomaly(); break; case ANY_STAR_PROPERTY::TZAMS: value = TZAMS() * TSOL; break; + case ANY_STAR_PROPERTY::VELOCITY_X: value = VelocityX(); break; + case ANY_STAR_PROPERTY::VELOCITY_Y: value = VelocityY(); break; + case ANY_STAR_PROPERTY::VELOCITY_Z: value = VelocityZ(); break; case ANY_STAR_PROPERTY::ZETA_HURLEY: value = CalculateZetaAdiabaticHurley2002(m_CoreMass); break; case ANY_STAR_PROPERTY::ZETA_HURLEY_HE: value = CalculateZetaAdiabaticHurley2002(m_HeCoreMass); break; case ANY_STAR_PROPERTY::ZETA_SOBERMAN: value = CalculateZetaAdiabaticSPH(m_CoreMass); break; diff --git a/src/BaseStar.h b/src/BaseStar.h index 64dc78da3..ab214b77e 100644 --- a/src/BaseStar.h +++ b/src/BaseStar.h @@ -177,6 +177,9 @@ class BaseStar { double Timescale(TIMESCALE p_Timescale) const { return m_Timescales[static_cast(p_Timescale)]; } double TotalMassLossRate() const { return m_TotalMassLossRate; } double TZAMS() const { return m_TZAMS; } + double VelocityX() const { return m_ComponentVelocity.xValue(); } + double VelocityY() const { return m_ComponentVelocity.yValue(); } + double VelocityZ() const { return m_ComponentVelocity.zValue(); } virtual ACCRETION_REGIME WhiteDwarfAccretionRegime() const { return ACCRETION_REGIME::ZERO; } double XExponent() const { return m_XExponent; } diff --git a/src/LogTypedefs.h b/src/LogTypedefs.h index 0df73ee8a..80d8e6c22 100644 --- a/src/LogTypedefs.h +++ b/src/LogTypedefs.h @@ -274,6 +274,9 @@ enum class STRING_QUALIFIER: int { NONE, FIXED_LENGTH, VARIABLE_LENGTH }; TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, \ TRUE_ANOMALY, \ TZAMS, \ + VELOCITY_X, \ + VELOCITY_Y, \ + VELOCITY_Z, \ ZETA_HURLEY, \ ZETA_HURLEY_HE, \ ZETA_SOBERMAN, \ @@ -424,6 +427,9 @@ const COMPASUnorderedMap STAR_PROPERTY_LABEL = { { STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, "TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION" }, { STAR_PROPERTY::TRUE_ANOMALY, "TRUE_ANOMALY" }, { STAR_PROPERTY::TZAMS, "TZAMS" }, + { STAR_PROPERTY::VELOCITY_X, "VELOCITY_X" }, + { STAR_PROPERTY::VELOCITY_Y, "VELOCITY_Y" }, + { STAR_PROPERTY::VELOCITY_Z, "VELOCITY_Z" }, { STAR_PROPERTY::ZETA_HURLEY, "ZETA_HURLEY" }, { STAR_PROPERTY::ZETA_HURLEY_HE, "ZETA_HURLEY_HE" }, { STAR_PROPERTY::ZETA_SOBERMAN, "ZETA_SOBERMAN" }, @@ -1407,6 +1413,9 @@ const std::map ANY_STAR_PROPERTY_DETAIL = { { ANY_STAR_PROPERTY::TOTAL_RADIUS_AT_COMPACT_OBJECT_FORMATION, { TYPENAME::DOUBLE, "Radius_Total@CO", "Rsol", 24, 15}}, { ANY_STAR_PROPERTY::TRUE_ANOMALY, { TYPENAME::DOUBLE, "True_Anomaly(psi)", "-", 24, 15}}, { ANY_STAR_PROPERTY::TZAMS, { TYPENAME::DOUBLE, "Teff@ZAMS", "K", 24, 15}}, + { ANY_STAR_PROPERTY::VELOCITY_X, { TYPENAME::DOUBLE, "VelocityX", "kms^-1", 24, 15}}, + { ANY_STAR_PROPERTY::VELOCITY_Y, { TYPENAME::DOUBLE, "VelocityY", "kms^-1", 24, 15}}, + { ANY_STAR_PROPERTY::VELOCITY_Z, { TYPENAME::DOUBLE, "VelocityZ", "kms^-1", 24, 15}}, { ANY_STAR_PROPERTY::ZETA_HURLEY, { TYPENAME::DOUBLE, "Zeta_Hurley", "-", 24, 15}}, { ANY_STAR_PROPERTY::ZETA_HURLEY_HE, { TYPENAME::DOUBLE, "Zeta_Hurley_He", "-", 24, 15}}, { ANY_STAR_PROPERTY::ZETA_SOBERMAN, { TYPENAME::DOUBLE, "Zeta_Soberman", "-", 24, 15}}, diff --git a/src/changelog.h b/src/changelog.h index b5ad54283..a9d09b764 100644 --- a/src/changelog.h +++ b/src/changelog.h @@ -1597,8 +1597,10 @@ // - Fix for issue #400; correct Zsol values are now used in stellar wind prescriptions // - To avoid ambiguous ZSOL, we now use ZSOL_HURLEY = 0.02, ZSOL_ANDERS = 0.019, and ZSOL_ASPLUND = 0.0142 // - Fixed error in MainSequence::CalculateInitialMainSequenceCoreMass() +// 03.20.09 RTW - Jun 30, 2025 - Enhancement: +// - 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) -const std::string VERSION_STRING = "03.20.08"; +const std::string VERSION_STRING = "03.20.09"; # endif // __changelog_h__