HV_NRTL Derived Type

type, public, extends(CubicMixRule) :: HV_NRTL

HV_NRTL

Huron-Vidal cubic mixing rule with an NRTL-HV excess-Gibbs model.

Description

This variant evaluates the Huron-Vidal relation using the modified NRTL expression. Under the limiting parameter choices below, its attractive mixing expression reduces to the quadratic form.

Examples

mixrule = HV_NRTL(b, del1, alpha, gji0, gjiT, use_kij, kij)
call model%set_mixrule(mixrule)

Inherits

type~~hv_nrtl~~InheritsGraph type~hv_nrtl HV_NRTL type~cubicmixrule CubicMixRule type~hv_nrtl->type~cubicmixrule type~nrtlhv NRTLHV type~hv_nrtl->type~nrtlhv ge type~gemodel GeModel type~nrtlhv->type~gemodel type~basemodel BaseModel type~gemodel->type~basemodel type~substances Substances type~basemodel->type~substances components

Components

Type Visibility Attributes Name Initial
real(kind=pr), public, allocatable :: bi(:)

Pure-component covolumes [L/mol].

real(kind=pr), public, allocatable :: del1(:)

Pure-component cubic parameters.

logical, public :: dn2 = .false.

Calculate second-order mole-number derivatives

type(NRTLHV), public :: ge

NRTL-HV excess-Gibbs model.

logical, public :: is_D_ddlc = .false.

Mixing rule D parameter depends on volume (density)

real(kind=pr), public, allocatable :: kij(:,:)

Binary attractive interaction parameters.

logical, public, allocatable :: use_kij(:,:)

Pair mask: where true, the NRTL parameters are replaced so that the rule reduces to the quadratic one with kij.


Constructor

public interface HV_NRTL

  • public function init_hvnrtl(b, del1, alpha, gji0, gjiT, use_kij, kij) result(mixrule)

    Huron-Vidal NRTL mixing rule

    This is the Huron-Vidal mixing rule that includes the NRTL model modified by Huron and Vidal.

    Description

    This is the Huron-Vidal mixing rule that includes the NRTL model modified by Huron and Vidal. It is a mixing rule that allows to use the NRTL model as an excess Gibbs energy model and can be simplified to the classic quadratic mixing rules when the parameters are set to:

    Examples

    mixrule = HV_NRTL(b, del1, alpha, gji0, gjiT, use_kij, kij)
    

    Arguments

    Type IntentOptional Attributes Name
    real(kind=pr), intent(in) :: b(:)

    Pure-component covolumes [L/mol]

    real(kind=pr), intent(in) :: del1(:)

    Pure-component values

    real(kind=pr), intent(in) :: alpha(:,:)

    NRTL non-randomness parameters

    real(kind=pr), intent(in) :: gji0(:,:)

    Temperature-independent NRTL-HV energy parameters

    real(kind=pr), intent(in) :: gjiT(:,:)

    Temperature coefficients of the NRTL-HV energy parameters

    logical, intent(in) :: use_kij(:,:)

    Pairs where the quadratic-limit parameters with kij are used

    real(kind=pr), intent(in) :: kij(:,:)

    Binary attractive interaction parameters

    Return Value type(HV_NRTL)


Type-Bound Procedures

procedure, public :: Bmix => BmixHVNRTL

  • private subroutine BmixHVNRTL(self, n, bi, B, dBi, dBij)

    Linear mixing rule for the repulsive parameter.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(HV_NRTL), intent(in) :: self

    Mixing rule object.

    real(kind=pr), intent(in) :: n(:)

    Component mole amounts [mol]

    real(kind=pr), intent(in) :: bi(:)

    Pure-component covolumes [L/mol]

    real(kind=pr), intent(out) :: B

    Mixture covolume [L]

    real(kind=pr), intent(out) :: dBi(:)

    real(kind=pr), intent(out) :: dBij(:,:)

procedure, public :: D1Mix => D1MixHVNRTL

  • private subroutine D1MixHVNRTL(self, n, d1i, D1, dD1i, dD1ij)

    Mole-fraction-weighted mixture (see d1mix_rkpr).

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(HV_NRTL), intent(in) :: self

    Mixing rule object.

    real(kind=pr), intent(in) :: n(:)

    Component mole amounts [mol]

    real(kind=pr), intent(in) :: d1i(:)

    Pure-component values

    real(kind=pr), intent(out) :: D1

    Mixture

    real(kind=pr), intent(out) :: dD1i(:)

    real(kind=pr), intent(out) :: dD1ij(:,:)

procedure, public :: Dmix => DmixHVNRTL

  • private subroutine DmixHVNRTL(self, n, V, T, ai, daidt, daidt2, D, dDdV, dDdT, dDdV2, dDdT2, dDi, dDdTV, dDidV, dDidT, dDij)

    Huron-Vidal attractive parameter with the NRTL-HV model.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(HV_NRTL), intent(in) :: self

    Mixing rule object.

    real(kind=pr), intent(in) :: n(:)

    Moles vector [mol]

    real(kind=pr), intent(in) :: V

    Volume [L] (unused)

    real(kind=pr), intent(in) :: T

    Temperature [K]

    real(kind=pr), intent(in) :: ai(:)

    Pure components attractive parameters

    real(kind=pr), intent(in) :: daidt(:)

    real(kind=pr), intent(in) :: daidt2(:)

    real(kind=pr), intent(out) :: D

    Mixture attractive parameter

    real(kind=pr), intent(out) :: dDdV

    (not assigned)

    real(kind=pr), intent(out) :: dDdT

    real(kind=pr), intent(out) :: dDdV2

    real(kind=pr), intent(out) :: dDdT2

    real(kind=pr), intent(out) :: dDi(:)

    real(kind=pr), intent(out) :: dDdTV

    real(kind=pr), intent(out) :: dDidV(:)

    real(kind=pr), intent(out) :: dDidT(:)

    real(kind=pr), intent(out) :: dDij(:,:)