private subroutine lnfug_vt(eos, n, V, T, P, lnf, dlnfdV, dlnfdT, dlnfdn, dPdV, dPdT, dPdn)
Calculate natural logarithm of fugacity given volume and temperature.
Calculate the natural logarithm of the fugacity and its derivatives.
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 % lnfug_vt (&
n , V , T , lnf = lnf , &
dlnfdV = dlnfdV , dlnfdT = dlnfdT , dlnfdn = dlnfdn &
)
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
::
lnf (size(n))
vector
real(kind=pr),
intent(out),
optional
::
dlnfdV (size(n))
Volume derivative
real(kind=pr),
intent(out),
optional
::
dlnfdT (size(n))
Temp derivative
real(kind=pr),
intent(out),
optional
::
dlnfdn (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 (:)
proc~~lnfug_vt~~CallsGraph
proc~lnfug_vt
ArModel%lnfug_vt
residual_helmholtz
residual_helmholtz
proc~lnfug_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~~lnfug_vt~~CalledByGraph
proc~lnfug_vt
ArModel%lnfug_vt
none~isofugacity
isofugacity
none~isofugacity->proc~lnfug_vt
proc~f_cep
F_cep
proc~f_cep->proc~lnfug_vt
proc~lambda1
lambda1
proc~f_cep->proc~lambda1
proc~lambda1->proc~lnfug_vt
proc~saturation_f
saturation_F
proc~saturation_f->proc~lnfug_vt
proc~stability_check
stability_check
proc~stability_check->proc~lnfug_vt
proc~three_phase_line_f
three_phase_line_F
proc~three_phase_line_f->proc~lnfug_vt
proc~critical_line
critical_line
proc~critical_line->proc~lambda1
proc~f_critical
F_critical
proc~critical_line->proc~f_critical
proc~look_for_cep
look_for_cep
proc~critical_line->proc~look_for_cep
proc~df_critical
df_critical
proc~critical_line->proc~df_critical
proc~critical_point
critical_point
proc~critical_point->proc~lambda1
proc~critical_point->proc~f_critical
proc~critical_point->proc~df_critical
proc~df_cep
df_cep
proc~df_cep->proc~f_cep
proc~f_critical->proc~lambda1
proc~look_for_cep->proc~f_cep
proc~look_for_cep->proc~stability_check
proc~look_for_cep->proc~df_cep
proc~solve_point~6
solve_point
proc~solve_point~6->none~isofugacity
proc~solve_vxvyt
solve_VxVyT
proc~solve_vxvyt->proc~saturation_f
proc~three_phase_line_f_solve
three_phase_line_F_solve
proc~three_phase_line_f_solve->proc~three_phase_line_f
proc~binary_llv_from_cep
binary_llv_from_cep
proc~binary_llv_from_cep->proc~three_phase_line_f_solve
proc~df_critical->proc~f_critical
proc~get_critical_constants
get_critical_constants
proc~get_critical_constants->proc~critical_point
proc~pure_saturation_line
pure_saturation_line
proc~pure_saturation_line->proc~solve_point~6
proc~init_pcsaft
init_pcsaft
proc~init_pcsaft->proc~get_critical_constants
proc~refit_rkpr_k
refit_rkpr_k
proc~refit_rkpr_k->proc~pure_saturation_line
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
::
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