Saturation temperature 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) | :: | p |
Pressure [bar] |
||
| character(len=*), | intent(in) | :: | kind |
[bubble|dew|liquid-liquid] |
||
| real(kind=pr), | intent(in), | optional | :: | t0 |
Initial temperature [K] |
|
| 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 | :: | dlnphi_dt_y(size(n)) | ||||
| real(kind=pr), | public | :: | dlnphi_dt_z(size(n)) | ||||
| real(kind=pr), | public | :: | f | ||||
| character(len=50), | public | :: | incipient | ||||
| logical, | public | :: | is_incipient(size(n)) | ||||
| 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 | :: | t | ||||
| real(kind=pr), | public | :: | vy | ||||
| real(kind=pr), | public | :: | vz | ||||
| real(kind=pr), | public | :: | y(size(n)) | ||||
| real(kind=pr), | public | :: | z(size(n)) |