functionObject: Fixed bugs in function object time-step adjustment
The logic governing function objects' ability to change the time-step has been modified so that it is compatible with the time-step adjustment done in the Time class. The behaviour has been split into a method which sets the step directly, and another which moidifies the time until the next write operation (i.e., the time that the solver "aims" for). This fixes an issue where the adjustments in Time and the function objects interfere and cause the time step to decrease exponentially down to machine precision. It also means that the set-time-step function object now does not break the adjustable run-time setting. This resolves bug report https://bugs.openfoam.org/view.php?id=2820
This commit is contained in:
@ -274,8 +274,11 @@ public:
|
||||
//- Called when Time::run() determines that the time-loop exits
|
||||
bool end();
|
||||
|
||||
//- Called at the end of Time::adjustDeltaT() if adjustTime is true
|
||||
bool adjustTimeStep();
|
||||
//- Override the time-step value
|
||||
bool setTimeStep();
|
||||
|
||||
//- Return the time to the next write
|
||||
scalar timeToNextWrite();
|
||||
|
||||
//- Update for changes of mesh
|
||||
void updateMesh(const mapPolyMesh& mpm);
|
||||
|
||||
Reference in New Issue
Block a user