CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Combustion modelling in OpenFOAM - Difficulties

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 23, 2010, 05:17
Cool Combustion modelling in OpenFOAM - Difficulties
  #1
Member
 
AleDR's Avatar
 
Alessandro
Join Date: May 2009
Location: Genova
Posts: 35
Rep Power: 7
AleDR is on a distinguished road
Hi guys,

I'm really new in OpenFOAM, but I have some little experience in combustion modelling with Fluent and burner laboratory testing.
I really appreciate the efforts of the OF community, so I would make some contributions if possible!

Reading through some posts here, I found that combustion modelling (a hard topic for any CFD engineer!) is somewhat not well established in OpenFOAM. But this is the main objective for the community, collaborating for common knowledge... So why don't start a sub-topic in this forum? Hope that I will find others interested in it!


Anyway before starting I have a question:
- Is radiation modelling possible for combustion equipment simulation in OpenFOAM ?

I think about standard workflow in Fluent:
Cold flow solution -> Reacting flow solution -> Radiation model activated --> Solution!
I have not understood if this is possible in OF too!


Another topic is the stability of combustion model in reactingFoam...
I have gone through the tutorial "Tut reactingFoam firstTutorial" in OpenFOAM Wiki adapting it to 1.7.1 version and I get this error:

--> FOAM FATAL ERROR:
attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; T = 5000.01

From function janafThermo<equationOfState>::checkT(const scalar T) const
in file /home/opencfd/OpenFOAM/OpenFOAM-1.7.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting

#0 Foam::error:: PrintStack(Foam::Ostream&) in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::specieThermo<Foam::janafThermo<Foam: :PerfectGas> >::H(double) const in "/opt/openfoam171/lib/linuxGccDPOpt/libreactionThermophysicalModels.so"
#3 Foam::ODEChemistryModel<Foam: :PsiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam: :PerfectGas> > > >::solve(double, double) in "/opt/openfoam171/lib/linuxGccDPOpt/libchemistryModel.so"
#4
in "/opt/openfoam171/applications/bin/linuxGccDPOpt/reactingFoam"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6
in "/opt/openfoam171/applications/bin/linuxGccDPOpt/reactingFoam"


