pt_envelope_3ph Function

public function pt_envelope_3ph(model, z, x0, y0, w0, beta0, P0, T0, ns0, dS0, points) result(envelope)

pt_envelope_3ph

Description

Trace a three-phase pressure-temperature envelope at fixed feed z.

The initial phase compositions, pressure, temperature, and phase fraction define the starting state. Subsequent points are generated by continuation and corrected by solving the three-phase equilibrium equations. The returned arrays contain only points that converged.

Arguments

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

Residual Helmholtz model.

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

Overall feed composition.

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

Initial composition of phase x.

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

Initial composition of phase y.

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

Initial composition of phase w.

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

Initial phase-split parameter.

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

Initial pressure [bar].

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

Initial temperature [K].

integer, intent(in) :: ns0

Index of the specified variable in , with , .

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

Initial signed continuation step.

integer, intent(in) :: points

Maximum number of envelope points requested.

Return Value type(PTEnvel3)


Calls

proc~~pt_envelope_3ph~~CallsGraph proc~pt_envelope_3ph pt_envelope_3ph proc~detect_critical~2 detect_critical proc~pt_envelope_3ph->proc~detect_critical~2 proc~get_values_from_x~4 get_values_from_X proc~pt_envelope_3ph->proc~get_values_from_x~4 proc~solve_point~5 solve_point proc~pt_envelope_3ph->proc~solve_point~5 proc~update_specification~4 update_specification proc~pt_envelope_3ph->proc~update_specification~4 proc~critical_interpol critical_interpol proc~detect_critical~2->proc~critical_interpol proc~pt_f_three_phases pt_F_three_phases proc~solve_point~5->proc~pt_f_three_phases proc~solve_system solve_system proc~solve_point~5->proc~solve_system proc~update_specification~4->proc~solve_system proc~lnphi_pt ArModel%lnphi_pt proc~pt_f_three_phases->proc~lnphi_pt none~dgesv dgesv proc~solve_system->none~dgesv proc~lnphi_vt ArModel%lnphi_vt proc~lnphi_pt->proc~lnphi_vt proc~volume~2 ArModel%volume proc~lnphi_pt->proc~volume~2 residual_helmholtz residual_helmholtz proc~lnphi_vt->residual_helmholtz get_v0 get_v0 proc~volume~2->get_v0 interface~newton newton proc~volume~2->interface~newton proc~newton_1d newton_1d interface~newton->proc~newton_1d

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: F(size(z)*2+3)
real(kind=pr), private :: P(points)
real(kind=pr), private :: S

Specified value

real(kind=pr), private :: T(points)
real(kind=pr), private :: Xvars(size(z)*2+3)
real(kind=pr), private :: beta(points)

Phase fraction.

real(kind=pr), private :: dF(size(z)*2+3,size(z)*2+3)
real(kind=pr), private :: dS

Specified value step for next point extrapolation

real(kind=pr), private :: dX(size(z)*2+3)
real(kind=pr), private :: dXdS(size(z)*2+3)
integer, private :: i

Loop/index variable.

integer, private :: iterations(points)
integer, private :: its

Iteration count.

real(kind=pr), private :: kx(size(z))
real(kind=pr), private :: ky(size(z))
integer, private :: max_iterations
integer, private :: nc

Number of components.

integer, private :: ns

Specified variable

real(kind=pr), private :: w(points,size(z))

Reference/trial phase composition.

real(kind=pr), private :: wi(size(z))
real(kind=pr), private :: x(points,size(z))
real(kind=pr), private :: xi(size(z))
real(kind=pr), private :: y(points,size(z))

Phase-y composition at each point.

real(kind=pr), private :: yi(size(z))