POSYDON-code / POSYDON

POSYDON is a next-generation single and binary-star population synthesis code incorporating full stellar structure and evolution modeling with the use of MESA.
BSD 3-Clause "New" or "Revised" License
29 stars 19 forks source link

Fix `initial_values` in single stellar grids #5

Closed ssbvr closed 1 month ago

ssbvr commented 2 years ago

After PR #4 is merged, re-post process single stellar grids such that initial conditions are read from the MESA history header instead of the first entry of the history, which is after step one of MESA. This accuracy issue is minor, we are talking about deviations of the initial stellar mass of less than 0.02%.

astroJeff commented 11 months ago

@ssbvr, was this ever solved?

ssbvr commented 11 months ago

I just checked the grid.initial_values['S1_star_mass'], which seems to correspond to the sampled initial values. However, all the other columns appearing in the grid.initial_values are read from the first entry of the MESA history. Ideally, we would like to have the same behavior of binary grids where in the grid.initial_values I believe (please check) we only have the initial conditions (m1, m2, p, met).

mkruckow commented 2 months ago

I had a look through the code:

Currently, we use the first history entry and take other option in case this value is either not available or aimed to be discarded. Do we want to follow a different approach? If so, which one? There are the three sources:

astroJeff commented 1 month ago

I don't think this is an issue - the star should not significantly evolve in the first timestep, and even if it does, I do not see this as a real problem.