zTVTERMO Subroutine

public subroutine zTVTERMO(nc, indic, t, rn, v, p, dpv, PHILOG, DLPHIP, DLPHIT, FUGN)

zTVTERMO

Evaluate legacy thermodynamic properties at fixed composition, temperature, and volume.

Description

Calculates pressure, its volume derivative, fugacity coefficients, and their pressure/temperature/composition derivatives from global model settings. Calculation of lnphiP and derivatives rn mixture mole numbers (input) t temperature (k) (input) v volume (L) (input) p pressure (bar) (output) PHILOG vector of ln(phi(i)P) (output) 0 < INDIC < 5 DLPHIT t-derivative of ln(phi(i)) (const P, n) (output) 0 < INDIC = 2 or 4 DLPHIP P-derivative of ln(phi(i)) (const T, n) (output) 0 < INDIC < 5 FUGN comp-derivative of ln(phi(i)) (const t & P)(output) 2 < INDIC


Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nc

Number of active components.

integer, intent(in) :: indic

Selects the requested outputs (see the INDIC table above).

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

Temperature [K].

real(kind=pr), intent(in) :: rn(nc)

Component mole amounts used in mixture rules.

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

Total volume [L].

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

Pressure [bar].

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

Pressure derivative with respect to volume.

real(kind=pr), intent(out) :: PHILOG(nc)

vector.

real(kind=pr), intent(out) :: DLPHIP(nc)

Pressure derivatives of logarithmic fugacity coefficients.

real(kind=pr), intent(out) :: DLPHIT(nc)

Temperature derivatives of logarithmic fugacity coefficients.

real(kind=pr), intent(out) :: FUGN(nc,nc)

Composition derivatives of at constant .


Calls

proc~~ztvtermo~~CallsGraph proc~ztvtermo zTVTERMO proc~arvnder ArVnder proc~ztvtermo->proc~arvnder

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: ArTn(nc)
real(kind=pr), public :: ArVn(nc)
real(kind=pr), public :: Arn(nc)
real(kind=pr), public :: Arn2(nc,nc)
real(kind=pr), public :: DPDN(nc)
real(kind=pr), public :: RT
real(kind=pr), public :: Z

Feed or overall composition.

real(kind=pr), public :: ar
real(kind=pr), public :: artv
real(kind=pr), public :: arv
real(kind=pr), public :: arv2
real(kind=pr), public :: dpdt
integer, public :: i

Loop/index variable.

integer, public :: igz
integer, public :: k
integer, public :: nder
integer, public :: ntemp
real(kind=pr), public :: totn

Total number of moles.