solvers::functions: Apply maxDeltaT from functions

The functions module now applies time-step restrictions from the
functions that are running, rather than from the sub-solver. The
sub-solver only exists to be constructed so that its data is available
to the functions. It should not affect the solution process in any way.
This commit is contained in:
Will Bainbridge
2023-09-12 10:23:23 +01:00
parent 0eb3479f9b
commit 2b7c977da5
3 changed files with 10 additions and 1 deletions

View File

@ -100,7 +100,7 @@ Foam::solvers::functions::~functions()
Foam::scalar Foam::solvers::functions::maxDeltaT() const
{
return solverPtr->maxDeltaT();
return vGreat;
}

View File

@ -78,4 +78,10 @@ bool Foam::functionObjects::fvModel::write()
}
Foam::scalar Foam::functionObjects::fvModel::maxDeltaT() const
{
return fvModelPtr_().maxDeltaT();
}
// ************************************************************************* //

View File

@ -124,6 +124,9 @@ public:
//- Do nothing
virtual bool write();
//- Return the maximum time-step for stable operation
virtual scalar maxDeltaT() const;
// Member Operators