-
-
Notifications
You must be signed in to change notification settings - Fork 409
Description
When parsing these reactions
H+CH2+M=CH3+M 6.E14 0.0 0.0
H+CH2(+M)<=>CH3(+M) 6.0E+14 .000 .00
LOW / 1.040E+26 -2.760 1600.00/
TROE/ .5620 91.00 5836.00 8552.00/
it seems that ck2yaml will interpret them both as pressure dependent and set pressure_dependent=True on both, but will only set the third_body attribute to M in the second reaction (the first reaction will have third_body=None).
When running through check_duplicate_reactions it will then reach the lines
elif (r1.third_body.upper() == 'M' and
r1.kinetics.efficiencies.get(r2.third_body) == 0):
and give an AttributeError: 'NoneType' object has no attribute 'upper' because r1.third_body is None.
Presumably the fix is for the parsing of the first reaction to set third_body='M' ??
But putting
if kind == 'third-body':
third_body = True
falloff3b = 'M' # <<<< new line
in the parse_expression method means we're setting a variable named "fall-off third body" for something that's technically not a "fall off" reaction. And may have other issues.
Or is the answer to change how check_duplicate_reactions works?
Should
H+CH2+M=CH3+M 6.E14 0.0 0.0
H+CH2(+M)<=>CH3(+M) 6.000E+14 .000 .00
LOW / 1.040E+26 -2.760 1600.00/
TROE/ .5620 91.00 5836.00 8552.00/
be considered duplicates anyway?
I know that Cantera does not consider these to be duplicates:
H+CH2=CH3 6.E14 0.0 0.0
H+CH2(+M)<=>CH3(+M) 6.000E+14 .000 .00
System information
- Cantera version: 2.4
- OS: Mac OS X
- Python: Python 3.7
Attachments
mechanism.txt
thermo.txt