slepicka-craig / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

ck2cti for LLNL n-Heptane Mechanismus v3.1 #239

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Convert the LLNL n-heptane v3.1 mechanism via ck2cti via Matlab
2.
nc7_ver3.1_mech.txt --> nc7_ver3.1_mech.inp
n_heptane_v3.1_therm.txt --> n_heptane_v3.1_therm.dat
n_heptane_v3.1_transport.txt --> n_heptane_v3.1_transport.dat
3. Called the function
f = ck2cti('nc7_ver3.1_mech.inp', 
'n_heptane_v3.1_therm.dat','n_heptane_v3.1_transport.dat')

What is the expected output? What do you see instead?
Expected to get one .cti file. Instead, I´ve received an error message as below

What version of the product are you using? On what operating system?
Cantera-2.1.1-x64
Matlab R2013b
Operating System-Windows 7 64bit
Python 3.3

Please provide any additional information below.
For a time critical project I urgently need the .cti file to further process.
For now, it would even be extremly helpfule if you could create the .cti file 
for me. 

Error using ctmethods

************************************************
                Cantera Error!
************************************************

Procedure: ck2cti
Error:   Error converting input file "c8-c16_n-alkanes_mech.inp" to CTI.
Python command was: 'C:\Python33\python.exe'
The exit code was: 7
-------------- start of converter log --------------
Traceback (most recent call last):
  File "<stdin>", line 8, in <module>
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 1828, in convertMech
    self.writeCTI(name=phaseName, outName=outName)
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 1707, in writeCTI
    raise InputParseError('No thermo data found for species: {0!r}'.format(s.label))
cantera.ck2cti.InputParseError: No thermo data found for species: 'h'
--------------- end of converter log ---------------

Error in ck2cti (line 35)
iok = ctmethods(0,1, infile, thermo, transport, idtag, 0, 0);

>> f = ck2cti('nc7_ver3.1_mech.inp', 
'n_heptane_v3.1_therm.dat','n_heptane_v3.1_transport.dat')
Error using ctmethods

************************************************
                Cantera Error!
************************************************

Procedure: ck2cti
Error:   Error converting input file "nc7_ver3.1_mech.inp" to CTI.
Python command was: 'C:\Python33\python.exe'
The exit code was: 7
-------------- start of converter log --------------
Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 931, in readThermoEntry
    (3,15,30), (3,30,45), (3,45,60)]]
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 930, in <listcomp>
    for i,j,k in [(2,30,45), (2,45,60), (2,60,75), (3,0,15),
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 812, in fortFloat
    return float(s)
ValueError: could not convert string to float: 'C5E1OOH3   2/27'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 8, in <module>
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 1809, in convertMech
    self.loadChemkinFile(thermoFile)
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 1493, in loadChemkinFile
    label, thermo, comp, note = self.readThermoEntry(thermo, TintDefault)
  File "C:\Python33\lib\site-packages\cantera\ck2cti.py", line 934, in readThermoEntry
    raise InputParseError('Error while reading thermo entry for species {0}:\n{1}'.format(species, err))
cantera.ck2cti.InputParseError: Error while reading thermo entry for species 
CPDOO:
could not convert string to float: 'C5E1OOH3   2/27'
--------------- end of converter log ---------------

Error in ck2cti (line 35)
iok = ctmethods(0,1, infile, thermo, transport, idtag, 0, 0);

Original issue reported on code.google.com by christia...@gmail.com on 25 Sep 2014 at 5:30

GoogleCodeExporter commented 9 years ago
Attached, you´ll find the relevant files as well

Thank you.

Original comment by christia...@gmail.com on 25 Sep 2014 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Christian,

Welcome to Cantera. This site is for bug reports about Cantera, but this is a 
well known problem with the LLNL mechanisms. They are very poorly formatted in 
general, but there is nothing Cantera can really do about this, so its not 
really a bug in Cantera. 

I would recommend you try to troubleshoot this yourself. Cantera is quite good 
with the error messages. You can see in the output above that there is a 
problem with the input near species CPDOO, where Cantera isn't sure how to 
parse the string 'C5E1OOH3   2/27' into a floating point number. I would guess 
there is some problem on one of the lines of the species previous to C5E10OOH3.

If you really can't get the problems fixed, post your question on the Cantera 
User's Group. You'll probably get a fast response from someone who can help you 
fix this. If you search on the group, you can find a number of posts already 
dealing with this exact problem: 
https://groups.google.com/forum/#!searchin/cantera-users/llnl

Finally, Nick Curtis has written a blog post detailing some of the fixes he 
needed to make to get the CTI file to be properly produced. That is located 
here: 
http://chemicalkinetics.wordpress.com/2013/11/15/my-procedure-for-converting-che
mkin-mechanisms-to-cantera-cti-mechanisms/

Best,
Bryan

Original comment by bryan.w....@gmail.com on 25 Sep 2014 at 11:12

GoogleCodeExporter commented 9 years ago
Do not submit duplicate issues as a method for getting the developers' 
attention.

Original comment by yarmond on 25 Sep 2014 at 11:19