Psat_pure Function

private function Psat_pure(eos, ncomp, T, Vl, Vv, converged)

Psat_pure

Description

Calculation of saturation pressure of a pure component. Liquid and vapor volumes are initialized at 100 bar and 0.001 bar, then solve_point_psat applies Newton iterations at fixed temperature. The returned value is the pressure evaluated at the converged liquid volume [bar].

Type Bound

ArModel

Arguments

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

Model that will be used

integer, intent(in) :: ncomp

Number of component in the mixture from which the saturation pressure will be calculated

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

Temperature [K]

real(kind=pr), intent(out) :: Vl

Liquid volume [L]

real(kind=pr), intent(out) :: Vv

Vapor volume [L]

logical, intent(out), optional :: converged

The calculation converged

Return Value real(kind=pr)


Calls

proc~~psat_pure~~CallsGraph proc~psat_pure ArModel%Psat_pure proc~pressure ArModel%pressure proc~psat_pure->proc~pressure proc~solve_point_psat solve_point_psat proc~psat_pure->proc~solve_point_psat proc~volume~2 ArModel%volume proc~psat_pure->proc~volume~2 residual_helmholtz residual_helmholtz proc~pressure->residual_helmholtz get_v0 get_v0 proc~solve_point_psat->get_v0 none~isofugacity isofugacity proc~solve_point_psat->none~isofugacity proc~solve_system solve_system proc~solve_point_psat->proc~solve_system proc~volume~2->get_v0 interface~newton newton proc~volume~2->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d proc~lnfug_vt ArModel%lnfug_vt none~isofugacity->proc~lnfug_vt none~dgesv dgesv proc~solve_system->none~dgesv proc~lnfug_vt->residual_helmholtz

Called by

proc~~psat_pure~~CalledByGraph proc~psat_pure ArModel%Psat_pure proc~estimate_critical_point estimate_critical_point proc~estimate_critical_point->proc~psat_pure proc~get_critical_constants get_critical_constants proc~get_critical_constants->proc~psat_pure proc~init_pcsaft init_pcsaft proc~init_pcsaft->proc~psat_pure proc~find_critical_points_all_components find_critical_points_all_components proc~init_pcsaft->proc~find_critical_points_all_components proc~refit_rkpr_k refit_rkpr_k proc~refit_rkpr_k->proc~psat_pure proc~find_critical_points_all_components->proc~estimate_critical_point proc~rkpr RKPR proc~rkpr->proc~refit_rkpr_k

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: F(3)

Residual or scalar equation value.

real(kind=pr), private :: Pc(size(eos))
real(kind=pr), private :: S
real(kind=pr), private :: X(3)

Variables

real(kind=pr), private :: dF(3,3)
integer, private :: its

Iteration count.

real(kind=pr), private :: n(size(eos))

Mole numbers selecting the pure component [mol]

integer, private, parameter :: ns = 3