Saturation pressure calculation function.
Calculates the saturation pressure of a multicomponent mixture with
a given molar composition n.
It is possible to calculate:
kind="bubble"kind="dew"kind="liquid-liquid"It will first try to converge a solution using a Newton method to solve the equation
updating at each step as the ratio of fugacities of the phases. If the solution does not converge, it will use a full Newton method to solve the system of equations using the variables and .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | intent(in), | target | :: | model | ||
| real(kind=pr), | intent(in) | :: | n(:) |
Composition vector [moles / molar fraction] |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | kind |
[bubble|dew|liquid-liquid] |
||
| real(kind=pr), | intent(in), | optional | :: | p0 |
Initial pressure [bar] |
|
| real(kind=pr), | intent(in), | optional | :: | y0(:) |
Initial composition |
|
| integer, | intent(in), | optional | :: | max_iters |
Maximum number of iterations |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | P | ||||
| real(kind=pr), | public | :: | Vy | ||||
| real(kind=pr), | public | :: | Vz | ||||
| real(kind=pr), | public | :: | dlnphi_dp_y(size(n)) | ||||
| real(kind=pr), | public | :: | dlnphi_dp_z(size(n)) | ||||
| real(kind=pr), | public | :: | f | ||||
| character(len=50), | public | :: | incipient | ||||
| integer, | public | :: | iterations | ||||
| integer, | public | :: | its | ||||
| real(kind=pr), | public | :: | k(size(n)) | ||||
| real(kind=pr), | public | :: | lnfug_y(size(n)) | ||||
| real(kind=pr), | public | :: | lnfug_z(size(n)) | ||||
| real(kind=pr), | public | :: | lnk(size(n)) | ||||
| character(len=50), | public | :: | main | ||||
| real(kind=pr), | public | :: | step | ||||
| real(kind=pr), | public | :: | y(size(n)) | ||||
| real(kind=pr), | public | :: | z(size(n)) |