functionObjects::fluidMaxDeltaT: New functionObject to set the maximum Courant number and time-step

at Function1s of time.

Underlying this new functionObject is a generalisation of the handling of the
maximum time-step in the modular solvers to allow complex user-specification of
the maximum time-step used in a simulation, not just the time-dependency
provided by fluidMaxDeltaT but functions of anything in the simulation by
creating a specialised functionObject in which the maxDeltaT function is
defined.

The chemical and combustion time-scale functionObjects adjustTimeStepToChemistry
and adjustTimeStepToCombustion have been updated and simplified using the above
mechanism.
This commit is contained in:
Henry Weller
2023-07-20 14:37:18 +01:00
parent 634b8d1cee
commit 2779442d2a
20 changed files with 432 additions and 111 deletions

View File

@ -299,6 +299,19 @@ Foam::scalar Foam::functionObjectList::timeToNextAction()
}
Foam::scalar Foam::functionObjectList::maxDeltaT() const
{
scalar result = vGreat;
forAll(*this, oi)
{
result = min(result, operator[](oi).maxDeltaT());
}
return result;
}
bool Foam::functionObjectList::read()
{
bool ok = true;