yaeos__models_cubic_mixing_rules_huron_vidal Module

Huron-Vidal (like) mixing rules module

This module contains the mixing rules that are based/similar to the mixing rules defined by Huron-Vidal

Description

Huron-Vidal presented a way to link a model with a Cubic EoS mixing rule. This makes it possible to make good predictions on polar compounds containing mixtures.

Examples

 A basic code example

References


Uses

  • module~~yaeos__models_cubic_mixing_rules_huron_vidal~~UsesGraph module~yaeos__models_cubic_mixing_rules_huron_vidal yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos__constants yaeos__constants module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__constants module~yaeos__models_ar_cubic_mixing_base yaeos__models_ar_cubic_mixing_base module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ar_cubic_mixing_base module~yaeos__models_ar_cubic_quadratic_mixing yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_ar_genericcubic yaeos__models_ar_genericcubic module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ar_genericcubic module~yaeos__models_ge yaeos__models_ge module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ge module~yaeos__models_ge_nrtlhv yaeos__models_ge_nrtlhv module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ge_nrtlhv iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__models_ar_cubic_mixing_base->module~yaeos__constants module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__constants module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__models_ar_cubic_mixing_base module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__models_ar_genericcubic module~yaeos__substance yaeos__substance module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__substance module~yaeos__models_ar_genericcubic->module~yaeos__constants module~yaeos__models_ar yaeos__models_ar module~yaeos__models_ar_genericcubic->module~yaeos__models_ar module~yaeos__models_ar_genericcubic->module~yaeos__substance module~yaeos__models_ge->module~yaeos__constants module~yaeos__models_base yaeos__models_base module~yaeos__models_ge->module~yaeos__models_base module~yaeos__models_ge_nrtlhv->module~yaeos__constants module~yaeos__models_ge_nrtlhv->module~yaeos__models_ge module~yaeos__autodiff yaeos__autodiff module~yaeos__models_ge_nrtlhv->module~yaeos__autodiff module~hyperdual_mod hyperdual_mod module~yaeos__autodiff->module~hyperdual_mod module~yaeos__adiff_hyperdual_ar_api yaeos__adiff_hyperdual_ar_api module~yaeos__autodiff->module~yaeos__adiff_hyperdual_ar_api module~yaeos__models_ar->module~yaeos__constants module~yaeos__models_ar->module~yaeos__models_base module~yaeos__models_base->module~yaeos__substance module~yaeos__substance->module~yaeos__constants module~hyperdual_mod->module~yaeos__constants module~yaeos__adiff_hyperdual_ar_api->module~yaeos__constants module~yaeos__adiff_hyperdual_ar_api->module~yaeos__models_ar module~yaeos__adiff_hyperdual_ar_api->module~hyperdual_mod

Used by

  • module~~yaeos__models_cubic_mixing_rules_huron_vidal~~UsedByGraph module~yaeos__models_cubic_mixing_rules_huron_vidal yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos__models yaeos__models module~yaeos__models->module~yaeos__models_cubic_mixing_rules_huron_vidal proc~psrk PSRK proc~psrk->module~yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos yaeos module~yaeos->module~yaeos__models

Interfaces

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 Quatratic mixing rules when the parameters are set to:

    Examples

    Arguments

    Type IntentOptional Attributes Name
    real(kind=pr), intent(in) :: b(:)
    real(kind=pr), intent(in) :: del1(:)
    real(kind=pr), intent(in) :: alpha(:,:)
    real(kind=pr), intent(in) :: gji0(:,:)
    real(kind=pr), intent(in) :: gjiT(:,:)
    logical, intent(in) :: use_kij(:,:)
    real(kind=pr), intent(in) :: kij(:,:)

    Return Value type(HV_NRTL)

public interface MHV

  • private function init_mhv(Ge, b, q, lij) result(mixrule)

    Arguments

    Type IntentOptional Attributes Name
    class(GeModel), intent(in) :: Ge
    real(kind=pr), intent(in) :: b(:)
    real(kind=pr), intent(in) :: q
    real(kind=pr), intent(in), optional :: lij(:,:)

    Return Value type(MHV)


Derived Types

type, public, extends(CubicMixRule) ::  HV

Components

Type Visibility Attributes Name Initial
real(kind=pr), public, allocatable :: bi(:)
real(kind=pr), public, allocatable :: del1(:)
logical, public :: dn2 = .false.

Calculate second order derivatives

class(GeModel), public, allocatable :: ge

Type-Bound Procedures

procedure, public :: Bmix => BmixHV
procedure, public :: D1Mix => D1MixHV
procedure, public :: Dmix => DmixHV

type, public, extends(CubicMixRule) ::  HV_NRTL

Huron-Vidal mixing rule including the NRTL model modified by Huron and Vidal.

Read more…

Components

Type Visibility Attributes Name Initial
real(kind=pr), public, allocatable :: bi(:)
real(kind=pr), public, allocatable :: del1(:)
logical, public :: dn2 = .false.

Calculate second order derivatives

type(NRTLHV), public :: ge
real(kind=pr), public, allocatable :: kij(:,:)
logical, public, allocatable :: use_kij(:,:)

Constructor

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

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

Read more…

Type-Bound Procedures

procedure, public :: Bmix => BmixHVNRTL
procedure, public :: D1Mix => D1MixHVNRTL
procedure, public :: Dmix => DmixHVNRTL

type, public, extends(CubicMixRule) ::  MHV

Mixing rule at zero-pressure which allows for the inclusion of an excess-gibbs model.

Read more…

Components

Type Visibility Attributes Name Initial
logical, public :: dn2 = .false.

Calculate second order derivatives

