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
25 stars 19 forks source link

Clarify logic for redirecting binaries in CO-H / He HMS grids. #307

Closed ka-rocha closed 4 weeks ago

ka-rocha commented 1 month ago

https://github.com/POSYDON-code/POSYDON/blob/cf933e466b96ac70e9823b02ff52849585928a92/posydon/binary_evol/MESA/step_mesa.py#L1416-L1424

It is unclear what this else clause is doing and it is causing some binaries to go through loops where they are redirected multiple times back into the CO-HMS steps.

maxbriel commented 1 month ago

This code should not be there anymore. I already removed it in PR #255.

It looks like it came back in PR #287, the error checking PR. Additionally there's code in step_mesa.py that was added with PR #255, which made sure to catch all the different types of out-of-grid, such that no cyclical redirects should happen.

@celiotine and @ka-rocha, this should be an easy fix. Would you be able to add the code back in and remove the part that should have been removed?