|
[Sponsors] |
May 25, 2017, 03:02 |
question about chemkinToFoam
|
#1 |
New Member
FengHaifeng
Join Date: May 2017
Posts: 4
Rep Power: 9 |
I’m a beginner of OpenFOAM and I’m using OpenFOAM4.1. I’m using chemkinToFoam to import reaction from chemkin to OpenFOAM. The usage of chemkinToFoam in OpenFOAM4.1 is:
chemkinToFoam [OPTIONS] <CHEMKINFile> <CHEMKINThermodynamicsFile> <CHEMKINTransport> <FOAMChemistryFile> <FOAMThermodynamicsFile> But an error occurred when I tried to import the CHEMKINTransport(tran.dat): --> FOAM FATAL IO ERROR: "ill defined primitiveEntry starting at keyword '!' on line 1 and ending at line 80" file: trans.dat at line 80. From function void Foam:rimitiveEntry::readEntry(const Foam::dictionary&, Foam::Istream&) in file db/dictionary/primitiveEntry/primitiveEntryIO.C at line 189. FOAM exiting it seems that there are some problems with my CHEMKINTransport. my CHEMKINTransport(tran.dat) looks like these: ! CURRAN, H. J., PITZ, W. J., AND WESTBROOK, C. K., 2002 ! UCRL-WEB-204236 ! REVIEW AND RELEASE DATE: MAY 19, 2004. ! AR 0 136.500 3.330 0.000 0.000 0.000 RR 0 136.500 3.330 0.000 0.000 0.000 AS 0 1045.500 4.580 0.000 0.000 0.000 ! MEC ASH 1 199.300 4.215 0.000 0.000 1.000 ! MEC ASH2 2 229.600 4.180 0.000 0.000 1.000 ! MEC C 0 71.400 3.298 0.000 0.000 0.000 ! * C2 1 97.530 3.621 0.000 1.760 4.000 C2O 1 232.400 3.828 0.000 0.000 1.000 ! * CN2 1 232.400 3.828 0.000 0.000 1.000 ! OIS C2H 1 265.300 3.721 0.000 0.000 2.500 ! NMM C2H2 1 265.300 3.721 0.000 0.000 2.500 ! NMM C2H2OH 2 224.700 4.162 0.000 0.000 1.000 ! * … How should I modify it so that it can be imported correctly? Thank you in advance. |
|
June 12, 2017, 16:37 |
Same issue
|
#2 |
New Member
Sid Nigam
Join Date: Feb 2016
Posts: 4
Rep Power: 10 |
Hi,
Were you able to correct this? I'm working on a similar issue and my challenge is trying to figure out how to import the transport file correctly as well. It seems like in OpenFoam version 4+ you need the transport file. Previously, it wasn't required. |
|
June 13, 2017, 13:21 |
|
#3 |
New Member
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
It happened to me too. I was trying with GRI 3.0, perfectly clean transport data file. It is probably a bug in OpenFOAM. Above, my log:
--> FOAM FATAL IO ERROR: "ill defined primitiveEntry starting at keyword 'AR' on line 1 and ending at line 112" file: transport.dat at line 112. From function void Foam:rimitiveEntry::readEntry(const Foam::dictionary&, Foam::Istream&) in file db/dictionary/primitiveEntry/primitiveEntryIO.C at line 189. FOAM exiting And transport file begins with: AR 0 136.500 3.330 0.000 0.000 0.000 C 0 71.400 3.298 0.000 0.000 0.000 ! * C2 1 97.530 3.621 0.000 1.760 4.000 C2O 1 232.400 3.828 0.000 0.000 1.000 ! * CN2 1 232.400 3.828 0.000 0.000 1.000 ! OIS C2H 1 209.000 4.100 0.000 0.000 2.500 Another thing to notice: the transport file has only 110 lines, but OpenFOAM tells the problem is in line 112. If someone has a fix, it would be gratefully wellcomed. |
|
June 26, 2017, 04:00 |
|
#4 |
New Member
FengHaifeng
Join Date: May 2017
Posts: 4
Rep Power: 9 |
Actually I gave up and installed the OpenFOAM3.0 which doesn't require the CHEMKINThermodynamicsFile.
|
|
June 26, 2017, 06:02 |
|
#5 |
New Member
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
I have flagged it as a bug in OpenFoam.org, and they answered me saying they don't have the feature installed in OF. So, they depend on someone programming it for them, which is quite strange, considering their software pretends to provide the feature. I'll do the same (install OF3.0), unfortunately, this new version doesn't do what I need.
|
|
June 30, 2017, 15:57 |
|
#6 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
You need to have the transport data in an Openfoam dictionary format. Check the files in the chemFoam tutorials.
Caelan |
|
July 5, 2017, 13:41 |
chemkinToFoam
|
#7 |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Dear all
I am using OF version 2.3.1 and to convert mechanism from Chemkin to OF format, I dont need transport file. I just used the command- chemkinToFoam <chemistry in CK format> <thermo in CK format> <chemistry in OF format> <themo in OF format> It works fine. I dont know if anyone used in the format or not, but did you notice that there is an automatic mole to kmole conversion of all the A-factors during the conversion? I dont know if it is really a mole to kmole conversion or not but all the A-factors are decreased by factors of 3. Could anyone explain if that conversion is really needed. |
|
July 5, 2017, 13:56 |
|
#8 | |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Quote:
Could you explain what you meant by 'chemFoam tutorials'. By the way, I am an older version OF user, I use version 2.3.1. thanks ~SFA |
||
July 5, 2017, 15:13 |
|
#9 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
I've included a link to the chemFoam tutorials in the git repository for 2.3.x.
https://github.com/OpenFOAM/OpenFOAM...stion/chemFoam Caelan |
|
July 5, 2017, 17:33 |
|
#10 |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Thanks Caelan.
That means you dont need any conversion there and you also have the A-factors as those in chemkin file. If possible, could you share your thoughts on that mole-kmole issue. By the way, where are those transport parameters in that solver? |
|
July 5, 2017, 18:01 |
|
#11 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
I'd mentioned the solver originally as a source with an example (empty) transport properties dictionary. Unfortunately I do not have much experience with the solver itself.
As far as the conversion from mol to kmol goes, it is included in the chemkin chemistry reader code: Code:
// Calculate the unit conversion factor for the A coefficient // for the change from mol/cm^3 to kmol/m^3 concentraction units const scalar concFactor = 0.001; scalar sumExp = 0.0; forAll(lhs, i) { sumExp += lhs[i].exponent; } scalar Afactor = pow(concFactor, sumExp - 1.0); scalar AfactorRev = Afactor; |
|
July 6, 2017, 12:39 |
|
#12 | |
Member
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11 |
Quote:
Are you still using version 2.3.x? If so, when you convert the mechanism from CK to OF, did you find the A-factor lowered by factor of 3? Could you PLEASE give me an idea of the rationale there? |
||
March 4, 2018, 15:46 |
|
#13 |
New Member
Omair
Join Date: May 2017
Posts: 9
Rep Power: 9 |
Can we convert the chemkin files with OF 2.3.x and use them in OF 4.1?
Can we install both on a single machine? |
|
March 5, 2018, 12:39 |
|
#14 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
There was a change from 2.3 to 4 -- version 4 also uses transport properties. I'd be surprised if files produced with version 2.3 worked with version 4. However, you can install multiple versions -- just make sure to source the correct (eg) bashrc file.
Caelan |
|
March 9, 2018, 16:00 |
|
#15 |
New Member
Omair
Join Date: May 2017
Posts: 9
Rep Power: 9 |
ChemkinToFoam reader of OF 4.1 is working without producing any errors now. However, its using constant values for transport data of all species. I just deleted the comments in chemkin files and corrected the format plus some 'intentional' errors in the ethanol mechanism. I was using files from https://combustion.llnl.gov/archived-mechanisms/ethanol
|
|
October 6, 2019, 05:01 |
|
#16 |
New Member
Stefano Doddo
Join Date: Mar 2019
Posts: 7
Rep Power: 7 |
HI Omair,
Sorry, I tried to run ChemkintoFoam in OF 4.1, with chemkin files of ethanol, but errors appear. Can you post the files after your corrections, please? Thank you. |
|
Tags |
openfoam4.1 chemkintofoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
question about chemkinToFoam | skarnani | OpenFOAM | 11 | September 11, 2013 09:07 |
small question about the functionalities of topological changes in OpenFoam | ngj | OpenFOAM Running, Solving & CFD | 2 | February 28, 2013 11:02 |
Question Re Engineering Data Source | imnull | ANSYS | 0 | March 5, 2012 14:51 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 16:26 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 05:37 |