Dmix Subroutine

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

Dmix

Description

Attractive parameter mixing rule with quadratic mix.

Takes the all the pure components attractive parameters and their derivatives with respect to temperature and mix them with the Van der Waals quadratic mixing rule:

Inside the routine the matrix is calculated using the procedure contained in the QMR object, this procedures defaults to the common combining rule:

The combining rule can be replaced by extending QMR and rebinding aij to a procedure that respects the interface get_aij:

type, extends(QMR) :: MyQMR
contains
   procedure :: aij => my_aij
end type MyQMR

This rule is volume independent; the volume-derivative outputs are not assigned here (GenericCubic_Ar zeroes them beforehand).

Type Bound

QMR

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


Calls

proc~~dmix~~CallsGraph proc~dmix QMR%Dmix proc~kij_constant QMR%kij_constant proc~dmix->proc~kij_constant

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: aij(size(ai),size(ai))
real(kind=pr), public :: aux

Intermediate accumulator.

real(kind=pr), public :: aux2

Second intermediate accumulator.

real(kind=pr), public :: daijdt(size(ai),size(ai))
real(kind=pr), public :: daijdt2(size(ai),size(ai))
integer, public :: i

Loop index i.

integer, public :: j

Loop index j.

integer, public :: nc

Number of components.