Error using ck2cti for converting to .cti format

222 views
Skip to first unread message

Ambuj Punia

unread,
Mar 1, 2019, 7:33:24 PM3/1/19
to Cantera Users' Group
Hi Everyone

I am using cantera 2.3.0 using anaconda environment(python 3.6). I was trying to convert the mech.dat file and therm.dat file to .cti file using the command "ck2cti --input=mech.dat --thermo=therm.dat --permissive".

When I try to convert using this command, I get this error 


ambuj@secanell-grad32:~/PhD Work/modelling/mechanisms/Dean$ ck2cti --input=mech.dat --thermo=therm.dat --permissive
WARNING:root:Found additional declaration of species CC*CCC.
WARNING:root:Found additional declaration of species C2CCC.
WARNING:root:Found additional declaration of species C*CCCC.*C
WARNING:root:Found additional declaration of species CH2*CPANE3.
WARNING:root:Found additional declaration of species C*CC2C*C
WARNING:root:Found additional declaration of species C*CC2C*C
WARNING:root:Found additional declaration of species CC*CCCC.
WARNING:root:Found additional declaration of species CYC5H4.CC
WARNING:root:Found additional declaration of species CHPD14
WARNING:root:Found additional declaration of species C*CCC*CC.C
WARNING:root:Found additional declaration of species ME14-CPENE4.
WARNING:root:Found additional declaration of species CC*CCCC*C
WARNING:root:Found additional declaration of species C*C2CC2*C
WARNING:root:Found additional declaration of species CC*CCCC*CC.
WARNING:root:Found additional declaration of species CC*CCC*CC.C
WARNING:root:Found additional declaration of species ME34-CHEXE5.
WARNING:root:Found additional declaration of species C*CC2CC*CC.
WARNING:root:Found additional declaration of species CC*CCC2*CC.
WARNING:root:Found additional declaration of species ME14-CHEXE5.
WARNING:root:Found additional declaration of species ME2-Et4-CPENE3.
WARNING:root:Found additional declaration of species C*CC2C(C.)CC
ERROR:root:Error reading reaction entry starting on line 8890:
WARNING:root:
ERROR: Unable to parse 'mech.dat' near line 58551:

Traceback (most recent call last):
 File "/home/ambuj/anaconda3/bin/ck2cti", line 6, in <module>
   sys.exit(cantera.ck2cti.script_entry_point())
 File "/home/ambuj/anaconda3/lib/python3.6/site-packages/cantera/ck2cti.py", line 2299, in script_entry_point
   main(sys.argv[1:])
 File "/home/ambuj/anaconda3/lib/python3.6/site-packages/cantera/ck2cti.py", line 2272, in main
   permissive=permissive)
 File "/home/ambuj/anaconda3/lib/python3.6/site-packages/cantera/ck2cti.py", line 2169, in convertMech
   self.loadChemkinFile(inputFile)
 File "/home/ambuj/anaconda3/lib/python3.6/site-packages/cantera/ck2cti.py", line 1845, in loadChemkinFile
   reaction, revReaction = self.readKineticsEntry(kinetics, surface)
 File "/home/ambuj/anaconda3/lib/python3.6/site-packages/cantera/ck2cti.py", line 1328, in readKineticsEntry
   Ea=(float(tokens[2].strip()), energy_units),
IndexError: list index out of range



I don't know what the issue is, and thats why I am posting the problem here with an attached mechanism and thermo files. Request you to please help.


Regards
Ambuj
mech.dat
therm.dat

Ray Speth

unread,
Mar 2, 2019, 12:44:20 PM3/2/19
to Cantera Users' Group
Hi Ambuj,

First, I would recommend upgrading to the current version of Cantera, 2.4.0. Second, have you tried looking at the reaction entry starting on line 8890 of your input file, which is suggested by the error message?

Regards,
Ray

Bryan W. Weber

unread,
Mar 2, 2019, 1:31:15 PM3/2/19
to Cantera Users' Group
Hi Ambuj,

It looks like you're using Linux. To view the line numbers in the file, you can use the nano text editor from the terminal with

nano -c mech.dat

which will show you the line numbers in the center-bottom of the screen. To go to line 8890, type ALT+g and enter the line number. See also: https://askubuntu.com/a/73465/166909 You could also use a graphical text editor like Atom or Visual Studio Code. (The same should work for macOS in case I misinterpreted your terminal).

Best,
Bryan

Ambuj Punia

unread,
Mar 4, 2019, 12:48:01 PM3/4/19
to canter...@googlegroups.com
Hi Bryan

Thank you for your reply. The reaction entry on line 8890 is :

C#CC. + CH3(+M) = C*C*CC(+M)                                    1.50E+12     0.0    0.0      line 8890

I checked the same using the command given by you and it is useful in getting the line on terminal so thank you for that, but I am still not able to figure it out the problem in the reaction. Is it the # sign which is creating the problem? I think it should not create the problem because the species has already been defined and has been used in previous other reactions. 

CH3+C#CC.=C#CC.C+H                                          6.75E+16     -1.17  18731.    !1.00E+00 atm,  900-2500 K,    line 8883      

Waiting for your reply.


Regards
Ambuj

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Bryan W. Weber

unread,
Mar 4, 2019, 1:53:34 PM3/4/19
to Cantera Users' Group
Ambuj,

The problem with that reaction appears to be the LOW coefficients on the line below, there are only 2 coefficients, not 3 that are required. It is up to you how to fix this, in the absence of any information from the mechanism authors. You could comment this reaction out, or try to find the missing parameter.

Best,
Bryan
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-users+unsubscribe@googlegroups.com.

Ambuj Punia

unread,
Mar 4, 2019, 2:09:26 PM3/4/19
to canter...@googlegroups.com
Hi Bryan 

Thanks for the your help I tried commenting that reaction and it worked. 

I have two more queries. If in the mechanism file there are multiple unmarked duplicate reaction entries then how to handle them(apart from doing them manually).
Second one is that if in the mechanism file we have to comment the species data for which is not present in thermo file how can I do that.

Once again thank you for your help and time.

Regards
Ambuj



To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.

To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.

Bryan W. Weber

unread,
Mar 4, 2019, 5:14:29 PM3/4/19
to Cantera Users' Group
Hi Ambuj,

Just watch out with commenting reactions, because it may change the behavior relative to other software that uses this mechanism (e.g., if that reaction is important to the problem you're studying). I doubt that particular reaction will be critical, but you never know...

Both of those problems you mention are problems in the construction of the mechanism, so Cantera is not sure how to proceed. Therefore, you have to handle each case manually. If you are curious which is the correct reaction to include, or if the reactions should in fact be duplicates, you'll have to contact the mechanism authors.

Best,
Bryan
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-users+unsubscribe@googlegroups.com.

To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-users+unsubscribe@googlegroups.com.

Ambuj Punia

unread,
Mar 4, 2019, 6:14:22 PM3/4/19
to canter...@googlegroups.com
Hi Bryan

Thank you very much for your time and help.


Regards
Ambuj

To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.

To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.

To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages