MESAHub / MESAHub/mesa

Profile output contains inconsistent data (especially about mixing)

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Fortran
Stars
249
Forks
82
Avg merge
1d 3h
Merged PRs (30d)
3

Description

In Sep 2009, Radek suggested that it would be good to have an example that shows how to work with MESA output:

> A case that can be used to show a profile of the
model(s) with various mixings ongoing (overshooting, semiconvection) in
which one can plot all the relevant gradients along with information about
mixing type and it all agrees. [...] some quantities are defined
at cell boundaries some at the centers, some are from the beginning of the
time step and some from the end and some seem to contain similar info, but
have different names. Hence, I'm always puzzled when I try it and cannot do it

Rich chimes in:

> The problem that Radek describes may be linked to the fact that some of the mixing-related quantities (e.g., grad I think) are calculated before and after a timestep, but others (e.g., diffusivities) are calculated only before the timestep. Hence, what ends up in a profile is some weird mix of before- and after-timestep information, which can be very confusing.

There was a suggestion to add a pass updating the mixing info at the end of the step (which sort of already exists), but I made the point

> But what values you would want to write out depends on what you think MESA
profile output represents:
>
> The reported diffusivities from the beginning of the timestep are also the
diffusivities at the end of the timestep. Now those diffusivities are
inconsistent with the other end of step values, but that's because we don't
solve the equations consistently (i.e. we don't update the mixing sigmas in
during the newton iterations). So you can of course revise the mixing
info, and now the profile will report consistent values, but they won't
reflect the values actually used in the solution of the equations.

In reply, Bill said:

> I agree with your statement of the problem and would suggest a consistent solution that is easy to explain.
>
> Write log files (profiles and histories) at the start of the step rather than at the end.

And then this thread withered and lay dormant for many months.

We should aim to provide more consistent output and/or clearly document the inconsistencies.

Original quoted messages:

https://lists.mesastar.org/mailman/private/mesa-developers/2019-September/009436.html
https://lists.mesastar.org/mailman/private/mesa-developers/2019-September/009438.html
https://lists.mesastar.org/mailman/private/mesa-developers/2019-September/009454.html
https://lists.mesastar.org/mailman/private/mesa-developers/2019-September/009455.html

Contributor guide

Open the contributing guide

Research direction

Start by tracing the profile and history output entry points and the mixing-related quantities described in the issue, paying attention to whether values come from the start or end of a timestep. Determine whether the project should make the output consistent or document the existing timing and location semantics; completion requires an agreed behavior and corresponding validation or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
data
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.