Skip to content

Commit ab15a7b

Browse files
committed
remove option to use deprecated cantera api
1 parent d14163c commit ab15a7b

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

rmgpy/kinetics/arrhenius.pyx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,11 @@ cdef class Arrhenius(KineticsModel):
232232
"""
233233
self._A.value_si *= factor
234234

235-
def to_cantera_kinetics(self, arrhenius_class=False):
235+
def to_cantera_kinetics(self):
236236
"""
237237
Converts the RMG Arrhenius object to a cantera ArrheniusRate or
238238
the auxiliary cantera Arrhenius class (used by falloff reactions).
239239
Inputs for both are (A,b,E) where A is in units of m^3/kmol/s, b is dimensionless, and E is in J/kmol
240-
241-
arrhenius_class: If ``True``, uses cantera.Arrhenius (for falloff reactions). If ``False``, uses
242-
Cantera.ArrheniusRate
243240
"""
244241

245242
import cantera as ct
@@ -269,10 +266,7 @@ cdef class Arrhenius(KineticsModel):
269266

270267
b = self._n.value_si
271268
E = self._Ea.value_si * 1000 # convert from J/mol to J/kmol
272-
if arrhenius_class:
273-
return ct.Arrhenius(A, b, E)
274-
else:
275-
return ct.ArrheniusRate(A, b, E)
269+
return ct.ArrheniusRate(A, b, E)
276270

277271
def set_cantera_kinetics(self, ct_reaction, species_list):
278272
"""
@@ -924,7 +918,7 @@ cdef class PDepArrhenius(PDepKineticsModel):
924918
assert isinstance(ct_reaction.rate, ct.PlogRate), "Must have a Cantera PlogRate attribute"
925919

926920
pressures = copy.deepcopy(self._pressures.value_si)
927-
ctArrhenius = [arr.to_cantera_kinetics(arrhenius_class=True) for arr in self.arrhenius]
921+
ctArrhenius = [arr.to_cantera_kinetics() for arr in self.arrhenius]
928922

929923
new_rates = ct.PlogRate(list(zip(pressures, ctArrhenius)))
930924
ct_reaction.rate = new_rates

rmgpy/kinetics/falloff.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ cdef class Lindemann(PDepKineticsModel):
234234
"""
235235
import cantera as ct
236236

237-
high_rate = self.arrheniusHigh.to_cantera_kinetics(arrhenius_class=True)
238-
low_rate = self.arrheniusLow.to_cantera_kinetics(arrhenius_class=True)
237+
high_rate = self.arrheniusHigh.to_cantera_kinetics()
238+
low_rate = self.arrheniusLow.to_cantera_kinetics()
239239
return ct.LindemannRate(low=low_rate, high=high_rate)
240240

241241

@@ -413,6 +413,6 @@ cdef class Troe(PDepKineticsModel):
413413
T2 = self.T2.value_si
414414
falloff = [A, T3, T1, T2]
415415

416-
high = self.arrheniusHigh.to_cantera_kinetics(arrhenius_class=True)
417-
low = self.arrheniusLow.to_cantera_kinetics(arrhenius_class=True)
416+
high = self.arrheniusHigh.to_cantera_kinetics()
417+
low = self.arrheniusLow.to_cantera_kinetics()
418418
return ct.TroeRate(high=high, low=low, falloff_coeffs=falloff)

0 commit comments

Comments
 (0)