This module contains the mixing rules that are based/similar to the mixing rules defined by Huron-Vidal
Huron-Vidal presented a way to link a model with a Cubic EoS mixing rule. This makes it possible to make good predictions on polar compounds containing mixtures.
A basic code example
This is the Huron-Vidal mixing rule that includes the NRTL model modified by Huron and Vidal.
This is the Huron-Vidal mixing rule that includes the NRTL model modified by Huron and Vidal. It is a mixing rule that allows to use the NRTL model as an excess Gibbs energy model and can. be simplified to the classic Quatratic mixing rules when the parameters are set to:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | b(:) | |||
| real(kind=pr), | intent(in) | :: | del1(:) | |||
| real(kind=pr), | intent(in) | :: | alpha(:,:) | |||
| real(kind=pr), | intent(in) | :: | gji0(:,:) | |||
| real(kind=pr), | intent(in) | :: | gjiT(:,:) | |||
| logical, | intent(in) | :: | use_kij(:,:) | |||
| real(kind=pr), | intent(in) | :: | kij(:,:) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public, | allocatable | :: | bi(:) | |||
| real(kind=pr), | public, | allocatable | :: | del1(:) | |||
| logical, | public | :: | dn2 | = | .false. |
Calculate second order derivatives |
|
| class(GeModel), | public, | allocatable | :: | ge | |||
| logical, | public | :: | is_D_ddlc | = | .false. |
Mixing rule D parameter dependant on density |
| procedure, public :: Bmix => BmixHV | |
| procedure, public :: D1Mix => D1MixHV | |
| procedure, public :: Dmix => DmixHV |
Huron-Vidal mixing rule including the NRTL model modified by Huron and Vidal.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public, | allocatable | :: | bi(:) | |||
| real(kind=pr), | public, | allocatable | :: | del1(:) | |||
| logical, | public | :: | dn2 | = | .false. |
Calculate second order derivatives |
|
| type(NRTLHV), | public | :: | ge | ||||
| logical, | public | :: | is_D_ddlc | = | .false. |
Mixing rule D parameter dependant on density |
|
| real(kind=pr), | public, | allocatable | :: | kij(:,:) | |||
| logical, | public, | allocatable | :: | use_kij(:,:) |
| public function init_hvnrtl (b, del1, alpha, gji0, gjiT, use_kij, kij) | This is the Huron-Vidal mixing rule that includes the NRTL model modified by Huron and Vidal. |
| procedure, public :: Bmix => BmixHVNRTL | |
| procedure, public :: D1Mix => D1MixHVNRTL | |
| procedure, public :: Dmix => DmixHVNRTL |
Mixing rule at zero-pressure which allows for the inclusion of an excess-gibbs model.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | dn2 | = | .false. |
Calculate second order derivatives |
|
| class(GeModel), | public, | allocatable | :: | ge | |||
| logical, | public | :: | is_D_ddlc | = | .false. |
Mixing rule D parameter dependant on density |
|
| real(kind=pr), | public, | allocatable | :: | l(:,:) | |||
| real(kind=pr), | public | :: | q | ||||
| real(kind=pr), | private, | allocatable | :: | B | |||
| real(kind=pr), | private, | allocatable | :: | bi(:) | |||
| real(kind=pr), | private, | allocatable | :: | dBi(:) | |||
| real(kind=pr), | private, | allocatable | :: | dBij(:,:) |
| private function init_mhv (Ge, b, q, lij) |
| procedure, public :: Bmix => BmixMHV | |
| procedure, public :: D1Mix => D1MixMHV | |
| procedure, public :: Dmix => DmixMHV |
This is the Huron-Vidal mixing rule that includes the NRTL model modified by Huron and Vidal.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | b(:) | |||
| real(kind=pr), | intent(in) | :: | del1(:) | |||
| real(kind=pr), | intent(in) | :: | alpha(:,:) | |||
| real(kind=pr), | intent(in) | :: | gji0(:,:) | |||
| real(kind=pr), | intent(in) | :: | gjiT(:,:) | |||
| logical, | intent(in) | :: | use_kij(:,:) | |||
| real(kind=pr), | intent(in) | :: | kij(:,:) |
Mixing rule at infinite pressure as defined in the book of Michelsen and Møllerup.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MHV), | intent(in) | :: | self | |||
| 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 |
|
||
| 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(:,:) |
|
Quadratinc mixing rule for the repulsive parameter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(HV), | intent(in) | :: | self | |||
| real(kind=pr), | intent(in) | :: | n(:) | |||
| real(kind=pr), | intent(in) | :: | bi(:) | |||
| real(kind=pr), | intent(out) | :: | B | |||
| real(kind=pr), | intent(out) | :: | dBi(:) | |||
| real(kind=pr), | intent(out) | :: | dBij(:,:) |
Quadratinc mixing rule for the repulsive parameter.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(HV_NRTL), | intent(in) | :: | self | |||
| real(kind=pr), | intent(in) | :: | n(:) | |||
| real(kind=pr), | intent(in) | :: | bi(:) | |||
| real(kind=pr), | intent(out) | :: | B | |||
| real(kind=pr), | intent(out) | :: | dBi(:) | |||
| real(kind=pr), | intent(out) | :: | dBij(:,:) |
Quadratinc mixing rule for the repulsive parameter, using as a combining rule.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MHV), | intent(in) | :: | self | |||
| real(kind=pr), | intent(in) | :: | n(:) | |||
| real(kind=pr), | intent(in) | :: | bi(:) | |||
| real(kind=pr), | intent(out) | :: | B | |||
| real(kind=pr), | intent(out) | :: | dBi(:) | |||
| real(kind=pr), | intent(out) | :: | dBij(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(HV), | intent(in) | :: | self | |||
| real(kind=pr), | intent(in) | :: | n(:) | |||
| real(kind=pr), | intent(in) | :: | d1i(:) | |||
| real(kind=pr), | intent(out) | :: | D1 | |||
| real(kind=pr), | intent(out) | :: | dD1i(:) | |||
| real(kind=pr), | intent(out) | :: | dD1ij(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(HV_NRTL), | intent(in) | :: | self | |||
| real(kind=pr), | intent(in) | :: | n(:) | |||
| real(kind=pr), | intent(in) | :: | d1i(:) | |||
| real(kind=pr), | intent(out) | :: | D1 | |||
| real(kind=pr), | intent(out) | :: | dD1i(:) | |||
| real(kind=pr), | intent(out) | :: | dD1ij(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MHV), | intent(in) | :: | self | |||
| real(kind=pr), | intent(in) | :: | n(:) | |||
| real(kind=pr), | intent(in) | :: | d1i(:) | |||
| real(kind=pr), | intent(out) | :: | D1 | |||
| real(kind=pr), | intent(out) | :: | dD1i(:) | |||
| real(kind=pr), | intent(out) | :: | dD1ij(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(HV), | intent(in) | :: | self | |||
| 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 |
|
||
| 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(:,:) |
|
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(HV_NRTL), | intent(in) | :: | self | |||
| 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 |
|
||
| 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(:,:) |
|