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

Chemkin reader

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2012, 02:22
Default
  #21
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
you probably forgot to add the appropriate line to the file liquidProperties/Make/files
niklas is offline   Reply With Quote

Old   October 18, 2012, 05:16
Default
  #22
New Member
 
Gustavo
Join Date: Feb 2010
Location: Curitiba - PR - Brasil
Posts: 16
Rep Power: 16
ghindi is on a distinguished road
Hi Niklas,

thanks a lot. I've forgot to add the line.

Regards,
Gustavo.
ghindi is offline   Reply With Quote

Old   October 19, 2012, 07:36
Default
  #23
New Member
 
Jan Kubata
Join Date: Mar 2009
Location: Prague, Czech Republic
Posts: 10
Rep Power: 17
JanKubata is on a distinguished road
Hi,
don't forget to edit files in Make folder. You have to add your new liquid in these files too. After that I tkink it will be ok.
Best regards
Jan
JanKubata is offline   Reply With Quote

Old   November 20, 2012, 08:00
Smile CHEMKIN files
  #24
Member
 
sushant's Avatar
 
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 17
sushant is on a distinguished road
(Digging out an old post, but better than creating a new one)

I was trying to read the CHEMKIN files for the Pitsch 44-species n-heptane mechanism (http://www.stanford.edu/group/pitsch/CES.htm) into OpenFOAM 2.1.x. The solver is sprayFoam on the usual aachenBomb case (which I want to turn into the sandia bomb).

The chemkinReader rejects this file outright, but the following steps are enough to solve the problem:

1. Replace windows line endings with UNIX; use dos2unix on the command line or choose UNIX endings when doing a "Save as..." from your usual GUI text editor (or else chemkinReader spits out a perfectly normal line and says it understands nothing)

2. Go through the file and remove all blank lines (or else chemkinReader reports finding stray ^M's - which is precisely the newline symbol)

3. In the rightmost columns (1,2,3,4,1,2,3,4... line by line) some lines are marked (labelled?) as (31,2,3,4,41,2,3,4). I haven't the faintest idea of the intricacies of the file format, but ditch this and replace all 31|41|51|01|etc with just 1. Mind the impeccable column alignment. Unless you really know how to, don't do a "Replace all" in the whole file - numbers like 31 can obviously appear anywhere in the species specification as well.

4. Replace commas in names with dashes (CH3O2,2) -> (CH3O2-2) (does this change the meaning? -- see below)

5. Convert everything to upper case. (doesn't matter?)

6. Make sure you name things consistently, for example the chemkin files I downloaded use NC7H16 but the case files (e.g. constant/thermophysical) has C7H16, change the chemkin file to reflect this.

Someone with experience on the CHEMKIN file format may please object and point out if any of these steps affects the validity of the mechanism. For example, earlier from marcbest [Jun 16 2010] about handling parenthesis in names (as opposed to just removing them):
Quote:
In detailled chemistry reactions, there are many radicals involved, for example CH2(S) which is the singlet state of methylene, whereas CH2 is the triplet state.
So CH2(S) means not solid, but singlet-state. To make the reactrion work CH2(S) must be written as CH2* which is exactly the same molecule-configuration.
tanchen likes this.
sushant is offline   Reply With Quote

Old   January 25, 2013, 12:52
Default
  #25
Member
 
Robertas N.
Join Date: Mar 2009
Location: Kaunas, Lithuania
Posts: 53
Rep Power: 17
r08n is on a distinguished road
OF v. 2.1.0

I'm trying to use the H2/CO reaction mechanism from here:
http://creckmodeling.chem.polimi.it/...2-co-mechanism

For a start, I tried chemFoam, then chemkinToFoam,
and all I get is this:

----8<----

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Constructing single cell mesh

Reading initial conditions.

Creating base fields for time 0

Reading thermophysicalProperties
Selecting psiChemistryModel ODEChemistryModel<gasThermoPhysics>
Selecting thermodynamics package hsPsiMixtureThermo<reactingMixture<gasThermoPhysic s>>
Selecting chemistryReader chemkinReader


--> FOAM FATAL ERROR:
while reading thermodynamic specie name on line 1
expected <word> (18A1) but found '"E"LEMENTS'

From function chemkinReader::lex()
in file chemistryReaders/chemkinReader/chemkinLexer.L at line 1497.

FOAM exiting

----8<----

The chemkin file begins like this:

ELEMENTS
C
H
CL
O
N
AR
HE
END
SPECIES
HE AR N2 O2 H2
H2O H2O2 CO CO2
O H OH HO2 HCO
END
REACTIONS
H+O2=OH+O .2210E+15 .000 16650.0
...
I converted the chemkin files with dos2unix, and the file seems to be in ASCII, not Unicode (I run 'iconv' also). What's the matter?
r08n is offline   Reply With Quote

Old   February 12, 2013, 07:47
Default
  #26
Member
 
sushant's Avatar
 
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 17
sushant is on a distinguished road
Quote:
Originally Posted by r08n View Post
OF v. 2.1.0

...
I converted the chemkin files with dos2unix, and the file seems to be in ASCII, not Unicode (I run 'iconv' also). What's the matter?
Does your therm.dat have an END at the end?
sushant is offline   Reply With Quote

Old   February 12, 2013, 09:23
Default
  #27
Member
 
Robertas N.
Join Date: Mar 2009
Location: Kaunas, Lithuania
Posts: 53
Rep Power: 17
r08n is on a distinguished road
Quote:
Originally Posted by sushant View Post
Does your therm.dat have an END at the end?
It does now Thanks a lot!
In my defence, it was not MY therm.dat
r08n is offline   Reply With Quote

Old   March 17, 2016, 06:01
Default
  #28
New Member
 
NGUYENVB
Join Date: Aug 2015
Posts: 11
Rep Power: 11
vanbonguyen is on a distinguished road
Hi Nordin and others,

I am using high carbon hydrogen fuel (C12H23). However, when i try to call the thermo.dat and chemi.inp. It seems to work well with speices which has x<10 (where CxHy), but it got problem with species with x>10 (C12H23). Following is the error:
--> FOAM FATAL ERROR:
Unknown element 2 on line 69
specieComposition:
2
(
1 C
3 2
)


From function chemkinReader::lex()
in file chemistryReaders/chemkinReader/chemkinReader.C at line 134.

and the thermo data:
C12H23 121386C 12H 23 G 0200.00 7000.00 1000.00 1
0.02488020E+03 0.07825005E+00-0.31550973E-04 0.57878900E-08-0.39827968E-12 2
-0.38508837E+05-0.95568240E+03 0.20869217E+01 0.13314965E+00-0.81157452E-04 3
0.29409286E-07-0.65195213E-11-0.31310966E+05 0.25442305E+02 4

So, can any one help me to fix this?
Thank you very much,
Van BO
vanbonguyen is offline   Reply With Quote

Old   March 8, 2022, 11:16
Default
  #29
Member
 
Join Date: Apr 2014
Location: N/A
Posts: 50
Rep Power: 12
FluentStarter is on a distinguished road
Quote:
Originally Posted by ghindi View Post
Hi there!

I'm using OF 2.1.x trying to use the sprayFoam solver with DME as fuel. I've downloaded from LLNL the detailed chemical mechanism and the thermodynamics data.
When I run my case I got the following error message:
"Unknown liquid properties type CH3OCH3
Valid liquidProperties type are:...."
There is a list of 30 "valid" species.
I've then gone to the /src/thermophysicalModels/properties/liquidProperties folder and created a folder for CH3OCH3, by copying another folder.
I've edited the just created CH3OCH3.C, CH3OCH3.H and CH3OCH3I.H files.
When I try to run the Allwmake from the /properties folder, the new fuel does not get compiled.
Can someone please help?
Another question. Do I need to create also all the other species from the DME mechanism and compile?

Best regards,
Gustavo.
I'm currently trying the same thing with another fluid. However, when I try to run wmake I get several errors (Permission denied because I'm not doing it as root) but if I do it as root wmake is not found.

How do I get around this?
FluentStarter is offline   Reply With Quote

Reply


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
[OpenFOAM] ParaFoam reader duartealbuquerque ParaView 21 December 24, 2009 00:29
A reader for cavityOpenFOAM alex OpenFOAM Running, Solving & CFD 11 April 2, 2009 10:57
[OpenFOAM] ParaView Reader %7c Visit tj22 ParaView 16 September 25, 2008 15:01
Chemkin reader TROE parameters stefanke OpenFOAM Running, Solving & CFD 1 September 9, 2006 01:02
[OpenFOAM] Reader should I visualize t%3d0 tj22 ParaView 1 June 30, 2006 11:16


All times are GMT -4. The time now is 22:34.