It seems to me (please, tell me if I'm wrong...) that the solver does not limit the temperature rise during iterations. In Fluent this is done automatically and you get a warning for this, but the solver continues to iterate and often this problem is overcome as the solution starts to settle down. The maxTemperature is a setting of the software and can be modified by the user. Maybe this should be implemented in OpenFOAM too, but I have to be a little skilled with reactingFoam before!!!

In other words, the Tut reactionFoam firstTutorial does not work for me!!!

Here are the files if you want to have a deeper look into my modifications (actually the tutorial files I have downloaded featured a controlDict with a wrong line for the solver... dieselFoam instead of reactingFoam ! I made some other minor modifications too and I think it should be necessary to add a good and physically sound /0 too...).
After that we could -somehow!- correct the tutorial on the OpenFOAM Wiki, in order to give our contribution and build a good tutorial section for the entire community (it seems to me very poor!!!).

I'll be waiting for collaborations, thank you!!!

.Alex.
AleDR is offline   Reply With Quote

Old   December 24, 2010, 02:28
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Some discussion about including a temperature limitation in thermoPhysicalModel was started here: http://www.openfoam.com/mantisbt/vie...id=57#bugnotes

At what time step does the tutorial crash for you?
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   December 26, 2010, 13:38
Default Same problem: Janaf error
  #3
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 119
Rep Power: 6
nileshjrane is on a distinguished road
Hi All,

I am also trying to make reactingFoam work. I took the reactingFoam tut (i am using OF 1.7.0) and added my geometry to it thats it..kept CH4 combustion as it it..modified the BCs accordingly. Now reactingFoam works fine for chemistry=OFF case, but as soon as i switch on the chemistry i get this same error reported above, that temp going above 5000K. I am doing an icoFoam run for initialisation. I tried solving chem from this initialization as well as running cold flow before switching chemistry on. But the result is the same. Tried to reduce time step but sooner or later it gives the same error. I have no idea what is happening.

If i keep max Co number = 0.1 within 10 steps the temperature reaches 5000K. If Co is kept higher the error occurs much early.

Any suggestion??
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   December 26, 2010, 15:10
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
You have to set the ODE solver properly.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   December 27, 2010, 03:44
Default
  #5
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 119
Rep Power: 6
nileshjrane is on a distinguished road
Hello Alberto,

Thanls for the reply..

I have no idea whatsoever abt this ODE solver settings my chemistryProperties file reads:

Quote:
psiChemistryModel ODEChemistryModel<gasThermoPhysics>;

chemistry on;

chemistrySolver ode;

initialChemicalTimeStep 1e-07;

turbulentReaction on;

sequentialCoeffs
{
cTauChem 0.001;
}

EulerImplicitCoeffs
{
cTauChem 0.05;
equilibriumRateLimiter off;
}

odeCoeffs
{
ODESolver SIBS;
eps 0.05;
scale 1;
}

Cmix Cmix [ 0 0 0 0 0 0 0 ] 0.1;
Could you please elaborate more on which parameters to be tweaked and how??

Thanking you in advance..

Nilesh
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   December 27, 2010, 04:03
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
The ODE solver parameters are in the odeCoeffs dictionary:

Code:
odeCoeffs
{
    ODESolver       SIBS;
    eps             0.05;
    scale           1;
}
Depending on the solver you use, you might want to have more restrictive settings to obtain a stable solution (check the doxygen documentation to see what these settings are).

Best,
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   December 29, 2010, 08:21
Default
  #7
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 119
Rep Power: 6
nileshjrane is on a distinguished road
Hello Alberto,

Feeling very stupid to post this, but a day with doxygen and i couldn't figure out how can i set the ODE solver values. I did try KKR and RK4 with SIBS. Tried to vary eps value and scale..but in vein..sooner or later i get either JANAF-error or floating point error like this:

Quote:
Courant Number mean: 0.0020547 max: 1.4849
deltaT = 9e-08
Time = 0.0053042

Solving chemistry
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam170/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::ODEChemistryModel<Foam:siChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam:erfectGas> > > >::solve(double, double) in "/opt/openfoam170/lib/linux64GccDPOpt/libchemistryModel.so"
#4
in "/opt/openfoam170/applications/bin/linux64GccDPOpt/reactingFoam"
#5 __libc_start_main in "/lib/libc.so.6"
#6
in "/opt/openfoam170/applications/bin/linux64GccDPOpt/reactingFoam"
Floating point exception
nilesh@MILKYWAY:~/NILESH_WORK/DUCTED_ROCKET_PROJECT/SIMULATIONS/STG_3_SIM/reactingFoam$

the problem as i perceived from post-processing is:

The highest temp is near fuel inlet..the gas temp there increases due to combustion but before this increased heat dissipates to surrounding gas, more fuel comes in form inlet and it burns giving more heat out...and this results in unrealistically high temp in very small region..

So i tried varying "cmix" and increased it to 10 from 1..it helped in stabilizing the temp of abt 3500K, still higher i think though for CH4 combustion..and i think this increase in Cmix value is unphysical...

But then question remains how to make the thing work??

Note: The tut for reactingFoam works just fine..and my BCs are quite the same as the tut..Also cold flow simulations show adequate mixing...
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   January 10, 2011, 09:33
Default
  #8
Member
 
AleDR's Avatar
 
Alessandro
Join Date: May 2009
Location: Genova
Posts: 35
Rep Power: 7
AleDR is on a distinguished road
Hi Alberto!
I had a look at your blog some weeks ago... so nice to meet you!

Thanks for your link! I will have a deeper look at the OF bugs reporting..!

My modified tutorial crashes at Time = 0.216488 as you can see from the last lines in the log file appended in my previous post:

Quote:
Courant Number mean: 0.0141266 max: 0.0984688
deltaT = 2.43902e-05
Time = 0.216463

Solving chemistry
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 2.52488e-05, Final residual = 1.34078e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.000118915, Final residual = 4.85378e-07, No Iterations 1
DILUPBiCG: Solving for C7H16, Initial residual = 3.39327e-05, Final residual = 6.07782e-09, No Iterations 1
DILUPBiCG: Solving for O2, Initial residual = 1.98069e-06, Final residual = 3.26697e-08, No Iterations 1
DILUPBiCG: Solving for CO2, Initial residual = 1.35165e-05, Final residual = 4.58395e-08, No Iterations 1
DILUPBiCG: Solving for H2O, Initial residual = 1.35165e-05, Final residual = 4.58395e-08, No Iterations 1
DILUPBiCG: Solving for hs, Initial residual = 1.6626e-05, Final residual = 1.79555e-08, No Iterations 1
T gas min/max = 800, 4848.77
DICPCG: Solving for p, Initial residual = 0.00915689, Final residual = 7.67017e-10, No Iterations 88
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.9809e-11, global = -7.50537e-13, cumulative = -6.7386e-11
DICPCG: Solving for p, Initial residual = 0.00165821, Final residual = 9.49956e-10, No Iterations 82
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.98045e-11, global = -7.52542e-13, cumulative = -6.81385e-11
DILUPBiCG: Solving for epsilon, Initial residual = 4.16044e-06, Final residual = 3.95024e-09, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 2.01082e-05, Final residual = 4.70466e-08, No Iterations 1
ExecutionTime = 12458.7 s ClockTime = 29348 s

Courant Number mean: 0.0141265 max: 0.0984685
deltaT = 2.43902e-05
Time = 0.216488

Solving chemistry
Here you can see:
- the C7H16 field
- the O2 field
- the CO2 field
- the temperature field with the 4000-5000 K contour.

The domain and mesh are exactly the same of the tutorial.

So did you encounter the same error?
I tried also a cold flow solution before activating the chemistry solver but I didn't manage to solve this problem...

Anyway a sort of temperature limitation is necessary for steady-state calculations!

Let me know!


.Alex.
AleDR is offline   Reply With Quote

Old   July 2, 2012, 08:00
Default Meaning of deltaT in the simualation
  #9
New Member
 
Amit Mangtani
Join Date: May 2012
Posts: 5
Rep Power: 4
amitmangtani is on a distinguished road
When the simulation is running on, we see some type of parameters as below. In this what does this deltaT mean?? Is it different from the deltaT we have defined in controlDict file and how can we reduce this deltaT to run the simualation faster..

Courant Number mean: 0.0020547 max: 1.4849
deltaT = 9e-08
Time = 0.0053042

Regards,
Amit Mangtani
amitmangtani is offline   Reply With Quote

Old   July 2, 2012, 11:39
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
If you use adaptive time-stepping, deltaT is changed automatically to respect the Courant condition specified in controlDict. You can disable the adaptive time stepping if you want a fixed deltaT.

Best,
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   July 2, 2012, 12:05
Default Error in using fixed deltaT
  #11
New Member
 
Amit Mangtani
Join Date: May 2012
Posts: 5
Rep Power: 4
amitmangtani is on a distinguished road
So, when i fixed my deltaT as 0.05 and disabled the adaptive time stepping, i got an error like this:
attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; T = 5060.63

Where is the problem now??

Regards,
Amit Mangtani
amitmangtani is offline   Reply With Quote

Old   July 2, 2012, 12:57
Default How to define fast chemistry in reactingFoam???
  #12
New Member
 
Amit Mangtani
Join Date: May 2012
Posts: 5
Rep Power: 4
amitmangtani is on a distinguished road
Also,
I want to model the reaction of carbon monoxide with oxygen to be very fast.
So it necesaary to define the reaction (CO + 0.5O2 = CO2) in the reactions file???
If yes, then what should be the Arrehenius parameters???

Regards,
Amit Mangtani
amitmangtani is offline   Reply With Quote

Old   July 2, 2012, 15:39
Default
  #13
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,880
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by amitmangtani View Post
So, when i fixed my deltaT as 0.05 and disabled the adaptive time stepping, i got an error like this:
attempt to use janafThermo<equationOfState> out of temperature range 200 -> 5000; T = 5060.63

Where is the problem now??

Regards,
Amit Mangtani
Your time-step is too large, and the computation returns a value of the temperature which is out of bounds.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 15, 2012, 11:34
Default
  #14
New Member
 
Join Date: Jul 2012
Posts: 4
Rep Power: 4
ToTh is on a distinguished road
Hi everyone,

I too have the common problem with T being out of range at some point. I try to simulate a simple CH4 combustion. After some time this or a simular problem occured:


--> FOAM FATAL ERROR:
attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 5000; T = 198.885

From function janafThermo<EquationOfState>::checkT(const scalar T) const
in file /home/opencfd/OpenFOAM/OpenFOAM-2.0.1/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 63.

FOAM aborting

I already read the discussion about including some kind of "clipping", but I have no idea how to use it (if it is included already). I use OpenFOAM 2.1.0.

Could someone please help me?
ToTh is offline   Reply With Quote

Old   July 29, 2013, 21:25
Default help
  #15
New Member
 
TONG LIN
Join Date: Jul 2013
Posts: 4
Rep Power: 3
tonylin is on a distinguished road
Hi

It seems that we are doing the similar thing, i know now u are capable to solve anything. my question is there are two inlet, one is airinlet and the other is fuel inlet, for cold flow, i use icofoam to solve this problem, I didn;t find where to define the species. could u help me?

best regards
Tony
Quote:
Originally Posted by nileshjrane View Post
Hi All,

I am also trying to make reactingFoam work. I took the reactingFoam tut (i am using OF 1.7.0) and added my geometry to it thats it..kept CH4 combustion as it it..modified the BCs accordingly. Now reactingFoam works fine for chemistry=OFF case, but as soon as i switch on the chemistry i get this same error reported above, that temp going above 5000K. I am doing an icoFoam run for initialisation. I tried solving chem from this initialization as well as running cold flow before switching chemistry on. But the result is the same. Tried to reduce time step but sooner or later it gives the same error. I have no idea what is happening.

If i keep max Co number = 0.1 within 10 steps the temperature reaches 5000K. If Co is kept higher the error occurs much early.

Any suggestion??
tonylin is offline   Reply With Quote

Old   August 18, 2013, 18:11
Default
  #16
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 6,997
Blog Entries: 32
Rep Power: 69
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Tony,

Quote:
Originally Posted by tonylin View Post
It seems that we are doing the similar thing, i know now u are capable to solve anything. my question is there are two inlet, one is airinlet and the other is fuel inlet, for cold flow, i use icofoam to solve this problem, I didn;t find where to define the species. could u help me?
Since you haven't gotten a better answer so far, I suggest that you study OpenFOAM's tutorial "combustion/reactingFoam/ras/counterFlowFlame2D".

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Tags
combustion, janaf, reactingfoam, tutorials

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
Modelling Combustion in Porous Zone tanjinjack FLUENT 0 November 19, 2010 11:23
Desktop for Combustion Modelling using Fluent JamesZA Hardware 4 September 29, 2010 08:12
MSc CFD course in EU with combustion modelling Michail Main CFD Forum 1 August 27, 2010 06:40
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
About Modelling Combustion Ridwan Budhi Febrianto FLUENT 2 May 11, 2005 03:55


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