32 template<
class Thermo,
class OtherThermo>
41 this->thermo_.composition().W(saturatedIndex_)
44 return Wi/this->thermo_.W()/this->thermo_.p();
50 template<
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." 83 template<
class Thermo,
class OtherThermo>
90 template<
class Thermo,
class OtherThermo>
99 template<
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))
121 /
max(scalar(1) - this->thermo_.Y()[saturatedIndex_], SMALL);
126 template<
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);
label find(const ListType &input, const UnaryPredicate &pred, const label start=0)
Same as ListOps::find_if.
virtual ~Saturated()
Destructor.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
basicSpecieMixture & composition
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Base class for interface composition models, templated on the two thermodynamic models either side of...
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
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.
virtual void update(const volScalarField &Tf)
Update the composition.
A class for handling words, derived from Foam::string.
Saturated(const dictionary &dict, const phasePair &pair)
Construct from components.
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
tmp< volScalarField > wRatioByP() const
Constant of proportionality between partial pressure and mass.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...