Correct one point on the three-phase envelope with Newton iteration.
Returns the residual, Jacobian, and iteration count at the corrected
state; reaching maxits signals that the continuation step failed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
Thermodynamic model. |
||
| real(kind=pr), | intent(in) | :: | z(:) |
Overall feed composition. |
||
| 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/status 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 | :: | i |
Loop/index variable. |
|||
| integer, | private | :: | nc |
Number of components. |