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

[flameletFoam] flameletFoam (by Hagen Müller)

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

Like Tree24Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2014, 12:19
Default flameletFoam (by Hagen Müller)
  #1
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 11
Hagen is on a distinguished road
Dear all,

I would like to open a thread for the flameletFoam package we recently developed. This is a package to use the steady laminar flamelet model for turbulent non-premixed combustion in OpenFOAM.
The package consists of a cantera tool to calculate the laminar flamelets, an utility to integrate them with a beta-PDF and a solver for RANS and LES. Two versions are available - one for OF-2.3 and one for OF-2.1.

Download: https://github.com/flameletFoam/
Documentation: https://openfoamwiki.net/index.php/E...n/flameletFoam

Greetings, Hagen

Last edited by Tobi; September 19, 2017 at 04:21.
Hagen is offline   Reply With Quote

Old   December 19, 2014, 20:03
Default
  #2
Senior Member
 
Freedom
Join Date: May 2014
Posts: 208
Rep Power: 9
wenxu is on a distinguished road
Quote:
We Can use any reaction mechanism in cantera. We just need to provide it in The mechanism folder ans select it in The input.txt.
------by Hagen Müller
wenxu is offline   Reply With Quote

Old   December 20, 2014, 02:56
Default
  #3
Senior Member
 
Freedom
Join Date: May 2014
Posts: 208
Rep Power: 9
wenxu is on a distinguished road
Dear Hagen,
http://www.et.byu.edu/~Tom/classes/6...ningphases.pdf we can get Cantera as the instructions, but can not be used by OF.
Now i want to get CO mechanism of .xml file as gri30.xml in the mechanisms folder, how can i get it? I have no idea. Please give me some hints, Thank you in advance!

Best regards,
wenxu
wenxu is offline   Reply With Quote

Old   December 21, 2014, 13:02
Default
  #4
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 11
Hagen is on a distinguished road
Dear Wenxu,

which mechanism do you want to use?
There are some provided in the cantera installation folder (cantera-2.0.0/data/).
If you have your mechanism in chemkin format, there is a converter ck2cti. I haven't tried it though.

Hope this helps a bit,
Hagen
Hagen is offline   Reply With Quote

Old   December 21, 2014, 18:14
Default problem installing flameletFoam on OpenFOAM-2.3.x
  #5
aat
New Member
 
Join Date: Oct 2009
Posts: 15
Rep Power: 12
aat is on a distinguished road
Quote:
Originally Posted by Hagen View Post
Dear all,

I would like to open a thread for the flameletFoam package we recently developed. This is a package to use the steady laminar flamelet model for turbulent non-premixed combustion in OpenFOAM.
The package consists of a cantera tool to calculate the laminar flamelets, an utility to integrate them with a beta-PDF and a solver for RANS and LES. Two versions are available - one for OF-2.3 and one for OF-2.1.

Download: https://github.com/flameletFoam/
Documentation: https://openfoamwiki.net/index.php/E...n/flameletFoam

Greetings, Hagen
Hello Hagen,

A big thanks to you and your colleagues for authoring and making flameletFoam available to us. I am really interested in trying it for some gas phase combustion tests.

I was able to successfully install Cantera-2.0.0 and Cantera-CounterflameFlow per the instructions. However, I ran into a problem trying to install flamelet-2.3.x on my machine under a working OpenFOAM-2.3.x installatoin. I assume the flamelet version will work with OF2.3.x builds (since the flamelet folder also has a 2.3.x naming). Could you confirm?

Here are the error log details.

During the installation, the library FlameletfvOptions was not built. Here is the last line of the build log:

---------error message-------------
Code:
/usr/bin/ld: cannot find -lFlameletfvOptions
looking into the log file where the lib was being generated, I saw these error messages :


--------------error messages--------------------------------
Code:
fvOptions/fvOption.C: In member function ‘void Foam::fv::option::setCellSet()’:
fvOptions/fvOption.C:116:13: error: ‘IInfo’ was not declared in this scope
             IInfo<< "- selecting cells using points" << endl;
             ^
