DmixHVAttractive parameter calculation for the Huron-Vidal mixing rule.
This subroutine calculates the attractive parameter and its derivatives for a mixture using the Huron-Vidal mixing rule. The Huron-Vidal mixing rule combines the pure component parameters using an excess Gibbs energy model. The expression of the attractive parameter is:
where is evaluated by lamdba_hv from the mixture
. The excess Gibbs energy and its derivatives are supplied
by the caller, normally from a GeModel evaluated at .
Huron, M.-J., and J. Vidal, Fluid Phase Equilibria 3 (1979) 255-271.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(in) | :: | bi(:) |
Pure-component covolumes [L/mol] |
||
| real(kind=pr), | intent(in) | :: | B |
Mixture covolume [L] |
||
| real(kind=pr), | intent(in) | :: | dBi(:) |
|
||
| real(kind=pr), | intent(in) | :: | dBij(:,:) |
|
||
| real(kind=pr), | intent(in) | :: | D1 |
Mixture |
||
| real(kind=pr), | intent(in) | :: | dD1i(:) |
|
||
| real(kind=pr), | intent(in) | :: | dD1ij(:,:) |
|
||
| real(kind=pr), | intent(in) | :: | ai(:) |
Pure-component attractive parameters |
||
| real(kind=pr), | intent(in) | :: | daidt(:) |
|
||
| real(kind=pr), | intent(in) | :: | daidt2(:) |
|
||
| real(kind=pr), | intent(in) | :: | Ge |
Excess Gibbs energy [bar L] |
||
| real(kind=pr), | intent(in) | :: | GeT |
|
||
| real(kind=pr), | intent(in) | :: | GeT2 |
|
||
| real(kind=pr), | intent(in) | :: | Gen(:) |
|
||
| real(kind=pr), | intent(in) | :: | GeTn(:) |
|
||
| real(kind=pr), | intent(in) | :: | Gen2(:,:) |
|
||
| real(kind=pr), | intent(out) | :: | D |
Mixture attractive parameter [bar L^2] |
||
| real(kind=pr), | intent(out) | :: | dDdT |
|
||
| real(kind=pr), | intent(out) | :: | dDdT2 |
|
||
| real(kind=pr), | intent(out) | :: | dDi(:) |
|
||
| real(kind=pr), | intent(out) | :: | dDidT(:) |
|
||
| real(kind=pr), | intent(out) | :: | dDij(:,:) |
|
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | L |
Infinite-pressure parameter |
|||
| real(kind=pr), | public | :: | dL(size(n)) | ||||
| real(kind=pr), | public | :: | dL2(size(n),size(n)) | ||||
| real(kind=pr), | public | :: | f |
Residual or scalar equation value. |
|||
| real(kind=pr), | public | :: | fdi(size(n)) | ||||
| real(kind=pr), | public | :: | fdij(size(n),size(n)) | ||||
| real(kind=pr), | public | :: | fdit(size(n)) | ||||
| real(kind=pr), | public | :: | fdt | ||||
| real(kind=pr), | public | :: | fdt2 |
Second-order intermediate quantity used by this procedure. |
|||
| integer, | public | :: | i |
Loop index |
|||
| integer, | public | :: | j |
Loop index |
|||
| integer, | public | :: | nc |
Number of components. |
|||
| real(kind=pr), | public | :: | totn |
Total number of moles |