@@ -39,52 +39,65 @@ abstract type AbstractGeneralizedCubic end
3939abstract type AbstractPengRobinson <: AbstractGeneralizedCubic end
4040
4141"""
42+ pr = PengRobinson()
43+
4244Specializes the GenericCubicEOS to the Peng-Robinson cubic equation of state.
4345"""
4446struct PengRobinson <: AbstractPengRobinson end
4547
4648
4749"""
50+ prc = PengRobinsonCorrected()
51+
4852Specializes the GenericCubicEOS to Peng-Robinson modified for large acentric factors
4953"""
5054
5155struct PengRobinsonCorrected <: AbstractPengRobinson end
5256"""
57+ zj = ZudkevitchJoffe(; F_a = (T, c_i) -> 1.0, F_b = (T, c_i) -> 1.0)
58+
5359Specializes the GenericCubicEOS to the Zudkevitch-Joffe cubic equation of state.
5460
5561The Zudkevitch-Joffe equations of state allows for per-component functions of
5662temperature that modify the `weight_ai` and `weight_bi` functions. These additional
5763fitting parameters allows for more flexibility when matching complex mixtures.
5864"""
59- struct ZudkevitchJoffe <: AbstractGeneralizedCubic
60- F_a
61- F_b
65+ struct ZudkevitchJoffe{A, B} <: AbstractGeneralizedCubic
66+ F_a:: A
67+ F_b:: B
6268 function ZudkevitchJoffe (; F_a = (T, c_i) -> 1.0 , F_b = (T, c_i) -> 1.0 )
63- new (F_a, F_b)
69+ new {typeof(F_a), typeof(F_b)} (F_a, F_b)
6470 end
6571end
6672
6773"""
74+ srk = SoaveRedlichKwong()
75+
6876Specializes the GenericCubicEOS to the Soave-Redlich-Kwong cubic equation of state.
6977"""
7078struct SoaveRedlichKwong <: AbstractGeneralizedCubic end
7179"""
80+ rk = RedlichKwong()
81+
7282Specializes the GenericCubicEOS to the Redlich-Kwong cubic equation of state.
7383"""
7484struct RedlichKwong <: AbstractGeneralizedCubic end
7585
7686"""
77- GenericCubicEOS(mixture, [type = PengRobinson()])
87+ GenericCubicEOS(mixture)
88+ GenericCubicEOS(mixture, PengRobinson())
89+
7890
79- Instantiate a generic cubic equation-of-state for a `MultiComponentMixture` and
91+ Instantiate a generic cubic equation-of-state for a `MultiComponentMixture` and
8092a specified EOS.
8193
82- Currently supported choices for type :
94+ Currently supported choices for second argument :
8395
84- 1. `PengRobinson` (default)
85- 2. `ZudkevitchJoffe`
86- 3. `RedlichKwong`
87- 4. `SoaveRedlichKwong`
96+ 1. `PengRobinson()` (default)
97+ 2. `PengRobinsonCorrected()`
98+ 3. `ZudkevitchJoffe()`
99+ 4. `RedlichKwong()`
100+ 5. `SoaveRedlichKwong()`
88101"""
89102function GenericCubicEOS (mixture, type = PengRobinson (); kwarg... )
90103 ω_a, ω_b, m_1, m_2 = static_coefficients (type)
0 commit comments