Trace a three-phase pressure-temperature envelope at fixed feed z.
The initial phase compositions, pressure, temperature, and phase fraction define the starting state. Subsequent points are generated by continuation and corrected by solving the three-phase equilibrium equations. The returned arrays contain only points that converged.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
Residual Helmholtz model. |
||
| real(kind=pr), | intent(in) | :: | z(:) |
Overall feed composition. |
||
| 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) | :: | T0 |
Initial temperature [K]. |
||
| 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 requested. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | F(size(z)*2+3) | ||||
| real(kind=pr), | private | :: | P(points) | ||||
| real(kind=pr), | private | :: | S |
Specified value |
|||
| real(kind=pr), | private | :: | T(points) | ||||
| real(kind=pr), | private | :: | Xvars(size(z)*2+3) | ||||
| real(kind=pr), | private | :: | beta(points) |
Phase fraction. |
|||
| real(kind=pr), | private | :: | dF(size(z)*2+3,size(z)*2+3) | ||||
| real(kind=pr), | private | :: | dS |
Specified value step for next point extrapolation |
|||
| real(kind=pr), | private | :: | dX(size(z)*2+3) | ||||
| real(kind=pr), | private | :: | dXdS(size(z)*2+3) | ||||
| integer, | private | :: | i |
Loop/index variable. |
|||
| integer, | private | :: | iterations(points) | ||||
| integer, | private | :: | its |
Iteration count. |
|||
| real(kind=pr), | private | :: | kx(size(z)) | ||||
| real(kind=pr), | private | :: | ky(size(z)) | ||||
| integer, | private | :: | max_iterations | ||||
| integer, | private | :: | nc |
Number of components. |
|||
| integer, | private | :: | ns |
Specified variable |
|||
| real(kind=pr), | private | :: | w(points,size(z)) |
Reference/trial phase composition. |
|||
| real(kind=pr), | private | :: | wi(size(z)) | ||||
| real(kind=pr), | private | :: | x(points,size(z)) | ||||
| real(kind=pr), | private | :: | xi(size(z)) | ||||
| real(kind=pr), | private | :: | y(points,size(z)) |
Phase-y composition at each point. |
|||
| real(kind=pr), | private | :: | yi(size(z)) |