hkmoffat / cantera

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

Error converting Chemkin file to Cantera Format #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I want to convert ethanol combustion files data(reaction 
mechanism,thermodynamic data,transport parameters) into cantera format(.cti) 
which are currently in chemkin format(downloaded from the LLNL site).

2.I converted these files from .txt format to other formats such as: chemical 
kinetics into .inp file, thermodynamic data into .DAT and transport parameters 
also into .DAT files. Then I imported these files into MATLAB required folder.

3. After that I used matlab ck to cti files convert utility program
(eg. f = ck2cti('chem.inp','therm.dat','tran.dat')

What is the expected output? What do you see instead?
Expected output is a .cti file for use in cantera but I am getting an error as 
'no element found' in the ck2cti log.

What version of the product are you using? On what operating system?
Cantera-2.0.2-x64
Matlab R2009a
Operating System-Windows 7

Please provide any additional information below.
Please help me to solve the problem encountered in converting chemkin files to 
cantera format.
The error report in matlab looks like this-
??? Error using ==> ctmethods

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

Procedure: convert_ck
Error:   error encountered in input file chem.inp
see file ck2cti.log for more information.

Error in ==> ck2cti at 44
iok = ctmethods(0,1, infile, thermo, transport, idtag, debug, validate);

I am attaching the files I am using for reference.

Original issue reported on code.google.com by shubham....@gmail.com on 8 Jun 2013 at 4:52

Attachments:

GoogleCodeExporter commented 9 years ago
Can you post the contents of the ck2cti.log file generated? Also, is there any 
difference if you use the "ck2cti.exe" program from the command line, e.g. 
something like:

    "C:\Program Files\Cantera\bin\ck2cti.exe" -i chem.inp -t therm.dat -tr tran.dat

Original comment by yarmond on 10 Jun 2013 at 5:28

GoogleCodeExporter commented 9 years ago
I tried using it from commmand line also.
A dialog box opens saying ck2cti.exe error and then no other output is received.

I am attaching the ck2cti.log file generated.

Original comment by shubham....@gmail.com on 10 Jun 2013 at 6:06

Attachments:

GoogleCodeExporter commented 9 years ago
I am unable to reproduce this behavior with this mechanism. Can you try running 
it with the vebose and debug flags:

    "C:\Program Files\Cantera\bin\ck2cti.exe" -v -d -i chem.inp -t therm.dat -tr tran.dat

starting from a command prompt in the directory containing chem.inp and the 
other input files? Can you post a screenshot of the dialog box showing the 
error? Are you able to convert any other input files, e.g the GRI 3.0 input 
file here:

   https://code.google.com/p/cantera/source/browse/cantera/trunk/data/inputs/gri30.inp

Original comment by yarmond on 10 Jun 2013 at 8:36

GoogleCodeExporter commented 9 years ago
I tried with the GRI 3.0 input file and the same error is coming up.

I have attached a screenshot of the error while running from the command prompt.

Original comment by shubham....@gmail.com on 11 Jun 2013 at 9:03

Attachments:

GoogleCodeExporter commented 9 years ago
What are the contents of contents of the ck2cti.log file when running with the 
"-v -d" flags? (make sure to delete the existing log file first).

Can you make sure that this is the version of ck2cti.exe included with Cantera 
2.0.2? It should have a file size of 325,120 bytes.

The other possibility that comes to mind is that it's finding a strange version 
of a system DLL. Can you download Dependency Walker from this site:

    http://www.dependencywalker.com/depends22_x64.zip

And use it to open the ck2cti.exe. It will show you which DLLs the EXE is 
accessing. There should be two warnings, one about "delay-load dependency 
module not found" and one about "missing export function in a delay-load 
dependency", which are related to IESHIMS.DLL and IEFRAME.DLL. Everything else 
should be resolved correctly, and all of the libraries should be in 
C:\windows\system32 or c:\windows\winsxs. If this is not the case, then I think 
that may be the source of the problem.

Original comment by yarmond on 11 Jun 2013 at 1:50

GoogleCodeExporter commented 9 years ago
I checked the version of ck2cti.exe included and it was of 325,120 bytes.

I also used the dependency walker to check the DLLs the EXE file is accessing.
There were two warnings namely "delay load dependency module not found" and 
"missing export function in a delay-load dependency". Apart from this all the 
libraries were in C:\windows\system32 or C:\windows\winsxs.

I have attached the ck2cti.log file generated when using the "-v -d" flags.

Original comment by shubham....@gmail.com on 11 Jun 2013 at 4:39

Attachments:

GoogleCodeExporter commented 9 years ago
The problem here must be something to do with the configuration of your 
computer, but I'm not sure what it would be. On any other Windows system, this 
copy of ck2cti.exe works fine for both the gri30.inp as well as the LLNL 
ethanol mechanism. 

The only suggestion I have right now is that you could try installing the 
32-bit version of Cantera as well, which might not have the same interaction 
with your system.

Original comment by yarmond on 11 Jun 2013 at 10:57

GoogleCodeExporter commented 9 years ago
Rather than trying to deal with a bug in the deprecated C++ version of ck2cti, 
I would suggest downloading a copy of the newer Python ck2cti tool:

    https://cantera.googlecode.com/svn/cantera/trunk/interfaces/python/ck2cti.py

and using it to convert the mechanism, e.g.

    python ck2cti.py --inp=ethanol_mech.txt --therm=ethanol_v1b_therm.txt --tran=ethanol_trandat.txt --permissive

(The 'permissive' flag is required because the original file contains duplicate 
thermo data for several species.)

Original comment by yarmond on 8 Jul 2013 at 1:46

GoogleCodeExporter commented 9 years ago
I encountered similar problem and reinstalling the entire Cantera seems to 
resolve the problem. Remember to uninstall and clear the Cantera directory. 
Hope it helps. 

Original comment by lee557.p...@gmail.com on 25 Jul 2013 at 3:34