# Output from MESA-Web

Once a *MESA-Web* calculation completes, you will receive an email containing a link to a Zip archive. Download and unpack this archive to obtain a 'job' directory (folder) with a name of the form MESA-Web_job_JJJJ, where JJJJ is a sequence of digits known as the 'run id'. The job directory contains variety of files produced by *MESA-Web*. The following sections describe these output files, and explain how to read them into Python.

## Movie Output

The movie file, MESA-Web_job_JJJJ.mp4, contains an MP4-format movie constructed using PGSTAR, the live plotting software allowing a user to dynamically plot MESA output variables. The data shown in the movie are divided into a number of panels:

- (upper-left): abundance profiles, plotting the mass fractions of selected nuclides as a function of mass coordinate within the star;
- (upper-mid): a Kippenhahn diagram;
- (lower-left): a Hertzsprung-Russell Diagram;
- (lower-mid): a density-temperature plot;
- (right): thermodynamic state profiles, plotting the total pressure (upper), density (mid), and temperature (lower) as a function of mass coordinate within the star.

Each frame of the movie is based on data from every fifth timestep of MESA. An example of a movie for a 1M_{☉} star, evolving from the pre-main sequence phase through to a cooling white dwarf, is shown here:

## History Output

The history file, named trimmed_history.data, provides general information about the entire stellar model as a function of time. The file consists of a few header lines giving global data, followed by a sequence of rows correspond to individual timesteps. The columns of each row contain the following data:

Column Number | Datum | Description |
---|---|---|

1 | Model Number | Number of model from the start of the calculation |

2 | Age (yr) | Elapsed simulated time since the start of the calculation |

3 | Mass (M_{☉}) |
Total mass of the star |

4 | log_{10} L (L_{☉}) |
Luminosity of the star at the outermost cell |

5 | log_{10} R (R_{☉}) |
Radius of the star at the outermost cell |

6 | log_{10} T_{eff} (K) |
Log_{10} effective temperature of the star |

7 | log_{10} T_{c} (K) |
Log_{10} temperature at the center of the star |

8 | log_{10} ρ_{c} (g cm^{-3}) |
Log_{10} density at the center of the star |

9 | log_{10} P_{c} (dyn cm^{-2}) |
Log_{10} pressure at the center of the star |

10 | X_{c}(^{1}H) |
Hydrogen 1 mass fraction at the center of the star |

11 | X_{c}(^{3}He) |
Helium 3 mass fraction at the center of the star |

12 | X_{c}(^{4}He) |
Helium mass fraction at the center of the star |

13 | X_{c}(^{12}C) |
Carbon 12 mass fraction at the center of the star |

14 | X_{c}(^{14}N) |
Nitrogen 14 mass fraction at the center of the star |

15 | X_{c}(^{16}O) |
Oxygen 16 mass fraction at the center of the star |

16 | X_{c}(^{20}Ne) |
Neon 20 mass fraction at the center of the star |

17 | X_{c}(^{24}Mg) |
Magnesium 24 mass fraction at the center of the star |

18 | X_{c}(^{28}Si) |
Silicon 28 mass fraction at the center of the star |

19 | X_{c}(^{32}S) |
Sulfur 32 mass fraction at the center of the star |

20 | X_{c}(^{36}Ar) |
Argon 36 mass fraction at the center of the star |

21 | X_{c}(^{40}Ca) |
Calcium 40 mass fraction at the center of the star |

22 | X_{c}(^{44}Ti) |
Titanium 44 mass fraction at the center of the star |

23 | X_{c}(^{48}Cr) |
Chromium 48 mass fraction at the center of the star |

24 | X_{c}(^{52}Fe) |
Iron 52 mass fraction at the center of the star |

25 | X_{c}(^{54}Fe) |
Iron 54 mass fraction at the center of the star |

26 | X_{c}(^{56}Fe) |
Iron 56 mass fraction at the center of the star |

27 | X_{c}(^{56}Ni) |
Nickel 56 mass fraction at the center of the star |

28 | η_{c}/k_{B}T |
The electron chemical potential at the center of the star |

29 | Y_{e,c} |
The ratio of electrons to baryons at the center of the star |

30 | S_{c}/(k_{B} baryon) |
The entropy at the center of the star |

31 | ξ_{m=2.5 M☉} |
Compactness parameter |

32 | τ_{dyn} (s) |
Dynamical timescale of the star |

33 | τ_{kh} (s) |
Kelvin-Helmholtz timescale of the star |

