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

question about chemkinToFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 25, 2017, 02:02
Question question about chemkinToFoam
  #1
New Member
 
FengHaifeng
Join Date: May 2017
Posts: 2
Rep Power: 0
asakusa is on a distinguished road
I知 a beginner of OpenFOAM and I知 using OpenFOAM4.1. I知 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.
asakusa is offline   Reply With Quote

Old   June 12, 2017, 15:37
Default Same issue
  #2
New Member
 
Sid Nigam
Join Date: Feb 2016
Posts: 3
Rep Power: 3
spk363 is on a distinguished road
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.
spk363 is offline   Reply With Quote

Old   June 13, 2017, 12:21
Default
  #3
rcr
New Member
 
Join Date: Jun 2017
Posts: 2
Rep Power: 0
rcr is on a distinguished road
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.
rcr is offline   Reply With Quote

Old   June 26, 2017, 03:00
Default
  #4
New Member
 
FengHaifeng
Join Date: May 2017
Posts: 2
Rep Power: 0
asakusa is on a distinguished road
Actually I gave up and installed the OpenFOAM3.0 which doesn't require the CHEMKINThermodynamicsFile.
asakusa is offline   Reply With Quote

Old   June 26, 2017, 05:02
Default
  #5
rcr
New Member
 
Join Date: Jun 2017
Posts: 2
Rep Power: 0
rcr is on a distinguished road
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.
rcr is offline   Reply With Quote

Old   June 30, 2017, 14:57
Default
  #6
New Member
 
Join Date: Aug 2015
Posts: 9
Rep Power: 3
clapointe is on a distinguished road
You need to have the transport data in an Openfoam dictionary format. Check the files in the chemFoam tutorials.

Caelan
clapointe is offline   Reply With Quote

Old   July 5, 2017, 12:41
Default chemkinToFoam
  #7
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 83
Rep Power: 3
sahmed is on a distinguished road
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.
sahmed is offline   Reply With Quote

Old   July 5, 2017, 12:56
Default
  #8
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 83
Rep Power: 3
sahmed is on a distinguished road
Quote:
Originally Posted by clapointe View Post
You need to have the transport data in an Openfoam dictionary format. Check the files in the chemFoam tutorials.

Caelan
Hi Caelan
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
sahmed is offline   Reply With Quote

Old   July 5, 2017, 14:13
Default
  #9
New Member
 
Join Date: Aug 2015
Posts: 9
Rep Power: 3
clapointe is on a distinguished road
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
clapointe is offline   Reply With Quote

Old   July 5, 2017, 16:33
Default
  #10
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 83
Rep Power: 3
sahmed is on a distinguished road
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?
sahmed is offline   Reply With Quote

Old   July 5, 2017, 17:01
Default
  #11
New Member
 
Join Date: Aug 2015
Posts: 9
Rep Power: 3
clapointe is on a distinguished road
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;
Caelan
clapointe is offline   Reply With Quote

Old   July 6, 2017, 11:39
Default
  #12
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 83
Rep Power: 3
sahmed is on a distinguished road
Quote:
Originally Posted by asakusa View Post
Actually I gave up and installed the OpenFOAM3.0 which doesn't require the CHEMKINThermodynamicsFile.
Hello Feng
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?
sahmed is offline   Reply With Quote

Reply

Tags
openfoam4.1 chemkintofoam

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about chemkinToFoam skarnani OpenFOAM 11 September 11, 2013 08: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 04:37


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