32 const Foam::scalar Foam::liquidMixtureProperties::TrMax = 0.999;
45 components_ = dict.
toc();
46 properties_.
setSize(components_.size());
50 if (dict.
isDict(components_[i]))
75 components_(lm.components_),
76 properties_(lm.properties_.size())
80 properties_.set(i, lm.properties_(i)->clone());
109 scalar x1 = X[i]*properties_[i].Vc();
111 vTc += x1*properties_[i].Tc();
124 Tpt += X[i]*properties_[i].Tt();
142 if (p >=
pv(p, Thi, X))
146 else if (p <
pv(p, Tlo, X))
149 <<
"Pressure below triple point pressure: " 150 <<
"p = " << p <<
" < Pt = " <<
pv(p, Tlo, X) <<
nl <<
endl;
155 scalar T = (Thi + Tlo)*0.5;
157 while ((Thi - Tlo) > 1.0e-4)
159 if ((
pv(p, T, X) - p) <= 0.0)
181 Tpc += X[i]*properties_[i].Tc();
195 Vc += X[i]*properties_[i].Vc();
196 Zc += X[i]*properties_[i].Zc();
199 return RR*Zc*
Tpc(X)/Vc;
209 omega += X[i]*properties_[i].omega();
230 scalar Ti =
min(TrMax*properties_[i].
Tc(), Tl);
231 Xs[i] = properties_[i].pv(p, Ti)*Xl[i]/
p;
244 W += X[i]*properties_[i].W();
258 Y[i] = X[i]*properties_[i].W();
275 X[i] = Y[i]/properties_[i].W();
299 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
300 scalar
rho = properties_[i].rho(p, Ti);
304 scalar Yi = X[i]*properties_[i].W();
329 scalar Yi = X[i]*properties_[i].W();
332 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
333 pv += Yi*properties_[i].pv(p, Ti);
355 scalar Yi = X[i]*properties_[i].W();
358 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
359 hl += Yi*properties_[i].hl(p, Ti);
381 scalar Yi = X[i]*properties_[i].W();
384 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
385 Cp += Yi*properties_[i].Cp(p, Ti);
408 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
409 scalar Pvs = properties_[i].pv(p, Ti);
421 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
422 sigma +=
Xs[i]*properties_[i].sigma(p, Ti);
443 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
444 mu += X[i]*
log(properties_[i].
mu(p, Ti));
465 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
467 scalar Vi = properties_[i].W()/properties_[i].rho(p, Ti);
478 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
482 scalar Tj =
min(TrMax*properties_[j].
Tc(), T);
487 1.0/properties_[i].kappa(p, Ti)
488 + 1.0/properties_[j].kappa(p, Tj)
490 K += phii[i]*phii[j]*Kij;
512 scalar Ti =
min(TrMax*properties_[i].
Tc(), T);
513 Dinv += X[i]/properties_[i].D(p, Ti);
scalar Cp(const scalar p, const scalar T, const scalarField &X) const
Calculate the mixture heat capacity [J/kg/K].
#define forAll(list, i)
Loop across all elements in list.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
liquidMixtureProperties(const dictionary &dict)
Construct from dictionary.
scalar D(const scalar p, const scalar T, const scalarField &X) const
Vapour diffusivity [m^2/s].
CGAL::Exact_predicates_exact_constructions_kernel K
wordList toc() const
Return the table of contents.
scalar mu(const scalar p, const scalar T, const scalarField &X) const
Calculate the mixture viscosity [Pa s].
bool isDict(const word &) const
Check if entry is a sub-dictionary.
scalar kappa(const scalar p, const scalar T, const scalarField &X) const
Estimate thermal conductivity [W/m/K].
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
scalarField Xs(const scalar p, const scalar Tg, const scalar Tl, const scalarField &Xg, const scalarField &Xl) const
Return the surface molar fractions.
scalar rho(const scalar p, const scalar T, const scalarField &X) const
Calculate the mixture density [kg/m^3].
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
scalar Tpc(const scalarField &X) const
Return pseudocritical temperature according to Kay's rule.
static autoPtr< liquidMixtureProperties > New(const dictionary &)
Select construct from dictionary.
scalar Ppc(const scalarField &X) const
Return pseudocritical pressure (modified Prausnitz and Gunn)
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField X(const scalarField &Y) const
Returns the mole fractions corresponding to the given mass fractions.
scalar sigma(const scalar p, const scalar T, const scalarField &X) const
Estimate mixture surface tension [N/m].
scalar Tc(const scalarField &X) const
Calculate the critical temperature of mixture.
scalarField Y(const scalarField &X) const
Returns the mass fractions corresponding to the given mole fractions.
scalar Tpt(const scalarField &X) const
Return pseudo triple point temperature (mole averaged formulation)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalar hl(const scalar p, const scalar T, const scalarField &X) const
Calculate the mixture latent heat [J/kg].
void setSize(const label)
Reset size of List.
#define WarningInFunction
Report a warning using Foam::Warning.
scalar pv(const scalar p, const scalar T, const scalarField &X) const
Calculate the mixture vapour pressure [Pa].
scalar W(const scalarField &X) const
Calculate the mean molecular weight [kg/kmol].
scalar omega(const scalarField &X) const
Return mixture accentric factor.
scalar pvInvert(const scalar p, const scalarField &X) const
Invert the vapour pressure relationship to retrieve the boiling.