px_envelope_3ph Function

public function px_envelope_3ph(model, z0, zi, T, x0, y0, w0, beta0, P0, a0, ns0, dS0, points) result(envelope)

px_envelope_3ph

Description

Trace a three-phase pressure-composition envelope at fixed temperature. The overall mixture varies as ; the initial phase states and continuation step define the branch. Points are stored only after the equilibrium equations converge.

Arguments

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

Residual Helmholtz model.

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

First limiting composition.

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

Second limiting composition.

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

Fixed temperature [K].

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

Initial composition interpolation parameter.

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.

Return Value type(PXEnvel3)


Calls

proc~~px_envelope_3ph~~CallsGraph proc~px_envelope_3ph px_envelope_3ph proc~detect_critical~3 detect_critical proc~px_envelope_3ph->proc~detect_critical~3 proc~get_values_from_x~5 get_values_from_X proc~px_envelope_3ph->proc~get_values_from_x~5 proc~solve_point~7 solve_point proc~px_envelope_3ph->proc~solve_point~7 proc~update_specification~5 update_specification proc~px_envelope_3ph->proc~update_specification~5 proc~critical_interpol~2 critical_interpol proc~detect_critical~3->proc~critical_interpol~2 proc~get_z get_z proc~get_values_from_x~5->proc~get_z proc~px_f_three_phases px_F_three_phases proc~solve_point~7->proc~px_f_three_phases proc~solve_system solve_system proc~solve_point~7->proc~solve_system proc~update_specification~5->proc~solve_system proc~px_f_three_phases->proc~get_z proc~lnphi_pt ArModel%lnphi_pt proc~px_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(z0)*2+3)
real(kind=pr), private :: P(points)
real(kind=pr), private :: S

Specified value

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

Phase fraction.

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

Specified value step for next point extrapolation

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

Loop/index variable.

integer, private :: its

Iteration count.

real(kind=pr), private :: kx(size(z0))
real(kind=pr), private :: ky(size(z0))
integer, private :: max_its = 500
integer, private :: nc

Number of components.

integer, private :: ns

Specified variable

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

Reference/trial phase composition.

real(kind=pr), private :: x(points,size(z0))
real(kind=pr), private :: y(points,size(z0))

Phase-y composition at each point.