DmixHV Subroutine

public subroutine DmixHV(n, T, bi, B, dBi, dBij, D1, dD1i, dD1ij, ai, daidt, daidt2, Ge, GeT, GeT2, Gen, GeTn, Gen2, D, dDdT, dDdT2, dDi, dDidT, dDij)

DmixHV

Attractive parameter calculation for the Huron-Vidal mixing rule.

Description

This subroutine calculates the attractive parameter and its derivatives for a mixture using the Huron-Vidal mixing rule. The Huron-Vidal mixing rule combines the pure component parameters using an excess Gibbs energy model. The expression of the attractive parameter is:

where is evaluated by lamdba_hv from the mixture . The excess Gibbs energy and its derivatives are supplied by the caller, normally from a GeModel evaluated at .

References

Huron, M.-J., and J. Vidal, Fluid Phase Equilibria 3 (1979) 255-271.

Arguments

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

Component mole amounts [mol]

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

Temperature [K]

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

Pure-component covolumes [L/mol]

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

Mixture covolume [L]

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

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

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

Mixture

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

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

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(in) :: Ge

Excess Gibbs energy [bar L]

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

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

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

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

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

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

Mixture attractive parameter [bar L^2]

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

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

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

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

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


Calls

proc~~dmixhv~2~~CallsGraph proc~dmixhv~2 DmixHV proc~lamdba_hv lamdba_hv proc~dmixhv~2->proc~lamdba_hv

Called by

proc~~dmixhv~2~~CalledByGraph proc~dmixhv~2 DmixHV proc~dmixhv HV%DmixHV proc~dmixhv->proc~dmixhv~2 proc~dmixhvnrtl HV_NRTL%DmixHVNRTL proc~dmixhvnrtl->proc~dmixhv~2

Variables

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

Infinite-pressure parameter

real(kind=pr), public :: dL(size(n))
real(kind=pr), public :: dL2(size(n),size(n))
real(kind=pr), public :: f

Residual or scalar equation value.

real(kind=pr), public :: fdi(size(n))
real(kind=pr), public :: fdij(size(n),size(n))
real(kind=pr), public :: fdit(size(n))
real(kind=pr), public :: fdt
real(kind=pr), public :: fdt2

Second-order intermediate quantity used by this procedure.

integer, public :: i

Loop index i.

integer, public :: j

Loop index j.

integer, public :: nc

Number of components.

real(kind=pr), public :: totn

Total number of moles