yaeos__models_ar_cubic_quadratic_mixing Module

Quadratic Mixing Rules for Cubic EoS.



Abstract Interfaces

abstract interface

  • public subroutine get_aij(self, T, ai, daidt, daidt2, aij, daijdt, daijdt2)

    Combining rule for the attractive parameter.

    From previously calculated attractive parameters calculate the matrix and it’s corresponding derivatives.

    Arguments

    Type IntentOptional Attributes Name
    class(QMR), intent(in) :: self
    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) :: aij(:,:)
    real(kind=pr), intent(out) :: daijdt(:,:)
    real(kind=pr), intent(out) :: daijdt2(:,:)

Derived Types

type, public, extends(CubicMixRule) ::  QMR

Quadratic Mixing Rule (QMR) derived type. Classic Van der Waals mixing rules.

Read more…

Components

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

Calculate second order derivatives

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

Attractive Binary Interatction parameter matrix

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

Repulsive Binary Interatction parameter matrix

Type-Bound Procedures

procedure, public :: Bmix ../../../

Repulsive parameter mixing rule

procedure, public :: D1mix => D1mix_constant
procedure, public :: Dmix ../../../

Attractive parameter mixing rule

procedure, public :: aij => kij_constant ../../../

Default attractive parameter combining rule

type, public, extends(QMR) ::  QMRTD

Components

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

Calculate second order derivatives

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

Attractive Binary Interatction parameter matrix

real(kind=pr), public, allocatable :: k0(:,:)
real(kind=pr), public, allocatable :: l(:,:)

Repulsive Binary Interatction parameter matrix

Type-Bound Procedures

procedure, public :: Bmix ../../../

Repulsive parameter mixing rule

procedure, public :: D1mix => D1mix_constant
procedure, public :: Dmix ../../../

Attractive parameter mixing rule

procedure, public :: aij => kij_exp_tdep

type, public, extends(QMR) ::  QMR_RKPR

Components

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

Calculate second order derivatives

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

Attractive Binary Interatction parameter matrix

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

Repulsive Binary Interatction parameter matrix

Type-Bound Procedures

procedure, public :: Bmix ../../../

Repulsive parameter mixing rule

procedure, public :: D1Mix => RKPR_D1mix
procedure, public :: Dmix ../../../

Attractive parameter mixing rule

procedure, public :: aij => kij_constant ../../../

Default attractive parameter combining rule


Subroutines

public subroutine Bmix(self, n, bi, B, dBi, dBij)

Mixture repulsive parameter.

Read more…

Arguments

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

Mixing rule object.

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

Moles vector.

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

Pure components repulsive parameters.

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

Mixture repulsive parameter.

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

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

public subroutine D1mix_constant(self, n, d1i, D1, dD1i, dD1ij)

Constant parameter.

Read more…

Arguments

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

Mixing rule

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

Moles vector

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

parameter

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

Mixture’s

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

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

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

Attractive parameter mixing rule with quadratic mix.

Read more…

Arguments

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

Mixing rule object.

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

Moles vector [mol]

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

public subroutine RKPR_D1mix(self, n, d1i, D1, dD1i, dD1ij)

RKPR parameter mixing rule.

Read more…

Arguments

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

public subroutine kij_constant(self, T, a, dadt, dadt2, aij, daijdt, daijdt2)

Combining rule that uses constant values.

Read more…

Arguments

Type IntentOptional Attributes Name
class(QMR), intent(in) :: self
real(kind=pr), intent(in) :: T

Temperature [K]

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

Pure components attractive parameters (\a_i)

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

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

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

Matrix

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

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

public subroutine kij_exp_tdep(self, T, a, dadt, dadt2, aij, daijdt, daijdt2)

Combining rule that uses temperature dependant values. With the following expression:

Read more…

Arguments

Type IntentOptional Attributes Name
class(QMRTD), intent(in) :: self
real(kind=pr), intent(in) :: T

Temperature [K]

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

Pure components attractive parameters (\a_i)

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

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

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

Matrix

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

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