Solve a saturation point for a pure component.
The set of equations to solve is:
Where is an specification function defined as:
The vector of variables is equal to .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
Thermodynamic model |
||
| integer, | intent(in) | :: | ncomp |
Component index |
||
| integer, | intent(in) | :: | nc |
Total number of components |
||
| real(kind=pr), | intent(inout) | :: | X(4) |
Variables |
||
| integer, | intent(in) | :: | ns |
Index of the specified variable (see above). |
||
| real(kind=pr), | intent(in) | :: | S |
Variable value specified to solve |
||
| real(kind=pr), | intent(out) | :: | F(4) |
Function |
||
| real(kind=pr), | intent(out) | :: | dF(4,4) |
Jacobian |
||
| real(kind=pr), | intent(out) | :: | dFdS(4) |
Derivative of the function with respect to S |
||
| integer, | intent(out) | :: | its |
Number of iterations |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | B | ||||
| real(kind=pr), | public | :: | Py | ||||
| real(kind=pr), | public | :: | Pz | ||||
| real(kind=pr), | public | :: | T | ||||
| real(kind=pr), | public | :: | Vy | ||||
| real(kind=pr), | public | :: | Vz | ||||
| real(kind=pr), | public | :: | Xnew(4) | ||||
| real(kind=pr), | public | :: | dPdTy | ||||
| real(kind=pr), | public | :: | dPdTz | ||||
| real(kind=pr), | public | :: | dPdVy |
Pressure derivative with respect to the incipient-phase volume. |
|||
| real(kind=pr), | public | :: | dPdVz |
Pressure derivative with respect to the feed-phase volume. |
|||
| real(kind=pr), | public | :: | dX(4) | ||||
| real(kind=pr), | public | :: | dlnfdt_y(nc) | ||||
| real(kind=pr), | public | :: | dlnfdt_z(nc) | ||||
| real(kind=pr), | public | :: | dlnfdv_y(nc) | ||||
| real(kind=pr), | public | :: | dlnfdv_z(nc) | ||||
| integer, | public | :: | i |
Loop/index variable. |
|||
| real(kind=pr), | public | :: | lnfug_y(nc) | ||||
| real(kind=pr), | public | :: | lnfug_z(nc) | ||||
| real(kind=pr), | public | :: | z(nc) |
Feed or overall composition. |
Evaluate the pure-fluid coexistence residuals and Jacobian for continuation. Unknowns are ; the residuals are fugacity equality, pressure equality, and the specification (see solve_point).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(inout) | :: | X(4) |
Variables . |
||
| real(kind=pr), | intent(out) | :: | F(4) |
Residuals . |
||
| real(kind=pr), | intent(out) | :: | dF(4,4) |
Residual Jacobian with respect to |
||
| real(kind=pr), | intent(out) | :: | dFdS(4) |
Residual derivative with respect to the continuation variable. |