Trace a three-phase pressure-composition envelope at fixed temperature. The overall mixture varies as ; the initial phase states and continuation step define the branch. Points are stored only after the equilibrium equations converge.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
Residual Helmholtz model. |
||
| real(kind=pr), | intent(in) | :: | z0(:) |
First limiting composition. |
||
| real(kind=pr), | intent(in) | :: | zi(:) |
Second limiting composition. |
||
| real(kind=pr), | intent(in) | :: | T |
Fixed temperature [K]. |
||
| real(kind=pr), | intent(in) | :: | x0(:) |
Initial composition of phase x. |
||
| real(kind=pr), | intent(in) | :: | y0(:) |
Initial composition of phase y. |
||
| real(kind=pr), | intent(in) | :: | w0(:) |
Initial composition of phase w. |
||
| real(kind=pr), | intent(in) | :: | beta0 |
Initial phase-split parameter. |
||
| real(kind=pr), | intent(in) | :: | P0 |
Initial pressure [bar]. |
||
| real(kind=pr), | intent(in) | :: | a0 |
Initial composition interpolation parameter. |
||
| integer, | intent(in) | :: | ns0 |
Index of the specified variable in , with , . |
||
| real(kind=pr), | intent(in) | :: | dS0 |
Initial signed continuation step. |
||
| integer, | intent(in) | :: | points |
Maximum number of envelope points. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | F(size(z0)*2+3) | ||||
| real(kind=pr), | private | :: | P(points) | ||||
| real(kind=pr), | private | :: | S |
Specified value |
|||
| real(kind=pr), | private | :: | Xvars(size(z0)*2+3) | ||||
| real(kind=pr), | private | :: | a(points) | ||||
| real(kind=pr), | private | :: | beta(points) |
Phase fraction. |
|||
| real(kind=pr), | private | :: | dF(size(z0)*2+3,size(z0)*2+3) | ||||
| real(kind=pr), | private | :: | dS |
Specified value step for next point extrapolation |
|||
| real(kind=pr), | private | :: | dX(size(z0)*2+3) | ||||
| real(kind=pr), | private | :: | dXdS(size(z0)*2+3) | ||||
| integer, | private | :: | i |
Loop/index variable. |
|||
| integer, | private | :: | its |
Iteration count. |
|||
| real(kind=pr), | private | :: | kx(size(z0)) | ||||
| real(kind=pr), | private | :: | ky(size(z0)) | ||||
| integer, | private | :: | max_its | = | 500 | ||
| integer, | private | :: | nc |
Number of components. |
|||
| integer, | private | :: | ns |
Specified variable |
|||
| real(kind=pr), | private | :: | w(points,size(z0)) |
Reference/trial phase composition. |
|||
| real(kind=pr), | private | :: | x(points,size(z0)) | ||||
| real(kind=pr), | private | :: | y(points,size(z0)) |
Phase-y composition at each point. |