CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

chemkinToFoam not reading transport files

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 2 Post By clapointe
  • 2 Post By zhangyan
  • 1 Post By ajithnair
  • 1 Post By Sugar-xm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2020, 10:50
Default chemkinToFoam not reading transport files
  #1
det
New Member
 
Daniel Thomas
Join Date: Mar 2020
Posts: 10
Rep Power: 6
det is on a distinguished road
I am trying to convert mechanisms from Chemkin format for use in OpenFoam, but have not had any success getting the chemkinToFoam utility to work. I consistently get this error message with the transport file:

Code:
--> FOAM FATAL IO ERROR:
"ill defined primitiveEntry starting at keyword '!' on line 1 and ending at line 1"
I've tried 5 different mechanism file sets with the same result (sometime the error is for the first line, sometimes for the whole file). Does the utility work in OpenFoam 7?

Details:
OpenFoam7 running on Ubuntu 18.04 via Windows subsystem for linux (WSL)
det is offline   Reply With Quote

Old   March 10, 2020, 16:58
Default chemkinToFoam in use?
  #2
det
New Member
 
Daniel Thomas
Join Date: Mar 2020
Posts: 10
Rep Power: 6
det is on a distinguished road
I'm new to OpenFOAM, so would also be interested to hear if anyone uses this chemkinToFoam utility. Is it something that is functional, or a relic from previous versions?
det is offline   Reply With Quote

Old   March 11, 2020, 06:00
Default
  #3
Member
 
Franco Marra
Join Date: Mar 2009
Location: Napoli - Italy
Posts: 70
Rep Power: 17
francescomarra is on a distinguished road
Dear Daniel,
it should work, but in my experience the chemkin file has to be very compliant with the formatting rules of chemkin. Actually this is not the case for several mechanisms you can find in several websites. The chemkin program itself is able to recognize correctly several extensions and not perfectly conforming formats to chemkin rules.

Best regards,
Franco
francescomarra is offline   Reply With Quote

Old   March 11, 2020, 09:37
Default
  #4
det
New Member
 
Daniel Thomas
Join Date: Mar 2020
Posts: 10
Rep Power: 6
det is on a distinguished road
Dear Franco,

Thank you for the note. I have noticed the inconsistency with Chemkin input files that you mention when I've converted them to Cantera cti format. But in that case, the error messages point me to the formatting problem; with chemkinToFoam, I get the same un-informative error no matter which input file set I use -- even the ones that are seemingly right on the Chemkin standard.

Daniel
det is offline   Reply With Quote

Old   March 12, 2020, 23:04
Default
  #5
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
If it is indeed a problem with the transport files it is likely not a problem with the mech file; check out the chemFoam tutorials. You'll notice that they use a file named something like transportProperties that is in Foam format -- not chemkin format. As noted previously, openfoam can also be quite picky about the format of the mech file (chemkinToFoam will also read the mech thermo just fine, possibly with just minor edits).

Caelan
det and ZhangPikai like this.
clapointe is offline   Reply With Quote

Old   March 17, 2020, 09:33
Default
  #6
det
New Member
 
Daniel Thomas
Join Date: Mar 2020
Posts: 10
Rep Power: 6
det is on a distinguished road
Caelan - Thank you for the note! I had been using the chemkin format transport file, as indicated by the chemkinToFoam help:

Code:
Usage: chemkinToFoam [OPTIONS] <CHEMKIN file> <CHEMKIN thermodynamics file> <CHEMKIN transport file> <OpenFOAM chemistry file> <OpenFOAM thermodynamics file>
As you suggested, I substituted the transportProperties file from the chemFoam tutorials, and that got me beyond the FATAL IO ERROR I was stuck on. Now I'm getting various errors related to the chemkin thermo file -- but at least stuff that I can work through.

It looks like the transportProperties file in the chemFoam tutorials is just a dud, with Sutherland As and Ts parameters set to zero. I'm modeling laminar diffusion flames, so the transport properties are important, and I'll need to figure out how to input that -- preferably from the chemkin file. So any suggestions on the best approach for that would be much appreciated.
det is offline   Reply With Quote

Old   May 26, 2021, 17:43
Default
  #7
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
Hi,
You may try my recently implemented reactingCanteraFoam:
https://github.com/ZhangYanTJU/reactingCanteraFoam
francescomarra and clapointe like this.
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   April 29, 2022, 03:07
Default
  #8
New Member
 
ajithnair's Avatar
 
Ajith U K Nair
Join Date: Sep 2021
Location: Kerala
Posts: 18
Rep Power: 5
ajithnair is on a distinguished road
Hello. If you were able to solve the issue kindly post the solution. I would relally appreciate it. I have the same error implementing sandeago mechanism for ethylene.
ugurtan666 likes this.
ajithnair is offline   Reply With Quote

Old   June 27, 2024, 10:36
Default
  #9
New Member
 
Select Your State or Province
Join Date: Jun 2024
Posts: 2
Rep Power: 0
Sugar-xm is on a distinguished road
GitHub上的“WWIIWWIIWW”大佬开发了ctTranToFoam程序,专门用于解决输运参数 的问题。在此之前需要安装cantera,使用ck2yaml脚本将chemkin格式转换为 cti/yaml格式,然后使用ctTranToFoam转为transportProperties。
The "WWIIWWIIWW" guy on GitHub developed the ctTranToFoam program specifically to solve the problem of transport parameters. Before you do this, you need to install cantera, convert chemkin format to cti/yaml format using ck2yaml script, and then convert to transportProperties using ctTranToFoam.
francescomarra likes this.
Sugar-xm is offline   Reply With Quote

Reply

Tags
chemkintofoam, mechanism, pre-processing


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Error while reading VTK files in Paraview d_ray ParaView 12 January 24, 2018 09:00
Reading data files in Matlab the Fortran way faysaal Main CFD Forum 7 October 25, 2015 10:56
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 11:46
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51


All times are GMT -4. The time now is 08:56.