-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathsCPA.jl
executable file
·93 lines (83 loc) · 3.83 KB
/
sCPA.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
"""
sCPAModel <: CPAModel
function sCPA(components;
idealmodel = BasicIdeal,
radial_dist::Symbol = :KG,
cubicmodel = RK,
alpha = sCPAAlpha,
mixing = vdW1fRule,
activity = nothing,
translation = NoTranslation,
userlocations = String[],
ideal_userlocations = String[],
alpha_userlocations = String[],
activity_userlocations = String[],
mixing_userlocations = String[],
translation_userlocations = String[],
reference_state = nothing,
verbose = false,
assoc_options = AssocOptions())
## Input parameters
- `Mw`: Single Parameter (`Float64`) - Molecular Weight `[g/mol]`
- `Tc`: Single Parameter (`Float64`) - Critical Temperature `[K]`
- `a`: Single Parameter (`Float64`) - Atraction parameter `[m^6*Pa/mol]`
- `b`: Single Parameter (`Float64`) - Covolume `[m^3/mol]`
- `c1`: Single Parameter (`Float64`) - α-function constant Parameter (no units)
- `k`: Pair Parameter (`Float64`) (optional) - Binary Interaction Paramater (no units)
- `epsilon_assoc`: Association Parameter (`Float64`) - Reduced association energy `[K]`
- `bondvol`: Association Parameter (`Float64`) - Association Volume `[m^3]`
## Model Parameters
- `Mw`: Single Parameter (`Float64`) - Molecular Weight `[g/mol]`
- `a`: Pair Parameter (`Float64`) - Mixed Atraction Parameter `[m^6*Pa/mol]`
- `b`: Pair Parameter (`Float64`) - Mixed Covolume `[m^3/mol]`
- `c1`: Single Parameter (`Float64`) - α-function constant Parameter (no units)
- `epsilon_assoc`: Association Parameter (`Float64`) - Reduced association energy `[J]`
- `bondvol`: Association Parameter (`Float64`) - Association Volume `[m^3]`
## Input models
- `idealmodel`: Ideal Model
- `cubicmodel`: Cubic Model
## Description
Simplified Cubic Plus Association (s-CPA) EoS. Consists in the addition of a cubic part and an association part:
```
a_res(model::CPA) = a_res(model::Cubic) + a_assoc(model)
```
The `radial_dist` argument can be used to choose between a Carnahan-Starling form (`CS`, default) or the Kontogeorgis (`KG`) term, more widely known as s-CPA. using `sCPA(components, radial_dist =: CS)` is equivalent to using the original CPA
## References
1. Kontogeorgis, G. M., Michelsen, M. L., Folas, G. K., Derawi, S., von Solms, N., & Stenby, E. H. (2006). Ten years with the CPA (cubic-plus-association) equation of state. Part 1. Pure compounds and self-associating systems. Industrial & Engineering Chemistry Research, 45(14), 4855–4868. [doi:10.1021/ie051305v](https://doi.org/10.1021/ie051305v)
"""
function sCPA(components;
idealmodel = BasicIdeal,
radial_dist::Symbol = :KG,
cubicmodel = RK,
alpha = sCPAAlpha,
mixing = vdW1fRule,
activity = nothing,
translation = NoTranslation,
userlocations = String[],
ideal_userlocations = String[],
alpha_userlocations = String[],
activity_userlocations = String[],
mixing_userlocations = String[],
translation_userlocations = String[],
reference_state = nothing,
verbose = false,
assoc_options = AssocOptions())
return CPA(components;
idealmodel = idealmodel,
radial_dist = radial_dist,
cubicmodel = cubicmodel,
alpha = alpha,
mixing = mixing,
activity = activity,
translation = translation,
userlocations = userlocations,
ideal_userlocations = ideal_userlocations,
alpha_userlocations = alpha_userlocations,
activity_userlocations = activity_userlocations,
mixing_userlocations = mixing_userlocations,
translation_userlocations = translation_userlocations,
reference_state = reference_state,
verbose = verbose,
assoc_options = assoc_options)
end
export sCPA