Go to the documentation of this file.
58 outletPatchName_(
dict.lookup(
"outletPatch")),
59 phiName_(
dict.lookupOrDefault<
word>(
"phi",
"phi"))
74 outletPatchName_(ptf.outletPatchName_),
75 phiName_(ptf.phiName_)
87 outletPatchName_(ptf.outletPatchName_),
88 phiName_(ptf.phiName_)
102 outletPatchName_(ptf.outletPatchName_),
103 phiName_(ptf.phiName_)
121 this->internalField()
126 label outletPatchID =
127 p.patch().boundaryMesh().findPatchID(outletPatchName_);
129 if (outletPatchID < 0)
132 <<
"Unable to find outlet patch " << outletPatchName_
136 const fvPatch& outletPatch =
p.boundaryMesh()[outletPatchID];
139 f.boundaryField()[outletPatchID];
142 this->db().objectRegistry::template lookupObject<surfaceScalarField>
145 const scalarField& outletPatchPhi =
phi.boundaryField()[outletPatchID];
146 scalar sumOutletPatchPhi =
gSum(outletPatchPhi);
148 if (sumOutletPatchPhi > SMALL)
150 Type averageOutletField =
151 gSum(outletPatchPhi*outletPatchField)
158 Type averageOutletField =
159 gSum(outletPatch.
magSf()*outletPatchField)
173 os.
writeEntry(
"outletPatch", outletPatchName_);
175 this->writeEntry(
"value", os);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
A class for handling words, derived from Foam::string.
Type gSum(const FieldField< Field, Type > &f)
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const scalarField & magSf() const
Return face area magnitudes.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...