setRDeltaT.H
Go to the documentation of this file.
1 {
2  volScalarField& rDeltaT = trDeltaT.ref();
3 
4  const dictionary& pimpleDict = pimple.dict();
5 
6  const scalar maxCo
7  (
8  pimpleDict.lookupOrDefault<scalar>("maxCo", 0.2)
9  );
10 
11  const scalar maxDeltaT
12  (
13  pimpleDict.lookupOrDefault<scalar>("maxDeltaT", great)
14  );
15 
16  const scalar minDeltaT
17  (
18  pimpleDict.lookupOrDefault<scalar>("minDeltaT", small)
19  );
20 
21  const scalar rDeltaTSmoothingCoeff
22  (
23  pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
24  );
25 
26  surfaceScalarField maxPhi("maxPhi", phi);
27 
29  {
31  }
32 
33  // Set the reciprocal time-step from the local Courant number
34  // and maximum and minimum time-steps
35  rDeltaT.ref() = min
36  (
38  max
39  (
42  /((2*maxCo)*mesh.V())
43  )
44  );
45 
46  // Update the boundary values of the reciprocal time-step
47  rDeltaT.correctBoundaryConditions();
48 
50 
51  Info<< "Flow time scale min/max = "
52  << gMin(1/rDeltaT.primitiveField())
53  << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
54 }
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const scalar minDeltaT(pimpleDict.lookupOrDefault< scalar >("minDeltaT", small))
pimpleNoLoopControl & pimple
label phasei
Definition: pEqn.H:27
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
forAll(phases, phasei)
Definition: setRDeltaT.H:28
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
phi
Definition: correctPhi.H:3
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))
phaseSystem::phaseModelList & phases
Definition: createFields.H:12
messageStream Info
dimensioned< scalar > mag(const dimensioned< Type > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< volScalarField > trDeltaT
Definition: createRDeltaT.H:3
surfaceScalarField maxPhi("maxPhi", phi)
const scalar maxDeltaT(pimpleDict.lookupOrDefault< scalar >("maxDeltaT", great))