Go to the documentation of this file.
38 namespace functionObjects
55 Foam::functionObjects::CourantNo::byRho
57 const tmp<volScalarField::Internal>& Co
69 bool Foam::functionObjects::CourantNo::calc()
71 if (foundObject<surfaceScalarField>(fieldName_))
74 lookupObject<surfaceScalarField>(fieldName_);
76 tmp<volScalarField::Internal> Coi
80 (0.5*mesh_.time().deltaT())
86 if (foundObject<volScalarField>(resultName_,
false))
89 lookupObjectRef<volScalarField>(resultName_);
92 Co.correctBoundaryConditions();
101 mesh_.time().timeName(),
108 zeroGradientFvPatchScalarField::typeName
110 tCo.ref().ref() = Coi();
111 tCo.ref().correctBoundaryConditions();
112 mesh_.objectRegistry::store(tCo.ptr());
134 setResultName(
"Co",
"phi");
151 rhoName_ =
dict.lookupOrDefault<
word>(
"rho",
"rho");
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const objectRegistry & obr_
Reference to the region objectRegistry.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero.
const dimensionSet dimDensity
bool read(const char *buf, int32_t &val)
Same as readInt32.
virtual ~CourantNo()
Destructor.
virtual bool read(const dictionary &dict)
Read the fieldExpression data.
CourantNo(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
addToRunTimeSelectionTable(functionObject, add, dictionary)
word name(const complex &c)
Return string representation of complex.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
virtual bool read(const dictionary &)
Read the CourantNo data.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
Base class for field expression function objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.