Mixing rule at zero-pressure which allows for the inclusion of an excess-gibbs model.
This mixing rule is based on the aproximate zero-pressure limit of a cubic equation of state. At the aproximate zero-pressure limit the attractive parameter can be expressed as:
Where is a weak function of temperature. In the case of MHV
and simplicity it is considered that depends on the model used.
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, bi=model%b)
! Replace the original mixrule on the previously defined model
model%mixrule = mixrule
! Ready to do calculations
call pressure(model, n, v, T)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | dn2 | = | .false. |
Calculate second order derivatives |
|
class(GeModel), | public, | allocatable | :: | ge | |||
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(:,:) |
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(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(:,:) |
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(:) | |||
real(kind=pr), | intent(in) | :: | T | |||
real(kind=pr), | intent(in) | :: | ai(:) | |||
real(kind=pr), | intent(in) | :: | daidt(:) | |||
real(kind=pr), | intent(in) | :: | daidt2(:) | |||
real(kind=pr), | intent(out) | :: | D | |||
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(:,:) |