From fe747f34c0ebe16c62178c8b402f90c4c5940f7e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 29 Aug 2016 23:31:29 -0400 Subject: [PATCH] [ck2cti] Provide better error message for reactions with missing data For falloff / chemically activated reactions (with "(+M)" appearing in the reaction equation), check that the alternate rate expression has been provided. Previously, this would only generate an inscrutable error when importing the XML file. --- interfaces/cython/cantera/ck2cti.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interfaces/cython/cantera/ck2cti.py b/interfaces/cython/cantera/ck2cti.py index f1c812ecf..b19771c7c 100644 --- a/interfaces/cython/cantera/ck2cti.py +++ b/interfaces/cython/cantera/ck2cti.py @@ -1499,6 +1499,10 @@ class Parser(object): reaction.kinetics = ThirdBody(arrheniusHigh=arrhenius, parser=self, efficiencies=efficiencies) + elif reaction.thirdBody: + raise InputParseError('Reaction equation implies pressure ' + 'dependence but no alternate rate parameters (i.e. HIGH or ' + 'LOW) were given for reaction {0}'.format(reaction)) else: reaction.kinetics = arrhenius