yaeos__equilibria_boundaries_phase_envelopes_pt Module

Phase boundaries line on the plane calculation procedures.



Variables

Type Visibility Attributes Name Initial
real(kind=pr), private :: Vy
real(kind=pr), private :: Vz

Derived Types

type, public ::  CriticalPoint

Critical point

Components

Type Visibility Attributes Name Initial
real(kind=pr), public :: P

Pressure [bar]

real(kind=pr), public :: T

Temperature [K]

type, public ::  PTEnvel2

Two-phase isopleth. Phase boundary line of a fluid at constant composition.

Components

Type Visibility Attributes Name Initial
type(CriticalPoint), public, allocatable :: cps(:)

Critical points found along the line.

type(EquilibriumState), public, allocatable :: points(:)

Each point through the line.

Type-Bound Procedures

procedure, public, pass :: write => write_PTEnvel2
generic, public :: write (FORMATTED) => write

Functions

public function find_hpl(model, z, T0, P0)

Find a liquid-liquid phase boundary on the PT plane. At a specified pressure. The procedure consists in looking for the temperature at which the fugacity of a component in the mixture is higher than the fugacity of the same component in a pure phase. This is done for each component in the mixture. The component with the highest temperature is selected as it should be the first one appearing. If all components have a negative difference then the mixture is probably stable at all temperatures.

Read more…

Arguments

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

Equation of state model

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

Mole fractions

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

Initial temperature [K]

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

Search pressure [bar]

Return Value type(PTEnvel2)

public function pt_envelope_2ph(model, z, first_point, points, iterations, delta_0, specified_variable_0, solver, stop_conditions, maximum_pressure) result(envelopes)

PT two-phase envelope calculation procedure.

Read more…

Arguments

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

Thermodyanmic model

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

Vector of molar fractions

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

Initial point of the envelope

integer, intent(in), optional :: points

Maxmimum number of points, defaults to 500

integer, intent(in), optional :: iterations

Point solver maximum iterations, defaults to 100

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

Initial extrapolation

integer, intent(in), optional :: specified_variable_0

Position of specified variable, since the vector of variables is the values for specification will be for the equilibria constants, for and for .

procedure(continuation_solver), optional :: solver

Specify solver for each point, defaults to a full newton procedure

procedure(continuation_stopper), optional :: stop_conditions

Function that returns true if the continuation method should stop

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

Maximum pressure to calculate [bar]

Return Value type(PTEnvel2)


Subroutines

public subroutine write_PTEnvel2(pt2, unit, iotype, v_list, iostat, iomsg)

Arguments

Type IntentOptional Attributes Name
class(PTEnvel2), intent(in) :: pt2
integer, intent(in) :: unit
character(len=*), intent(in) :: iotype
integer, intent(in) :: v_list(:)
integer, intent(out) :: iostat
character(len=*), intent(inout) :: iomsg