Evaluate the saturation residual system in log-volume coordinates.
With and
, the residuals are
(isofugacity),
, , , and
. The Jacobian is returned when dF is present.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
EOS used to evaluate phase fugacities. |
||
| real(kind=pr) | :: | z(size(model)) |
Feed composition |
|||
| real(kind=pr), | intent(in) | :: | X(:) |
Unknowns |
||
| integer, | intent(in) | :: | ns |
Index of the specified unknown. |
||
| real(kind=pr), | intent(in) | :: | S |
Value imposed on unknown |
||
| real(kind=pr), | intent(out) | :: | F(:) |
Saturation residual vector. |
||
| real(kind=pr), | intent(out), | optional | :: | dF(:,:) |
Residual Jacobian. |
|
| real(kind=pr), | intent(out) | :: | dPdVz |
Pressure derivative with respect to the feed-phase volume. |
||
| real(kind=pr), | intent(out) | :: | dPdVy |
Pressure derivative with respect to the incipient-phase volume. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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 | :: | dPdTy | ||||
| real(kind=pr), | public | :: | dPdTz | ||||
| real(kind=pr), | public | :: | dPdn_y(size(z)) | ||||
| real(kind=pr), | public | :: | dPdn_z(size(z)) | ||||
| real(kind=pr), | public | :: | dlnfug_dP_y(size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dP_z(size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dT_y(size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dT_z(size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dV_y(size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dV_z(size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dn_y(size(model),size(model)) | ||||
| real(kind=pr), | public | :: | dlnfug_dn_z(size(model),size(model)) | ||||
| integer, | public | :: | j |
Loop/index variable. |
|||
| real(kind=pr), | public | :: | lnPspec |
Logarithmic thermodynamic quantity or intermediate. |
|||
| real(kind=pr), | public | :: | lnfug_y(size(model)) |
Logarithmic thermodynamic quantity or intermediate. |
|||
| real(kind=pr), | public | :: | lnfug_z(size(model)) |
Logarithmic thermodynamic quantity or intermediate. |
|||
| integer, | public | :: | nc |
Number of components. |
|||
| real(kind=pr), | public | :: | y(size(z)) |
Incipient/second phase composition. |