32template<
class Thermo,
class OtherThermo>
50template<
class Thermo,
class OtherThermo>
58 saturatedName_(this->speciesNames_[0]),
67 dict.subDict(
"saturationPressure"),
72 if (this->speciesNames_.size() != 1)
75 <<
"Saturated model is suitable for one species only."
83template<
class Thermo,
class OtherThermo>
90template<
class Thermo,
class OtherThermo>
99template<
class Thermo,
class OtherThermo>
103 const word& speciesName,
107 if (saturatedName_ == speciesName)
109 return wRatioByP()*saturationModel_->pSat(Tf);
113 const label speciesIndex
115 this->thermo_.composition().species().find(speciesName)
119 this->thermo_.Y()[speciesIndex]
120 *(scalar(1) - wRatioByP()*saturationModel_->pSat(Tf))
126template<
class Thermo,
class OtherThermo>
130 const word& speciesName,
134 if (saturatedName_ == speciesName)
136 return wRatioByP()*saturationModel_->pSatPrime(Tf);
140 const label speciesIndex
142 this->thermo_.composition().species().find(speciesName)
146 - this->thermo_.Y()[speciesIndex]
147 *wRatioByP()*saturationModel_->pSatPrime(Tf)
148 /
max(scalar(1) - this->thermo_.Y()[saturatedIndex_], SMALL);
Base class for interface composition models, templated on the two thermodynamic models either side of...
const Thermo & thermo_
Thermo.
InterfaceCompositionModel(const dictionary &dict, const phasePair &pair)
Construct from components.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual ~Saturated()
Destructor.
autoPtr< saturationModel > saturationModel_
Saturation pressure model.
Saturated(const dictionary &dict, const phasePair &pair)
Construct from components.
virtual void update(const volScalarField &Tf)
Update the composition.
tmp< volScalarField > wRatioByP() const
Constant of proportionality between partial pressure and mass.
label saturatedIndex_
Saturated species index.
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
word saturatedName_
Saturated species name.
const phasePair & pair() const
The phase pair.
static autoPtr< interfaceCompositionModel > New(const dictionary &dict, const phasePair &pair)
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
basicSpecieMixture & composition
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)