s-amouyal12 / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

Reaction number in ThirdBodyMgr for falloff reactions #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The class GasKinetics includes two instances of the class 
ThirdBodyMgr<Enhanced3BConc>:
- m_3b_concm (third body efficiencies in regular three-body reactions)
- m_falloff_concm (third body efficiencies in falloff reactions)

The class ThirdBodyMgr contains the vector m_reaction_index, with the 
respective reaction numbers. When calling the function m_3b_concm.install(..) 
in GasKinetics.cpp, the reactionNumber() of the respective reaction is appended 
to m_reaction_index.

However, when calling the corresponding function m_falloff_concm.install(..), 
m_nfall is appended to m_reaction_index, which does not contain the reaction 
number but the falloff reaction counter 
(0<=m_nfall<'totalNumberOfFalloffReactions'). I think that here should also 
rather be passed reactionNumber(), or not?

However, as the m_reaction_index only is relevant in ThirdBodyMgr.multiply(..) 
and ThirdBodyMgr.contains(..), which are never called for m_falloff_concm if I 
checked correctly, this is probably not critical.

Original issue reported on code.google.com by FabianPr...@gmail.com on 4 Sep 2014 at 9:56

GoogleCodeExporter commented 9 years ago
You're correct that this information is never used for m_falloff_concm, so 
either way it will not affect any calculations.

If the multiply() function were used, I think it would need to modify the rate 
coefficients for all the falloff reactions (since all falloff reactions require 
the 3rd body efficiency information), which are already stored in separate 
arrays, so it makes sense for m_reaction_index to be the index into the array 
of falloff reactions (the current behavior). 
GasKinetics::processFalloffReactions just skips calling ThirdBodyMgr::multiply 
since the indexing is trivial.

Original comment by yarmond on 5 Sep 2014 at 3:44