class(GeModel), public, allocatable :: ge
real(kind=pr), public, allocatable :: l(:,:)
real(kind=pr), public :: q
real(kind=pr), private, allocatable :: B
real(kind=pr), private, allocatable :: bi(:)
real(kind=pr), private, allocatable :: dBi(:)
real(kind=pr), private, allocatable :: dBij(:,:)

Constructor

private function init_mhv (Ge, b, q, lij)

Type-Bound Procedures

procedure, public :: Bmix => BmixMHV
procedure, public :: D1Mix => D1MixMHV
procedure, public :: Dmix => DmixMHV

Functions

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

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

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: b(:)
real(kind=pr), intent(in) :: del1(:)
real(kind=pr), intent(in) :: alpha(:,:)
real(kind=pr), intent(in) :: gji0(:,:)
real(kind=pr), intent(in) :: gjiT(:,:)
logical, intent(in) :: use_kij(:,:)
real(kind=pr), intent(in) :: kij(:,:)

Return Value type(HV_NRTL)

private function init_mhv(Ge, b, q, lij) result(mixrule)

Arguments

Type IntentOptional Attributes Name
class(GeModel), intent(in) :: Ge
real(kind=pr), intent(in) :: b(:)
real(kind=pr), intent(in) :: q
real(kind=pr), intent(in), optional :: lij(:,:)

Return Value type(MHV)


Subroutines

public subroutine DmixMHV(self, n, T, ai, daidt, daidt2, D, dDdT, dDdT2, dDi, dDidT, dDij)

Mixing rule at infinite pressure as defined in the book of Michelsen and Møllerup.

Read more…

Arguments

Type IntentOptional Attributes Name
class(MHV), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: T
real(kind=pr), intent(in) :: ai(:)
real(kind=pr), intent(in) :: daidt(:)
real(kind=pr), intent(in) :: daidt2(:)
real(kind=pr), intent(out) :: D
real(kind=pr), intent(out) :: dDdT
real(kind=pr), intent(out) :: dDdT2
real(kind=pr), intent(out) :: dDi(:)
real(kind=pr), intent(out) :: dDidT(:)
real(kind=pr), intent(out) :: dDij(:,:)

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

Quadratinc mixing rule for the repulsive parameter.

Read more…

Arguments

Type IntentOptional Attributes Name
class(HV), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: bi(:)
real(kind=pr), intent(out) :: B
real(kind=pr), intent(out) :: dBi(:)
real(kind=pr), intent(out) :: dBij(:,:)

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

Quadratinc mixing rule for the repulsive parameter.

Read more…

Arguments

Type IntentOptional Attributes Name
class(HV_NRTL), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: bi(:)
real(kind=pr), intent(out) :: B
real(kind=pr), intent(out) :: dBi(:)
real(kind=pr), intent(out) :: dBij(:,:)

private subroutine BmixMHV(self, n, bi, B, dBi, dBij)

Quadratinc mixing rule for the repulsive parameter, using as a combining rule.

Read more…

Arguments

Type IntentOptional Attributes Name
class(MHV), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: bi(:)
real(kind=pr), intent(out) :: B
real(kind=pr), intent(out) :: dBi(:)
real(kind=pr), intent(out) :: dBij(:,:)

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

Arguments

Type IntentOptional Attributes Name
class(HV), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: d1i(:)
real(kind=pr), intent(out) :: D1
real(kind=pr), intent(out) :: dD1i(:)
real(kind=pr), intent(out) :: dD1ij(:,:)

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

Arguments

Type IntentOptional Attributes Name
class(HV_NRTL), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: d1i(:)
real(kind=pr), intent(out) :: D1
real(kind=pr), intent(out) :: dD1i(:)
real(kind=pr), intent(out) :: dD1ij(:,:)

private subroutine D1MixMHV(self, n, d1i, D1, dD1i, dD1ij)

Arguments

Type IntentOptional Attributes Name
class(MHV), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: d1i(:)
real(kind=pr), intent(out) :: D1
real(kind=pr), intent(out) :: dD1i(:)
real(kind=pr), intent(out) :: dD1ij(:,:)

private subroutine DmixHV(self, n, T, ai, daidt, daidt2, D, dDdT, dDdT2, dDi, dDidT, dDij)

Arguments

Type IntentOptional Attributes Name
class(HV), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: T
real(kind=pr), intent(in) :: ai(:)
real(kind=pr), intent(in) :: daidt(:)
real(kind=pr), intent(in) :: daidt2(:)
real(kind=pr), intent(out) :: D
real(kind=pr), intent(out) :: dDdT
real(kind=pr), intent(out) :: dDdT2
real(kind=pr), intent(out) :: dDi(:)
real(kind=pr), intent(out) :: dDidT(:)
real(kind=pr), intent(out) :: dDij(:,:)

private subroutine DmixHVNRTL(self, n, T, ai, daidt, daidt2, D, dDdT, dDdT2, dDi, dDidT, dDij)

Arguments

Type IntentOptional Attributes Name
class(HV_NRTL), intent(in) :: self
real(kind=pr), intent(in) :: n(:)
real(kind=pr), intent(in) :: T
real(kind=pr), intent(in) :: ai(:)
real(kind=pr), intent(in) :: daidt(:)
real(kind=pr), intent(in) :: daidt2(:)
real(kind=pr), intent(out) :: D
real(kind=pr), intent(out) :: dDdT
real(kind=pr), intent(out) :: dDdT2
real(kind=pr), intent(out) :: dDi(:)
real(kind=pr), intent(out) :: dDidT(:)
real(kind=pr), intent(out) :: dDij(:,:)