Correct a fixed-pressure or fixed-temperature saturation point.
Applies newton from yaeos__math_nonlinearsolvers to the residual
system assembled by saturation_TP and updates the packed unknown
vector in place.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
EOS used for phase fugacities. |
||
| character(len=*), | intent(in) | :: | kind |
|
||
| real(kind=pr), | intent(in) | :: | z(:) |
Feed composition. |
||
| real(kind=pr), | intent(inout) | :: | X(:) |
Initial packed unknowns; corrected state on return. |
||
| integer, | intent(in) | :: | ns |
Index of the specified variable. |
||
| real(kind=pr), | intent(in) | :: | S |
Specified value of |
||
| real(kind=pr), | intent(in) | :: | tol |
Residual tolerance. |
||
| integer, | intent(in) | :: | max_iterations |
Maximum corrector iterations. |
||
| integer, | intent(out) | :: | its |
Iterations used. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | F(size(X)) |
Residual or scalar equation value. |
|||
| real(kind=pr), | public | :: | G(size(X)) | ||||
| real(kind=pr), | public | :: | H(size(X)) | ||||
| real(kind=pr), | public | :: | Jp(size(X)) | ||||
| real(kind=pr), | public | :: | X0(size(X)) | ||||
| real(kind=pr), | public | :: | Xnew(size(X)) | ||||
| real(kind=pr), | public | :: | alpha |
Step length (unused) |
|||
| real(kind=pr), | public | :: | dF(size(X),size(X)) | ||||
| real(kind=pr), | public | :: | dFdS(size(X)) | ||||
| real(kind=pr), | public | :: | dG(size(X),size(X)) | ||||
| real(kind=pr), | public | :: | dH(size(X),size(X)) | ||||
| real(kind=pr), | public | :: | dx(size(X)) | ||||
| real(kind=pr), | public | :: | grad_phi_p | ||||
| integer, | public | :: | info |
Solver status code. |
|||
| integer, | public | :: | nc |
Number of components. |
|||
| real(kind=pr), | public | :: | phi_ax | ||||
| real(kind=pr), | public | :: | phi_x | ||||
| real(kind=pr), | public | :: | t |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | X(:) |
Unknowns |
||
| real(kind=pr), | intent(out) | :: | F(:) |
Residual vector |
||
| real(kind=pr), | intent(out) | :: | J(:,:) |
Jacobian matrix |