ck2yaml conversion issue

399 views
Skip to first unread message

Saurabh Sivakumar

unread,
Feb 16, 2022, 12:38:45 PM2/16/22
to Cantera Users' Group
Hi,

I am looking to convert the attached 2 files into the cantera yaml format using ck2yaml --permissive --surface=sm_CH4_O2_H2O_CO2_Rh_2013_chemkin.txt --thermo=td_CH4_O2_H2O_CO2_Rh_2013.txt. The data was obtained from https://www.detchem.com/mechanisms

I run into the following issue when running the command. 

ERROR: Unable to parse 'td_CH4_O2_H2O_CO2_Rh_2013.txt' near line 2:

Traceback (most recent call last):
  File "C:\Users\saura\.conda\envs\ct-env\Scripts\ck2yaml-script.py", line 10, in <module>
    sys.exit(script_entry_point())
  File "C:\Users\saura\.conda\envs\ct-env\lib\site-packages\cantera\ck2yaml.py", line 2223, in script_entry_point
    main(sys.argv[1:])
  File "C:\Users\saura\.conda\envs\ct-env\lib\site-packages\cantera\ck2yaml.py", line 2187, in main
    parser, surfaces = Parser.convert_mech(input_file, thermo_file,
  File "C:\Users\saura\.conda\envs\ct-env\lib\site-packages\cantera\ck2yaml.py", line 2037, in convert_mech
    parser.load_chemkin_file(thermo_file,
  File "C:\Users\saura\.conda\envs\ct-env\lib\site-packages\cantera\ck2yaml.py", line 1622, in load_chemkin_file
    TintDefault = float(line.split()[1])
ValueError: could not convert string to float: '70590C'


Any help in trying to understand/resolve this issue would be appreciated. 

Thank you
sm_CH4_O2_H2O_CO2_Rh_2013_chemkin.txt
td_CH4_O2_H2O_CO2_Rh_2013.txt

Ray Speth

unread,
Feb 16, 2022, 12:57:14 PM2/16/22
to Cantera Users' Group
Hi,

The second line of the thermo file is supposed to specify default values for the minimum / middle / maximum temperatures. See soot-therm.dat as an example.

Regards,
Ray

Kartik

unread,
Aug 22, 2022, 2:25:03 PM8/22/22
to Cantera Users' Group
Hello,
I am facing the same issue. The error is in parsing the string before the elemental composition, which is usually a date. Tried converting the CH4-O2 reaction on Pt using the original chemkin format to yaml format that comes with the Cantera module but was getting same error.
Could you debug the error?

Thanks in advance.

Kartik.

On Wednesday, February 16, 2022 at 12:38:45 PM UTC-5 saurab...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages