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

[flameletFoam] new flameletFoam for OpenFoam-2.3.0

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2014, 05:34
Default new flameletFoam for OpenFoam-2.3.0
  #1
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear Foamers,

As my first real exercise of code development in OpenFoam, I worked on updating the flameletFoam code (http://openfoamwiki.net/index.php/Ex...n/flameletFoam) developed by Dr. Hagen Mueller from OpenFoam-2.1.0 to OpenFoam-2.3.0. Although I really suffered a lot as a beginner, it was a nice experience anyhow. Now the new version of the flameletFoam code is working in OpenFoam-2.3.0. The code can be downloaded here:
https://sourceforge.net/projects/flameletfoam230/.

Feel free to check it.

Best,
Likun
Likun is offline   Reply With Quote

Old   September 8, 2014, 15:18
Default
  #2
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear Foamers,

My next step is to implement FGM (Flamelet Generated Manifold) model based on the flameletFoam-2.3. Any suggestion, collaboration are very welcome!

Best,
Likun
Likun is offline   Reply With Quote

Old   September 9, 2014, 04:43
Default
  #3
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Dear Likun

Nice Try.

Have u ever checked the results of new code? I mean The code might be compiled well, however during running a case some errors might occur.

Best
Bobi

Last edited by babakflame; September 9, 2014 at 07:04.
babakflame is offline   Reply With Quote

Old   September 9, 2014, 10:52
Default
  #4
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear Bobi,

Thank you!

Yes, I have run the 'pilotedDiffusionFlame' RANS tutorial case release with the original code, there is no problem, and the results is more or less the same with that given by flameletFoam-2.1. However, for the LES case, it crashes after a few time steps, and gives the following errors:

PHP Code:
[0#0  Foam::error::printStack(Foam::Ostream&) in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0#1  Foam::sigFpe::sigHandler(int) in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0#2
[0]  at sigaction.c:0
[0#3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0#4  Foam::sqrt(Foam::tmp<Foam::Field<double> > const&) in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0#5  Foam::compressible::LESModels::vanDriestDelta::calcDelta() in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/lib/libFlameletcompressibleLESModels.so"
[0#6  Foam::compressible::LESModels::Smagorinsky::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/lib/libFlameletcompressibleLESModels.so"
[0#7  Foam::compressible::LESModel::correct() in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/lib/libFlameletcompressibleLESModels.so"
[0#8
[0]  in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/bin/flameletFoam"
[0#9  __libc_start_main in "/lib64/libc.so.6"
[0#10
[0]  in "/home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/bin/flameletFoam"
[tud0028150:17249] *** Process received signal ***
[
tud0028150:17249SignalFloating point exception (8)
[
tud0028150:17249Signal code:  (-6)
[
tud0028150:17249Failing at address0x4d400004361
[tud0028150:17249] [ 0] /lib64/libc.so.6() [0x304a8326b0]
[
tud0028150:17249] [ 1] /lib64/libc.so.6(gsignal+0x35) [0x304a832635]
[
tud0028150:17249] [ 2] /lib64/libc.so.6() [0x304a8326b0]
[
tud0028150:17249] [ 3] /opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam4sqrtERNS_5FieldIdEERKNS_5UListIdEE+0x30) [0x7ffd9bad4ec0]
[
tud0028150:17249] [ 4] /opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam4sqrtERKNS_3tmpINS_5FieldIdEEEE+0x81) [0x7ffd9badf541]
[
tud0028150:17249] [ 5] /home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/lib/libFlameletcompressibleLESModels.so(_ZN4Foam12compressible9LESModels14vanDriestDelta9calcDeltaEv+0x3a5) [0x7ffd9f2585d5]
[
tud0028150:17249] [ 6] /home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/lib/libFlameletcompressibleLESModels.so(_ZN4Foam12compressible9LESModels11Smagorinsky7correctERKNS_3tmpINS_14GeometricFieldINS_6TensorIdEENS_12fvPatchFieldENS_7volMeshEEEEE+0x23) [0x7ffd9f21bd43]
[
tud0028150:17249] [ 7] /home6695/likun/OpenFOAM/likun-2.3.0/platforms/linux64GccDPOpt/lib/libFlameletcompressibleLESModels.so(_ZN4Foam12compressible8LESModel7correctEv+0x35) [0x7ffd9f1a7e65]
[
tud0028150:17249] [ 8flameletFoam() [0x42041d]
[
tud0028150:17249] [ 9] /lib64/libc.so.6(__libc_start_main+0xfd) [0x304a81ed5d]
[
tud0028150:17249] [10flameletFoam() [0x41e299]
[
tud0028150:17249] *** End of error message *** 
I still don't know what is the problem. Do you have any idea on what could be the possible reason?

Best
Likun
Likun is offline   Reply With Quote

Old   September 9, 2014, 10:57
Default
  #5
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Dear Likun

I am still trying to validate the LES results of the same code in DOWNSTREAM locations (Upstream good).

For your problem, I GUESS maybe the definition of Compressible LES models has changed from O.F. 2.1.0 to O.F. 2.3.0.

My proposal is using oneEqEddy LES model and check that whether the same problem happens or not.

Best,

Bobi
babakflame is offline   Reply With Quote

Old   September 9, 2014, 13:20
Default
  #6
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear Bobi,

Thank you for your fast reply.

Indeed, the definitions of compressible LES models has changed from OF2.1. to OF2.3, for examples,

1) the 'LESModel::correct()'

In OF2.1:
Code:
void LESModel::correct(const tmp<volTensorField>&)
{
    delta_().correct();
}
In OF2.3 it is:
Code:
void LESModel::correct(const tmp<volTensorField>&)
{
    turbulenceModel::correct();
    delta_().correct();
}
2) the 'alphaEff()'

in OF2.1 is:
Code:
        //- Return the effective thermal diffusivity
        virtual tmp<volScalarField> alphaEff() const
        {
            return tmp<volScalarField>
            (
                new volScalarField("alphaEff", alphaSgs() + alpha())
            );
        }
in OF2.3 it is:
Code:
        //- Return the effective thermal diffusivity
        virtual tmp<volScalarField> alphaEff() const
        {
            return thermo().alphaEff(alphaSgs());
        }
3) the SGS kinetic energy in Smagrinsky model

in OF2.1 is:
Code:
        //- Return SGS kinetic energy
        //  calculated from the given velocity gradient
        tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
        {
            return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
        }
in OF2.3 it is:
Code:
        //- Return SGS kinetic energy
        //  calculated from the given velocity gradient
        tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
        {
            volSymmTensorField D(symm(gradU));

            volScalarField a(ce_/delta());
            volScalarField b((2.0/3.0)*tr(D));
            volScalarField c(2*ck_*delta()*(dev(D) && D));

            return sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a));
        }
The problems should be related to these changes, especially the changes in Smagrinsky model. Because as you suggested, when I switched the LES model to oneEqEddy, the code is now running without problem, at least it past the point where it crashes when using Smagrinsky model.

Best,
Likun
songwukong likes this.
Likun is offline   Reply With Quote

Old   September 10, 2014, 02:43
Default
  #7
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16
babakflame is on a distinguished road
Dear Likun

My suggestion is first check the LES properties file in O.F. 2.3.o to see whether other inputs are needed in your LES properties file or not (for smagorinsky model).

nest step, might be check the code for adding headers that might be needed.

Best,
Bobi
babakflame is offline   Reply With Quote

Old   September 13, 2014, 12:57
Default
  #8
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Quote:
Originally Posted by babakflame View Post
Dear Likun

My suggestion is first check the LES properties file in O.F. 2.3.o to see whether other inputs are needed in your LES properties file or not (for smagorinsky model).

nest step, might be check the code for adding headers that might be needed.

Best,
Bobi
Dear Bobi,

Thank you for your suggestions, I am still working on this problem.

Best,
Likun
Likun is offline   Reply With Quote

Old   October 16, 2014, 10:01
Default
  #9
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear FOAMers,

I have made some more modifications for the flameletFoam-2.3.0 solver, now it works for OpenFoam-2.3.x. The previous problem for LES case running is also solved, but there still no guarantee for free of problem. Feel free to check it: https://sourceforge.net/projects/flameletfoam230/files/.

Best,
Likun
Likun is offline   Reply With Quote

Old   December 11, 2014, 14:25
Default
  #10
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear Foamers,

Hagen has created a repository for the flameletFoam code, both the flameletFoam-2.1 and flameletFoam-2.3 are uploaded there. To avoid possible confusion, I have removed the flameletFoam-2.3 code that I have previously uploaded to the sourceforge. The code can now be found here: https://github.com/flameletFoam.

Best,
Likun
Likun is offline   Reply With Quote

Old   January 1, 2015, 04:28
Default
  #11
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Dear Likun,

Are you using the flameletFoam for further research? Now i am trying this solver but i encounter the following problem:
  • I need to generate a flamelet library myself using cantera, but i can not find what the mixture fraction definition is based on? Is it based on the one-step reaction or Bilger's definition which is based on element?

best regards,
wenxu
wenxu is offline   Reply With Quote

Old   January 1, 2015, 05:30
Default
  #12
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Dear Wenxu,

I am not using Cantera for generating flamelet library. So I don't know what is the definition of mixture fraction in Cantera.

Best,
Likun
Likun is offline   Reply With Quote

Old   January 5, 2015, 07:41
Default
  #13
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 16
Hagen is on a distinguished road
Dear Wenxu,

the mixture fraction is calculated using a small amount of Argon that is added at the Fuel inlet.

Hagen
Hagen is offline   Reply With Quote

Old   March 19, 2015, 05:06
Wink
  #14
Member
 
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 11
Howard is on a distinguished road
Quote:
Originally Posted by wenxu View Post
Dear Likun,


Are you using the flameletFoam for further research? Now i am trying this solver but i encounter the following problem:
  • I need to generate a flamelet library myself using cantera, but i can not find what the mixture fraction definition is based on? Is it based on the one-step reaction or Bilger's definition which is based on element?
best regards,
wenxu
Hi, I'm a new user here. Could I ask after downloading your package how to use it? And I would like to ask if this flameletFoam can be used for premixed combustion.
Howard is offline   Reply With Quote

Old   March 19, 2015, 05:33
Default
  #15
Member
 
Hagen Müller
Join Date: Nov 2010
Posts: 34
Rep Power: 16
Hagen is on a distinguished road
Dear Howard,

there is a small description how the code can be used on the extend bazaar in the OpenFoam wiki:
https://openfoamwiki.net/index.php/E...n/flameletFoam

For premixed combustion you will probably need to modify the code, adding a reaction progress-variable, basically switching to FGM. The preprocessing (table generation etc) is different for premixed flames.

Hagen
Hagen is offline   Reply With Quote

Old   March 20, 2015, 04:11
Default
  #16
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Quote:
Originally Posted by Howard View Post
Hi, I'm a new user here. Could I ask after downloading your package how to use it? And I would like to ask if this flameletFoam can be used for premixed combustion.
Hi Howard,

I fully agree with what Hagen said. Flamelet model by concept is for modeling of non-premixed combustion. For premixed combustion you need progress variable as the independent variable instead of mixture fraction as in flamelet model. However, for partially-premixed flame you still need mixture fraction. I think the best way for you is to modify this code, add progress variable. This should not be too difficult if you understand the structure of flameletFoam. I have already implemented FGM model based on the flameletFoam, and it is working fine. After adding progress variable, you need generate a lookup table using progress variable (and mixture fraction) as independent variable. This can be done by Cantera, FlameMaster or CHEM1D. I am using CHEM1D flame Eindhoven university.

Good Luck!

Best,
Likun
Likun is offline   Reply With Quote

Old   March 20, 2015, 06:07
Smile
  #17
Member
 
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 11
Howard is on a distinguished road
Quote:
Originally Posted by Likun View Post
Hi Howard,

I fully agree with what Hagen said. Flamelet model by concept is for modeling of non-premixed combustion. For premixed combustion you need progress variable as the independent variable instead of mixture fraction as in flamelet model. However, for partially-premixed flame you still need mixture fraction. I think the best way for you is to modify this code, add progress variable. This should not be too difficult if you understand the structure of flameletFoam. I have already implemented FGM model based on the flameletFoam, and it is working fine. After adding progress variable, you need generate a lookup table using progress variable (and mixture fraction) as independent variable. This can be done by Cantera, FlameMaster or CHEM1D. I am using CHEM1D flame Eindhoven university.

Good Luck!

Best,
Likun
Thank you very much for your reply! I think FGM is suitable for my situation. However, since I am only a new user of OpenFoam, what you mentioned is relatively difficult for me. Could you give me some suggestions?
Howard is offline   Reply With Quote

Old   March 20, 2015, 18:37
Default
  #18
Member
 
Likun
Join Date: Feb 2013
Posts: 52
Rep Power: 13
Likun is on a distinguished road
Send a message via Skype™ to Likun
Quote:
Originally Posted by Howard View Post
Thank you very much for your reply! I think FGM is suitable for my situation. However, since I am only a new user of OpenFoam, what you mentioned is relatively difficult for me. Could you give me some suggestions?
I would suggest to first run some cases with the flameletFoam (for premixed flame), and get familiar with how the flamelet model works. After that you can think of adding a extra transport equation for progress variable. FGM and flamelet model work in very similar ways. But you may also think of using other combustion models (e.g. EDC model) or other solvers, e.g. reactingFoam, they are not restricted to non-premixed combustion, and should suitable for your case. For the EDC model, if you search on the forum, you will find some useful information, for example this one http://www.cfd-online.com/Forums/ope...implefoam.html.

Best,
Likun
Likun is offline   Reply With Quote

Old   July 13, 2015, 12:01
Default Argon and mixture fraction
  #19
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
Hagen,

Here you have said the mixture fraction is calculated using a small amount of Argon added from the fuel inlet.

I just wanted to know if my understanding is correct.

Is it added as a tracer element so within the counter-flow flame thickness instead of calculating mixture fraction explicitly by Bilger's formulation, Yar/Yar_fuel is used as the mixture fraction ?
Uyan is offline   Reply With Quote

Old   July 13, 2015, 23:00
Default
  #20
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
The definition of mixture fraction based on element can be found here: Masri, A. R., and Bilger, R. W., Comb. Flame 73:261– 285 (1988).

You can also look through this paper, then you will have a clear understanding of mixture fraction: A Consistent Flamelet Formulation for Non-Premixed Combustion Considering Differential Diffusion Effects

regards,
wen
wenxu 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
Multiple Floating Objects with 6DoF in OF 2.3.0 tyoung OpenFOAM Running, Solving & CFD 23 June 11, 2024 02:13
[OpenFOAM.org] Problem in installing OpenFOAM 2.3.0 !!! omid20110 OpenFOAM Installation 6 August 1, 2016 12:20
Difference in the results between OF 2.3.0 and OF 2.4.0 simpleFoam Olgierd OpenFOAM Running, Solving & CFD 0 July 27, 2015 12:23
Liquid Evaporation Model Error in OF 2.3.0 brbbhatti OpenFOAM 11 June 16, 2014 10:40
Installing Mixing_plane in either OpenFOAM 2.3.0 or 1.6-ext Jiricbeng OpenFOAM Installation 7 May 18, 2014 16:46


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