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

thickened flame model

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

Like Tree4Likes
  • 3 Post By remir
  • 1 Post By remir

Reply
 
LinkBack Thread Tools Display Modes
Old   January 20, 2011, 14:05
Default thickened flame model
  #1
Member
 
Join Date: Nov 2010
Posts: 54
Rep Power: 8
usergk is on a distinguished road
Hi

I came across some previous code on the thickened flame model that uses the following for the source term:

Does anyone know what the scalars A, TA, MF etc signify?

Thanks,
gk

namespace Foam
{

defineTypeNameAndDebug(airmix, 0);
addToRunTimeSelectionTable(sourceTerm, airmix, dictionary);


airmix::airmix(/*const volScalarField& b*/ const hCombustionThermo& thermo)
: sourceTerm(typeName, thermo),
A_(readScalar(coeffsDict_.lookup("A"))),
TA_(readScalar(coeffsDict_.lookup("TA"))),
MF_(readScalar(coeffsDict_.lookup("MF"))),
nuF_(readScalar(coeffsDict_.lookup("nuF"))),
nuO_(readScalar(coeffsDict_.lookup("nuO"))),
phi_(0.0),
stOF_(0.0)
{
dimensionedScalar stof(thermo.lookup("stoichiometricAirFuelMassRatio"));
stOF_=stof.value();
if (!thermo_.composition().contains("ft"))
{
phi_=readScalar(coeffsDict_.lookup("phi"));
}
}

airmix::~airmix()
{
}

void airmix::correct(const volScalarField& T)
{

const scalar MO2=32;

const volScalarField& b_ = thermo_.composition().Y("b");
const volScalarField& rho = //thermo_.rho(); //thermo.rho has uncorrected BC's! Do not use
T.db().lookupObject<volScalarField>("rho"); //lookup returns rho field from top level solver

if (thermo_.composition().contains("ft"))
{
const volScalarField& ft=thermo_.composition().Y("ft");

forAll(omega_, I)
{
scalar maxYF= ft[I];
scalar YF= b_[I]*ft[I]
+(1.0 - b_[I])*max(thermo_.composition().fres(ft[I], stOF_), 0.0);
scalar YO2= 0.233005 * (1.0 - ft[I] - (ft[I] - YF)*stOF_);

omega_[I]=maxYF>SMALL ? 1e3* // from cgs
A_ * nuF_ * MF_
*pow( 1e-3*rho[I]*YF / MF_, nuF_ ) // rho is kg/m^3, change to cgs
*pow( 1e-3*rho[I]*YO2 / MO2, nuO_ )
*exp(-TA_/T[I])
/maxYF : 0.0;
}

forAll(omega_.boundaryField(), bI)
forAll(omega_.boundaryField()[bI], fI)
{
scalar maxYF= ft.boundaryField()[bI][fI];
scalar YF= b_.boundaryField()[bI][fI]*ft.boundaryField()[bI][fI]
+(1.0 - b_.boundaryField()[bI][fI])*
max(thermo_.composition().fres(ft.boundaryField()[bI][fI], stOF_), 0.0);
scalar YO2= 0.233005 * (1.0 - ft.boundaryField()[bI][fI]
- (ft.boundaryField()[bI][fI] - YF)*stOF_);

omega_.boundaryField()[bI][fI]=maxYF > SMALL ? 1e3*
A_ * nuF_ * MF_
*pow( 1e-3*rho.boundaryField()[bI][fI]*YF / MF_, nuF_ )
*pow( 1e-3*rho.boundaryField()[bI][fI]*YO2 / MO2, nuO_ )
*exp(-TA_/T.boundaryField()[bI][fI])
/maxYF : 0.0;
}
}
else
{

scalar maxYF=1.0/((stOF_/phi_)+1.0);
scalar YLex=1.0 - maxYF - stOF_*maxYF;

forAll(omega_, I)
{
scalar YF = maxYF * b_[I];
scalar YO2 = 0.233005 * (1.0 - maxYF) * b_[I]
+ 0.233005 * YLex * (1.0 - b_[I]);
omega_[I]=1e3* // from cgs
A_ * nuF_ * MF_
*pow( 1e-3*rho[I]*YF / MF_, nuF_ ) // rho is kg/m^3, change to cgs
*pow( 1e-3*rho[I]*YO2 / MO2, nuO_ )
*exp(-TA_/T[I])
/maxYF;
}

forAll(omega_.boundaryField(), bI)
forAll(omega_.boundaryField()[bI], fI)
{
scalar YF = maxYF * b_.boundaryField()[bI][fI];
scalar YO2 = 0.233005 * (1.0 - maxYF) * b_.boundaryField()[bI][fI]
+ 0.233005 * YLex * (1.0 - b_.boundaryField()[bI][fI]);
omega_.boundaryField()[bI][fI]=1e3*
A_ * nuF_ * MF_
*pow( 1e-3*rho.boundaryField()[bI][fI]*YF / MF_, nuF_ )
*pow( 1e-3*rho.boundaryField()[bI][fI]*YO2 / MO2, nuO_ )
*exp(-TA_/T.boundaryField()[bI][fI])
/maxYF;
}
}
}

}
usergk is offline   Reply With Quote

