From 7d250f380050b97f7189d07aa189ad84f484ec08 Mon Sep 17 00:00:00 2001 From: Richard West Date: Fri, 22 Mar 2024 08:55:06 -0400 Subject: [PATCH] Trying to fix yaml (via cantera 2.6) for Lindemann kinetics 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 --- rmgpy/reaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmgpy/reaction.py b/rmgpy/reaction.py index 3fa9198bdad..932db34fc44 100644 --- a/rmgpy/reaction.py +++ b/rmgpy/reaction.py @@ -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: