private subroutine lnphi_vt(eos, n, V, T, P, lnPhi, dlnPhidP, dlnPhidT, dlnPhidn, dPdV, dPdT, dPdn, lnPhiP)
Calculate natural logarithm of fugacity coefficent.
Calculate the natural logarithm of the fugacity coefficient and its
derivatives given volume and temperature. The routine gives the
possibility to calculate the pressure and it’s derivatives.
Examples
eos = PengRobinson76 ( Tc , Pc , w )
n = [ 1.0_pr , 1.0_pr ]
T = 30 0.0_pr
V = 1.0_pr
call eos % lnphi_vt (&
n , V , T , lnPhi = lnPhi , &
dlnPhidP = dlnPhidP , dlnPhidT = dlnPhidT , dlnPhidn = dlnPhidn &
)
Type Bound
ArModel
Arguments
Type
Intent Optional Attributes
Name
class(ArModel )
::
eos
Model
real(kind=pr),
intent(in)
::
n (:)
Mixture mole numbers
real(kind=pr),
intent(in)
::
V
Volume [L]
real(kind=pr),
intent(in)
::
T
Temperature [K]
real(kind=pr),
intent(out),
optional
::
P
Pressure [bar]
real(kind=pr),
intent(out),
optional
::
lnPhi (size(n))
vector
real(kind=pr),
intent(out),
optional
::
dlnPhidP (size(n))
Presssure derivative
real(kind=pr),
intent(out),
optional
::
dlnPhidT (size(n))
Temp derivative
real(kind=pr),
intent(out),
optional
::
dlnPhidn (size(n),size(n))
compositional derivative
real(kind=pr),
intent(out),
optional
::
dPdV
real(kind=pr),
intent(out),
optional
::
dPdT
real(kind=pr),
intent(out),
optional
::
dPdn (:)
real(kind=pr),
intent(out),
optional
::
lnPhiP (:)
. It is useful to calculate fugacity coefficients
at negatives pressures.
proc~~lnphi_vt~~CallsGraph
proc~lnphi_vt
ArModel%lnphi_vt
residual_helmholtz
residual_helmholtz
proc~lnphi_vt->residual_helmholtz
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Type Bound Procedure
Type Bound Procedure
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
proc~~lnphi_vt~~CalledByGraph
proc~lnphi_vt
ArModel%lnphi_vt
proc~ar_consistency
ar_consistency
proc~ar_consistency->proc~lnphi_vt
proc~lnphi_pt
ArModel%lnphi_pt
proc~lnphi_pt->proc~lnphi_vt
none~diff~3
diff
none~diff~3->proc~lnphi_pt
none~foo~3
foo
none~foo~3->proc~lnphi_pt
none~foo~4
foo
none~foo~4->proc~lnphi_pt
proc~find_hpl
find_hpl
proc~find_hpl->proc~lnphi_pt
proc~find_llcl
find_llcl
proc~find_llcl->proc~lnphi_pt
proc~pt_f_np
pt_F_NP
proc~pt_f_np->proc~lnphi_pt
proc~pt_f_np~2
pt_F_NP
proc~pt_f_np~2->proc~lnphi_pt
proc~pt_f_np~3
pt_F_NP
proc~pt_f_np~3->proc~lnphi_pt
proc~pt_f_three_phases
pt_F_three_phases
proc~pt_f_three_phases->proc~lnphi_pt
proc~px_f_np
px_F_NP
proc~px_f_np->proc~lnphi_pt
proc~px_f_three_phases
px_F_three_phases
proc~px_f_three_phases->proc~lnphi_pt
proc~saturation_pressure
saturation_pressure
proc~saturation_pressure->proc~lnphi_pt
proc~solve_tp
solve_TP
proc~saturation_pressure->proc~solve_tp
proc~saturation_temperature
saturation_temperature
proc~saturation_temperature->proc~lnphi_pt
proc~saturation_temperature->proc~solve_tp
proc~saturation_tp
saturation_TP
proc~saturation_tp->proc~lnphi_pt
proc~tx_f_np
tx_F_NP
proc~tx_f_np->proc~lnphi_pt
none~wrap~2
wrap
none~wrap~2->proc~saturation_tp
proc~psat_pure
ArModel%Psat_pure
proc~psat_pure->none~diff~3
proc~px_envelope_2ph
px_envelope_2ph
proc~px_envelope_2ph->none~foo~4
proc~solve_generalized_point
solve_generalized_point
proc~solve_generalized_point->proc~pt_f_np~3
proc~solve_mp_flash_point
solve_mp_flash_point
proc~solve_mp_flash_point->proc~pt_f_np~2
proc~solve_point
PXEnvelMP%solve_point
proc~solve_point->proc~px_f_np
proc~solve_point~2
solve_point
proc~solve_point~2->proc~px_f_three_phases
proc~solve_point~4
PTEnvelMP%solve_point
proc~solve_point~4->proc~pt_f_np
proc~solve_point~5
solve_point
proc~solve_point~5->proc~pt_f_three_phases
proc~solve_point~7
TXEnvelMP%solve_point
proc~solve_point~7->proc~tx_f_np
proc~tx_envelope_2ph
tx_envelope_2ph
proc~tx_envelope_2ph->none~foo~3
proc~create_generalized_isoz_line
create_generalized_isoz_line
proc~create_generalized_isoz_line->proc~solve_generalized_point
proc~get_critical_constants
get_critical_constants
proc~get_critical_constants->proc~psat_pure
proc~pt_envelope
pt_envelope
proc~pt_envelope->proc~solve_point~4
proc~pt_envelope_3ph
pt_envelope_3ph
proc~pt_envelope_3ph->proc~solve_point~5
proc~pt_mp_flash
pt_mp_flash
proc~pt_mp_flash->proc~solve_mp_flash_point
proc~px_envelope
px_envelope
proc~px_envelope->proc~solve_point
proc~px_envelope_3ph
px_envelope_3ph
proc~px_envelope_3ph->proc~solve_point~2
proc~refit_rkpr_k
refit_rkpr_k
proc~refit_rkpr_k->proc~psat_pure
proc~solve_tp->none~wrap~2
proc~tx_envelope
tx_envelope
proc~tx_envelope->proc~solve_point~7
proc~init_pcsaft
init_pcsaft
proc~init_pcsaft->proc~get_critical_constants
proc~rkpr
RKPR
proc~rkpr->proc~refit_rkpr_k
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Type Bound Procedure
Type Bound Procedure
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Variables
Type
Visibility Attributes
Name
Initial
real(kind=pr),
private
::
Ar
real(kind=pr),
private
::
ArTV
real(kind=pr),
private,
dimension(size(n))
::
ArTn
real(kind=pr),
private
::
ArV
real(kind=pr),
private
::
ArV2
real(kind=pr),
private,
dimension(size(n))
::
ArVn
real(kind=pr),
private,
dimension(size(n))
::
Arn
real(kind=pr),
private
::
Arn2 (size(n),size(n))
real(kind=pr),
private
::
P_in
real(kind=pr),
private
::
RT
real(kind=pr),
private
::
Z
real(kind=pr),
private
::
Z_P
real(kind=pr),
private
::
dPdT_in
real(kind=pr),
private
::
dPdV_in
real(kind=pr),
private
::
dPdn_in (size(n))
integer,
private
::
i
integer,
private
::
j
integer,
private
::
nc
real(kind=pr),
private
::
totn