30 template<
class Thermo,
class OtherThermo>
39 this->thermo_.composition().W(saturatedIndex_)
42 return Wi/this->thermo_.W()/this->thermo_.p();
48 template<
class Thermo,
class OtherThermo>
51 const dictionary& dict,
55 InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
56 saturatedName_(this->speciesNames_[0]),
59 this->thermo_.
composition().species()[saturatedName_]
65 dict.subDict(
"saturationPressure"),
73 <<
"Saturated model is suitable for one species only." 81 template<
class Thermo,
class OtherThermo>
88 template<
class Thermo,
class OtherThermo>
97 template<
class Thermo,
class OtherThermo>
101 const word& speciesName,
105 if (saturatedName_ == speciesName)
107 return wRatioByP()*saturationModel_->pSat(Tf);
111 const label speciesIndex
113 this->
thermo_.composition().species()[speciesName]
117 this->
thermo_.Y()[speciesIndex]
118 *(scalar(1) - wRatioByP()*saturationModel_->pSat(Tf))
119 /
max(scalar(1) - this->
thermo_.Y()[saturatedIndex_], small);
124 template<
class Thermo,
class OtherThermo>
128 const word& speciesName,
132 if (saturatedName_ == speciesName)
134 return wRatioByP()*saturationModel_->pSatPrime(Tf);
138 const label speciesIndex
140 this->
thermo_.composition().species()[speciesName]
144 - this->
thermo_.Y()[speciesIndex]
145 *wRatioByP()*saturationModel_->pSatPrime(Tf)
146 /
max(scalar(1) - this->
thermo_.Y()[saturatedIndex_], small);
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
virtual void update(const volScalarField &Tf)
Update the composition.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
basicSpecieMixture & composition
void size(const label)
Override size to be inconsistent with allocated storage.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Saturated(const dictionary &dict, const phasePair &pair)
Construct from components.
tmp< volScalarField > wRatioByP() const
Constant of proportionality between partial pressure and mass.
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
const hashedWordList speciesNames_
Names of the transferring species.
const Thermo & thermo_
Thermo.
virtual ~Saturated()
Destructor.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.