Dmix Subroutine

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

Uses

  • proc~~dmix~2~~UsesGraph proc~dmix~2 CMR%Dmix module~yaeos__models_ar_cubic_mixing_base yaeos__models_ar_cubic_mixing_base proc~dmix~2->module~yaeos__models_ar_cubic_mixing_base module~yaeos__constants yaeos__constants module~yaeos__models_ar_cubic_mixing_base->module~yaeos__constants iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env

Dmix

Description

Attractive parameter mixing rule with cubic mix.

Takes the all the pure components attractive parameters and their derivatives with respect to temperature and mix them with the cubic (three-body) mixing rule:

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

The combining rule can be replaced by extending CMR and rebinding aijk to a procedure with the same arguments as kijk_constant:

type, extends(CMR) :: MyCMR
contains
   procedure :: aijk => my_aijk
end type MyCMR

Type Bound

CMR

Arguments

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

(zero)

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~2~~CallsGraph proc~dmix~2 CMR%Dmix proc~cmr_dmix CMR_Dmix proc~dmix~2->proc~cmr_dmix proc~kijk_constant CMR%kijk_constant proc~dmix~2->proc~kijk_constant proc~cmr_aijk CMR_aijk proc~kijk_constant->proc~cmr_aijk

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: a(size(ai),size(ai),size(ai))
real(kind=pr), private :: dadt(size(ai),size(ai),size(ai))
real(kind=pr), private :: dadt2(size(ai),size(ai),size(ai))
integer, private :: i

Loop index i.

integer, private :: j

Loop index j.

integer, private :: nc

Number of components.