The NRTL model modified by Huron and Vidal is a variation of the original non-random two-liquid model. This variation is intended to be used combined with cubic Equations of State, using the Huron-Vidal mixing rule. The major difference with respect to the original NRTL model is that it includes the repulsive parameter of the cubic EoS in the expression for the excess Gibbs energy. This allows the model to be simplified to the classic Van der Waals 1-fluid quadratic mixing rules when giving special values to the parameters.
Choose this model when your parameter set was developed for a Huron-Vidal
cubic-EOS formulation. Ordinary NRTL weights neighbors by their
amounts and interaction factors; NRTL-HV additionally weights them by pure-fluid
covolumes , which represent excluded-volume size in the cubic EOS.
This is not a liquid molar-volume calculation. In yaeos the public type is
NRTLHV, while the ordinary type is NRTL.
NRTL-HV itself remains a GeModel: its derivatives give activity coefficients relative to an ideal liquid, not fugacity coefficients relative to an ideal gas. An activity is ; a liquid fugacity also requires its pure-liquid reference fugacity. Coupling the excess model to a cubic EOS is a separate step through the mixing rule, not a side effect of calling the constructor.
The general expression for the excess Gibbs energy is given by:
Where the parameters are defined as follows:
In this implementation:
Here is the already-referenced interaction difference. If a source supplies raw energies , subtract the reference before constructing this model: the implementation does not subtract a diagonal energy. The non-randomness parameter controls the local weighting and is often symmetric, but must match the fitted parameter set.
| Constructor argument | Meaning and units |
|---|---|
b(:) |
Pure-component cubic covolumes, L/mol |
alpha(:,:) |
Dimensionless non-randomness parameters |
gji0(:,:) |
Constant referenced energy differences, bar L/mol |
gjiT(:,:) |
Coefficients multiplying T, bar L/(mol K) |
Thus , with T
in kelvin and the library gas constant R in bar L/(mol K). Divide J/mol by 100
to obtain bar L/mol (and likewise for J/(mol K)). These arrays are not the
dimensionless a and kelvin-valued b matrices of the ordinary NRTL constructor.
All matrices have shape (nc,nc) and need not be symmetric. (:,i) describes
contacts in the local average around component i. Use zero diagonal energy
differences and keep component order consistent with n and the covolume vector.
The following artificial binary example tests the API and its ideal-interaction
limit; it is not a parameter set for named chemicals. For EOS work, obtain b
from the same pure-component cubic model used for coupling.
program nrtlhv_activity
use yaeos, only: pr, NRTLHV
implicit none
type(NRTLHV) :: model
real(pr) :: b(2)
real(pr) :: alpha(2, 2)
real(pr) :: gji0(2, 2)
real(pr) :: gjiT(2, 2)
real(pr) :: n(2)
real(pr) :: T
real(pr) :: ln_gamma(2)
real(pr) :: Ge
b = [0.04_pr, 0.06_pr]
alpha = 0.3_pr
gji0 = 0.0_pr
gji0(1, 2) = 10.0_pr
gji0(2, 1) = -5.0_pr
gjiT = 0.0_pr
n = [0.4_pr, 0.6_pr]
T = 300.0_pr
model = NRTLHV(b=b, alpha=alpha, gji0=gji0, gjiT=gjiT)
call model%ln_activity_coefficient(n, T, ln_gamma)
call model%excess_gibbs(n, T, Ge=Ge)
print *, "gamma, components 1 and 2 = ", exp(ln_gamma)
print *, "GE [bar L] = ", Ge
gji0 = 0.0_pr
model = NRTLHV(b=b, alpha=alpha, gji0=gji0, gjiT=gjiT)
call model%ln_activity_coefficient(n, T, ln_gamma)
print *, "Zero-interaction ln(gamma), near zero = ", ln_gamma
end program nrtlhv_activity
The output coefficient order follows n. Coefficients must be positive, not
necessarily less than 1. With both energy matrices zero, and the
coefficients are 1, even when the covolumes differ. This ideal-excess check is
not the same as the special parameter choices needed to recover quadratic
mixing in an EOS.
When every component has the same covolume, the covolume weighting drops out of the local averages and NRTL-HV reduces to ordinary NRTL for the same and . Because the two models use different parameter forms, the conversion is:
| Ordinary NRTL | NRTL-HV equivalent |
|---|---|
a(i,j) (dimensionless) |
gjiT(i,j) = a(i,j) * R |
b(i,j) (K) |
gji0(i,j) = b(i,j) * R |
c(i,j) (dimensionless) |
alpha(i,j) = c(i,j) |
| — | b(i) = 1 for every component |
With those substitutions the two models give identical activity coefficients. This is a useful diagnostic when converting a parameter set: if the results differ, a unit or a matrix direction is wrong.
Use positive covolumes and nonnegative mole amounts with a positive total. Wrong energy units, reversed matrix directions, and subtracting the diagonal twice are particularly damaging mistakes. Equal covolumes reduce the weighting to ordinary NRTL for the same and , which offers another cross-check. Do not transplant a fitted ordinary-NRTL parameter set into an unequal-covolume model and assume unchanged predictions.
The special parameter choices that recover the classic van der Waals one-fluid quadratic mixing rule inside a cubic EOS (a specific set of diagonal and off-diagonal energies, and zero non-randomness) are implemented in the Huron-Vidal mixing rule, not by this model object.
No density, vapor phase, ionic chemistry, or pressure-dependent excess properties are supplied by this standalone model. Validate the fitted temperature range, then continue to shared property methods and cubic mixing rules. The derivative details below are optional background; application code should call the model methods.
In this section we present the first and second order derivatives of the excess Gibbs energy. To simplify the expressions we will define the following parameters:
With this definitions, the excess Gibbs energy can be rewritten as:
The first order derivatives of the excess Gibbs energy with respect to the number of moles of component are given by:
Which can be rewritten in terms of the defined parameters as:
The second order derivatives of the excess Gibbs energy with respect to the number of moles of components and are given by:
To simplify the equations, we present the derivatives of each variable as for first order derivatives wrt to temperature and for second order derivatives.
First derivative
Second derivative