@@ -91,10 +91,10 @@ BaseStar::BaseStar(const unsigned long int p_RandomSeed,
9191
9292 // calculate coefficients, constants etc.
9393
94- CalculateRCoefficients (LogMetallicityXi (), m_RCoefficients);
95- CalculateLCoefficients (LogMetallicityXi (), m_LCoefficients);
94+ CalculateRCoefficients (LogMetallicityXiHurley (), m_RCoefficients);
95+ CalculateLCoefficients (LogMetallicityXiHurley (), m_LCoefficients);
9696
97- CalculateMassCutoffs (m_Metallicity, LogMetallicityXi (), m_MassCutoffs);
97+ CalculateMassCutoffs (m_Metallicity, LogMetallicityXiHurley (), m_MassCutoffs);
9898
9999 CalculateAnCoefficients (m_AnCoefficients, m_LConstants, m_RConstants, m_GammaConstants);
100100 CalculateBnCoefficients (m_BnCoefficients);
@@ -506,7 +506,7 @@ void BaseStar::CalculateAnCoefficients(DBL_VECTOR &p_AnCoefficients,
506506#define GammaConstants (x ) p_GammaConstants[static_cast <int >(GAMMA_CONSTANTS::x)] // for convenience and readability - undefined at end of function
507507
508508 double Z = m_Metallicity;
509- double xi = LogMetallicityXi ();
509+ double xi = LogMetallicityXiHurley ();
510510 double sigma = LogMetallicitySigma ();
511511
512512 // pow() is slow - use multiplication
@@ -606,7 +606,7 @@ void BaseStar::CalculateBnCoefficients(DBL_VECTOR &p_BnCoefficients) {
606606
607607
608608 double Z = m_Metallicity;
609- double xi = LogMetallicityXi ();
609+ double xi = LogMetallicityXiHurley ();
610610 double sigma = LogMetallicitySigma ();
611611 double rho = LogMetallicityRho ();
612612
@@ -879,7 +879,7 @@ void BaseStar::CalculateMassCutoffs(const double p_Metallicity, const double p_L
879879double BaseStar::CalculateGBRadiusXExponent () const {
880880
881881 // pow()is slow - use multiplication
882- double xi = LogMetallicityXi ();
882+ double xi = LogMetallicityXiHurley ();
883883 double xi_2 = xi * xi;
884884 double xi_3 = xi_2 * xi;
885885 double xi_4 = xi_2 * xi_2;
@@ -1834,7 +1834,7 @@ double BaseStar::CalculateMassLossRateOBVink2001() const {
18341834 (2.210 * log10 (m_Luminosity / 1.0E5 )) -
18351835 (1.339 * log10 (m_Mass / 30.0 )) -
18361836 (1.601 * log10 (v / 2.0 )) +
1837- (0.85 * log10 (m_Metallicity / ZSOL_ANDERS )) +
1837+ (0.85 * LogMetallicityXiAnders ( )) +
18381838 (1.07 * log10 (teff / 20000.0 ));
18391839
18401840 rate = PPOW (10.0 , logMdotOB);
@@ -1850,7 +1850,7 @@ double BaseStar::CalculateMassLossRateOBVink2001() const {
18501850 (2.194 * log10 (m_Luminosity / 1.0E5 )) -
18511851 (1.313 * log10 (m_Mass / 30.0 )) -
18521852 (1.226 * log10 (v / 2.0 )) +
1853- (0.85 * log10 (m_Metallicity / ZSOL_ANDERS )) +
1853+ (0.85 * LogMetallicityXiAnders ( )) +
18541854 (0.933 * log10 (teff / 40000.0 )) -
18551855 (10.92 * log10 (teff / 40000.0 ) * log10 (teff/40000.0 ));
18561856
@@ -1885,7 +1885,7 @@ double BaseStar::CalculateMassLossRateOBVinkSander2021() const {
18851885
18861886 double teff = m_Temperature * TSOL;
18871887 double Gamma = EDDINGTON_PARAMETER_FACTOR * m_Luminosity / m_Mass;
1888- double charrho = -14.94 + (3.1857 * Gamma) + (zExp * log10 (m_Metallicity / ZSOL_ANDERS ));
1888+ double charrho = -14.94 + (3.1857 * Gamma) + (zExp * LogMetallicityXiAnders ( ));
18891889 double T2 = ( 61.2 + (2.59 * charrho) ) * 1000.0 ; // typically around 25000.0, higher jump first as in Vink python recipe
18901890 double T1 = ( 100.0 + (6.0 * charrho) ) * 1000.0 ; // typically around 20000.0, has similar behavior when fixed
18911891
@@ -1901,7 +1901,7 @@ double BaseStar::CalculateMassLossRateOBVinkSander2021() const {
19011901 (2.210 * logL5) -
19021902 (1.339 * logM30) -
19031903 (1.601 * log10 (V / 2.0 )) +
1904- (zExp2001 * log10 (m_Metallicity / ZSOL_ANDERS )) +
1904+ (zExp2001 * LogMetallicityXiAnders ( )) +
19051905 (1.07 * logT20);
19061906
19071907 rate = PPOW (10.0 , logMdotOB);
@@ -1914,7 +1914,7 @@ double BaseStar::CalculateMassLossRateOBVinkSander2021() const {
19141914 (2.210 * logL5) -
19151915 (1.339 * logM30) -
19161916 (1.601 * log10 (V / 2.0 )) +
1917- (zExp2001 * log10 (m_Metallicity / ZSOL_ANDERS )) +
1917+ (zExp2001 * LogMetallicityXiAnders ( )) +
19181918 (1.07 * logT20);
19191919
19201920 rate = PPOW (10.0 , logMdotOB);
@@ -1927,7 +1927,7 @@ double BaseStar::CalculateMassLossRateOBVinkSander2021() const {
19271927 (2.194 * logL5) -
19281928 (1.313 * logM30) -
19291929 (1.226 * log10 (V / 2.0 )) +
1930- (zExp * log10 (m_Metallicity / ZSOL_ANDERS )) +
1930+ (zExp * LogMetallicityXiAnders ( )) +
19311931 (0.933 * logT40) -
19321932 (10.92 * logT40 * logT40);
19331933
@@ -1953,9 +1953,7 @@ double BaseStar::CalculateMassLossRateOBVinkSander2021() const {
19531953 */
19541954double BaseStar::CalculateMassLossRateOBKrticka2018 () const {
19551955
1956- double logZ = log10 (m_Metallicity / ZSOL_ASPLUND);
1957-
1958- double logMdot = -5.70 + 0.50 * logZ + (1.61 - 0.12 * logZ) * log10 (m_Luminosity / 1.0E6 );
1956+ double logMdot = -5.70 + 0.50 * LogMetallicityXiAsplund () + (1.61 - 0.12 * LogMetallicityXiAsplund ()) * log10 (m_Luminosity / 1.0E6 );
19591957
19601958 return PPOW (10.0 , logMdot);
19611959}
@@ -2301,7 +2299,7 @@ double BaseStar::CalculateMassLossRateWolfRayetSanderVink2020(const double p_Mu)
23012299 if (utils::Compare (p_Mu, 1.0 ) < 0 ) {
23022300
23032301 double logL = log10 (m_Luminosity);
2304- double logZ = log10 (m_Metallicity / ZSOL_ANDERS );
2302+ double logZ = LogMetallicityXiAnders ( );
23052303
23062304 // Calculate alpha, L0 and Mdot10
23072305 double alpha = 0.32 * logZ + 1.4 ; // Equation 18 in Sander & Vink 2020
@@ -2369,7 +2367,7 @@ double BaseStar::CalculateMassLossRateWolfRayetTemperatureCorrectionSander2023(c
23692367 */
23702368double BaseStar::CalculateMassLossRateHeliumStarVink2017 () const {
23712369
2372- double logMdot = -13.3 + (1.36 * log10 (m_Luminosity)) + (0.61 * log10 (m_Metallicity / ZSOL_ANDERS )); // Vink 2017 Eq. 1.
2370+ double logMdot = -13.3 + (1.36 * log10 (m_Luminosity)) + (0.61 * LogMetallicityXiAnders ( )); // Vink 2017 Eq. 1.
23732371
23742372 return PPOW (10.0 , logMdot);
23752373}
0 commit comments