Go to the documentation of this file.
59 outletPatchName_(
dict.lookup(
"outletPatch")),
60 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi"))
75 outletPatchName_(ptf.outletPatchName_),
76 phiName_(ptf.phiName_)
88 outletPatchName_(ptf.outletPatchName_),
89 phiName_(ptf.phiName_)
103 outletPatchName_(ptf.outletPatchName_),
104 phiName_(ptf.phiName_)
122 this->internalField()
127 label outletPatchID =
128 p.patch().boundaryMesh().findPatchID(outletPatchName_);
130 if (outletPatchID < 0)
133 <<
"Unable to find outlet patch " << outletPatchName_
137 const fvPatch& outletPatch =
p.boundaryMesh()[outletPatchID];
140 f.boundaryField()[outletPatchID];
143 this->db().objectRegistry::template lookupObject<surfaceScalarField>
146 const scalarField& outletPatchPhi =
phi.boundaryField()[outletPatchID];
147 scalar sumOutletPatchPhi =
gSum(outletPatchPhi);
149 if (sumOutletPatchPhi > SMALL)
151 Type averageOutletField =
152 gSum(outletPatchPhi*outletPatchField)
159 Type averageOutletField =
160 gSum(outletPatch.
magSf()*outletPatchField)
174 os.
writeEntry(
"outletPatch", outletPatchName_);
176 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...
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...