You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This figure shows the relative derivative error,:math:`\partial \kappa / \partial T` (:math:`X` = 0.625, :math:`Z` = 0.015),
84
+
This figure shows the relative error in the derivative:math:`\partial \kappa / \partial T` (:math:`X` = 0.625, :math:`Z` = 0.015),
85
85
for an OPAL opacity table grid using Grevesse & Sauval (1998) abundances, generated from MESA’s kap module, using cubic interpolation.
86
86
The OPLIB log(:math:`R`) = −8, 1.5 table boundaries are marked with a solid black line and the OPAL/OP log(:math:`R`) = 1.0 boundary is shown with a dashed line.
87
87
The approximate location of the Z-dependent transition to an electron conduction dominated opacity is marked with dot-dash blue curve. Regions for Atomic, molecular,
88
88
and compton scattering opacity are labeled and presented with their associated blending regions.
89
89
90
90
91
-
This is in stark contrast to the relative derivative error achieved with linear interpolation only, see the figure below.
This figure shows the relative derivative error, :math:`\partial \kappa / \partial T` (:math:`X` = 0.625, :math:`Z` = 0.015),
97
-
for an OPAL opacity table grid using Grevesse & Sauval (1998) abundances, generated from MESA’s kap module using linear interpolation.
98
-
The OPLIB log(:math:`R`) = −8, 1.5 table boundaries are marked with a solid black line and the OPAL/OP log(:math:`R`) = 1.0 boundary is shown with a dashed line.
99
-
The approximate location of the Z-dependent transition to an electron conduction dominated opacity is marked with dot-dash blue curve. Regions for Atomic, molecular,
100
-
and compton scattering opacity are labeled and presented with their associated blending regions.
101
-
102
-
103
-
While the opacity derivatives do not directly appear in the canonical equations of stellar structure, they do appear in the jacobian matrix
104
-
MESA solves. The opacity derivatives are used to implicitly solve the stellar structure equations and reach a converged solution. Numerically unstable opacity derivatives can
91
+
While the opacity derivatives do not directly appear in the canonical equations of stellar structure, they do appear in the Jacobian matrix for the MESA implicit solver.
92
+
The opacity derivatives are used to implicitly solve the stellar structure equations and reach a converged solution. Numerically unstable opacity derivatives can
105
93
halt the progress of the solver and ultimately crash a calculation.
106
94
107
95
To improve the numerical stability of MESA's cubic opacity interpolation routines, we have implemented
@@ -110,21 +98,25 @@ in the :math:`X–Z` plane are computed by taking the derivative of the interpol
110
98
has resulted in a significant reduction in the relative derivative error and results in an increase in the numerical accuracy of opacity derivatives computed with cubic interpolation.
This figure shows the relative derivative error, :math:`\partial \kappa / \partial T` (:math:`X` = 0.625, :math:`Z` = 0.015),
116
-
for an OPAL opacity table grid using Grevesse & Sauval (1998) abundances, generated from MESA’s kap module using cubic interpolation with automatic differentation.
117
-
The OPLIB log(:math:`R`) = −8, 1.5 table boundaries are marked with a solid black line and the OPAL/OP log(:math:`R`) = 1.0 boundary is shown with a dashed line.
118
-
The approximate location of the Z-dependent transition to an electron conduction dominated opacity is marked with dot-dash blue curve. Regions for Atomic, molecular,
119
-
and compton scattering opacity are labeled and presented with their associated blending regions.
103
+
Same as previous figure, but for new cubic interpolation scheme taking advantage of automatic differentiation.
104
+
105
+
106
+
This new implementation of cubic interpolation in composition for opacity tables comes close to achieving the derivative quality of the linear interpolation
107
+
option (shown below), while also providing more accurate opacity physics between opacity table grid points.
Same as previous figure, but for linear interpolation instead of cubic.
121
113
122
-
Some areas in the figure still seems to disagree with the numerical derivatives achieved via richardson extrapolation, however there is ongoing development to
123
-
discearn whether these remaining differences are a product of the interpolation method, or rather the implementation of richardson extrapolation in MESA. The entire
124
-
MESA test_suite has been tested with these improvements to the opacity derivatives without error.
125
114
126
-
For this MESA release, linear interpolation will remain the default interpolation opacity method. Although, we implore users to experiment with cubic interpolation, as it has been shown to consistently increase the overall
127
-
opacity of a model, and can directly effect the structure of solar models, see Appendix B & C in Farag et al. 2024. We anticipate making cubic interpolation the default in a future MESA release version.
115
+
For this MESA release, linear interpolation remains the default method for interpolating in composition between opacity tables
116
+
while we continue to investigate the residual areas where cubic interpolation appears to occasionally produce lower quality derivatives.
117
+
However, we recommend users experiment with cubic interpolation, as it has been shown to consistently increase the overall
118
+
opacity of a model, and can directly effect the structure of solar models, see Appendix B & C in Farag et al. 2024.
119
+
We anticipate making cubic interpolation the default in a future MESA release version.
128
120
We encourage users to experiment with these different opacity interpolation routines and be mindful of the effect they can have on their stellar models.
0 commit comments