three_phase_line_F Subroutine

public subroutine three_phase_line_F(model, Xvars, ns, S, F, dF)

Uses

  • proc~~three_phase_line_f~~UsesGraph proc~three_phase_line_f three_phase_line_F module~yaeos__math yaeos__math proc~three_phase_line_f->module~yaeos__math module~yaeos__constants yaeos__constants module~yaeos__math->module~yaeos__constants module~yaeos__math_continuation yaeos__math_continuation module~yaeos__math->module~yaeos__math_continuation module~yaeos__math_linalg yaeos__math_linalg module~yaeos__math->module~yaeos__math_linalg iso_fortran_env iso_fortran_env module~yaeos__constants->iso_fortran_env module~yaeos__math_continuation->module~yaeos__constants module~yaeos__math_continuation->module~yaeos__math_linalg module~yaeos__math_linalg->module~yaeos__constants

three_phase_line_F

Description

Calculate the function vector and Jacobian for the three-phase line (LLV) of a binary mixture. Phases are defined as x, y and w. Which are two liquid phases and one vapor phase respectively.

The system of equations is defined as:

References

[1] M. Cismondi, M.L. Michelsen, Global phase equilibrium calculations: Critical lines, critical end points and liquid–liquid–vapour equilibrium in binary mixtures, The Journal of Supercritical Fluids 39 (2007) 287–295. https://doi.org/10.1016/j.supflu.2006.03.011.

Arguments

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

Thermodynamic model to use

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

Input vector

integer, intent(in) :: ns

Specified variable index

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

Specified variable value

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

Function vector

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

Jacobian


Calls

proc~~three_phase_line_f~~CallsGraph proc~three_phase_line_f three_phase_line_F proc~lnfug_vt ArModel%lnfug_vt proc~three_phase_line_f->proc~lnfug_vt residual_helmholtz residual_helmholtz proc~lnfug_vt->residual_helmholtz

Called by

proc~~three_phase_line_f~~CalledByGraph proc~three_phase_line_f three_phase_line_F proc~three_phase_line_f_solve three_phase_line_F_solve proc~three_phase_line_f_solve->proc~three_phase_line_f proc~binary_llv_from_cep binary_llv_from_cep proc~binary_llv_from_cep->proc~three_phase_line_f_solve

Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: Peq_1
real(kind=pr), private :: Peq_2
real(kind=pr), private :: Pw
real(kind=pr), private :: Px
real(kind=pr), private :: Py
real(kind=pr), private :: T
real(kind=pr), private :: dPwdN(2)
real(kind=pr), private :: dPwdT
real(kind=pr), private :: dPwdV
real(kind=pr), private :: dPxdN(2)
real(kind=pr), private :: dPxdT
real(kind=pr), private :: dPxdV
real(kind=pr), private :: dPydN(2)
real(kind=pr), private :: dPydT
real(kind=pr), private :: dPydV
real(kind=pr), private :: dlnfwdP(2)
real(kind=pr), private :: dlnfwdT(2)
real(kind=pr), private :: dlnfwdn(2,2)
real(kind=pr), private :: dlnfwdv(2)
real(kind=pr), private :: dlnfxdP(2)
real(kind=pr), private :: dlnfxdT(2)
real(kind=pr), private :: dlnfxdn(2,2)
real(kind=pr), private :: dlnfxdv(2)
real(kind=pr), private :: dlnfydP(2)
real(kind=pr), private :: dlnfydT(2)
real(kind=pr), private :: dlnfydn(2,2)
real(kind=pr), private :: dlnfydv(2)
real(kind=pr), private :: dxdn(2,2)
real(kind=pr), private :: isofug_1(2)
real(kind=pr), private :: isofug_2(2)
real(kind=pr), private :: lnf_w(2)
real(kind=pr), private :: lnf_x(2)
real(kind=pr), private :: lnf_y(2)
real(kind=pr), private :: vw
real(kind=pr), private :: vx
real(kind=pr), private :: vy
real(kind=pr), private :: w(2)
real(kind=pr), private :: w1
real(kind=pr), private :: x(2)
real(kind=pr), private :: x1
real(kind=pr), private :: y(2)
real(kind=pr), private :: y1