yaeos__equilibria_binaries Module

Module with routines particular to binary mixtures.



Derived Types

type, public ::  BinaryThreePhase

Components

Type Visibility Attributes Name Initial
real(kind=pr), public, allocatable :: P(:)
real(kind=pr), public, allocatable :: T(:)
real(kind=pr), public, allocatable :: Vw(:)
real(kind=pr), public, allocatable :: Vx(:)
real(kind=pr), public, allocatable :: Vy(:)
real(kind=pr), public, allocatable :: w1(:)
real(kind=pr), public, allocatable :: x1(:)
real(kind=pr), public, allocatable :: y1(:)

Functions

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

Arguments

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

Return Value type(BinaryThreePhase)


Subroutines

public subroutine find_llcl(model, z0, zi, P, a, V, T)

Find an initial guess for the critical L-L line of a binary mixture.

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model
real(kind=pr), intent(in) :: z0(2)

Mole fractions of original fluid

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

Mole fractions of new fluid

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

Pressure [bar]

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

Mole fraction of new fluid

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

Volume [L/mol]

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

Temperature [K]

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

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model
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

public subroutine three_phase_line_F_solve(model, X, ns, S, F, dF, iters)

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model
real(kind=pr), intent(inout) :: X(:)

Input/output 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

integer, intent(out), optional :: iters

Number of iterations performed