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),
80 outletPatchName_(
dict.get<
word>(
"outletPatch")),
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();
196 os.writeEntry(
"outletPatch", outletPatchName_);
197 os.writeEntryIfDifferent<word>(
"phi",
"phi", phiName_);
199 Qptr_->writeData(
os);
201 os.writeEntry(
"TMin", TMin_);
202 os.writeEntry(
"TMax", TMax_);
215 outletMappedUniformInletHeatAdditionFvPatchField
Macros for easy insertion into run-time selection tables.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
tmp< Field< Type > > T() const
Return the field transpose (only defined for second rank tensors).
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Abstract base-class for fluid and solid thermodynamic properties.
static const word dictName
The dictionary name ("thermophysicalProperties").
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const polyPatch & patch() const noexcept
Return the polyPatch.
const fvBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
const scalarField & magSf() const
Return face area magnitudes, like the fvMesh::magSf() method.
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
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.
Type gSum(const FieldField< Field, Type > &f)
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
fvPatchField< scalar > fvPatchScalarField
psiReactionThermo & thermo