Closed GoogleCodeExporter closed 9 years ago
Try running with the "--permissive" flag.
Original comment by yarmond
on 26 Sep 2013 at 12:45
[deleted comment]
still fails with --permissive on.
The first error is in readKineticsEntry:
alpha = float(tokens[0].strip())
ValueError: invalid literal for float(): 0.902,
The relevant entry appears to be this one:
C6H5 (+M) = o-C6H4 + H (+M) 4.300E+12 0.616 77313. ! RRKM 00-HAI-FRE
LOW/ 1.000E+84 -18.866 90064 /
TROE/ 0.902, 696., 358., 3856. /
H2/2.0/ H2O/6.0/ CH4/2.0/ CO/1.5/ CO2/2.0/
I located the offending lines in the 'troe' part of readKineticsEntry, where
replacing lines 1193ff in ck2cti.py with
elif 'troe' in line.lower():
# Troe falloff parameters
tokens = tokens[1].split()
alpha = float(tokens[0].strip(', '))
T3 = float(tokens[1].strip(', '))
T1 = float(tokens[2].strip(', '))
try:
T2 = float(tokens[3].strip(', '))
except (IndexError, ValueError):
T2 = None
fixes that particular issue. However, there's another error with:
if (self.energy_units != ENERGY_UNITS[energyUnits] or
KeyError: '-'
which arises in a different section (in loadChemkinFile, line 1490)
Original comment by ischo...@gmail.com
on 26 Sep 2013 at 2:07
I've never seen any indication that commas are an allowed separator in the
Chemkin input file format. I think this should be regarded as an error in the
input file that just happens to be ignored by the Chemkin interpreter.
The second error is caused by the "comments" at the end of the file (starting
on line 1784) that are not marked as such. Again, I've never seen any
indication that the Chemkin file format permits comments unless they are marked
by the comment character '!'.
I made some additions in r2552 which should identify the line and file where
the error occurs, which make it easier to determine the source of the error. In
this case, the parser is picking up on the word 'reactions' on line 1794 as the
start of a section containing more reactions.
Original comment by yarmond
on 30 Sep 2013 at 2:16
Original issue reported on code.google.com by
ischo...@gmail.com
on 26 Sep 2013 at 4:57