Skip to content

Commit

Permalink
Trying to fix yaml (via cantera 2.6) for Lindemann kinetics
Browse files Browse the repository at this point in the history
The call
    rate = ct.LindemannRate(low_rate, high_rate, falloff)
was causing 
    TypeError: Argument 'rate' has incorrect type (expected cantera._cantera.Arrhenius, got cantera._cantera.ArrheniusRate)

I think the ct.LindemannRate expects an Arrhenius not an ArrheniusRate.
Thdis was with cantera                   2.6.0            py37hb93dfd8_0    cantera
running on the Ubuntu CI
  • Loading branch information
rwest committed Mar 22, 2024
1 parent 20958cd commit 7d250f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmgpy/reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ def to_cantera(self, species_list=None, use_chemkin_identifier=False):
ct_reaction = ct.Reaction(equation=equation, rate=rate)

elif isinstance(self.kinetics, Lindemann):
high_rate = self.kinetics.arrheniusHigh.to_cantera_kinetics()
low_rate = self.kinetics.arrheniusLow.to_cantera_kinetics()
high_rate = self.kinetics.arrheniusHigh.to_cantera_kinetics(arrhenius_class=True)
low_rate = self.kinetics.arrheniusLow.to_cantera_kinetics(arrhenius_class=True)
falloff = []
rate = ct.LindemannRate(low_rate, high_rate, falloff)
if ct_collider is not None:
Expand Down

0 comments on commit 7d250f3

Please sign in to comment.