Description of a two-phase equilibria state.
| 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 |
| generic, public :: write (FORMATTED) => write | |
| procedure, private, pass :: write => write_EquilibriumState |
Type to hold the state of a multiphase equilibrium calculation.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | P |
Pressure |
|||
| real(kind=pr), | public | :: | T |
Temperature |
|||
| real(kind=pr), | public, | allocatable | :: | betas(:) |
Mole fractions of each phase |
||
| character(len=14), | public | :: | kind_w |
Kind of the reference phase |
|||
| character(len=14), | public, | allocatable | :: | kinds_x(:) |
Kinds of the main phases |
||
| integer, | public | :: | np |
Number of phases |
|||
| real(kind=pr), | public, | allocatable | :: | w(:) |
Mole fractions of the reference phase |
||
| real(kind=pr), | public, | allocatable | :: | x_l(:,:) |
Mole fractions of the main phases |
||
| real(kind=pr), | public, | allocatable | :: | z(:) |
Global composition |
Function to create a MPEquilibriumState from the vector of variables
X used in the multiphase generalized isopleths methods.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nc |
Number of components |
||
| integer, | intent(in) | :: | np |
Number of phases - 1 |
||
| real(kind=pr), | intent(in) | :: | z(nc) |
Global composition |
||
| character(len=14), | intent(in) | :: | kinds_x(np) |
Kinds of the main phases |
||
| character(len=14), | intent(in) | :: | kind_w |
Kind of the reference phase |
||
| real(kind=pr), | intent(in) | :: | X(nc*np+np+1+2) |
Vector of variables.
The first |
| Type | Intent | Optional | 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 |