sDDLC Derived Type

type, public, extends(QMRTD) :: sDDLC

sDDLC

Segmented density-dependent local-composition mixing rule.

Description

Extends QMRTD with segment-size data and a density-dependent local composition correction to the attractive mixture parameter.

Examples

Initialize through the sDDLC constructor and install with model%set_mixrule.


Inherits

type~~sddlc~~InheritsGraph type~sddlc sDDLC type~qmrtd QMRTD type~sddlc->type~qmrtd type~qmr QMR type~qmrtd->type~qmr type~cubicmixrule CubicMixRule type~qmr->type~cubicmixrule

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

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

Pure-component segment sizes


Constructor

public interface sDDLC

  • public function init_sddlc(k, k0, tref, l, q) result(mixrule)

    init_sddlc

    Description

    Create a segmented density-dependent local-composition mixing rule.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=pr), intent(in) :: k(:,:)

    interaction matrix

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

    matrix

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

    Reference-temperature matrix [K]

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

    matrix

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

    Segment sizes

    Return Value type(sDDLC)


Type-Bound Procedures

procedure, public :: Bmix

Repulsive parameter mixing rule

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

procedure, public :: D1mix => RKPR_D1mix

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

procedure, public :: Dmix => ddlc_Dmix

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

    s-DDLC D mixing rule including V, n, and T derivatives.

    Read more…

    Arguments

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

    Mixing rule object.

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

    Component mole amounts [mol]

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

    Total volume [L]

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

    Mixture attractive parameter [bar L^2]

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

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

procedure, public :: aij => kij_exp_tdep

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