fvOptions/fvOption.C:144:13: error: ‘IInfo’ was not declared in this scope
             IInfo<< "- selecting cells using cellSet " << cellSetName_ << endl;
             ^
fvOptions/fvOption.C:153:13: error: ‘IInfo’ was not declared in this scope
             IInfo<< "- selecting cells using cellZone " << cellSetName_ << endl;
             ^
fvOptions/fvOption.C:171:17: error: ‘IInfo’ was not declared in this scope
                 IInfo<< "- selecting inter region mapping" << endl;
                 ^
fvOptions/fvOption.C:216:13: error: ‘IInfo’ was not declared in this scope
             IInfo<< "- selecting all cells" << endl;
             ^
fvOptions/fvOption.C:241:9: error: ‘IInfo’ was not declared in this scope
         IInfo<< "- selected " << returnReduce(cells_.size(), sumOp<label>())
         ^
fvOptions/fvOption.C: In constructor ‘Foam::fv::option::option(const Foam::word&, const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&, bool)’:
fvOptions/fvOption.C:280:9: error: ‘IInfo’ was not declared in this scope
         IInfo<< "- applying source at time " << timeStart_
         ^
fvOptions/fvOption.C:285:9: error: ‘IInfo’ was not declared in this scope
         IInfo<< "- applying source for all time" << endl;
         ^
fvOptions/fvOption.C: In static member function ‘static Foam::autoPtr<Foam::fv::option> Foam::fv::option::New(const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&)’:
fvOptions/fvOption.C:307:5: error: ‘IInfo’ was not declared in this scope
     IInfo<< "Selecting finite volume options model type " << modelType << endl;
     ^
make: *** [Make/linux64GccDPOpt/fvOption.o] Error 1
Is this some missing or corrupted header file on my installation?

Thanks!

-Amish

[PS: Moderator, my apologies if I posted installation related questions in a wrong thread, please let me know if so]

Last edited by wyldckat; December 27, 2014 at 05:20. Reason: Added [CODE][/CODE]
aat is offline   Reply With Quote

Old   December 22, 2014, 04:48
Default
  #6
Senior Member
 
Freedom
Join Date: May 2014
Posts: 208
Rep Power: 9
wenxu is on a distinguished road
The different versions were used, i think. The first version fvOptions was not added, but the latter one, fvOptions was added to adjusted to OF230.

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

Dear Hagen,
Yes, i have found that the ck2cti can transfer .inp file to .cti file, which can be used in cantera. But my problems as follows:
  1. I want use gri30 for CO reaction, but i'm not sure if that ok.(gri30 if for natural gas, but the CO is the intermediate specie, so i think it ok, if i'm wrong, please correct me.)
  2. If the first one is ok, then i set the input.txt as follows for CO:
    Quote:
    1.013e5 // operating pressure in Pa
    294 // Temperature at the left boundary in K
    294 // Temperature at the right boundary in K
    294 // Temperature for equilibrium solution calculation
    0.05 // mass flow in kg/(s m^2)
    0.287 // Stoichiometric Mixture fraction Zst
    CO:0.99999,AR:0.00001 // Species at the left side (in mole fractions)
    O2:0.21,N2:0.79 // Species at the right side (in mole fractions)
    mechanisms/gri30.xml // Location of the chemical mechanism
    0.2 // domain lenght [m]
    50 // Initial number of grid point
    100 // Maximum number of grid points (applies only for grid refinement)
    1 // Refine grid? (1 = true , 0 = false)
    If i use the initial solution file (this file is actually for CH4),then it will give the :
    Quote:
    .................................................. ............................
    Take 5 timesteps 6.407e-05 3.603
    .................................................. ............................

    Attempt Newton solution of steady-state problem... failure.
    which means that the counterflow has been extincted? Then i change the mass flow to very low, such as 0.0001, then the output is as something like above:
    Quote:
    .................................................. ............................
    Take 10 timesteps 0.001847 3.423
    .................................................. ............................

    Attempt Newton solution of steady-state problem... failure.
    .
  3. If i do not use the initial solution file, then it ask me to set the equivalence ratio phi (0 - 1), but the equivalence ratio of CO is 2.48, which is not within (0-1),then it will ask me to put the name of the fuel (only CH4 and H2 can be selected.): if now i put CO, as excepted, the error is as follows:
    Quote:
    Your fuel/oxidizer selection is not available
    Please add your combination in the source code
