Go to the documentation of this file.
72 outletPatchName_(
dict.lookup(
"outletPatchName")),
73 phiName_(
dict.lookupOrDefault<
word>(
"phi",
"phi"))
124 label outletPatchID =
125 p.patch().boundaryMesh().findPatchID(outletPatchName_);
127 if (outletPatchID < 0)
130 <<
"Unable to find outlet patch " << outletPatchName_
134 const fvPatch& outletPatch =
p.boundaryMesh()[outletPatchID];
137 f.boundaryField()[outletPatchID];
140 this->db().objectRegistry::template lookupObject<surfaceScalarField>
143 const scalarField& outletPatchPhi =
phi.boundaryField()[outletPatchID];
144 scalar sumOutletPatchPhi =
gSum(outletPatchPhi);
146 if (sumOutletPatchPhi > SMALL)
148 Type averageOutletField =
149 gSum(outletPatchPhi*outletPatchField)
156 Type averageOutletField =
157 gSum(outletPatch.
magSf()*outletPatchField)
172 << outletPatchName_ << token::END_STATEMENT <<
nl;
173 if (phiName_ !=
"phi")
177 this->writeEntry(
"value", os);
A class for handling words, derived from string.
rDeltaT dimensionedInternalField()
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
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.
Pre-declare SubField and related Field type.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A list of keyword definitions, which are a keyword followed by any number of values (e....
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
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.
Generic GeometricField class.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...