Go to the documentation of this file.
67 if (!rhoInfInitialised_)
70 <<
type() <<
" " << name_ <<
": "
71 <<
"pressure identified as incompressible, but reference "
72 <<
"density is not set. Please set rhoName to rhoInf, and "
73 <<
"set an appropriate value for rhoInf"
85 p.mesh().time().timeName(),
116 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
175 const bool loadFromFiles
192 rhoInfInitialised_(
false)
195 if (!isA<fvMesh>(obr_))
199 <<
"No fvMesh available, deactivating " << name_ <<
nl
214 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
233 mesh.objectRegistry::store(pPtr);
250 log_.readIfPresent(
"log",
dict);
256 rhoInfInitialised_ =
false;
258 if (rhoName_ ==
"rhoInf")
261 rhoInfInitialised_ =
true;
277 scalar zeroCheck = 0.5*rhoInf_*
magSqr(UInf_) + pInf_;
279 if (
mag(zeroCheck) < ROOTVSMALL)
282 <<
type() <<
" " << name_ <<
": "
283 <<
"Coefficient calculation requested, but reference "
284 <<
"pressure level is zero. Please check the supplied "
285 <<
"values of pInf, UInf and rhoInf" <<
endl;
288 rhoInfInitialised_ =
true;
293 resultName_ = pName_;
297 resultName_ =
"total(" + resultName_ +
")";
301 resultName_ =
"static(" + resultName_ +
")";
306 resultName_ = resultName_ +
"_coeff";
325 pResult == convertToCoeff(rhoScale(
p)*
p +
pDyn(
p) +
pRef());
350 <<
type() <<
" " << name_ <<
" output:" <<
nl
351 <<
" writing field " << pResult.name() <<
nl
const dimensionSet dimPressure
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
A class for handling words, derived from string.
A class for managing temporary objects.
const dimensionSet dimVelocity
const dimensionSet dimDensity
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
bool read(const char *, int32_t &)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
Dimension set for the base types.
dimensioned< scalar > mag(const dimensioned< Type > &)
Registry of regIOobjects.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
volScalarField pDyn(IOobject("pDyn", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar("zero", dimPressure, 0.0))
A list of keyword definitions, which are a keyword followed by any number of values (e....
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
static const word null
An empty word.
const Time & time() const
Return the top-level database.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.