39 namespace functionObjects
50 Foam::functionObjects::CourantNo::byRho
52 const tmp<volScalarField::Internal>& Co
64 bool Foam::functionObjects::CourantNo::calc()
66 if (foundObject<surfaceScalarField>(fieldName_))
69 lookupObject<surfaceScalarField>(fieldName_);
71 tmp<volScalarField::Internal> Coi
75 (0.5*mesh_.time().deltaT())
81 auto* resultPtr = getObjectPtr<volScalarField>(resultName_);
90 mesh_.time().timeName(),
102 auto& Co = *resultPtr;
104 Co.internalFieldRef() = Coi;
105 Co.correctBoundaryConditions();
137 rhoName_ =
dict.getOrDefault<
word>(
"rho",
"rho");
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField...
defineTypeNameAndDebug(ObukhovLength, 0)
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool read(const dictionary &dict)
Read the fieldExpression data.
bool store()
Register object with its registry and transfer ownership to the registry.
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
CourantNo(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Macros for easy insertion into run-time selection tables.
virtual bool read(const dictionary &)
Read the CourantNo data.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void setResultName(const word &typeName, const word &defaultArg)
Set the name of result field.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
const dimensionSet dimDensity
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc...
const objectRegistry & obr_
Reference to the region objectRegistry.
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Request registration (bool: true)
static constexpr const zero Zero
Global zero (0)