我遵循Matlab用户指南网站http://www.cantera.org/docs/sphinx/html/matlab/code-docs/utilities.html将CHEMKIN输入文件转换为Cantera格式,步骤如下
adddir('the directory of chem.inp,therm.dat and tran.dat')f = ck2cti('chem.inp', 'therm.dat', 'tran.dat')但是发生了一个错误。
************************************************
Cantera Error!
************************************************
Procedure: ck2cti
Error: Error converting input file "chem.inp" to CTI.
Python command was: 'C:\Python34\python.exe'
The exit code was: 7
-------------- start of converter log --------------
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
File "C:\Python34\lib\site-packages\cantera\ck2cti.py", line 1899, in convertMech
raise IOError('Missing input file: {0!r}'.format(inputFile))
OSError: Missing input file: 'chem.inp'
--------------- end of converter log ---------------
error ck2cti (line 47)
iok = ctmethods(0, 1, infile, thermo, transport, idtag, 0, 0);这个问题有解决办法吗?如有任何答复将不胜感激!
发布于 2016-05-24 09:32:00
Adddir不是内置的matlab函数,您应该使用加法路径 .
因此,它变成:
addpath('the directory of chem.inp,therm.dat and tran.dat')
f = ck2cti('chem.inp', 'therm.dat', 'tran.dat')还请检查您的文件“chem.inp”是否存在并放置在正确的文件夹中。
https://stackoverflow.com/questions/37408919
复制相似问题