@@ -13,8 +13,8 @@ export AbstractFalloffRate
13
13
Ea:: Q
14
14
unc:: P = EmptyRateUncertainty ()
15
15
end
16
- @inline (arr:: Arrhenius )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp (- arr. Ea/ (R* T))
17
- @inline (arr:: Arrhenius )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp (- arr. Ea/ (R* T))
16
+ @inline (arr:: Arrhenius )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp (- arr. Ea/ (R* T))
17
+ @inline (arr:: Arrhenius )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,d = 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp (- arr. Ea/ (R* T))
18
18
export Arrhenius
19
19
20
20
@with_kw struct StickingCoefficient{N<: Real ,K<: Real ,Q<: Real ,P<: AbstractRateUncertainty } <: AbstractRate
@@ -23,8 +23,8 @@ export Arrhenius
23
23
Ea:: Q
24
24
unc:: P = EmptyRateUncertainty ()
25
25
end
26
- @inline (arr:: StickingCoefficient )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath min (arr. A* T^ arr. n* exp (- arr. Ea/ (R* T)),1.0 )
27
- @inline (arr:: StickingCoefficient )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath min (arr. A* T^ arr. n* exp (- arr. Ea/ (R* T)),1.0 )
26
+ @inline (arr:: StickingCoefficient )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath min (arr. A* T^ arr. n* exp (- arr. Ea/ (R* T)),1.0 )
27
+ @inline (arr:: StickingCoefficient )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath min (arr. A* T^ arr. n* exp (- arr. Ea/ (R* T)),1.0 )
28
28
export StickingCoefficient
29
29
30
30
@with_kw struct Arrheniusq{N<: Real ,K<: Real ,Q<: Real ,P<: AbstractRateUncertainty ,B} <: AbstractRate
@@ -34,18 +34,38 @@ export StickingCoefficient
34
34
q:: B = 0.0
35
35
unc:: P = EmptyRateUncertainty ()
36
36
end
37
- @inline (arr:: Arrheniusq )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp ((- arr. Ea- arr. q* F* phi)/ (R* T))
38
- @inline (arr:: Arrheniusq )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp ((- arr. Ea- arr. q* F* phi)/ (R* T))
37
+ @inline (arr:: Arrheniusq )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp ((- arr. Ea- arr. q* F* phi)/ (R* T))
38
+ @inline (arr:: Arrheniusq )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,N<: Real ,S<: Real } = @fastmath arr. A* T^ arr. n* exp ((- arr. Ea- arr. q* F* phi)/ (R* T))
39
39
export Arrheniusq
40
40
41
+ @with_kw struct Marcus{N<: Real ,K<: Real ,Q,P<: AbstractRateUncertainty ,B} <: AbstractRate
42
+ A:: N
43
+ n:: K
44
+ lmbd_i_coefs:: Q
45
+ lmbd_o:: K
46
+ wr:: K
47
+ wp:: K
48
+ beta:: B
49
+ unc:: P = EmptyRateUncertainty ()
50
+ end
51
+ @inline function (arr:: Marcus )(;T:: Q ,P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn= 0.0 ,d= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real }
52
+ @fastmath lmbd = arr. lmbd_o + evalpoly (T,arr. lmbd_i_coefs)
53
+ @fastmath arr. A* T^ arr. n* exp (- lmbd/ 4.0 * (1.0 + dGrxn/ lmbd)^ 2 / (R* T)- arr. beta* d)
54
+ end
55
+ @inline function (arr:: Marcus )(T:: Q ;P:: N = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn= 0.0 ,d= 0.0 ) where {Q<: Real ,N<: Real ,S<: Real }
56
+ @fastmath lmbd = arr. lmbd_o + evalpoly (T,arr. lmbd_i_coefs)
57
+ @fastmath return arr. A* T^ arr. n* exp (- lmbd/ 4.0 * (1.0 + dGrxn/ lmbd)^ 2 / (R* T)- arr. beta* d)
58
+ end
59
+ export Marcus
60
+
41
61
@with_kw struct PdepArrhenius{T<: Real ,Q<: AbstractRateUncertainty ,Z<: AbstractRate } <: AbstractRate
42
62
Ps:: Array{T,1}
43
63
arrs:: Array{Z,1}
44
64
unc:: Q = EmptyRateUncertainty ()
45
65
end
46
66
PdepArrhenius (Ps:: Array{Q,1} ,arrs:: Array{Z,1} ) where {Q<: Real ,Z<: AbstractRate } = PdepArrhenius (sort (Ps),arrs)
47
67
48
- @inline function (parr:: PdepArrhenius )(;T:: Q = nothing ,P:: V = nothing ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,V<: Real ,S<: Real }
68
+ @inline function (parr:: PdepArrhenius )(;T:: Q = nothing ,P:: V = nothing ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,V<: Real ,S<: Real }
49
69
inds = getBoundingIndsSorted (P,parr. Ps):: Tuple{Int64,Int64}
50
70
51
71
if inds[2 ] == - 1
@@ -65,7 +85,7 @@ export PdepArrhenius
65
85
unc:: Q = EmptyRateUncertainty ()
66
86
end
67
87
68
- @inline function (marr:: MultiArrhenius )(;T:: Q ,P:: R = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
88
+ @inline function (marr:: MultiArrhenius )(;T:: Q ,P:: R = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
69
89
out = 0.0
70
90
for arr in marr. arrs
71
91
@fastmath out += arr (T)
@@ -79,7 +99,7 @@ export MultiArrhenius
79
99
unc:: Q = EmptyRateUncertainty ()
80
100
end
81
101
82
- @inline function (parr:: MultiPdepArrhenius )(;T:: Q ,P:: R = 0.0 ,C:: S = 0.0 ,phi= 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
102
+ @inline function (parr:: MultiPdepArrhenius )(;T:: Q ,P:: R = 0.0 ,C:: S = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
83
103
out = 0.0
84
104
for pdar in parr. parrs
85
105
@fastmath out += pdar (T= T,P= P)
@@ -95,7 +115,7 @@ export MultiPdepArrhenius
95
115
unc:: Q = EmptyRateUncertainty ()
96
116
end
97
117
98
- (tbarr:: ThirdBody )(;T:: Q = nothing ,P:: R = 0.0 ,C:: S = nothing ,phi= 0.0 ) where {Q<: Real ,R<: Real ,S<: Real } = C* (tbarr. arr (T))
118
+ (tbarr:: ThirdBody )(;T:: Q = nothing ,P:: R = 0.0 ,C:: S = nothing ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,R<: Real ,S<: Real } = C* (tbarr. arr (T))
99
119
export ThirdBody
100
120
101
121
@with_kw struct Lindemann{N<: Integer ,K<: AbstractFloat ,Q<: AbstractRateUncertainty } <: AbstractFalloffRate
@@ -106,7 +126,7 @@ export ThirdBody
106
126
unc:: Q = EmptyRateUncertainty ()
107
127
end
108
128
109
- @inline function (lnd:: Lindemann )(;T:: Q = nothing ,P:: R = 0.0 ,C:: S = nothing ,phi= 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
129
+ @inline function (lnd:: Lindemann )(;T:: Q = nothing ,P:: R = 0.0 ,C:: S = nothing ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
110
130
k0 = lnd. arrlow (T= T)
111
131
kinf = lnd. arrhigh (T= T)
112
132
@fastmath Pr = k0* C/ kinf
@@ -126,7 +146,7 @@ export Lindemann
126
146
unc:: R = EmptyRateUncertainty ()
127
147
end
128
148
129
- @inline function (tr:: Troe )(;T:: Q ,P:: R = 0.0 ,C:: S = nothing ,phi= 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
149
+ @inline function (tr:: Troe )(;T:: Q ,P:: R = 0.0 ,C:: S = nothing ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {Q<: Real ,R<: Real ,S<: Real }
130
150
k0 = tr. arrlow (T= T)
131
151
kinf = tr. arrhigh (T= T)
132
152
@fastmath Pr = k0* C/ kinf
@@ -195,7 +215,7 @@ export getredtemp
195
215
end
196
216
export getredpress
197
217
198
- @inline function (ch:: Chebyshev )(;T:: N ,P:: Q = 0.0 ,C:: B = 0.0 ,phi= 0.0 ) where {N<: Real ,B<: Real ,Q<: Real }
218
+ @inline function (ch:: Chebyshev )(;T:: N ,P:: Q = 0.0 ,C:: B = 0.0 ,phi= 0.0 ,dGrxn = 0.0 ,d = 0.0 ) where {N<: Real ,B<: Real ,Q<: Real }
199
219
k = 0.0
200
220
Tred = getredtemp (ch,T)
201
221
Pred = getredpress (ch,P)
0 commit comments