binary_llv_from_cep Function

public function binary_llv_from_cep(model, cep) result(llv)

binary_llv_from_cep

Calculate the LLV line from a converged critical end point (CEP).

Description

From a converged critical end point (CEP) of a binary mixture, this function calculates the three-phase line (LLV) by solving the corresponding system of equations (defined at three_phase_line_F) at each point. To trace the whole line a continuation method is used to obtain good initial guesses for each point. The specification used to trace the line is initially the difference between the mole fractions of the two liquid phases, and then it is switched to temperature.

Arguments

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

Thermodynamic model to use

type(EquilibriumState), intent(in) :: cep

Converged critical end point.

Return Value type(BinaryThreePhase)


Calls

proc~~binary_llv_from_cep~~CallsGraph proc~binary_llv_from_cep binary_llv_from_cep proc~pressure ArModel%pressure proc~binary_llv_from_cep->proc~pressure proc~solve_system solve_system proc~binary_llv_from_cep->proc~solve_system proc~three_phase_line_f_solve three_phase_line_F_solve proc~binary_llv_from_cep->proc~three_phase_line_f_solve proc~volume~3 ArModel%volume proc~binary_llv_from_cep->proc~volume~3 residual_helmholtz residual_helmholtz proc~pressure->residual_helmholtz none~dgesv dgesv proc~solve_system->none~dgesv proc~three_phase_line_f_solve->proc~solve_system proc~three_phase_line_f three_phase_line_F proc~three_phase_line_f_solve->proc~three_phase_line_f 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~lnfug_vt ArModel%lnfug_vt proc~three_phase_line_f->proc~lnfug_vt proc~lnfug_vt->residual_helmholtz

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: F(nvars)
real(kind=pr), private :: P
real(kind=pr), private, allocatable :: Ps(:)
real(kind=pr), private :: S
real(kind=pr), private :: T
real(kind=pr), private, allocatable :: Ts(:)
real(kind=pr), private :: Vw
real(kind=pr), private :: Vx
real(kind=pr), private :: Vy
real(kind=pr), private :: X(nvars)
real(kind=pr), private :: dF(nvars,nvars)
real(kind=pr), private :: dFdS(nvars)
real(kind=pr), private :: dS
real(kind=pr), private :: dXdS(nvars)
real(kind=pr), private :: delta
real(kind=pr), private :: imin
integer, private :: iters
integer, private :: ns
integer, private, parameter :: nvars = 10
integer, private :: points
real(kind=pr), private :: w(2)
real(kind=pr), private :: xx(2)
real(kind=pr), private :: y(2)