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