Correct a predicted three-phase PX-envelope point with Newton iteration. Returns the equilibrium residual and Jacobian at the corrected state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
Thermodynamic 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]. |
||
| integer, | intent(in) | :: | ns |
Index of the specified unknown. |
||
| real(kind=pr), | intent(in) | :: | S |
Value imposed on unknown |
||
| real(kind=pr), | intent(inout) | :: | X(:) |
Initial unknown vector; corrected in place. |
||
| real(kind=pr), | intent(out) | :: | F(:) |
Three-phase equilibrium residuals. |
||
| real(kind=pr), | intent(out) | :: | dF(:,:) |
Jacobian of the residual system. |
||
| integer, | intent(inout) | :: | its |
Iteration count from the point solver. |
||
| integer, | intent(in) | :: | maxits |
Maximum Newton iterations. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | dX(size(X)) | ||||
| integer, | private | :: | nc |
Number of components. |