Skip to content

Commit 04011c6

Browse files
author
Ilya Mandel
committed
Corrected and simplified GiantBranch::CalculateRadialExtentConvectiveEnvelope()
1 parent f293075 commit 04011c6

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/GiantBranch.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -694,15 +694,9 @@ double GiantBranch::CalculateRadialExtentConvectiveEnvelope() const{
694694
std::tie(convectiveEnvelopeMass, convectiveEnvelopeMassMax) = CalculateConvectiveEnvelopeMass();
695695
if (utils::Compare(convectiveEnvelopeMass, 0.0) <= 0 || utils::Compare(convectiveEnvelopeMassMax, 0.0) <= 0 ) return 0.0; // massless convective envelope has zero radial extent
696696

697-
double convectiveCoreMass = CalculateConvectiveCoreMass();
698697
double convectiveCoreRadius = CalculateConvectiveCoreRadius();
699-
// assume that the final radiative intershell (if any) would have a density that is a geometric mean of the core density and total density
700-
double radiativeIntershellMass = m_Mass - convectiveCoreMass - convectiveEnvelopeMassMax;
701-
double convectiveCoreRadiusCubed = convectiveCoreRadius * convectiveCoreRadius * convectiveCoreRadius;
702-
double radiativeIntershellDensity = 1.0 / (4.0 /3.0 * M_PI) * std::sqrt(convectiveCoreMass / convectiveCoreRadiusCubed * m_Mass / m_Radius / m_Radius / m_Radius);
703-
double outerEdgeRadiativeIntershellCubed = radiativeIntershellMass / (4.0 / 3.0 * M_PI * radiativeIntershellDensity) + convectiveCoreRadiusCubed;
704698

705-
return std::sqrt(convectiveEnvelopeMass/convectiveEnvelopeMassMax) * (m_Radius - std::cbrt(outerEdgeRadiativeIntershellCubed));
699+
return std::sqrt(convectiveEnvelopeMass/convectiveEnvelopeMassMax) * (m_Radius - convectiveCoreRadius);
706700
}
707701

708702

src/changelog.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,9 @@
15531553
// - Added several outputs to provide more information and aid code testing: SEMI_MAJOR_AXIS_POST_STAGE_1_CE (for the 2-stage CE); BINDING_ENERGY_CONVECTIVE_ENVELOPE, CONVECTIVE_ENV_MASS, LAMBDA_CONVECTIVE_ENVELOPE (convective envelope binding energy, mass, and lambda, respectively, Picker prescription)
15541554
// - Ensure that the MANDEL main sequence core mass prescription never provides a core mass exceeding the total mass
15551555
// - Corrected several erroneous comments, cleaned up a few function definitions
1556+
// 03.18.07 IM - May 11, 2025 - Defect repair:
1557+
// - Corrected and simplified GiantBranch::CalculateRadialExtentConvectiveEnvelope()
15561558

1557-
const std::string VERSION_STRING = "03.18.06";
1559+
const std::string VERSION_STRING = "03.18.07";
15581560

15591561
# endif // __changelog_h__

0 commit comments

Comments
 (0)