34 | τ_{nuc} (s) |
Nuclear timescale of the star |

35 | log_{10} L_{pp} (L_{☉}) |
Log_{10} luminosity due to all pp chain reactions |

36 | log_{10} L_{CNO} (L_{☉}) |
Log_{10} luminosity due to CNO cycle |

37 | log_{10} L_{3α} (L_{☉}) |
Log_{10} luminosity due to the triple alpha process |

38 | log_{10} L_{H} (L_{☉}) |
Log_{10} luminosity due to all H nuclear burning |

39 | log_{10} L_{He} (L_{☉}) |
Log_{10} luminosity due to all He nuclear burning |

40 | log_{10} L_{Z} (L_{☉}) |
Log_{10} luminosity due to all nuclear burning excluding H and He |

41 | log_{10} L_{ν} (L_{☉}) |
Log_{10} luminosity emitted by neutrinos (thermal and nuclear) |

42 | M_{He} (M_{☉}) |
Amount of mass enclosed in outermost region where the Helium 4 mass fraction is greater than 0.01 |

43 | M_{C} (M_{☉}) |
Amount of mass enclosed in outermost region where the Carbon 12 mass fraction is greater than 0.01 |

44 | M_{O} (M_{☉}) |
Amount of mass enclosed in outermost region where the Oxygen 16 mass fraction is greater than 0.01 |

45 | M_{Si} (M_{☉}) |
Amount of mass enclosed in outermost region where the Silicon 28 mass fraction is greater than 0.01 |

46 | M_{Fe} (M_{☉}) |
Amount of mass enclosed in outermost region where the Iron 56 mass fraction is greater than 0.01 |

47 | R_{He} (R_{☉}) |
Radius of outermost region where the Helium 4 mass fraction is greater than 0.01 |

48 | R_{C} (R_{☉}) |
Radius of outermost region where the Carbon 12 mass fraction is greater than 0.01 |

49 | R_{O} (R_{☉}) |
Radius of outermost region where the Oxygen 16 mass fraction is greater than 0.01 |

50 | R_{Si} (R_{☉}) |
Radius of outermost region where the Silicon 28 mass fraction is greater than 0.01 |

51 | R_{Fe} (R_{☉}) |
Radius of outermost region where the Iron 56 mass fraction is greater than 0.01 |

52 | |v_{max}| (cm s^{-1}) |
Absolute value of maximum velocity of the star |

53 | (Ω_{ZAMS}/Ω_{crit})_{i,surf} |
Surface Average angular frequency divided by the Keplerian critical angular frequency at ZAMS |

54 | log_{10} J_{total} (g cm^{2}s^{-1}) |
Log_{10} total angular momentum of the star at a particular model |

55 | Ω_{surf} (rad s^{-1}) |
Surface Average angular frequency |

56 | v_{rot,surf} (km s^{-1}) |
Surface Average Rotational Velocity |

57 | dM/dt (M_{☉} yr^{-1}) |
Mass Loss Rate |

58 | I (cm^{2} g) |
Moment of inertia |

## Profile Output

The profile files, named profileN.dat (where N is an integer counting up from 1), contain information about the internal structure of the stellar model at a single timestep. The mapping between profile number N and timestep is provided in the file named profiles.index. A profile file consists of a few header lines giving global data, followed by a sequence of rows correspond to individual interior zones (ordered from the outermost zone to the innermost). The columns of each row contain the following data:

Column Number | Datum | Description |
---|---|---|

1 | m (M_{☉}) |
Mass coordinate of outer boundary of zone |

2 | r (R_{☉}) |
Radius at outer boundary of zone |

3 | L (L_{☉}) |
Luminosity at outer boundary of zone |

4 | P (dyn cm^{-2}) |
Total pressure at center of zone (radiation + gas) |

5 | log_{10} ρ (g cm^{-3}) |
Log_{10} density at center of zone |

6 | log_{10} T (K) |
Log_{10} temperature at center of zone |

7 | E_{int} (erg g^{-1}) |
Internal energy |

8 | S/N_{A}k_{B} |
Specific entropy |

9 | C_{p} (erg g^{-1}K^{-1}) |
Specific heat capacity at constant total pressure |

10 | Γ_{1} (∂lnP/∂lnρ)_{S} |
Gamma 1 at constant entropy |

11 | ∇_{ad} |
Adiabatic temperature gradient at constant entropy |

12 | μ | Mean molecular weight per gas particle (ions + free electrons) |

