EquilibriumState Derived Type

type, public :: EquilibriumState

EquilibriumState

Result of a two-phase flash or saturation-point calculation.

Description

Stores the state kind, phase compositions, volumes, conditions, phase fraction, and iteration count. x denotes the heavy phase and y the light phase; beta is the light-phase mole fraction.

Examples

print *, result%P, result%T, result%beta

Inherited by

type~~equilibriumstate~~InheritedByGraph type~equilibriumstate EquilibriumState type~criticalline CriticalLine type~criticalline->type~equilibriumstate CEP type~ptenvel2 PTEnvel2 type~ptenvel2->type~equilibriumstate points type~pxenvel2 PXEnvel2 type~pxenvel2->type~equilibriumstate points type~txenvel2 TXEnvel2 type~txenvel2->type~equilibriumstate points

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)

    Format a two-phase equilibrium state for formatted derived-type I/O.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(EquilibriumState), intent(in) :: eq

    State to serialize.

    integer, intent(in) :: unit

    Output unit number.

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

    Fortran formatted-I/O mode string.

    integer, intent(in) :: v_list(:)

    Format control list supplied by the runtime.

    integer, intent(out) :: iostat

    I/O status returned to the runtime.

    character(len=*), intent(inout) :: iomsg

    I/O error message buffer.

procedure, private, pass :: write => write_EquilibriumState

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

    Format a two-phase equilibrium state for formatted derived-type I/O.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(EquilibriumState), intent(in) :: eq

    State to serialize.

    integer, intent(in) :: unit

    Output unit number.

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

    Fortran formatted-I/O mode string.

    integer, intent(in) :: v_list(:)

    Format control list supplied by the runtime.

    integer, intent(out) :: iostat

    I/O status returned to the runtime.

    character(len=*), intent(inout) :: iomsg

    I/O error message buffer.