setRDeltaT.H
Go to the documentation of this file.
1 {
2  volScalarField& rDeltaT = trDeltaT.ref();
3 
5  (
6  runTime.controlDict().lookupOrDefault<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  (
17  fvc::surfaceSum(amaxSf)()()
18  /((2*maxCo)*mesh.V())
19  );
20 
21  // Update the boundary values of the reciprocal time-step
22  rDeltaT.correctBoundaryConditions();
23 
25 
26  Info<< "Flow time scale min/max = "
27  << gMin(1/rDeltaT.primitiveField())
28  << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
29 }
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Type gMin(const FieldField< Field, Type > &f)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
fvMesh & mesh
void smooth(volScalarField &field, const scalar coeff)
Definition: fvcSmooth.C:35
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
const dimensionSet dimTime
const scalar maxCo(pimpleDict.lookupOrDefault< scalar >("maxCo", 0.9))
Type gMax(const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const scalar rDeltaTSmoothingCoeff(pimpleDict.lookupOrDefault< scalar >("rDeltaTSmoothingCoeff", 0.1))
messageStream Info
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< volScalarField > trDeltaT
Definition: createRDeltaT.H:3
const scalar maxDeltaT(pimpleDict.lookupOrDefault< scalar >("maxDeltaT", great))