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~~UsesGraph proc~dmix CMR%Dmix module~yaeos__models_ar_cubic_mixing_base yaeos__models_ar_cubic_mixing_base proc~dmix->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

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 CMR object, this procedures defaults to the common combining rule:

The procedure can be overloaded by a common one that respects the interface get_aijk

type(CMR) :: my_mixing_rule
my_mixing_rule%aij => new_aij_procedure

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

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 CMR%Dmix proc~cmr_dmix CMR_Dmix proc~dmix->proc~cmr_dmix proc~kijk_constant CMR%kijk_constant proc~dmix->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
integer, private :: j
integer, private :: nc