Skip to content

Commit 30e0328

Browse files
committed
Corrected calculations for Hurley A(n) and B(n) coefficients (see Hurley et al. 2000, appendix)
1 parent fe1e5ff commit 30e0328

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/BaseStar.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,13 +533,16 @@ void BaseStar::CalculateAnCoefficients(DBL_VECTOR &p_AnCoefficients,
533533
a[19] *= a[20];
534534
a[29] = PPOW(a[29], (a[32]));
535535
a[33] = min(1.4, 1.5135 + (0.3769 * xi));
536+
a[33] = max(0.6355 - (0.4192 * xi), max(1.25, a[33]));
536537
a[42] = min(1.25, max(1.1, a[42]));
537538
a[44] = min(1.3, max(0.45, a[44]));
538539
a[49] = max(a[49], 0.145);
539540
a[50] = min(a[50], (0.306 + (0.053 * xi)));
540541
a[51] = min(a[51], (0.3625 + (0.062 * xi)));
541-
a[52] = (utils::Compare(Z, 0.01) > 0) ? min(a[52], 1.0) : max(a[52], 0.9);
542-
a[53] = (utils::Compare(Z, 0.01) > 0) ? min(a[53], 1.1) : max(a[53], 1.0);
542+
a[52] = max(a[52], 0.9);
543+
a[52] = (utils::Compare(Z, 0.01) > 0) ? min(a[52], 1.0) : a[52];
544+
a[53] = max(a[53], 1.0);
545+
a[53] = (utils::Compare(Z, 0.01) > 0) ? min(a[53], 1.1) : a[53];
543546
a[57] = min(1.4, a[57]);
544547
a[57] = max((0.6355 - (0.4192 * xi)), max(1.25, a[57]));
545548
a[62] = max(0.065, a[62]);
@@ -633,8 +636,8 @@ void BaseStar::CalculateBnCoefficients(DBL_VECTOR &p_BnCoefficients) {
633636
b[1] = min(0.54, b[1]);
634637
b[2] = PPOW(10.0, (-4.6739 - (0.9394 * sigma)));
635638
b[2] = min(max(b[2], (-0.04167 + (55.67 * Z))), (0.4771 - (9329.21 * PPOW(Z, 2.94))));
636-
b[3] = max(-0.1451, (-2.2794 - (1.5175 * sigma) - (0.254 * sigma * sigma)));
637-
b[3] = (utils::Compare(Z, 0.004) > 0) ? max(b[3], 0.7307 + (14265.1 * PPOW(Z, 3.395))) : PPOW(10.0, b[3]);
639+
b[3] = PPOW(10.0, max(-0.1451, (-2.2794 - (1.5175 * sigma) - (0.254 * sigma * sigma))));
640+
b[3] = (utils::Compare(Z, 0.004) > 0) ? max(b[3], 0.7307 + (14265.1 * PPOW(Z, 3.395))) : b[3];
638641
b[4] += 0.1231572 * xi_5;
639642
b[6] += 0.01640687 * xi_5;
640643
b[11] = b[11] * b[11];

src/changelog.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,8 @@
16551655
// fallback option, fixed remnant mass, and added lum and teff as attributes of RLOFProperties
16561656
// 03.25.00 RTW - August 18, 2025 - Enhancement:
16571657
// - Added KLENCKI_LINEAR AM loss, which is linear in the specific AM gamma instead of the orbital separation (as in MACLEOD_LINEAR)
1658-
//
1658+
// 03.25.01 JR - August 20, 2025 - Defect repairs:
1659+
// - Corrected calculations for Hurley A(n) and B(n) coefficients (see Hurley et al. 2000, appendix)
16591660
//
16601661
// Version string format is MM.mm.rr, where
16611662
//
@@ -1666,7 +1667,7 @@
16661667
// if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made
16671668
// if mm is incremented, set rr to 00, even if defect repairs were also made
16681669

1669-
const std::string VERSION_STRING = "03.25.00";
1670+
const std::string VERSION_STRING = "03.25.01";
16701671

16711672

16721673
# endif // __changelog_h__

0 commit comments

Comments
 (0)