setRDeltaT.H
Go to the documentation of this file.
1 {
2  volScalarField& rDeltaT = trDeltaT();
3 
4  const dictionary& pimpleDict = pimple.dict();
5 
6  scalar maxCo
7  (
8  pimpleDict.lookupOrDefault<scalar>("maxCo", 0.2)
9  );
10 
11  scalar maxDeltaT
12  (
13  pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT)
14  );
15 
17  (
18  pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
19  );
20 
21  surfaceScalarField maxPhi("maxPhi", phi);
22 
24  {
26  }
27 
28  // Set the reciprocal time-step from the local Courant number
29  rDeltaT.dimensionedInternalField() = max
30  (
31  1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
33  /((2*maxCo)*mesh.V())
34  );
35 
36  // Update tho boundary values of the reciprocal time-step
37  rDeltaT.correctBoundaryConditions();
38 
40 
41  Info<< "Flow time scale min/max = "
42  << gMin(1/rDeltaT.internalField())
43  << ", " << gMax(1/rDeltaT.internalField()) << endl;
44 }
dimensioned< scalar > mag(const dimensioned< Type > &)
label phasei
Definition: pEqn.H:37
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")))
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
surfaceScalarField maxPhi("maxPhi", phi)
messageStream Info
dynamicFvMesh & mesh
const dictionary & pimple
forAll(phases, phasei)
Definition: setRDeltaT.H:23
scalar rDeltaTSmoothingCoeff(pimpleDict.lookupOrDefault< scalar >("rDeltaTSmoothingCoeff", 0.1))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Type gMin(const FieldField< Field, Type > &f)
surfaceScalarField & phi
rDeltaT dimensionedInternalField()
tmp< volScalarField > trDeltaT
Definition: createRDeltaT.H:3
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:11
scalar maxDeltaT(pimpleDict.lookupOrDefault< scalar >("maxDeltaT", GREAT))
Type gMax(const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void smooth(volScalarField &field, const scalar coeff)
Definition: fvcSmooth.C:35