Michelsen’s modified function, .
Alternative formulation of the reduced tangent plane function, where the test phase is defined in moles, which enables for unconstrained minimization.
tm
tm = tpd(model, z, w, P, T)
---------------------------
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)
---------------------------
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ArModel), | 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(:) |
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 |