Flash algorithm using sucessive substitutions.
Available specifications:
This algorithm assumes that the specified T and P/V correspond to vapor-liquid separation predicted by the provided model (0<beta<1) and solves the equilibria and mass-balance equations with a fixed-point method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BaseModel), | intent(in) | :: | model |
Thermodynamic model |
||
| real(kind=pr), | intent(in) | :: | z(:) |
Global composition (molar fractions) |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K] |
||
| real(kind=pr), | intent(in), | optional | :: | v_spec |
Specified Volume [L/mol] |
|
| real(kind=pr), | intent(in), | optional | :: | p_spec |
Specified Pressure [bar] |
|
| real(kind=pr), | intent(in), | optional | :: | k0(:) |
Initial K factors (y/x) |
|
| integer, | intent(out), | optional | :: | iters |
Number of iterations |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public, | dimension(size(z)) | :: | K | |||
| real(kind=pr), | public | :: | P | ||||
| real(kind=pr), | public | :: | V | ||||
| real(kind=pr), | public | :: | Vx | ||||
| real(kind=pr), | public | :: | Vy | ||||
| real(kind=pr), | public | :: | beta | ||||
| real(kind=pr), | public | :: | bmax | ||||
| real(kind=pr), | public | :: | bmin | ||||
| real(kind=pr), | public, | dimension(size(z)) | :: | dK | |||
| real(kind=pr), | public, | dimension(size(z)) | :: | dKold | |||
| real(kind=pr), | public | :: | g0 | ||||
| real(kind=pr), | public | :: | g1 | ||||
| real(kind=pr), | public, | dimension(size(z)) | :: | lnK | |||
| real(kind=pr), | public, | dimension(size(z)) | :: | lnKold | |||
| real(kind=pr), | public, | dimension(size(z)) | :: | lnfug_x | |||
| real(kind=pr), | public, | dimension(size(z)) | :: | lnfug_y | |||
| character(len=2), | public | :: | spec |
Flash specification [PT | VT] |
|||
| real(kind=pr), | public, | dimension(size(z)) | :: | x | |||
| real(kind=pr), | public, | dimension(size(z)) | :: | y |