find_hpl Function

public function find_hpl(model, z, T0, P0)

find_hpl

Description

Find a liquid-liquid phase boundary on the PT plane. At a specified pressure. The procedure consists in looking for the temperature at which the fugacity of a component in the mixture is higher than the fugacity of the same component in a pure phase. This is done for each component in the mixture. The component with the highest temperature is selected as it should be the first one appearing. If all components have a negative difference then the mixture is probably stable at all temperatures.

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model

Equation of state model

real(kind=pr), intent(in) :: z(:)

Mole fractions

real(kind=pr), intent(in) :: T0

Initial temperature [K]

real(kind=pr), intent(in) :: P0

Search pressure [bar]

Return Value type(PTEnvel2)


Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: P
real(kind=pr), public :: T
real(kind=pr), public :: Ts(size(z))
real(kind=pr), public :: diffs(size(z))
type(EquilibriumState), public :: fr
integer, public :: i
real(kind=pr), public :: lnphi_y(size(z))
real(kind=pr), public :: lnphi_z(size(z))
integer, public :: nc
integer, public :: ncomp
real(kind=pr), public :: y(size(z))