Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(CubicMixRule), | 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(CubicMixRule), | 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(CubicMixRule), | 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(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(AlphaFunction), | intent(in) | :: | self | |||
real(kind=pr), | intent(in) | :: | Tr(:) | |||
real(kind=pr), | intent(out) | :: | a(:) | |||
real(kind=pr), | intent(out) | :: | dadt(:) | |||
real(kind=pr), | intent(out) | :: | dadt2(:) |
Generic Cubic Equation of State as defined by Michelsen and Mollerup with a parameter that is not constant, and a parameter that depends on it. In the case of a two parameter EoS like PengRobinson the is the same for all components so it can be considered as a constant instead of a variable. The expression of the Equation is:
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=pr), | public, | allocatable | :: | ac(:) |
Attractive critical parameter |
||
class(AlphaFunction), | public, | allocatable | :: | alpha |
Uses the abstract derived type |
||
real(kind=pr), | public, | allocatable | :: | b(:) |
Repulsive parameter |
||
type(Substances), | public | :: | components |
Substances contained in the module |
|||
real(kind=pr), | public, | allocatable | :: | del1(:) |
paramter |
||
real(kind=pr), | public, | allocatable | :: | del2(:) |
paramter |
||
class(CubicMixRule), | public, | allocatable | :: | mixrule |
Uses the abstract derived type |
||
character(len=:), | public, | allocatable | :: | name |
Name of the model |
procedure, public :: Cp_residual_vt | |
procedure, public :: Cv_residual_vt | |
procedure, public :: enthalpy_residual_vt | |
procedure, public :: entropy_residual_vt | |
procedure, public :: get_v0 => v0 | |
procedure, public :: gibbs_residual_vt => gibbs_residual_VT | |
procedure, public :: lnphi_pt => fugacity_pt | |
procedure, public :: lnphi_vt => fugacity_vt | |
procedure, public :: pressure | |
procedure, public :: residual_helmholtz => GenericCubic_Ar | |
procedure, public :: set_delta1 | |
procedure, public :: set_mixrule | |
procedure, public :: volume |
Abstract derived type that describe the required procedure for a mixing rule on a Cubic EoS
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | dn2 | = | .false. |
Calculate second order derivatives |
procedure(abs_Bmix), public, deferred :: Bmix | |
procedure(abs_D1mix), public, deferred :: D1mix | |
procedure(abs_Dmix), public, deferred :: Dmix |
Cubic EoS volume initializer. For a Cubic Equation of State, the covolume calculated with the mixing rule is a good estimate for the initial volume solver on the liquid region.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(CubicEoS), | intent(in) | :: | self | |||
real(kind=pr), | intent(in) | :: | n(:) | |||
real(kind=pr), | intent(in) | :: | p | |||
real(kind=pr), | intent(in) | :: | t |
Residual Helmholtz Energy for a generic Cubic Equation of State.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(CubicEoS), | intent(in) | :: | self | |||
real(kind=pr), | intent(in) | :: | n(:) |
Number of moles |
||
real(kind=pr), | intent(in) | :: | v |
Volume [L] |
||
real(kind=pr), | intent(in) | :: | t |
Temperature [K] |
||
real(kind=pr), | intent(out), | optional | :: | ar |
Residual Helmholtz |
|
real(kind=pr), | intent(out), | optional | :: | arv |
|
|
real(kind=pr), | intent(out), | optional | :: | ArT |
|
|
real(kind=pr), | intent(out), | optional | :: | artv |
|
|
real(kind=pr), | intent(out), | optional | :: | arv2 |
|
|
real(kind=pr), | intent(out), | optional | :: | ArT2 |
|
|
real(kind=pr), | intent(out), | optional | :: | Arn(size(n)) |
|
|
real(kind=pr), | intent(out), | optional | :: | ArVn(size(n)) |
|
|
real(kind=pr), | intent(out), | optional | :: | ArTn(size(n)) |
|
|
real(kind=pr), | intent(out), | optional | :: | Arn2(size(n),size(n)) |
|
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(CubicEoS) | :: | self | ||||
real(kind=pr), | intent(in) | :: | delta1(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(CubicEoS), | intent(inout) | :: | self | |||
class(CubicMixRule), | intent(in) | :: | mixrule |
Volume solver optimized for Cubic Equations of State.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(CubicEoS), | intent(in) | :: | eos | |||
real(kind=pr), | intent(in) | :: | n(:) | |||
real(kind=pr), | intent(in) | :: | P | |||
real(kind=pr), | intent(in) | :: | T | |||
real(kind=pr), | intent(out) | :: | V | |||
character(len=*), | intent(in) | :: | root_type |