EquilibriumState Derived Type

type, public :: EquilibriumState

Description of a two-phase equilibria state.

Contains the relevant information of an equilibrium point obtained from some kind of equilibria calculation.


Components

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

Pressure [bar]

real(kind=pr), public :: T

Temperature [K]

real(kind=pr), public :: Vx

Heavy-phase volume [L/mol]

real(kind=pr), public :: Vy

Light-phase volume [L/mol]

real(kind=pr), public :: beta

Mole fraction of light-phase

integer, public :: iters = 0

Iterations needed to reach the state

character(len=14), public :: kind

Kind of point [“bubble”, “dew”, “liquid-liquid”, “split”]

real(kind=pr), public, allocatable :: x(:)

Heavy-phase molar fractions

real(kind=pr), public, allocatable :: y(:)

Light-phase molar fractions


Type-Bound Procedures

generic, public :: write (FORMATTED) => write

  • public subroutine write_EquilibriumState(eq, unit, iotype, v_list, iostat, iomsg)

    Arguments

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

procedure, private, pass :: write => write_EquilibriumState

  • public subroutine write_EquilibriumState(eq, unit, iotype, v_list, iostat, iomsg)

    Arguments

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