yaeos__equilibria_saturation_points Module



Variables

Type Visibility Attributes Name Initial
integer, public :: iters_first_step = 100
integer, public :: max_iterations = 2000
real(kind=pr), public :: step_tol = 0.1_pr
real(kind=pr), public :: tol = 1e-9_pr
real(kind=pr), private :: Vy
real(kind=pr), private :: Vz
character(len=14), private :: hidden_kind
class(ArModel), private, pointer :: hidden_model
real(kind=pr), private, allocatable :: hidden_z(:)

Functions

public function saturation_pressure(model, n, t, kind, p0, y0, max_iters)

Saturation pressure calculation function.

Read more…

Arguments

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

Composition vector [moles / molar fraction]

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

Temperature [K]

character(len=*), intent(in) :: kind

[bubble|dew|liquid-liquid]

real(kind=pr), intent(in), optional :: p0

Initial pressure [bar]

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

Initial composition

integer, intent(in), optional :: max_iters

Maximum number of iterations

Return Value type(EquilibriumState)

public function saturation_temperature(model, n, p, kind, t0, y0, max_iters)

Saturation temperature calculation function.

Read more…

Arguments

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

Composition vector [moles / molar fraction]

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

Pressure [bar]

character(len=*), intent(in) :: kind

[bubble|dew|liquid-liquid]

real(kind=pr), intent(in), optional :: t0

Initial temperature [K]

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

Initial composition

integer, intent(in), optional :: max_iters

Maximum number of iterations

Return Value type(EquilibriumState)


Subroutines

public subroutine foo(X, ns, S, F, dF, dFdS)

Function that needs to be solved at each envelope point

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: X(:)
integer, intent(in) :: ns
real(kind=pr), intent(in) :: S
real(kind=pr), intent(out) :: F(:)
real(kind=pr), intent(out) :: dF(:,:)
real(kind=pr), intent(out) :: dFdS(:)