yaeos__models_ar_cubic_quadratic_mixing Module

Quadratic cubic-EOS mixing rules

Binary quadratic mixing rules for the attractive and repulsive parameters.

Description

Exports QMR with constant binary interactions and QMRTD with temperature-dependent attractive interactions. QMR uses the classic pair combining rules and can be configured with component-pair matrices.

Examples

rule = QMR(k=kij, l=lij)
call model%set_mixrule(rule)

Uses

  • module~~yaeos__models_ar_cubic_quadratic_mixing~~UsesGraph module~yaeos__models_ar_cubic_quadratic_mixing yaeos__models_ar_cubic_quadratic_mixing module~yaeos__constants yaeos__constants module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__constants module~yaeos__models_ar_cubic_mixing_base yaeos__models_ar_cubic_mixing_base module~yaeos__models_ar_cubic_quadratic_mixing->module~yaeos__models_ar_cubic_mixing_base module~yaeos__models_ar_genericcubic yaeos__models_ar_genericcubic 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 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_genericcubic->module~yaeos__constants module~yaeos__models_ar_genericcubic->module~yaeos__substance module~yaeos__models_ar yaeos__models_ar module~yaeos__models_ar_genericcubic->module~yaeos__models_ar module~yaeos__substance->module~yaeos__constants module~yaeos__models_ar->module~yaeos__constants module~yaeos__models_base yaeos__models_base module~yaeos__models_ar->module~yaeos__models_base module~yaeos__models_base->module~yaeos__substance

Used by

  • module~~yaeos__models_ar_cubic_quadratic_mixing~~UsedByGraph module~yaeos__models_ar_cubic_quadratic_mixing yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models yaeos__models module~yaeos__models->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_ar_cubic_mixing_sddlc yaeos__models_ar_cubic_mixing_sddlc module~yaeos__models->module~yaeos__models_ar_cubic_mixing_sddlc module~yaeos__models_cubic_mixing_rules_huron_vidal yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos__models->module~yaeos__models_cubic_mixing_rules_huron_vidal module~yaeos__models_ar_cubic_mixing_sddlc->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos__models_cubic_mixing_rules_huron_vidal->module~yaeos__models_ar_cubic_quadratic_mixing proc~pengrobinson76 PengRobinson76 proc~pengrobinson76->module~yaeos__models_ar_cubic_quadratic_mixing proc~pengrobinson78 PengRobinson78 proc~pengrobinson78->module~yaeos__models_ar_cubic_quadratic_mixing proc~rkpr RKPR proc~rkpr->module~yaeos__models_ar_cubic_quadratic_mixing proc~soaveredlichkwong SoaveRedlichKwong proc~soaveredlichkwong->module~yaeos__models_ar_cubic_quadratic_mixing module~yaeos yaeos module~yaeos->module~yaeos__models module~yaeos__extra_fluids yaeos__extra_fluids module~yaeos__extra_fluids->module~yaeos__models proc~co2_h2o_isop co2_h2o_isop proc~co2_h2o_isop->module~yaeos__models proc~psrk PSRK proc~psrk->module~yaeos__models_cubic_mixing_rules_huron_vidal

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 its corresponding derivatives.

    Arguments

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

    Mixing rule object.

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

    Temperature [K]

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

    Pure-component attractive parameters

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

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

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

    matrix

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

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


Derived Types

type, public, extends(CubicMixRule) ::  QMR

Classic quadratic (van der Waals one-fluid) mixing rule.

Read more…

Components

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

Calculate second-order mole-number derivatives

logical, public :: is_D_ddlc = .false.

Mixing rule D parameter depends on volume (density)

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

Attractive Binary Interaction parameter matrix

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

Repulsive Binary Interaction 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

type, public, extends(QMR) ::  QMRTD

Quadratic mixing rule with temperature-dependent binary interactions.

Read more…

Components

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

Pair-specific reference temperatures [K].

logical, public :: dn2 = .false.

Calculate second-order mole-number derivatives

logical, public :: is_D_ddlc = .false.

Mixing rule D parameter depends on volume (density)

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

Attractive Binary Interaction parameter matrix

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

Temperature-dependent interaction amplitudes.

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

Repulsive Binary Interaction 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_exp_tdep

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

public subroutine Dmix(self, n, V, T, ai, daidt, daidt2, D, dDdV, dDdT, dDdV2, dDdT2, dDi, dDdTV, dDidV, 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) :: 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(:,:)

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

RKPR parameter mixing rule.

Read more…

Arguments

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

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

Mixing rule object.

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

Temperature [K]

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

Pure components attractive parameters

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 dependent values. With the following expression:

Read more…

Arguments

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

Mixing rule object.

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

Temperature [K]

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

Pure components attractive parameters

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