32template<
class Thermo,
class OtherThermo>
63 alpha12_(
"alpha12",
dimless, Zero),
64 alpha21_(
"alpha21",
dimless, Zero),
68 if (this->speciesNames_.size() != 2)
71 <<
"NonRandomTwoLiquid model is suitable for two species only."
75 species1Name_ = this->speciesNames_[0];
76 species2Name_ = this->speciesNames_[1];
78 species1Index_ = this->
thermo_.composition().species().find(species1Name_);
79 species2Index_ = this->
thermo_.composition().species().find(species2Name_);
86 saturationModel12_.reset
94 saturationModel21_.reset
125template<
class Thermo,
class OtherThermo>
133template<
class Thermo,
class OtherThermo>
145 this->thermo_.composition().Y(species1Index_)
151 this->thermo_.composition().W(species1Index_)
157 this->thermo_.composition().Y(species2Index_)
163 this->thermo_.composition().W(species2Index_)
181 tau21*
sqr(G21)/
max(
sqr(X1 + X2*G21), SMALL)
182 + tau12*G12/
max(
sqr(X2 + X1*G12), SMALL)
190 tau12*
sqr(G12)/
max(
sqr(X2 + X1*G12), SMALL)
191 + tau21*G21/
max(
sqr(X1 + X2*G21), SMALL)
197template<
class Thermo,
class OtherThermo>
201 const word& speciesName,
205 if (speciesName == species1Name_)
208 this->otherThermo_.composition().Y(speciesName)
209 *speciesModel1_->Yf(speciesName, Tf)
212 else if (speciesName == species2Name_)
215 this->otherThermo_.composition().Y(speciesName)
216 *speciesModel2_->Yf(speciesName, Tf)
222 this->thermo_.composition().Y(speciesName)
223 *(scalar(1) - Yf(species1Name_, Tf) - Yf(species2Name_, Tf));
228template<
class Thermo,
class OtherThermo>
233 const word& speciesName,
237 if (speciesName == species1Name_)
240 this->otherThermo_.composition().Y(speciesName)
241 *speciesModel1_->YfPrime(speciesName, Tf)
244 else if (speciesName == species2Name_)
247 this->otherThermo_.composition().Y(speciesName)
248 *speciesModel2_->YfPrime(speciesName, Tf)
254 - this->thermo_.composition().Y(speciesName)
255 *(YfPrime(species1Name_, Tf) + YfPrime(species2Name_, Tf));
const Mesh & mesh() const
Return mesh.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Base class for interface composition models, templated on the two thermodynamic models either side of...
const Thermo & thermo_
Thermo.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool read(const dictionary &dict)
Non ideal law for the mixing of two species. A separate composition model is given for each species....
virtual ~NonRandomTwoLiquid()
Destructor.
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.
virtual bool update()
Update the mesh for both mesh motion and topology change.
const phasePair & pair() const
The phase pair.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
const multiphaseInter::phaseModel & phase1() const
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)