39 Foam::enthalpySorptionFvPatchScalarField::enthalpyModelType
41Foam::enthalpySorptionFvPatchScalarField::enthalpyModelTypeNames
43 { enthalpyModelType::estimated,
"estimated" },
44 { enthalpyModelType::calculated,
"calculated" }
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),
82 speciesName_(
dict.get<
word>(
"species")),
83 pName_(
dict.getOrDefault<
word>(
"p",
"p")),
84 TName_(
dict.getOrDefault<
word>(
"T",
"T")),
92 switch (enthalpyModel_)
94 case enthalpyModelType::calculated:
96 enthalpyMassLoadPtr_ =
100 case enthalpyModelType::estimated:
128 zeroGradientFvPatchScalarField(ptf,
p, iF, mapper),
129 enthalpyModel_(ptf.enthalpyModel_),
130 includeHs_(ptf.includeHs_),
131 enthalpyMassLoadPtr_(ptf.enthalpyMassLoadPtr_.clone()),
134 speciesName_(ptf.speciesName_),
137 dhdt_(ptf.dhdt_, mapper)
146 zeroGradientFvPatchScalarField(ptf),
147 enthalpyModel_(ptf.enthalpyModel_),
148 includeHs_(ptf.includeHs_),
149 enthalpyMassLoadPtr_(ptf.enthalpyMassLoadPtr_.clone()),
152 speciesName_(ptf.speciesName_),
165 zeroGradientFvPatchScalarField(ptf, iF),
166 enthalpyModel_(ptf.enthalpyModel_),
167 includeHs_(ptf.includeHs_),
168 enthalpyMassLoadPtr_(ptf.enthalpyMassLoadPtr_.clone()),
171 speciesName_(ptf.speciesName_),
185 zeroGradientFvPatchScalarField::autoMap(m);
197 zeroGradientFvPatchScalarField::rmap(ptf, addr);
199 const auto& tiptf = refCast<const enthalpySorptionFvPatchScalarField>(ptf);
201 dhdt_.rmap(tiptf.dhdt_, addr);
209 refCast<const speciesSorptionFvPatchScalarField>
211 patch().lookupPatchField<volScalarField, scalar>
240 const label speciesId =
241 thermo.composition().species()[speciesName_];
247 hsp[facei] =
composition.
Hs(speciesId, pp[facei], Tp[facei]);
255 Info<<
" Patch enthalpy rate min/max [J/m3/sec]: "
271 refCast<const speciesSorptionFvPatchScalarField>
273 patch().lookupPatchField<volScalarField, scalar>
279 switch (enthalpyModel_)
281 case enthalpyModelType::estimated:
286 case enthalpyModelType::calculated:
294 const scalar mfacei = massb[facei];
296 dhdt_[facei] = enthalpyMassLoadPtr_->value(mfacei);
306 Info<<
" Enthalpy change min/max [J/kg]: "
310 zeroGradientFvPatchScalarField::updateCoeffs();
318 os.
writeEntry(
"enthalpyModel", enthalpyModelTypeNames[enthalpyModel_]);
320 if (enthalpyMassLoadPtr_)
322 enthalpyMassLoadPtr_->writeData(
os);
333 dhdt_.writeEntry(
"dhdt",
os);
335 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
static const word dictName
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
This is a temperature boundary condition which works in conjunction with the speciesSorption conditio...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< scalarField > patchSource() const
Source of cells next to the patch.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< Type > &)
friend Ostream & operator(Ostream &, const fvPatchField< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
basicSpecieMixture & composition
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
Type gMin(const FieldField< Field, Type > &f)
Type gMax(const FieldField< Field, Type > &f)
#define forAll(list, i)
Loop across all elements in list.