HV Derived Type

type, public, extends(CubicMixRule) :: HV

HV

Huron-Vidal cubic mixing rule.

Description

Couples an excess-Gibbs model with a cubic EOS through the infinite-pressure-limit relation. Component covolumes (bi) and values (del1) are stored in the type; there is no custom constructor, so use the structure constructor.

Examples

The initialized variants exported here are MHV and HV_NRTL.


Inherits

type~~hv~~InheritsGraph type~hv HV type~cubicmixrule CubicMixRule type~hv->type~cubicmixrule type~gemodel GeModel type~hv->type~gemodel ge 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

class(GeModel), public, allocatable :: ge

Excess-Gibbs model used for mixture non-ideality.

logical, public :: is_D_ddlc = .false.

Mixing rule D parameter depends on volume (density)


Type-Bound Procedures

procedure, public :: Bmix => BmixHV

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

    Linear mixing rule for the repulsive parameter.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(HV), 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 => D1MixHV

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

    Mole-fraction-weighted mixture (see d1mix_rkpr).

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(HV), 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 => DmixHV

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

    Huron-Vidal attractive parameter using the stored GeModel.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(HV), 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(:,:)