private subroutine ln_activity_coefficient(eos, n, P, T, root_type, lngamma, dlngammadP, dlngammadT, dlngammadn)
Calculate natural logarithm of activity coefficients and its
derivatives given pressure and temperature.
Examples
```fortran ! eos = PengRobinson76(Tc, Pc, w)
n = [1.0_pr, 1.0_pr] ! T = 300.0_pr ! P = 1.0_pr
call eos%ln_activity_coefficient(&
n, P, T, root_type=”stable”, &
lngamma=lngamma, dlngammadP=dlngammadP, &
dlngammadT=dlngammadT, dlngammadn=dlngammadn &
)
```
Type Bound
ArModel
Arguments
Type
Intent Optional Attributes
Name
class(ArModel ),
intent(in)
::
eos
Model
real(kind=pr),
intent(in)
::
n (:)
Moles number vector
real(kind=pr),
intent(in)
::
P
Pressure [bar]
real(kind=pr),
intent(in)
::
T
Temperature [K]
character(len=*),
intent(in)
::
root_type
Desired root-type to solve. Options are:
["liquid", "vapor", "stable"]
real(kind=pr),
intent(out),
optional
::
lngamma (size(n))
Natural logarithm of activity coefficient
real(kind=pr),
intent(out),
optional
::
dlngammadP (size(n))
real(kind=pr),
intent(out),
optional
::
dlngammadT (size(n))
real(kind=pr),
intent(out),
optional
::
dlngammadn (size(n),size(n))
proc~~ln_activity_coefficient~3~~CallsGraph
proc~ln_activity_coefficient~3
ArModel%ln_activity_coefficient
proc~lnphi_pt
ArModel%lnphi_pt
proc~ln_activity_coefficient~3->proc~lnphi_pt
proc~lnphi_vt
ArModel%lnphi_vt
proc~lnphi_pt->proc~lnphi_vt
proc~volume~2
ArModel%volume
proc~lnphi_pt->proc~volume~2
residual_helmholtz
residual_helmholtz
proc~lnphi_vt->residual_helmholtz
get_v0
get_v0
proc~volume~2->get_v0
interface~newton
newton
proc~volume~2->interface~newton
proc~newton_1d
newton_1d
interface~newton->proc~newton_1d
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~~ln_activity_coefficient~3~~CalledByGraph
proc~ln_activity_coefficient~3
ArModel%ln_activity_coefficient
proc~enthalpy_excess
ArModel%enthalpy_excess
proc~enthalpy_excess->proc~ln_activity_coefficient~3
proc~entropy_excess
ArModel%entropy_excess
proc~entropy_excess->proc~ln_activity_coefficient~3
proc~gibbs_excess
ArModel%gibbs_excess
proc~gibbs_excess->proc~ln_activity_coefficient~3
proc~helmholtz_excess
ArModel%helmholtz_excess
proc~helmholtz_excess->proc~ln_activity_coefficient~3
proc~internal_energy_excess
ArModel%internal_energy_excess
proc~internal_energy_excess->proc~ln_activity_coefficient~3
proc~volume_excess
ArModel%volume_excess
proc~volume_excess->proc~ln_activity_coefficient~3
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
::
dPdV
real(kind=pr),
private
::
dPdn (size(n))
real(kind=pr),
private
::
dVdn (size(n))
real(kind=pr),
private
::
dlnPhi_i_dT (size(n))
real(kind=pr),
private
::
dlnPhi_i_dT_temp (size(n))
real(kind=pr),
private
::
dlnPhidT (size(n))
real(kind=pr),
private
::
dlnPhidn (size(n),size(n))
logical,
private
::
dn
logical,
private
::
dp
logical,
private
::
dt
logical,
private
::
gam
integer,
private
::
i
real(kind=pr),
private
::
lnPhi (size(n))
real(kind=pr),
private
::
lnPhi_i (size(n))
real(kind=pr),
private
::
lnPhi_i_temp (size(n))
real(kind=pr),
private
::
npure (size(n))
logical,
private
::
present_derivs
real(kind=pr),
private
::
vi (size(n))
real(kind=pr),
private
::
vi_temp