So it seems that CO can not be used by ./flamelet, please help me?

PS: the flamelet.cpp file in src folder should be changed in order to use CO mechanism. If that true, then it will be tough... Sorry, this question is some one like the first, because i am not understand the first time you answer me.

regards,
wenxu

Last edited by wyldckat; December 27, 2014 at 05:22. Reason: merge consecutive posts, posted a few minutes apart
wenxu is offline   Reply With Quote

Old   December 22, 2014, 07:46
Default
  #7
Member
 
davide basso
Join Date: Jan 2012
Posts: 48
Rep Power: 10
rolloblues is on a distinguished road
Quote:
Originally Posted by wenxu View Post
The different versions were used, i think. The first version fvOptions was not added, but the latter one, fvOptions was added to adjusted to OF230.
I'm experiencing the same problem highlighted by aat.
I'm running OF 2.3.1 and I installed flameletFoam 2.3.x

How can I solve this?
rolloblues is offline   Reply With Quote

Old   December 22, 2014, 15:09
Default
  #8
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 11
Hagen is on a distinguished road
Dear Amish, Dear Rolloblues,

thank you for this hint! Apparently, fvOptions was changed in 2.3.x and is not compatible anymore with that used in 2.3.0 and vice versa.

The repo flameletFoam-2.3.x is updated now and should work with the current version of OpenFOAM-2.3.x.
For those who are using OpenFOAM-2.3.0, there is a new repo flameletFoam-2.3.0. The only difference is the fvOptions.

Best wishes,
Hagen
rolloblues likes this.
Hagen is offline   Reply With Quote

Old   December 22, 2014, 16:53
Default
  #9
aat
New Member
 
Join Date: Oct 2009
Posts: 15
Rep Power: 12
aat is on a distinguished road
Thanks Hagen,

I can confirm that it compiled fine on OF2.3.x and I was able to complete the tutorial (ras).

-Amish
aat is offline   Reply With Quote

Old   December 23, 2014, 07:13
Default
  #10
Member
 
davide basso
Join Date: Jan 2012
Posts: 48
Rep Power: 10
rolloblues is on a distinguished road
I also confirm that everything is now working just fine.

Thanks
rolloblues is offline   Reply With Quote

Old   December 23, 2014, 08:31
Default
  #11
Senior Member
 
Freedom
Join Date: May 2014
Posts: 208
Rep Power: 9
wenxu is on a distinguished road
Then no one help me?!
wenxu is offline   Reply With Quote

Old   January 5, 2015, 06:36
Default
  #12
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 11
Hagen is on a distinguished road
Dear Wenxu,

your cantera run does not converge with these settings. If you are using one of the solution files in the examples folder, you can try to change the boundary conditions in the input.txt in small steps. In your case, if you are using the Sandia example, slowly increase the CO mass fraction and decrease mass fraction of the other species at the fuel boundary until you reach the conditions of your flame.

Hagen
Hagen is offline   Reply With Quote

Old   April 7, 2015, 12:32
Default flameletFoam compilation problem
  #13
Member
 
Join Date: Feb 2014
Posts: 61
Rep Power: 8
Uyan is on a distinguished road
I am using openfoam-2.3.x [ on ubuntu 1.204] and i tried to install flameletFoam. when i try to compile OpenFOAM

i get an error about cycilcAMILduInterface

Code:
finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/flameletFoamPost.o] Error 1

Has anyone come across something like that and solved it?
Uyan is offline   Reply With Quote

Old   April 7, 2015, 16:13
Default cycilcAMILduInterface.H error
  #14
Member
 
