@@ -13,8 +13,8 @@ export AbstractFalloffRate
1313 Ea:: Q
1414 unc:: P = EmptyRateUncertainty ()
1515end
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))
1818export Arrhenius
1919
2020@with_kw struct StickingCoefficient{N<: Real ,K<: Real ,Q<: Real ,P<: AbstractRateUncertainty } <: AbstractRate
@@ -23,8 +23,8 @@ export Arrhenius
2323 Ea:: Q
2424 unc:: P = EmptyRateUncertainty ()
2525end
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 )
2828export StickingCoefficient
2929
3030@with_kw struct Arrheniusq{N<: Real ,K<: Real ,Q<: Real ,P<: AbstractRateUncertainty ,B} <: AbstractRate
@@ -34,18 +34,38 @@ export StickingCoefficient
3434 q:: B = 0.0
3535 unc:: P = EmptyRateUncertainty ()
3636end
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))
3939export Arrheniusq
4040
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+
4161@with_kw struct PdepArrhenius{T<: Real ,Q<: AbstractRateUncertainty ,Z<: AbstractRate } <: AbstractRate
4262 Ps:: Array{T,1}
4363 arrs:: Array{Z,1}
4464 unc:: Q = EmptyRateUncertainty ()
4565end
4666PdepArrhenius (Ps:: Array{Q,1} ,arrs:: Array{Z,1} ) where {Q<: Real ,Z<: AbstractRate } = PdepArrhenius (sort (Ps),arrs)
4767
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 }
4969 inds = getBoundingIndsSorted (P,parr. Ps):: Tuple{Int64,Int64}
5070
5171 if inds[2 ] == - 1
@@ -65,7 +85,7 @@ export PdepArrhenius
6585 unc:: Q = EmptyRateUncertainty ()
6686end
6787
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 }
6989 out = 0.0
7090 for arr in marr. arrs
7191 @fastmath out += arr (T)
@@ -79,7 +99,7 @@ export MultiArrhenius
7999 unc:: Q = EmptyRateUncertainty ()
80100end
81101
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 }
83103 out = 0.0
84104 for pdar in parr. parrs
85105 @fastmath out += pdar (T= T,P= P)
@@ -95,7 +115,7 @@ export MultiPdepArrhenius
95115 unc:: Q = EmptyRateUncertainty ()
96116end
97117
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))
99119export ThirdBody
100120
101121@with_kw struct Lindemann{N<: Integer ,K<: AbstractFloat ,Q<: AbstractRateUncertainty } <: AbstractFalloffRate
@@ -106,7 +126,7 @@ export ThirdBody
106126 unc:: Q = EmptyRateUncertainty ()
107127end
108128
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 }
110130 k0 = lnd. arrlow (T= T)
111131 kinf = lnd. arrhigh (T= T)
112132 @fastmath Pr = k0* C/ kinf
@@ -126,7 +146,7 @@ export Lindemann
126146 unc:: R = EmptyRateUncertainty ()
127147end
128148
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 }
130150 k0 = tr. arrlow (T= T)
131151 kinf = tr. arrhigh (T= T)
132152 @fastmath Pr = k0* C/ kinf
@@ -195,7 +215,7 @@ export getredtemp
195215end
196216export getredpress
197217
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 }
199219 k = 0.0
200220 Tred = getredtemp (ch,T)
201221 Pred = getredpress (ch,P)
0 commit comments