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 ArModel%volume proc~lnphi_pt->proc~volume interface~optval optval proc~pt_envelope_2ph->interface~optval proc~continuation continuation proc~pt_envelope_2ph->proc~continuation proc~pt_envelope pt_envelope proc~pt_envelope_2ph->proc~pt_envelope 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 proc~pt_envelope->interface~optval proc~check_critical_jump check_critical_jump proc~pt_envelope->proc~check_critical_jump proc~detect_critical~2 detect_critical proc~pt_envelope->proc~detect_critical~2 proc~get_values_from_x~4 PTEnvelMP%get_values_from_X proc~pt_envelope->proc~get_values_from_x~4 proc~solve_point~5 PTEnvelMP%solve_point proc~pt_envelope->proc~solve_point~5 proc~update_specification~4 update_specification proc~pt_envelope->proc~update_specification~4 get_v0 get_v0 proc~volume->get_v0 interface~newton newton proc~volume->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d proc~interpol interpol proc~check_critical_jump->proc~interpol proc~detect_critical~2->proc~interpol proc~full_newton->proc~solve_system proc~solve_point~5->proc~get_values_from_x~4 proc~solve_point~5->proc~solve_system proc~pt_f_np~3 pt_F_NP proc~solve_point~5->proc~pt_f_np~3 none~dgesv dgesv proc~solve_system->none~dgesv proc~update_specification~4->proc~solve_system proc~near_critical near_critical proc~update_specification~4->proc~near_critical proc~pt_f_np~3->proc~lnphi_pt dvnvdb dvnvdb proc~pt_f_np~3->dvnvdb dvnvdlnkl dvnvdlnkl proc~pt_f_np~3->dvnvdlnkl dvnvdn dvnvdn proc~pt_f_np~3->dvnvdn dvwdb dvwdb proc~pt_f_np~3->dvwdb dvwdlnkl dvwdlnkl proc~pt_f_np~3->dvwdlnkl

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))