setDeltaT: Reinstate effect of deltaT setting in controlDict
The time step adjustment now starts from the minimum of the deltaT calculated from Courant condition (and other physical limits), and the deltaT specified in the system/controlDict. This means that a small deltaT setting in system/controlDict results in a gradual increase up to the Courant number limited value. This can be useful in maintaining stability at the start of a simulation. This functionality is an accidental side-effect at best. It is being reinstated as existing cases are reliant upon it. If additional control of the time step in the initial stages of a simulation is needed, then that should be achieved with a more explicit user control.
This commit is contained in:
@ -47,7 +47,7 @@ void Foam::setDeltaT(Time& runTime, const PtrList<solver>& solvers)
|
|||||||
|
|
||||||
if (deltaT != great)
|
if (deltaT != great)
|
||||||
{
|
{
|
||||||
runTime.setDeltaT(deltaT);
|
runTime.setDeltaT(min(runTime.deltaTValue(), deltaT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ void Foam::setDeltaT(Time& runTime, const solver& solver)
|
|||||||
&& runTime.controlDict().lookupOrDefault("adjustTimeStep", false)
|
&& runTime.controlDict().lookupOrDefault("adjustTimeStep", false)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
runTime.setDeltaT(solver.maxDeltaT());
|
runTime.setDeltaT(min(runTime.deltaTValue(), solver.maxDeltaT()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,14 @@ if (adjustTimeStep)
|
|||||||
{
|
{
|
||||||
if ((runTime.timeIndex() == 0) && (CoNum > small))
|
if ((runTime.timeIndex() == 0) && (CoNum > small))
|
||||||
{
|
{
|
||||||
runTime.setDeltaT(min(maxCo*runTime.deltaTValue()/CoNum, maxDeltaT));
|
runTime.setDeltaT
|
||||||
|
(
|
||||||
|
min
|
||||||
|
(
|
||||||
|
maxCo*runTime.deltaTValue()/CoNum,
|
||||||
|
min(runTime.deltaTValue(), maxDeltaT)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user