How to convert cti/xml to chemkin mechanism format

1,440 views
Skip to first unread message

Weiqi Ji

unread,
Apr 13, 2016, 2:52:24 AM4/13/16
to Cantera Users' Group
Hi all,

xml is a greate format for structured reading and modification. However I have to convert the modified xml file to chemkin mechanism file to cooperate with some CFD solver.
Is there anyone has tried to write a code to convert xml to chemkin mechanism format?

Thanks,
Weiqi

Nick Curtis

unread,
Apr 13, 2016, 10:19:14 AM4/13/16
to Cantera Users' Group
Weiqi Ji,
I did actually create a tool to do just this a few months to a year ago.
Basically it works as a wrapper around ck2cti, where it takes as input the base chemkin mechanism and a skeletal cantera mechanism (under --mask).
Then it compares species and reaction strings to determine what's shared by the skeletal cantera mechanism and the chemkin mechanism.
Finally, as ck2cti thankfully stores the line numbers during conversion, it reads the chemkin file between those lines and outputs it to a file.
Note that this was written for version 2.2, and I last tested it some time ago.  Additionally if you're modifying the reactions (nu's/species/etc.) it won't work as you'd want.

Nick
ctml2ck.py

Weiqi Ji

unread,
Apr 13, 2016, 10:25:56 PM4/13/16
to canter...@googlegroups.com
Thanks Nick. It sounds a genius approach.

Weiqi

--
You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/rr7GPiZVG0c/unsubscribe.
To unsubscribe from this group and all its topics, 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.



--

Weiqi Ji , Ph.D student

Center for Combustion Energy & Dept. of Thermal Engineering 

Tsinghua University, BJ, China

 Note: I am currently visiting Clean Combustion Research Center, KAUST, Thuwai, Saudi Arabia at GMT+3.

Reply all
Reply to author
Forward
0 new messages