uw-comphys / opencmp

OpenCMP is a computational multiphysics software package based on the finite element method. It is primarily intended for physicochemical processes involving significant convective flow.
https://opencmp.io/
GNU Lesser General Public License v2.1
25 stars 15 forks source link

Resume of Simulation From Last Saved File #33

Open Alex-Vasile opened 1 year ago

Alex-Vasile commented 1 year ago

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 commented 1 year ago

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.

nasserma commented 1 year ago

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

Alex-Vasile commented 1 year ago

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.

nasserma commented 1 year ago

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