43 fixedValueFvPatchScalarField(
p, iF),
61 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
62 Qptr_(ptf.Qptr_.clone()),
63 outletPatchName_(ptf.outletPatchName_),
64 phiName_(ptf.phiName_),
78 fixedValueFvPatchScalarField(
p, iF,
dict),
81 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
82 TMin_(
dict.getOrDefault<scalar>(
"TMin", 0)),
83 TMax_(
dict.getOrDefault<scalar>(
"TMax", 5000))
94 fixedValueFvPatchScalarField(ptf),
95 Qptr_(ptf.Qptr_.clone()),
96 outletPatchName_(ptf.outletPatchName_),
97 phiName_(ptf.phiName_),
111 fixedValueFvPatchScalarField(ptf, iF),
112 Qptr_(ptf.Qptr_.clone()),
113 outletPatchName_(ptf.outletPatchName_),
114 phiName_(ptf.phiName_),
135 const fvPatch& fvp = this->
patch();
137 label outletPatchID =
138 fvp.patch().boundaryMesh().findPatchID(outletPatchName_);
140 if (outletPatchID < 0)
143 <<
"Unable to find outlet patch " << outletPatchName_
147 const fvPatch& outletPatch = fvp.boundaryMesh()[outletPatchID];
149 const fvPatchField<scalar>& outletPatchField =
150 vsf.boundaryField()[outletPatchID];
155 const scalarField& outletPatchPhi =
phi.boundaryField()[outletPatchID];
156 const scalar sumOutletPatchPhi =
gSum(outletPatchPhi);
158 if (sumOutletPatchPhi > SMALL)
160 const basicThermo&
thermo =
166 scalar averageOutletField =
167 gWeightedSum(outletPatchPhi, outletPatchField)/sumOutletPatchPhi;
170 const scalar Q = Qptr_->value(averageOutletField);
174 scalar totalPhiCp = sumOutletPatchPhi*
gAverage(Cpf);
180 scalar averageOutletField =
186 fixedValueFvPatchScalarField::updateCoeffs();
199 Qptr_->writeData(
os);
215 outletMappedUniformInletHeatAdditionFvPatchField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
word dictName() const
The local dictionary name (final part of scoped name)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Type gWeightedAverage(const UList< scalar > &weights, const UList< Type > &fld, const label comm)
The global weighted average of a field, using the mag() of the weights.
Type gWeightedSum(const UList< scalar > &weights, const UList< Type > &fld, const label comm)
The global weighted sum (integral) of a field, using the mag() of the weights.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
psiReactionThermo & thermo
Type gSum(const FieldField< Field, Type > &f)
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
errorManip< error > abort(error &err)
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
OBJstream os(runTime.globalPath()/outputName)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)