
[Sponsors] 
January 20, 2011, 14:05 
thickened flame model

#1 
Member
Join Date: Nov 2010
Posts: 50
Rep Power: 7 
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( 1e3*rho[I]*YF / MF_, nuF_ ) // rho is kg/m^3, change to cgs *pow( 1e3*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( 1e3*rho.boundaryField()[bI][fI]*YF / MF_, nuF_ ) *pow( 1e3*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( 1e3*rho[I]*YF / MF_, nuF_ ) // rho is kg/m^3, change to cgs *pow( 1e3*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( 1e3*rho.boundaryField()[bI][fI]*YF / MF_, nuF_ ) *pow( 1e3*rho.boundaryField()[bI][fI]*YO2 / MO2, nuO_ ) *exp(TA_/T.boundaryField()[bI][fI]) /maxYF; } } } } 

January 20, 2011, 15:32 

#2 
Member
Join Date: Nov 2010
Posts: 50
Rep Power: 7 
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 

June 14, 2014, 10:26 

#3 
New Member
remi
Join Date: May 2014
Location: China
Posts: 24
Rep Power: 3 
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 

January 20, 2015, 02:18 

#4  
New Member
remi
Join Date: May 2014
Location: China
Posts: 24
Rep Power: 3 
Thought I'd give some feedback on this old post, as I've been working on the TF model recently:
Quote:
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 nonpremixed 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. 

February 2, 2015, 12:55 

#5 
New Member
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 11
Rep Power: 4 
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 

February 2, 2015, 22:31 

#6 
New Member
remi
Join Date: May 2014
Location: China
Posts: 24
Rep Power: 3 
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.0e08 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(1e3*rho[I]*YF / MF_,0), nuF_ ) // rho is kg/m^3, change to cgs *pow( max(1e3*rho[I]*YO2 / MO2,0), nuO_ ) *exp(TA_/T[I]) /maxYF : 0.0; Instead of emailing I tried uploading it here, tell me if you got everything. Best, Remi 

February 5, 2015, 22:08 

#7 
New Member
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 11
Rep Power: 4 
Thank you Remi.


May 5, 2015, 04:39 
TF model

#8  
New Member
Kai Zheng
Join Date: May 2015
Posts: 1
Rep Power: 0 
Quote:
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? 

June 30, 2015, 15:53 

#9 
New Member
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 11
Rep Power: 4 
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 MetghalchiKeck for laminar flame speeds (material>properties>laminar flame speed> MetghalchiKeck>type of fuel you are using. Is the your combustion chamber closed or open/parially open? thanks Y. Najim 

July 27, 2015, 09:47 

#10 
New Member
Join Date: Feb 2015
Posts: 24
Rep Power: 2 
Hi Foamers,
Can someone explain me why in the airmix.C file a 1e+3 conversion is exploited for the preexponential constant A? In my opinion this constant should be proportional to the order of the reaction.. Stefano 

Thread Tools  
Display Modes  


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 kepsilon 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 