[Mesa-users] Missing energy generation in MESA output?
Jason Wright
astrowright at gmail.com
Thu Feb 27 17:27:37 UTC 2025
Hi, all. Me again teaching stellar structure with MESA.
One set of our assignments is to test the precision of MESA in computing
the equations of stellar structure. This is a good way for the students to
practice coding up physics and exploring which physics matters where in the
Sun. We are using a solar-mass ZAMS star of solar metallicity as our
example (from Ed Brown's excellent notes).
We find that the 1st 3 equations of stellar structure are obeyed extremely
well, but we are struggling with the luminosity equation.
Δl/Δm = ε_nuc - T
(Eq. 11 of the first MESA instrument paper).
*Problem 1:*
We get reasonably good agreement for most of the star, but in the outermost
cells (m/M > 0.999) there is a big divergence between these quantities. In
the atmosphere of the star, Δl/Δm actually goes *very slightly* negative,
but the reported ε_grav (calculated as -T ds/dt) is still positive there.
I'm guessing the answer is that I'm not calculating T ds/dt properly. I'm
using the delta_entropy profile output, and log_dt from the history file
for that timestep. Perhaps these do not correspond exactly, or that is not
the quantity used in determining Δl/Δm?
(I do see there is an advertised eps_grav parameter in MESA, but it is set
to zero everywhere, which is why I'm using T ds/dt. Is there a way to get
that output to "turn on"?)
Below: comparison of the finite difference of Δl/Δm (red, dashed line is
negative) and energy generation terms reported by MESA.
[Core is on the left, atmosphere on the right. The logit_10 function
"counts nines" near m/M~1 (so 0.9999 is 4) and "counts zeros" near m~0 (so
0.0001 is -4). ]
["eps" here is "net_energy", which does not have the precision to show
values below 1 erg/s/g]
[image: Screenshot 2025-02-24 at 1.12.43 PM.png]
*Problem 2:*
Another mismatch is more subtle, but suggests I'm missing physics.
It's hard to see in the above plot, but the discrepancy actually stars at
about m/M=0.5 (logit_10(m/M)=0). If I integrate up (ε_nuc - T ds/dt)dm to
compute luminosity and compare it to the actual luminosity, I get about a
0.1% discrepancy with a strange shape.This shape shares some qualities /
features of both eps_nuc and eps_grav, but not exactly.
[image: Screenshot 2025-02-24 at 1.18.56 PM.png]
Any ideas what's going on? Am I misunderstanding something about neutrino
losses?
Happy to share my code if it helps.
--
-
---------------
Jason T Wright
Professor of Astronomy and Astrophysics
Director, Penn State Extraterrestrial Intelligence Center
he/him/his
*https://sites.psu.edu/astrowright/ <https://sites.psu.edu/astrowright/>*
*https://bsky.app/profile/astrowright.bsky.social
<https://bsky.app/profile/astrowright.bsky.social>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20250227/dba8bdf4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2025-02-24 at 1.12.43?PM.png
Type: image/png
Size: 170808 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20250227/dba8bdf4/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2025-02-24 at 1.18.56?PM.png
Type: image/png
Size: 261110 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20250227/dba8bdf4/attachment-0001.png>
More information about the Mesa-users
mailing list