From 3fdcd79b67e60c5a93c8ba91334c38e59caaeb38 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 27 Jun 2019 16:02:29 +0100 Subject: [PATCH] Added minDeltaT option to automatic time-step control, 2 --- src/finiteVolume/cfdTools/general/include/setDeltaT.H | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/include/setDeltaT.H b/src/finiteVolume/cfdTools/general/include/setDeltaT.H index 6aedc56e8..c7ecaaa98 100644 --- a/src/finiteVolume/cfdTools/general/include/setDeltaT.H +++ b/src/finiteVolume/cfdTools/general/include/setDeltaT.H @@ -38,10 +38,14 @@ if (adjustTimeStep) runTime.setDeltaT ( - min + Foam::max ( - deltaTFact*runTime.deltaT().value(), - maxDeltaT + minDeltaT, + Foam::min + ( + deltaTFact*runTime.deltaT().value(), + maxDeltaT + ) ) );