public function tm(model, z, w, P, T, d, dtpd)
Michelsen’s modified function, .
Description
Alternative formulation of the reduced tangent plane function,
where the test phase is defined in moles, which enables for unconstrained
minimization.
Examples
Calculation of tm
tm = tpd ( model , z , w , P , T )
---------------------------
Using precalculated trial-phase data
It is possible to calculate externaly the d_i vector and use it for
later calculations.
call fugacity_tp (&
model , z , T = T , P = P , V = Vz , root_type = "stable" , lnphip = lnphi_z &
)
lnphi_z = lnphi_z - log ( P )
di = log ( z ) + lnphi_z
tm = tpd ( model , z , w , P , T , d = di )
---------------------------
References
Thermodynamic Models: Fundamental and Computational Aspects, Michael L.
Michelsen, Jørgen M. Mollerup. Tie-Line Publications, Denmark (2004)
doi
Arguments
Type
Intent Optional Attributes
Name
class(BaseModel ),
intent(in)
::
model
Thermodynamic model
real(kind=pr),
intent(in)
::
z (:)
Feed composition
real(kind=pr),
intent(in)
::
w (:)
Test-phase mole numbers vector
real(kind=pr),
intent(in)
::
P
Pressure [bar]
real(kind=pr),
intent(in)
::
T
Temperature [K]
real(kind=pr),
intent(in),
optional
::
d (:)
vector
real(kind=pr),
intent(out),
optional
::
dtpd (:)
Return Value
real(kind=pr)
proc~~tm~~CallsGraph
proc~tm
tm
ln_activity_coefficient
ln_activity_coefficient
proc~tm->ln_activity_coefficient
lnphi_pt
lnphi_pt
proc~tm->lnphi_pt
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~~tm~~CalledByGraph
proc~tm
tm
proc~create_generalized_isoz_line
create_generalized_isoz_line
proc~create_generalized_isoz_line->proc~tm
proc~min_tpd
min_tpd
proc~min_tpd->proc~tm
proc~pt_mp_flash
pt_mp_flash
proc~pt_mp_flash->proc~min_tpd
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),
public
::
di (size(z))
real(kind=pr),
public
::
lnphi_w (size(z))
real(kind=pr),
public
::
lnphi_z (size(z))
real(kind=pr),
public
::
vw
real(kind=pr),
public
::
vz