Loading...
Searching...
No Matches
setRDeltaT.H
Go to the documentation of this file.
1{
2 volScalarField& rDeltaT = trDeltaT.ref();
3
5 (
6 runTime.controlDict().getOrDefault<scalar>
7 (
8 "rDeltaTSmoothingCoeff",
9 0.02
10 )
11 );
12
13 // Set the reciprocal time-step from the local Courant number
14 rDeltaT.ref() = max
15 (
16 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
17 fvc::surfaceSum(amaxSf)()()
18 /((2*maxCo)*mesh.V())
19 );
20
21 // Update tho boundary values of the reciprocal time-step
22 rDeltaT.correctBoundaryConditions();
23
24 fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
25
26 {
27 auto limits = gMinMax(rDeltaT.primitiveField());
28 limits.reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL));
29
30 Info<< "Flow time scale min/max = "
31 << limits.min() << ", " << limits.max() << endl;
32 }
33}
auto limits
Definition setRDeltaT.H:186
scalar rDeltaTSmoothingCoeff(pimpleDict.getOrDefault< scalar >("rDeltaTSmoothingCoeff", 0.1))
dynamicFvMesh & mesh
engineTime & runTime
tmp< volScalarField > trDeltaT
scalar maxCo
GeometricField< scalar, fvPatchField, volMesh > volScalarField