amusecode / amuse

Astrophysical Multipurpose Software Environment. This is the main repository for AMUSE
http://www.amusecode.org
Apache License 2.0
154 stars 98 forks source link

Add finer controls for timestepping in mesa #956

Closed rjfarmer closed 1 year ago

rjfarmer commented 1 year ago

MESA has the concept of both a "redo" and a "retry". A redo re-computes the same step with the same dt, but lets you change the physics (say the mass transfer rate). While a retry re-computes a step with a different timestep. This is helpful when evolving multiple stars and you need to keep them in sync.

rieder commented 1 year ago

A potential minor issue with this: if we evolve a (group of) star(s) with MESA in AMUSE and save snapshots in one file (with the timestamp saved), there could be multiple snapshots that share the same timestamp but that have different property values. I wonder if there could be a way to distinguish these. Perhaps this is not an issue at all (snapshots/histories are ordered, so just take the last one), in any case not enough to block merging.

rjfarmer commented 1 year ago

Perhaps this is not an issue at all (snapshots/histories are ordered, so just take the last one),

This is how we handle the normal mesa output when there are retries, for all output with the same model_number take the last output.