[Mesa-users] Reformatting MESA mod models

Jared Goldberg jagoldberg18 at gmail.com
Mon Aug 19 17:02:51 UTC 2024


Agreed with Frank -- a .mod file in mesa is the bare minimum information
required for MESA to reconstruct a stellar model, using its own equation of
state, opacities, et cetera. The profiles are far more customizable with
more useful output.

Regarding the .mod file, much of the information you need is in there in
principle. To explain the header information you mentioned: ln indicates
the natural log, all units are in cgs. d is density, T is temperature, R is
radius, dq is dm/star_mass, and the composition is given by the other
columns listed. The header rows contain the star_mass so you can convert
from coordinate q to an enclosed mass coordinate. The pressure needs to be
recovered from MESA's equation of state at each density and temperature;
you might be able to do this using the Equation of State module (Just a
Module documentation
<https://docs.mesastar.org/en/latest/using_mesa/just_a_module.html#equation-of-state>)
or using pymesa <https://github.com/rjfarmer/pyMesa>. Also, it is likely
that some of the elemental species you require were not part of the MESA
model's reaction network. To change this, see the Nets documentation
<https://docs.mesastar.org/en/latest/net/nets.html>.

If you just have the .mod file and no access to profiles, you could also
load the .mod file into MESA, take a single tiny timestep (so that nothing
changes), and output a profile, which might be close enough.

Good luck,
~Jared


On Sun, Aug 18, 2024 at 7:54 AM Francis Timmes via Mesa-users <
mesa-users at lists.mesastar.org> wrote:

> probably you should be using profile files, not mod files, which can be
> customized to output what you want:
>
> https://docs.mesastar.org/en/24.08.1/using_mesa/output.html
>
> fxt
>
>
>
>
> > On Aug 18, 2024, at 3:23 AM, Pau A.S. via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
> >
> > Dear all,
> >
> > I am running a code which uses as input a stellar model which was
> evolved with tycho. I am using MESA now and I need to give the output of
> MESA the tycho ordering, which was an ascii file with this information (14
> columns).
> >
> > # 1:Enclosed mass m 2:Radius at m 3:Pressure at m 4:Density at m 5:H fraction
> chem. abundance by mass 6: Same metals 7: Same He3 8: Same C12 9: Same C13
> 10:Same N14 11:Same N15 12:Same O16 13:SameO17 14:Same O18
> >
> > I am not sure where is this information in the MESA models. For
> instance, I have this file "5M_at_TAMS.mod" with the following columns:
> >
> > 1: lnd 2:lnT 3:lnR 4:L 5:dq 6:mlt_vc 7:h1 8:he3 9:he4 10:c12 11:n14
> 12:o16 13:ne20 14:mg24
> >
> > The information in the header explains that:
> >
> > lnd=ln(density), lnT=ln(temperature), lnR=ln(radius), L=luminosity,
> dq=fraction of total mstar in cell; remaining cols are mass fractions.
> >
> > I am not sure how to convert MESA's information into the information I
> need. Could anyone help me here a bit out?
> >
> > Thanks!
> > _______________________________________________
> > mesa-users at lists.mesastar.org
> > https://lists.mesastar.org/mailman/listinfo/mesa-users
> >
>
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240819/1f978ad2/attachment.htm>


More information about the Mesa-users mailing list