find_hpl Function

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

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]

integer, intent(in) :: max_points

Return Value type(PTEnvel2)


Calls

proc~~find_hpl~~CallsGraph proc~find_hpl find_hpl proc~lnphi_pt ArModel%lnphi_pt proc~find_hpl->proc~lnphi_pt proc~pt_envelope_2ph pt_envelope_2ph proc~find_hpl->proc~pt_envelope_2ph proc~lnphi_vt ArModel%lnphi_vt proc~lnphi_pt->proc~lnphi_vt proc~volume~3 ArModel%volume proc~lnphi_pt->proc~volume~3 interface~optval optval proc~pt_envelope_2ph->interface~optval proc~continuation continuation proc~pt_envelope_2ph->proc~continuation proc~optval_character optval_character interface~optval->proc~optval_character proc~optval_integer optval_integer interface~optval->proc~optval_integer proc~optval_real optval_real interface~optval->proc~optval_real proc~full_newton full_newton proc~continuation->proc~full_newton proc~solve_system solve_system proc~continuation->proc~solve_system residual_helmholtz residual_helmholtz proc~lnphi_vt->residual_helmholtz get_v0 get_v0 proc~volume~3->get_v0 interface~newton newton proc~volume~3->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d proc~full_newton->proc~solve_system none~dgesv dgesv proc~solve_system->none~dgesv

Variables

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