Michelsen’s modified Huron-Vidal cubic mixing rule.
A zero-pressure-limit mixing rule coupling a cubic EOS with an
excess-Gibbs model. The parameter q selects the MHV variant, and
l can hold repulsive binary interactions.
This mixing rule is based on the approximate zero-pressure limit
of a cubic equation of state. At the approximate zero-pressure limit the
attractive parameter can be expressed as:
Where is a weak function of temperature. In this implementation it is a constant chosen for the cubic EOS (e.g. for SRK, as in MHV1, and in PSRK).
To use the modified Huron-Vidal mixing rule it is necessary to define
a CubicEoS and replace its original mixing rule with the one generated
by the user.
type(MHV) :: mixrule
type(NRTL) :: ge_model
type(CubicEoS) :: model
! Define the Ge model to be used and the CubicEoS
ge_model = NRTL(a, b, c)
model = SoaveRedlichKwong(tc, pc, w)
! Use the initialization function to setup
mixrule = MHV(ge=ge_model, q=-0.593_pr, b=model%b)
! Replace the original mixrule on the previously defined model
model%mixrule = mixrule
! Ready to do calculations
call model%pressure(n, V, T, P)
Michelsen, M. L., Fluid Phase Equilibria 60 (1990) 213-219.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | dn2 | = | .false. |
Calculate second-order mole-number derivatives |
|
| class(GeModel), | public, | allocatable | :: | ge |
Excess-Gibbs model in the MHV relation. |
||
| logical, | public | :: | is_D_ddlc | = | .false. |
Mixing rule D parameter depends on volume (density) |
|
| real(kind=pr), | public, | allocatable | :: | l(:,:) |
Repulsive binary interaction matrix. |
||
| real(kind=pr), | public | :: | q |
MHV parameter defining the zero-pressure relation. |
|||
| real(kind=pr), | private, | allocatable | :: | B |
Mixture covolume. |
||
| real(kind=pr), | private, | allocatable | :: | bi(:) |
Cached pure-component covolumes. |
||
| real(kind=pr), | private, | allocatable | :: | dBi(:) |
Mole-number gradient of the mixture covolume. |
||
| real(kind=pr), | private, | allocatable | :: | dBij(:,:) |
Mole-number Hessian of the mixture covolume. |
Construct a Michelsen modified Huron-Vidal mixing rule.
mixrule = MHV(ge=ge_model, b=model%b, q=-0.593_pr)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModel), | intent(in) | :: | Ge |
Excess Gibbs energy model |
||
| real(kind=pr), | intent(in) | :: | b(:) |
Pure-component covolumes [L/mol] |
||
| real(kind=pr), | intent(in) | :: | q |
MHV parameter |
||
| real(kind=pr), | intent(in), | optional | :: | lij(:,:) |
Binary repulsive interaction parameters (default zero) |
Quadratic mixing rule for the repulsive parameter, using as a combining rule.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MHV), | intent(in) | :: | self |
Mixing rule object. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol] |
||
| real(kind=pr), | intent(in) | :: | bi(:) |
Pure-component covolumes [L/mol] |
||
| real(kind=pr), | intent(out) | :: | B |
Mixture covolume [L] |
||
| real(kind=pr), | intent(out) | :: | dBi(:) |
|
||
| real(kind=pr), | intent(out) | :: | dBij(:,:) |
|
Calculate the MHV mixture parameter and mole derivatives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MHV), | intent(in) | :: | self |
Mixing rule object. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol] |
||
| real(kind=pr), | intent(in) | :: | d1i(:) |
Pure-component values |
||
| real(kind=pr), | intent(out) | :: | D1 |
Mixture |
||
| real(kind=pr), | intent(out) | :: | dD1i(:) |
|
||
| real(kind=pr), | intent(out) | :: | dD1ij(:,:) |
|
Mixing rule at the approximate zero-pressure limit as defined in the book of Michelsen and Møllerup.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MHV), | intent(in) | :: | self |
Mixing rule object. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles vector [mol] |
||
| real(kind=pr), | intent(in) | :: | V |
Volume [L] (unused) |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(in) | :: | ai(:) |
Pure components attractive parameters |
||
| real(kind=pr), | intent(in) | :: | daidt(:) |
|
||
| real(kind=pr), | intent(in) | :: | daidt2(:) |
|
||
| real(kind=pr), | intent(out) | :: | D |
Mixture attractive parameter |
||
| real(kind=pr), | intent(out) | :: | dDdV |
(not assigned) |
||
| real(kind=pr), | intent(out) | :: | dDdT |
|
||
| real(kind=pr), | intent(out) | :: | dDdV2 |
|
||
| real(kind=pr), | intent(out) | :: | dDdT2 |
|
||
| real(kind=pr), | intent(out) | :: | dDi(:) |
|
||
| real(kind=pr), | intent(out) | :: | dDdTV |
|
||
| real(kind=pr), | intent(out) | :: | dDidV(:) |
|
||
| real(kind=pr), | intent(out) | :: | dDidT(:) |
|
||
| real(kind=pr), | intent(out) | :: | dDij(:,:) |
|