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

question about chemkinToFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2011, 21:58
Default question about chemkinToFoam
  #1
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 15
skarnani is on a distinguished road
Hi.
I recently upgraded to OpenFOAM 2.0 and I've run in to a small issue using the chemkinToFoam utility. Instead of getting something that looks like


OH
{
specie
{
nMoles 1;
molWeight 17.0074;
}
thermodynamics
{
Tlow 200;
Thigh 3500;
Tcommon 1000;
highCpCoeffs ( 3.09289 0.00054843 1.26505e-07 -8.79462e-11 1.17412e-14 3858.66 4.4767 );
lowCpCoeffs ( 3.99202 -0.00240132 4.61794e-06 -3.88113e-09 1.36411e-12 3615.08 -0.103925 );
}
transport
{
As 1.67212e-06;
Ts 170.672;
}
}


I get something like the following:

CN
{

{
nMoles 1;
molWeight 26.0179;
}

{
Tlow 200;
Thigh 6000;
Tcommon 1000;
highCpCoeffs ( 3.74598 4.34508e-05 2.9706e-07 -6.86518e-11 4.41342e-15 51536.2 2.78676 );
lowCpCoeffs ( 3.61294 -0.000955513 2.1443e-06 -3.15163e-10 -4.64304e-13 51708.3 3.9805 );
}

{
As 1.67212e-06;
Ts 170.672;
}
}

Without those tags before each grouping, I get an error that reads,

Selecting psiChemistryModel ODEChemistryModel<gasThermoPhysics>
Selecting thermodynamics package hsPsiMixtureThermo<reactingMixture<gasThermoPhysic s>>
Selecting chemistryReader foamChemistryReader
--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /home/sunny/OpenFOAM/sunny-2.0.0/run/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/chemistry/test2
found on line 25 the punctuation token '{'
expected either } or EOF


--> FOAM FATAL IO ERROR:
keyword specie is undefined in dictionary "/home/sunny/OpenFOAM/sunny-2.0.0/run/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/chemistry/test2::CN"

file: /home/sunny/OpenFOAM/sunny-2.0.0/run/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/chemistry/test2::CN

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 461.

FOAM exiting


I can't be sure, but I imagine this is a straightforward fix. The problem is, I don't know where to begin.

Any suggestions?

Thanks.
Sunny

skarnani is offline   Reply With Quote

Old   July 15, 2011, 05:14
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
Interesting, I also have an issue with reading the thermo file, with an error

Quote:
--> FOAM FATAL ERROR:
while reading thermodynamic data specie formula on line 2
expected <word><label><word><label><word><label><word><labe l> (4(2A1,I3)) but found '"."00'

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

If you post up your chem.inp and therm.dat files I can take a look.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 15, 2011, 13:40
Default
  #3
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 15
skarnani is on a distinguished road
Thanks for your willingness to assist. I attached three files:

1 & 2 are the original CHEMKIN mechanism and thermo file. The third file is the FOAM converted thermo file. You will notice in the FOAM thermo file that the first specie -- OH -- has the required tags that I mentioned in the previous post. I had put those in to test if that was the source of the error.

BTW, which version of OpenFOAM and solver are you using? Your error looks like a similar issue, but the output is different.

Thanks again.
Sunny
Attached Files
File Type: txt grimech30.txt (28.5 KB, 77 views)
File Type: txt thermo30.txt (17.6 KB, 80 views)
File Type: txt test2.txt (25.0 KB, 74 views)
skarnani is offline   Reply With Quote

Old   July 15, 2011, 13:48
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
I've posted a bug report:

http://www.openfoam.com/mantisbt/view.php?id=251

Keep track of that and I'm sure it will be fixed reasonably soon.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 20, 2011, 05:12
Default
  #5
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
This has been fixed in OF-2.0.x:

https://github.com/OpenCFD/OpenFOAM-...716d3ed0dcef41
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 20, 2011, 13:20
Default
  #6
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 15
skarnani is on a distinguished road
Very cool. Thanks for the update.
skarnani is offline   Reply With Quote

Old   September 2, 2011, 18:39
Default error message after changes made
  #7
New Member
 
Ryan Johnson
Join Date: Jul 2010
Posts: 3
Rep Power: 15
RyanJohnson is on a distinguished road
Hello,
I get this error message after running chemkinToFoam

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/rfj2c/OF/OpenFOAM-2.0.x/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/home/rfj2c/OF/OpenFOAM-2.0.x/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
Segmentation fault

