30 template<
class Thermo,
class OtherThermo>
34 const dictionary& dict,
38 InterfaceCompositionModel<Thermo, OtherThermo>(dict, pair),
43 IOobject::groupName(
"gamma1", pair.
name()),
54 IOobject::groupName(
"gamma2", pair.
name()),
67 <<
"NonRandomTwoLiquid model is suitable for two species only." 74 species1Index_ = this->thermo_.composition().species()[species1Name_];
75 species2Index_ = this->thermo_.composition().species()[species2Name_];
81 dict.subDict(species1Name_).lookup(
"alpha")
87 dict.subDict(species2Name_).lookup(
"alpha")
94 dict.subDict(species1Name_).lookup(
"beta")
100 dict.subDict(species2Name_).lookup(
"beta")
103 saturationModel12_.reset
107 dict.subDict(species1Name_).subDict(
"interaction")
110 saturationModel21_.reset
114 dict.subDict(species2Name_).subDict(
"interaction")
122 dict.subDict(species1Name_),
131 dict.subDict(species2Name_),
140 template<
class Thermo,
class OtherThermo>
148 template<
class Thermo,
class OtherThermo>
160 this->thermo_.composition().Y(species1Index_)
162 /this->thermo_.composition().W(species1Index_)
167 this->thermo_.composition().Y(species2Index_)
169 /this->thermo_.composition().W(species2Index_)
186 tau21*
sqr(G21)/
max(
sqr(X1 + X2*G21), SMALL)
187 + tau12*G12/
max(
sqr(X2 + X1*G12), SMALL)
195 tau12*
sqr(G12)/
max(
sqr(X2 + X1*G12), SMALL)
196 + tau21*G21/
max(
sqr(X1 + X2*G21), SMALL)
202 template<
class Thermo,
class OtherThermo>
206 const word& speciesName,
210 if (speciesName == species1Name_)
213 this->otherThermo_.composition().Y(speciesName)
214 *speciesModel1_->Yf(speciesName, Tf)
217 else if(speciesName == species2Name_)
220 this->otherThermo_.composition().Y(speciesName)
221 *speciesModel2_->Yf(speciesName, Tf)
227 this->thermo_.composition().Y(speciesName)
228 *(scalar(1) -
Yf(species1Name_, Tf) -
Yf(species2Name_, Tf));
233 template<
class Thermo,
class OtherThermo>
238 const word& speciesName,
242 if (speciesName == species1Name_)
245 this->otherThermo_.composition().Y(speciesName)
246 *speciesModel1_->YfPrime(speciesName, Tf)
249 else if(speciesName == species2Name_)
252 this->otherThermo_.composition().Y(speciesName)
253 *speciesModel2_->YfPrime(speciesName, Tf)
259 - this->thermo_.composition().Y(speciesName)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static autoPtr< saturationModel > New(const dictionary &dict)
Select null constructed.
void size(const label)
Override size to be inconsistent with allocated storage.
static autoPtr< interfaceCompositionModel > New(const dictionary &dict, const phasePair &pair)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar exp(const dimensionedScalar &ds)
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const =0
Interface mass fraction.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
NonRandomTwoLiquid(const dictionary &dict, const phasePair &pair)
Construct from components.
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
word name(const complex &)
Return a string representation of a complex.
const hashedWordList speciesNames_
Names of the transferring species.
virtual ~NonRandomTwoLiquid()
Destructor.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const =0
The interface mass fraction derivative w.r.t. temperature.
A class for managing temporary objects.
virtual void update(const volScalarField &Tf)
Update the composition.
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.