Old   January 20, 2011, 15:32
Default
  #2
Member
 
Join Date: Nov 2010
Posts: 54
Rep Power: 8
usergk is on a distinguished road
Hi,

It seems they refer to this:

Wb=−A*[Fuel]^nuF*[O2]^nuO*exp(−TA/T)

If so, does anyone know the exact values for propane?

Thanks,
gk
usergk is offline   Reply With Quote

Old   June 14, 2014, 10:26
Default
  #3
New Member
 
remi
Join Date: May 2014
Location: China
Posts: 26
Rep Power: 4
remir is on a distinguished road
Hi,
I know it's been a while, but did you find the answers to your questions?

I came across the same code for thickened flame model, and was trying to adapt it to OF2.2 or OF2.3. Any idea on where to start? (XiFoam I thought).

Thanks,

Remi
remir is offline   Reply With Quote

Old   January 20, 2015, 02:18
Default
  #4
New Member
 
remi
Join Date: May 2014
Location: China
Posts: 26
Rep Power: 4
remir is on a distinguished road
Thought I'd give some feedback on this old post, as I've been working on the TF model recently:

Quote:
Originally Posted by usergk View Post
Hi,

It seems they refer to this:

Wb=−A*[Fuel]^nuF*[O2]^nuO*exp(−TA/T)

If so, does anyone know the exact values for propane?

Thanks,
gk

The constants refer to:

W= A*NuF*MF*[(rho*YF/WF)^NuF]*[(rho*YO/WO)^NuO]*exp(-Ta/T)

Values for propane are:
A=1.65.10^11 cgs
Ta=15080K
NuF=0.5
NuO=1
WF=44
WO=32

Source: Dynamically thickened flame LES model for premixed and non-premixed turbulent combustion. By J.P. Legier, T.Poisont and D.Veynante.

I have updated the thickened flame model to OF222, and compiled successfully the new solver. However, I encounter a problem when setting NuF to 0.5 : immediate simulation crash: Floating point exception (core dumped)
Changing the coefficient to 1 solves the problem, and there seems to be a limit around 0.7. I assume it has to do with the calculation of Omega in airmix.C, but can't find how.
Was there any major change from OF16 to OF222 that should be taken care of when adapting an old solver (in mesh, chemistry, units, etc..?).

I can send the solver to those interested in this problem.

Best,

R.
Heat80, Uyan and shuige like this.
remir is offline   Reply With Quote

Old   February 2, 2015, 12:55
Default
  #5
New Member
 
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 11
Rep Power: 6
Heat80 is on a distinguished road
Hi Remi,
Would you please send me the code on this email (younisengmsu@gmail.com). I'm currently working methane/air combustion in closed channel using TFM in Fluent.
Thanks
Heat80 is offline   Reply With Quote