Join Date: Feb 2014
Posts: 61
Rep Power: 8
Uyan is on a distinguished road
Well i managed to get it compiled, but did not test yet.

I had to replace few Make/options files

src/combustionModels/Make/options
applications/utilities/preProcessing/canteraToFoam/Make/options
applications/utilities/postProcessing/flameletFoamPost/Make/options

I added the following include directory

Code:
EXE_INC = \

    -I$(LIB_SRC)/meshTools/lnInclude \
Uyan is offline   Reply With Quote

Old   April 13, 2015, 06:47
Default
  #15
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 11
Hagen is on a distinguished road
Hi Uyan,

thank you! I changed the source in the git repository.

Regards, Hagen
Hagen is offline   Reply With Quote

Old   July 25, 2015, 16:42
Default Error after "make"
  #16
Member
 
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 9
Lisandro Maders is on a distinguished road
Ps: I edited it because I had put I had an error when compiling Cantera. Actually, I compiled Cantera successfully, I had an error when compiling flameletFoam solver..

Hello guys,

I am installing Cantera aiming use it with OpenFOAM. However, when I tried to compile the flameletFoam solver (after "make" command), I received the following error:

g++ -g -Wall -fpermissive -c StFlow_2.cpp -I/usr/local/include
In file included from StFlow_2.h:10:0,
from StFlow_2.cpp:15:
TransportBase_2.h:344:57: error: ‘virtual’ outside class declaration
DEPRECATED(virtual void mobilityRatio(double* mobRat)) {
^
TransportBase_2.h:344:58: warning: ISO C++ forbids declaration of ‘DEPRECATED’ with no type [-fpermissive]
DEPRECATED(virtual void mobilityRatio(double* mobRat)) {
^
TransportBase_2.h: In member function ‘int Cantera::Transport:EPRECATED(void (*)(double*))’:
TransportBase_2.h:346:5: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
In file included from StFlow_2.cpp:15:0:
StFlow_2.h: At global scope:
StFlow_2.h:195:18: error: conflicting return type specified for ‘virtual void Cantera::StFlow::save(Cantera::XML_Node&, const doublereal*)’
virtual void save(XML_Node& o, const doublereal* const sol);
^
In file included from StFlow_2.h:11:0,
from StFlow_2.cpp:15:
/usr/local/include/cantera/oneD/Domain1D.h:413:23: error: overriding ‘virtual Cantera::XML_Node& Cantera:omain1D::save(Cantera::XML_Node&, const doublereal*)’
virtual XML_Node& save(XML_Node& o, const doublereal* const sol);
^
make: *** [StFlow_2.o] Error 1



Does anyone have any idea what could be causing this?

Thanks in advance!

Lisandro

Last edited by Lisandro Maders; July 26, 2015 at 14:27.
Lisandro Maders is offline   Reply With Quote

Old   July 26, 2015, 14:28
Default
  #17
New Member
 
Federica Ferraro
Join Date: Jul 2015
Posts: 1
Rep Power: 0
federicafer is on a distinguished road
Hi Lisandro,

If you are using cantera-2.0.0 you should not have any problem.

that is my output to make:
g++ -g -Wall -fpermissive -c StFlow_2.cpp -I/opt/cantera/include
g++ -g -Wall -fpermissive -c TransportFactory_2.cpp -I/opt/cantera/include
g++ -g -Wall -fpermissive -c Lewis1Transport.cpp -I/opt/cantera/include
g++ -c -g -Wall -fpermissive flamelet.cpp -I/opt/cantera/include
g++ flamelet.o StFlow_2.o TransportFactory_2.o Lewis1Transport.o -lf2c -pthread -L/opt/cantera/lib -lcantera -lcvode -lblas -llapack -o flamelet

the paths to cantera's include and libraries (in bold) are different for you.. this can probably cause the error..

Check if the first line in the Makefile contains the path to your cantera build directory that for me is
include ~/cantera-2.0.0/build/platform/Cantera.mak

Regards,
Federica
federicafer is offline   Reply With Quote

Old   July 26, 2015, 18:05
Default Sorted the old problem, a new one appeared..
  #18
Member
 
Lisandro Maders
Join Date: Feb 2013
Posts: 98
Rep Power: 9
Lisandro Maders is on a distinguished road
Federica,

thanks for your reply! I was really making a mistake regarding to the path.

Also, I wrote my thread badly. My error happened when I compiled the flameletFoam solver, not Cantera. I sorted it out by updating the pip through easy_install. It seems that for Ubuntu 12.04 (which I am using) the pip (for python packages) has some bugs (see it on http://stackoverflow.com/questions/2...-on-pip-freeze)

So I uninstalled Cantera, updated pip, reinstalled Cantera and then the flameletFoam compiled well.

The only thin weird was when I runned scons test after building, it shown me this error:

* Running test 'diamondSurf-cti'... Comparing 'diamond_blessed.xml' with 'diamond.xml' scons: *** [test_problems/diamondSurf/.passed-diamondSurf-cti] /private/tmp/cantera-OaWCVw/cantera-2.1.2/test_problems/diamondSurf/diamond.xml: No such file or directory scons: building terminated because of errors.


However, as it was running everything ok (apparently) I did not fixed it. Do you know if this is really an error or just a test stuff bug? Could I keep using Cantera with this error?


Regards,

Lisandro
zhouqy1994 likes this.
Lisandro Maders is offline   Reply With Quote

Old   September 10, 2015, 20:40
Default
  #19
Member
 
Join Date: Aug 2015
Posts: 37
Rep Power: 6
knuckles is on a distinguished road
Can anyone explain to me why the steady laminar flamelet model class is templated as YSLFModel<class CombThermoType, class ThermoType>? It seems to me that the second template variable is completely irrelevant. I was able to remove it by:
  1. eliminating the second template variable from YSLFModel.H and .C
  2. changing the macro call in YSLFModels.C to makeCombustionTypes() rather than makeCombustionTypesThermo(), and removing the third macro argument
  3. changing the combustionModel entry in constant/combustionProperties of the case file to YSLFModel<rhoThermoCombustion> - i.e., removing the second template variable
This compiled and ran successfully. Have I unknowingly introduced an error?

Edit: this was for OpenFOAM 2.3.0

Last edited by knuckles; September 10, 2015 at 20:41. Reason: Adding version
knuckles is offline   Reply With Quote

Old   September 23, 2015, 04:26
Default
  #20
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 11
Hagen is on a distinguished road
Quote:
Originally Posted by knuckles View Post
Can anyone explain to me why the steady laminar flamelet model class is templated as YSLFModel<class CombThermoType, class ThermoType>? It seems to me that the second template variable is completely irrelevant. I was able to remove it by:
  1. eliminating the second template variable from YSLFModel.H and .C
  2. changing the macro call in YSLFModels.C to makeCombustionTypes() rather than makeCombustionTypesThermo(), and removing the third macro argument
  3. changing the combustionModel entry in constant/combustionProperties of the case file to YSLFModel<rhoThermoCombustion> - i.e., removing the second template variable
This compiled and ran successfully. Have I unknowingly introduced an error?

Edit: this was for OpenFOAM 2.3.0
Thanks for this hint! The ThermoType template is indeed a remnant of an older version and is not needed anymore. I changed the code as you suggested and pushed it to the git repository.
Hagen 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
[flameletFoam] new flameletFoam for OpenFoam-2.3.0 Likun OpenFOAM Community Contributions 25 April 10, 2017 03:05
[flameletFoam] Issue: Installation of flameletfoam Raghuveera OpenFOAM Community Contributions 2 April 12, 2016 22:59
FlameletFoam tables and OpenFOAM-2.3.x Look-Up-Tables Sermengi OpenFOAM 2 December 19, 2014 06:10
flameletFoam for mutiphase Combustion wenxu OpenFOAM 0 December 10, 2014 08:14
data on flow Hagen Poisseuis kostas FLUENT 0 August 6, 2003 17:37


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