Evaluate the two criticality residuals at a pure-fluid state.
Computes from the EOS and by a centered finite difference of in volume.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in) | :: | model |
Equation of state used for pressure derivatives. |
||
| integer, | intent(in) | :: | nc |
Number of components. |
||
| integer, | intent(in) | :: | i_comp |
One-based index of the pure component. |
||
| real(kind=pr), | intent(in) | :: | V |
Total volume [L]. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K]. |
||
| real(kind=pr), | intent(out) | :: | f1 |
First criticality residual, pressure differentiated with respect to volume. |
||
| real(kind=pr), | intent(out) | :: | f2 |
Second criticality residual, pressure differentiated twice with respect to volume. |
||
| real(kind=pr), | intent(out) | :: | P |
Pressure [bar]. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | Pin | ||||
| real(kind=pr), | private | :: | dPdV | ||||
| real(kind=pr), | private | :: | dPdV_minus | ||||
| real(kind=pr), | private | :: | dPdV_plus | ||||
| real(kind=pr), | private | :: | z(nc) |