opencmp icon indicating copy to clipboard operation
opencmp copied to clipboard

Resume of Simulation From Last Saved File

Open Alex-Vasile opened this issue 2 years ago • 4 comments

Added ability to resume the simulation from the last saved file. This implementation manually requires the user to specify the name of the last time-step.

A version that works automatically will require much more changes to the way that the initial condition is handled.

Alex-Vasile avatar Jun 08 '23 19:06 Alex-Vasile

I've split the mutable default arguments into a seperate PR (#46). All that's remaining now are the changes needed for resuming from a previous result.

Alex-Vasile avatar Jun 19 '23 19:06 Alex-Vasile

I think there are a few things that need to be done before this functionality can be added:

  • discussion with others regarding how this functionality should be configured and perform.
  • addition of documentation of this functionality, preferably in a stationary AND transient example.
  • changing the code in base_model.py to resume for only a stationary solve, transient solves are to be moved into a new derived solver class in the near future.

nasserma avatar Jun 27 '23 13:06 nasserma

I think there are a few things that need to be done before this functionality can be added:

  • discussion with others regarding how this functionality should be configured and perform.
  • addition of documentation of this functionality, preferably in a stationary AND transient example.
  • changing the code in base_model.py to resume for only a stationary solve, transient solves are to be moved into a new derived solver class in the near future.

I agree that the documentation is missing and I will add it. But I am unclear of what you mean for the other two points. We currently do not export intermediary iterations for a stationary solves. And even if we did, those can be loaded in simply as a the initial condition for a stationary solve, the stationary solves don't require anything to be done to them.

This is added for the transient simulations since resuming from a previous solve requires both changing the initial condition and the initial time value. That initial time is the only thing being added by this (that and a sanity check). The different initial time is needed for time varying BCs, forcing functions, etc. as well as for producing a correct time-series out of the results. Stationaryu solves don't have these considerations.

Alex-Vasile avatar Jun 27 '23 14:06 Alex-Vasile

Do we really need to have this conversation on Github...your office is, literally, down the hall.

nasserma avatar Jun 27 '23 15:06 nasserma