after making the changes to the code I recompiled using ./Allwmake in the /src/ directory

thanks in advance!
RyanJohnson is offline   Reply With Quote

Old   September 3, 2011, 05:49
Default
  #8
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
What changes to the code did you make? What input files are you running chemkinToFoam on? Where did it fail? You need to give more information.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   September 5, 2011, 17:59
Default Problems with ChemToFoam
  #9
New Member
 
Ryan Johnson
Join Date: Jul 2010
Posts: 3
Rep Power: 15
RyanJohnson is on a distinguished road
I changed files by doing the bug fixes exactly as the link above isntructed to do (changed the 10 files as listed above)

I then recompiled the entire directory in the /src/ to make sure that any refrences to these headers would be recompiled.

I then tried again to run the chemkinToFoam and get the segmentation fault error exactly as shown above. I use chemkinToFoam on the attached files.

ChemkinToFoam worked with these two files in the OpenFoam 1.7 release that I am currently using.

Thanks for your help, and sorry about the brevity earlier,
Ryan

##EDIT##
I was able to get it to work when I did ./Allwmake for the entire OpenFOAM environment, some clarification on why this would be needed and not just needed in the /src/ directory would be quite imformative
thanks for your help again!
Attached Files
File Type: txt therm.txt (49.7 KB, 38 views)
File Type: txt comech.txt (6.5 KB, 24 views)

Last edited by RyanJohnson; September 5, 2011 at 18:18.
RyanJohnson is offline   Reply With Quote

Old   September 6, 2011, 05:01
Default
  #10
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
Hmm, you'll probably find you only needed to recompile applications/utilities/thermophysical/chemkinToFoam. Did you change anything else in between the above? Glad to hear it worked in any case.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   November 30, 2011, 07:22
Arrow
  #11
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
Dear Foamers,

Firstly, i ran chemFoam at /home/ayhan/OpenFOAM/ayhan-2.0.1/run/tutorials/combustion/chemFoam/gri case

It works without fail.
And it draws graph. ok.



------------------------

Then i used
Code:
chemkinToFoam chem.inp therm.dat reactions thermo
command and i put reactions and thermo files to constant folder.

And i changed to thermophysicalProperties file.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType      hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;

//inertSpecie N2;

chemistryReader foamChemistryReader;

foamChemistryFile "$FOAM_CASE/constant/reactions";

foamChemistryThermoFile "$FOAM_CASE/constant/thermo";


// ************************************************************************* //
Then i use ./Allrun command
It works without fail.
And it draws graph. but..
this time got that picture.



Is there something wrong arrangement? How can i fix that?

and h2 case
without modification


chemkinToFoam & foamChemistryReader
Attached Files
File Type: gz chemfiles.tar.gz (24.4 KB, 35 views)
ayhan515 is offline   Reply With Quote

Old   September 11, 2013, 09:07
Default help regarding reactionFoam solver .
  #12
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 12
yash.aesi is on a distinguished road
greeting oll ,

i am relatively new to OF. nowadays i am trying to simulate my case of different species with the reactingFoam solver and m using openFoam 2.2-x . fist i solved the tutorial of counterFlow Flame after that nw i tried to run my case . but in starting one thing which is paining me is what to write in in thermophysical properties file . shown below :

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture         reactingMixture;
    transport       sutherland;
    thermo          janaf;
    energy          sensibleEnthalpy;
    equationOfState perfectGas;
    specie          specie;
}

inertSpecie N2;

chemistryReader foamChemistryReader;

foamChemistryFile "$FOAM_CASE/constant/reactions";

foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";

reaction and thermo.compressible file is there in constant folder of my case .
so can anybody guide me what should i change in the above file marked bold ?


thanks in advance ,

Regards ,
sonu
Attached Files
File Type: zip reactions.zip (322 Bytes, 22 views)
File Type: zip thermo.compressibleGas.zip (1.1 KB, 16 views)
yash.aesi is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about uds tanven FLUENT 2 July 5, 2015 12:22
Unanswered question niklas OpenFOAM 2 July 31, 2013 17:03
Poisson Solver question Suresh Main CFD Forum 3 August 12, 2005 05:37
CHANNEL FLOW: a question and a request Carlos Main CFD Forum 4 August 23, 2002 06:55
question K.L.Huang Siemens 1 March 29, 2000 05:57


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