@@ -32,18 +32,20 @@ struct ReactiveInternalInterface{T,B,C,C2,N,Q<:AbstractReaction,X} <: AbstractRe
32
32
domaininds:: Array{Int64,1}
33
33
p:: Array{Float64,1}
34
34
reversibililty:: Array{Bool,1}
35
+ forwardability:: Array{Bool,1}
35
36
end
36
37
function ReactiveInternalInterface (domain1,domain2,reactions,A)
37
38
vectuple,vecinds,otherrxns,otherrxninds,posinds = getveckinetics (reactions)
38
39
rxns = vcat (reactions[vecinds],reactions[otherrxninds])
39
40
rxns = [ElementaryReaction (index= i,reactants= rxn. reactants,reactantinds= rxn. reactantinds,products= rxn. products,
40
- productinds= rxn. productinds,kinetics= rxn. kinetics,radicalchange= rxn. radicalchange,reversible= rxn. reversible,pairs= rxn. pairs) for (i,rxn) in enumerate (rxns)]
41
+ productinds= rxn. productinds,kinetics= rxn. kinetics,radicalchange= rxn. radicalchange,reversible= rxn. reversible,forwardable = rxn . forwardable, pairs= rxn. pairs) for (i,rxn) in enumerate (rxns)]
41
42
rxnarray = getinterfacereactioninds (domain1,domain2,rxns)
42
43
M,Nrp1,Nrp2 = getstoichmatrix (domain1,domain2,reactions)
43
44
reversibility = Array {Bool,1} (getfield .(rxns,:reversible ))
45
+ forwardability = Array {Bool,1} (getfield .(rxns,:forwardable ))
44
46
return ReactiveInternalInterface (domain1,domain2,
45
47
rxns,vectuple,posinds,rxnarray,M,Nrp1,Nrp2,A,[1 ,length (reactions)],
46
- [0 ,1 ],ones (length (rxns)),reversibility),ones (length (rxns))
48
+ [0 ,1 ],ones (length (rxns)),reversibility,forwardability ),ones (length (rxns))
47
49
end
48
50
export ReactiveInternalInterface
49
51
@@ -82,6 +84,7 @@ struct ReactiveInternalInterfaceConstantTPhi{J,N,B,B2,B3,C,C2,Q<:AbstractReactio
82
84
domaininds:: Array{Int64,1}
83
85
p:: Array{Float64,1}
84
86
reversibility:: Array{Bool,1}
87
+ forwardability:: Array{Bool,1}
85
88
end
86
89
function ReactiveInternalInterfaceConstantTPhi (domain1,domain2,reactions,T,A,phi= 0.0 )
87
90
@assert domain1. T == domain2. T
@@ -92,6 +95,7 @@ function ReactiveInternalInterfaceConstantTPhi(domain1,domain2,reactions,T,A,phi
92
95
krevs = kfs./ Kc
93
96
M,Nrp1,Nrp2 = getstoichmatrix (domain1,domain2,reactions)
94
97
reversibility = Array {Bool,1} (getfield .(reactions,:reversible ))
98
+ forwardability = Array {Bool,1} (getfield .(reactions,:forwardable ))
95
99
if isa (reactions,Vector{Any})
96
100
reactions = convert (Vector{ElementaryReaction},reactions)
97
101
end
@@ -100,7 +104,7 @@ function ReactiveInternalInterfaceConstantTPhi(domain1,domain2,reactions,T,A,phi
100
104
end
101
105
return ReactiveInternalInterfaceConstantTPhi (domain1,domain2,reactions,
102
106
rxnarray,M,Nrp1,Nrp2,kfs,krevs,T,A,[1 ,length (reactions)],
103
- [0 ,1 ],kfs[1 : end ],reversibility),kfs[1 : end ]
107
+ [0 ,1 ],kfs[1 : end ],reversibility,forwardability ),kfs[1 : end ]
104
108
end
105
109
export ReactiveInternalInterfaceConstantTPhi
106
110
@@ -205,7 +209,7 @@ function upgradekinetics(rxns,domain1,domain2)
205
209
@assert length (spc) == 1
206
210
kin = stickingcoefficient2arrhenius (rxn. kinetics,surfdomain. phase. sitedensity,length (rxn. reactants)- 1 ,spc[1 ]. molecularweight)
207
211
newrxns[i] = ElementaryReaction (index= rxn. index,reactants= rxn. reactants,reactantinds= rxn. reactantinds,products= rxn. products,
208
- productinds= rxn. productinds,kinetics= kin,radicalchange= rxn. radicalchange,reversible= rxn. reversible,pairs= rxn. pairs)
212
+ productinds= rxn. productinds,kinetics= kin,radicalchange= rxn. radicalchange,reversible= rxn. reversible,forwardable = rxn . forwardable, pairs= rxn. pairs)
209
213
else
210
214
newrxns[i] = rxn
211
215
end
0 commit comments