39 Foam::enthalpySorptionFvPatchScalarField::enthalpyModelType
41 Foam::enthalpySorptionFvPatchScalarField::enthalpyModelTypeNames
43 { enthalpyModelType::estimated,
"estimated" },
44 { enthalpyModelType::calculated,
"calculated" }
53 const DimensionedField<scalar, volMesh>& iF
56 zeroGradientFvPatchScalarField(
p, iF),
57 enthalpyModel_(enthalpyModelType::estimated),
59 enthalpyMassLoadPtr_(nullptr),
76 zeroGradientFvPatchScalarField(
p, iF,
dict),
77 enthalpyModel_(enthalpyModelTypeNames.
get(
"enthalpyModel",
dict)),
78 includeHs_(
dict.getOrDefault<bool>(
"includeHs", true)),
79 enthalpyMassLoadPtr_(nullptr),
83 pName_(
dict.getOrDefault<
word>(
"p",
"p")),
84 TName_(
dict.getOrDefault<
word>(
"T",
"T")),
87 switch (enthalpyModel_)
89 case enthalpyModelType::calculated:
91 enthalpyMassLoadPtr_ =
95 case enthalpyModelType::estimated:
110 const enthalpySorptionFvPatchScalarField& ptf,
112 const DimensionedField<scalar, volMesh>& iF,
113 const fvPatchFieldMapper& mapper
116 zeroGradientFvPatchScalarField(ptf,
p, iF, mapper),
117 enthalpyModel_(ptf.enthalpyModel_),
118 includeHs_(ptf.includeHs_),
119 enthalpyMassLoadPtr_(ptf.enthalpyMassLoadPtr_.clone()),
122 speciesName_(ptf.speciesName_),
125 dhdt_(ptf.dhdt_, mapper)
134 zeroGradientFvPatchScalarField(ptf),
135 enthalpyModel_(ptf.enthalpyModel_),
136 includeHs_(ptf.includeHs_),
137 enthalpyMassLoadPtr_(ptf.enthalpyMassLoadPtr_.clone()),
140 speciesName_(ptf.speciesName_),
153 zeroGradientFvPatchScalarField(ptf, iF),
154 enthalpyModel_(ptf.enthalpyModel_),
155 includeHs_(ptf.includeHs_),
156 enthalpyMassLoadPtr_(ptf.enthalpyMassLoadPtr_.clone()),
159 speciesName_(ptf.speciesName_),
173 zeroGradientFvPatchScalarField::autoMap(m);
185 zeroGradientFvPatchScalarField::rmap(ptf, addr);
187 const auto& tiptf = refCast<const enthalpySorptionFvPatchScalarField>(ptf);
189 dhdt_.rmap(tiptf.dhdt_, addr);
197 refCast<const speciesSorptionFvPatchScalarField>
222 const label speciesId =
223 thermo.composition().species()[speciesName_];
237 Info<<
" Patch enthalpy rate min/max [J/m3/sec]: " 253 refCast<const speciesSorptionFvPatchScalarField>
258 switch (enthalpyModel_)
260 case enthalpyModelType::estimated:
265 case enthalpyModelType::calculated:
268 tmp<scalarField> tmassb = Yp.mass();
273 const scalar mfacei = massb[facei];
275 dhdt_[facei] = enthalpyMassLoadPtr_->value(mfacei);
285 Info<<
" Enthalpy change min/max [J/kg]: " 289 zeroGradientFvPatchScalarField::updateCoeffs();
297 os.
writeEntry(
"enthalpyModel", enthalpyModelTypeNames[enthalpyModel_]);
299 if (enthalpyMassLoadPtr_)
301 enthalpyMassLoadPtr_->writeData(
os);
325 enthalpySorptionFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
This is a temperature boundary condition which works in conjunction with the speciesSorption conditio...
Type gMin(const FieldField< Field, Type > &f)
basicSpecieMixture & composition
enthalpySorptionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
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.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
virtual void write(Ostream &) const
Write.
int debug
Static debugging option.
Type gMax(const FieldField< Field, Type > &f)
OBJstream os(runTime.globalPath()/outputName)
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
virtual void operator=(const UList< Type > &)
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
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.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A class for managing temporary objects.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual tmp< scalarField > patchSource() const
Source of cells next to the patch.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)