13 | n_{e-} (N_{e-} cm^{-3}) |
Mean number of free electrons per nucleon |

14 | Y_{e} |
Specific ratio of electrons to baryons |

15 | P_{gas} (dyn cm^{-2}) |
Gas pressure at center of zone (electrons and ions) |

16 | P_{rad} (dyn cm^{-2}) |
Radiation pressure at center of zone |

17 | ∇_{rad} (∂lnT/∂lnρ)_{S} |
Radiative temperature gradient |

18 | ∇_{T} |
Temperature gradient |

19 | v (cm s^{-1}) |
Velocity at outer boundary of zone |

20 | v_{conv} (cm s^{-1}) |
Convection velocity |

21 | κ (cm^{2} g^{-1}) |
Opacity measured at the center of zone |

22 | ε_{nuc} (erg g^{-1} s^{-1}) |
Energy generation rate from all nuclear reactions excluding those from neutrino reactions |

23 | ε_{pp} (erg g^{-1} s^{-1}) |
Energy generation rate from pp chain reactions |

24 | ε_{CNO} (erg g^{-1} s^{-1}) |
Energy generation rate from CNO cycle |

25 | ε_{3α} (erg g^{-1} s^{-1}) |
Energy generation rate from triple alpha process |

26 | ε_{ν} (erg g^{-1} s^{-1}) |
Energy generation rate of neutrinos from all reactions |

27 | ε_{cool} (erg g^{-1} s^{-1}) |
Non-nuclear-reaction neutrino losses |

28 | ε_{grav} (erg g^{-1} s^{-1}) |
Gravitational heating rate |

29 | X(^{1}H) |
Hydrogen mass fraction |

30 | X(^{3}He) |
Helium 3 mass fraction |

31 | X(^{4}He) |
Helium 4 mass fraction |

32 | X(^{12}C) |
Carbon 12 mass fraction |

33 | X(^{14}N) |
Nitrogen 14 mass fraction |

34 | X(^{16}O) |
Oxygen 16 mass fraction |

35 | X(^{20}Ne) |
Neon 20 mass fraction |

36 | X(^{24}Mg) |
Magnesium 24 mass fraction |

37 | X(^{28}Si) |
Silicon 28 mass fraction |

38 | X(^{32}S) |
Sulfur 32 mass fraction |

39 | X(^{36}Ar) |
Argon 36 mass fraction |

40 | X(^{40}Ca) |
Calcium 40 mass fraction |

41 | X(^{44}Ti) |
Titanium 44 mass fraction |

42 | X(^{48}Cr) |
Chromium 48 mass fraction |

43 | X(^{52}Fe) |
Iron 52 mass fraction |

44 | X(^{54}Fe) |
Iron 54 mass fraction |

45 | X(^{56}Fe) |
Iron 56 mass fraction |

46 | X(^{56}Ni) |
Nickel 56 mass fraction |

47 | η | Electron Degeneracy Parameter |

48 | log_{10} ω (rad s^{-1}) |
Log_{10} specific angular frequency |

49 | v_{rot} (km s^{-1}) |
Rotational velocity at cell boundary |

50 | j (g cm^{2} s^{-1}) |
Specific angular momentum |

51 | log_{10} B_{r} (Gauss) |
Log_{10} radial magnetic field |

52 | log_{10} B_{φ} (Gauss) |
Log_{10} azimuthal magnetic field |

53 | log_{10} D_{conv} (cm^{2} s^{-1}) |
Log_{10} D_{mix} for regions where mix_type = convective_mixing |

54 | log_{10} D_{semi} (cm^{2} s^{-1}) |
Log_{10} D_{mix} for regions where mix_type = semiconvective_mixing |

55 | log_{10} D_{ovr} (cm^{2} s^{-1}) |
Log_{10} D_{mix} for regions where mix_type = overshoot_mixing |

56 | log_{10} D_{thrm} (cm^{2} s^{-1}) |
Log_{10} D_{mix} for regions where mix_type = thermohaline_mixing |

## Python Analysis

To facilitate reading history and profile files into Python, we've created a module called mesa_web.py. Download the module (by clicking on the link), and place it either in your working directory or somewhere in your Python path. This module provides three functions:

- read_history()
- read a history file.
- read_profile()
- read a profile file.
- find_read_profile()
- find a profile file using the profiles.index mapping file, and then read it.

All three functions return either a Python dict, or an astropy.table.Table object. See the help documentation [e.g., help(read_history)] for details about function arguments.