Old   February 2, 2015, 22:31
Default
  #6
New Member
 
remi
Join Date: May 2014
Location: China
Posts: 26
Rep Power: 4
remir is on a distinguished road
Sure thing Younis.

Little upgrade on the code situation:
I located the problem causing the simulation crash, and changed a little the airmix.C file in order to fix it, even though the file itself was well coded originally. I think that at some point, the b field's minimum value might become a negative number ( -1.0e-08 or something), thus leading to negative values for species mass fraction, and a NaN value as soon as the term [Fuel]^nuF*[O2]^nuO is calculated, if NuF or NuO are not integers.

Thus, to avoid the problem (a real study should be conducted to see where it comes from though..), I added some max functions in the airmix file that has been linked by the original poster, as follow:

omega_[I]=maxYF>SMALL ? 1e3* // from cgs
A_ * nuF_ * MF_
*pow( max(1e-3*rho[I]*YF / MF_,0), nuF_ ) // rho is kg/m^3, change to cgs
*pow( max(1e-3*rho[I]*YO2 / MO2,0), nuO_ )
*exp(-TA_/T[I])
/maxYF : 0.0;

Instead of e-mailing I tried uploading it here, tell me if you got everything.

Best,

Remi
Attached Files
File Type: zip Thickened Flame Model.zip (88.4 KB, 56 views)
Uyan likes this.
remir is offline   Reply With Quote

Old   February 5, 2015, 22:08
Default
  #7
New Member
 
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 11
Rep Power: 6
Heat80 is on a distinguished road
Thank you Remi.
Heat80 is offline   Reply With Quote

Old   May 5, 2015, 04:39
Default TF model
  #8
New Member
 
Kai Zheng
Join Date: May 2015
Posts: 1
Rep Power: 0
Zach Zheng is on a distinguished road
Quote:
Originally Posted by Heat80 View Post
Hi Remi,
Would you please send me the code on this email (younisengmsu@gmail.com). I'm currently working methane/air combustion in closed channel using TFM in Fluent.
Thanks
Hi Najim,
I'm also working the premixed methane/air flame propagating in duct using the TF model and flame surface density (FSD) model in Fluent, but it seems that the premixed flame propagating very slow using the TF model, did you meet the same problem?
Zach Zheng is offline   Reply With Quote

Old   June 30, 2015, 15:53
Default
  #9
