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



Interfaces

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) ::  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

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 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 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(:,:)