setRDeltaT.H
Go to the documentation of this file.
1{
2 volScalarField& rDeltaT = trDeltaT.ref();
3
4 const dictionary& pimpleDict = pimple.dict();
5
6 scalar maxCo
7 (
8 pimpleDict.getOrDefault<scalar>("maxCo", 0.2)
9 );
10
11 scalar maxDeltaT
12 (
13 pimpleDict.getOrDefault<scalar>("maxDeltaT", GREAT)
14 );
15
17 (
18 pimpleDict.getOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
19 );
20
21 // Set the reciprocal time-step from the local Courant number
22 rDeltaT.ref() = max
23 (
24 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
25 fvc::surfaceSum(max(mag(phi1), mag(phi2)))()()
26 /((2*maxCo)*mesh.V())
27 );
28
29 // Update tho boundary values of the reciprocal time-step
30 rDeltaT.correctBoundaryConditions();
31
32 fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
33
34 Info<< "Flow time scale min/max = "
35 << gMin(1/rDeltaT.primitiveField())
36 << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
37}
Y[inertIndex] max(0.0)
pimpleControl & pimple
surfaceScalarField & phi2
surfaceScalarField & phi1
const dictionary & pimpleDict
Definition: setRDeltaT.H:32
scalar rDeltaTSmoothingCoeff(pimpleDict.getOrDefault< scalar >("rDeltaTSmoothingCoeff", 0.1))
dynamicFvMesh & mesh
tmp< volScalarField > trDeltaT
Definition: createRDeltaT.H:3
scalar maxCo
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82