New Member
 
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 11
Rep Power: 6
Heat80 is on a distinguished road
Hi Zheng,
Sorry for my late reply. This is due to the turbulent flame speed model which is a function of flow parameters, geometry, initial conditions, and so on. What I know from ANSYS tutorial is the turbulent flame speed has to be set accurately when you work with TFM. Try to use Metghalchi-Keck for laminar flame speeds (material>properties>laminar flame speed> Metghalchi-Keck>type of fuel you are using. Is the your combustion chamber closed or open/parially open?
thanks
Y. Najim
Heat80 is offline   Reply With Quote

Old   July 27, 2015, 09:47
Default
  #10
Member
 
Join Date: Feb 2015
Posts: 31
Rep Power: 4
Stefano Puggelli is on a distinguished road
Hi Foamers,
Can someone explain me why in the airmix.C file a 1e+3 conversion is exploited for the pre-exponential constant A? In my opinion this constant should be proportional to the order of the reaction..
Stefano
Stefano Puggelli is offline   Reply With Quote

Old   June 9, 2016, 07:15
Default ATF : thermophysicalProperties
  #11
Member
 
Join Date: Feb 2014
Posts: 52
Rep Power: 5
Uyan is on a distinguished road
Hi All,

I am trying to use ATF model to simulate premixed methane flame.

I need to know how to modify the thermophysicalProperties dictionary. I am having some troubles understanding the entry nMoles.

Code:
reactants
{
    specie
    {
        nMoles          42.7719;
        molWeight       29.48;
    }
    thermodynamics
    {
        Tlow            200;
        Thigh           5000;
        Tcommon         1000;
        highCpCoeffs    (3.26219 1.90578e-03 -6.70778e-07 1.11111e-10 -6.95161e-15 -1.54131e+03 4.51236);
        lowCpCoeffs     (3.19463 2.23757e-03 -2.87044e-06 3.71954e-09 -1.67996e-12 -1.47394e+03 4.96249);
    }
    transport
    {
        As              1.67212e-06;
        Ts              170.672;
    }
}
I don't understand how the nMoles entry became 42.77 for propane in this tutorial case. To make things worse the nMoles for products is 43.77.

Because I think nMoles has to be 1, considering one mole of reactants is used.

Can someone please help me here what is going on with nMoles entry?
Uyan is offline   Reply With Quote

Old   June 21, 2016, 08:20
Default myATF ---- ftEqn and ft field
  #12
Member
 
Join Date: Feb 2014
Posts: 52
Rep Power: 5
Uyan is on a distinguished road
Hi remir all,

Does anyone know what exactly is the purpose of ftEqn.H file is.
And in the test case that was kindly provided by remir there is a file "ft"

What exactly is the purpose of that file?

Can someone who has used this solver please help me here.

Thanks a lot.
Uyan is offline   Reply With Quote

Old   August 11, 2016, 02:08
Default Thicken Flame : reaction rate calculation
  #13
Member
 
Join Date: Feb 2014
Posts: 52
Rep Power: 5
Uyan is on a distinguished road
Hi all,

I am trying to use this thickened Flame model in OpenFOAM and I hope someone here can help me on understanding few things about that code.

In airmix.C , where reaction rate (omega) is calculated,
the code has

Code:
omega_[I] = 1e3* A_* nuF_* MF_* pow(max(1e3*rho[I]*YF/MF_,0),nuF_)*
pow(max(1e3*rho[I]*YO2/MO2,0),nuO_)
*exp(-TA_/T[I])/maxYF;
can someone kindly explain me why the this whole term is divided by maxYF ?

Because in the theoretical Arrehnius Equation, omega is calculated

\dot{\omega} = A*\nu_{F}*W_F \bigg(\frac{\rho Y_F}{W_F}\bigg)^{\nu_F}\bigg(\frac{\rho Y_O}{W_O}\bigg)^{\nu_O} exp\bigg( \frac{-Ta}{T} \bigg)

so I can't understand what is the need of dividing by maxYF.


Secondly, the test case has got sourcetermPropertiesDit has got the necessary values for the omega calculation.

But these values looks to be significantly different from the values of the reference paper by Legier and Poinsot.
For example in the test case TA_ = 7048, where as in the above reference paper it is 15080 K.
In the test case MF = 1, but for propane MF_ should be 44.

Can anyone kindly explain these differences in values as well. Because the omega value is very sensitive to these value especially the activation temperature.

Thanks in advance.
Uyan is offline   Reply With Quote

Old   August 11, 2016, 02:58
Default
  #14
New Member
 
remi
Join Date: May 2014
Location: China
Posts: 26
Rep Power: 4
remir is on a distinguished road
Hello all,

I will try to address some of the questions above best I can, but I haven't worked on the TFM in a while, so please pardon my lack of memory.

The 1e+3 conversion for the pre-exponential factor is a unit conversion to cgs units. In the original solver when A was defined (user input), the unit was not cgs. In my version of it, it is, so I hard-coded the conversion.

Now for ft, it is defined as follow in this portion of the code :

if (thermo_.composition().contains("ft"))
{
const volScalarField& ft=thermo_.composition().Y("ft");

The purpose of the ft file might just be for initialization, have you tried removing it before you run a simulation? ftEqn.H seems to treat the transport equation of a scalar in a turbulent flow-field.

The maxYF constant : I don't remember why it's used here, maybe to give some sort of correction depending on the stoecchiometric ratio of air/fuel ? To be investigated further !

The nMoles entry : it is indeed still an unknown for me, have you found a andwer?

Now for the values of the TFM coefficients, different choices are possible here, as this is mainly just a curve fitting. I think you can find some of these coeff in Angelberger, C., Veynante, D., Egolfopoulos, F., & Poinsot, T. (1998). Large eddy simulations of combustion instabilities in premixed flames. In Proc. of the Summer Program (pp. 61-82)..

Also, it is suggested by Westbrook and Dryer (1981) that Ta be kept at the lowest value to assure low stiffness and a thicker reaction zone, hence my choice for a lower Ta = 7048K. For the MF = 1 or 44, have you found any difference in the simulation?

Hope it helped a little,

good luck.

Remi
remir is offline   Reply With Quote

Old   August 11, 2016, 03:29
Default
  #15
Member
 
Join Date: Feb 2014
Posts: 52
Rep Power: 5
Uyan is on a distinguished road
Hi remir,

Thanks for your quick response,

TA value makes a huge difference, if I use the 15000K value the flame blows off after ignition. But with 7048K value I can get the flame to stay. With 15000K value it is almost impossible to get a stable flame.

MF_ , which should be 44 also does not make a huge difference on that backward step flow case. However I need to compare with experimental results.

As you said that maxYF term, must be there for some sort of normalization, but not clear what the original author tried to do with it.

No i could not find out what nmoles actually does.

Thanks for the westbrook reference I will look into it.

If you understand why they normalize the reaction rate with respect to maxYF please let me know.

I ll post the update.
Thanks for the westbook reference.
Uyan is offline   Reply With Quote

Old   September 21, 2016, 09:49
Default maxYF and nMoles
  #16
Member
 
Join Date: Feb 2014
Posts: 52
Rep Power: 5
Uyan is on a distinguished road
Hi Remir,

I think I found the answer to "nMoles" and "maxYF"

I explained why nMoles is not equal to one :
HTML Code:
 http://www.cfd-online.com/Forums/openfoam/175917-janaf-coefficient-gaz-mixture-nmoles.html#post615339
why omega is normalized using maxYF?

b = \frac{Y_f - Y_f^u}{Y_f^u - Y_f^b}

for lean mixtures Y_f^b = 0

therefore,

b = \frac{Y_f}{Y_f^u}

\dot{b} = \frac{\dot{Y_f}}{Y_f^u}

so the original code looks to be fine, only problem is fine tuning the Arrehnius coefficients.
Uyan is offline   Reply With Quote

Old   February 1, 2017, 14:57
Default
  #17
New Member
 
Join Date: Sep 2012
Posts: 23
Rep Power: 6
Zack is on a distinguished road
Hi All

I wanted to use the TFM model (myATF from loaded files by remir) in the recent version of OpenFOAM (v1606+). I am getting below error:

Code:
airmix.C: In member function virtual void Foam::airmix::correct(const volScalarField&):
airmix.C:60:62: error: const class Foam::basicSpecieMixture has no member named fres
                     +(1.0 - b_[I])*max(thermo_.composition().fres(ft[I], stOF_), 0.0);
                                                              ^
airmix.C:77:47: error: const class Foam::basicSpecieMixture has no member named fres
                     max(thermo_.composition().fres(ft.boundaryField()[bI][fI], stOF_), 0.0);
I know after OF-2.2, the member "fres" has been moved from "basicMultiComponentMixture" to " basicCombustionMixture". I tried a lot but I could not solve the issue (such as including basicCombustionMixture.H ...).

I appreciate any suggestion.
Zack is offline   Reply With Quote

Reply

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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Low Reynolds k-epsilon model YJZ ANSYS 1 August 20, 2010 13:57
species transport model or mixture model? achaokaoyan Main CFD Forum 0 July 10, 2010 10:52
lighter flame model douglasbloer Main CFD Forum 0 July 1, 2010 11:35
Crosswind flame with reactingFoam torvic OpenFOAM Running, Solving & CFD 1 September 10, 2007 17:48


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