Find a liquid-liquid phase boundary on the PT plane. At a specified pressure. The procedure consists in looking for the temperature at which the fugacity of a component in the mixture is higher than the fugacity of the same component in a pure phase. This is done for each component in the mixture. The component with the highest temperature is selected as it should be the first one appearing. If all components have a negative difference then the mixture is probably stable at all temperatures.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ArModel), | intent(in) | :: | model |
Equation of state model |
||
real(kind=pr), | intent(in) | :: | z(:) |
Mole fractions |
||
real(kind=pr), | intent(in) | :: | T0 |
Initial temperature [K] |
||
real(kind=pr), | intent(in) | :: | P0 |
Search pressure [bar] |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public | :: | P | ||||
real(kind=pr), | public | :: | T | ||||
real(kind=pr), | public | :: | Ts(size(z)) | ||||
real(kind=pr), | public | :: | diffs(size(z)) | ||||
type(EquilibriumState), | public | :: | fr | ||||
integer, | public | :: | i | ||||
real(kind=pr), | public | :: | lnphi_y(size(z)) | ||||
real(kind=pr), | public | :: | lnphi_z(size(z)) | ||||
integer, | public | :: | nc | ||||
integer, | public | :: | ncomp | ||||
real(kind=pr), | public | :: | y(size(z)) |