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

Combustion modelling in OpenFOAM - Difficulties

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2010, 06:17
Cool Combustion modelling in OpenFOAM - Difficulties
  #1
Member
 
AleDR's Avatar
 
Alessandro
Join Date: May 2009
Location: Genova
Posts: 47
Rep Power: 17
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.
Saeng Kinley likes this.
AleDR is offline   Reply With Quote

Old   December 24, 2010, 03:28
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
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?
Saeng Kinley likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 26, 2010, 14:38
Default Same problem: Janaf error
  #3
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
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, 16:10
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You have to set the ODE solver properly.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 27, 2010, 04:44
Default
  #5
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
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, 05:03
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
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 Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   December 29, 2010, 09:21
Default
  #7
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
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...
justsmile2007 likes this.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   January 10, 2011, 10:33
Default
  #8
Member
 
AleDR's Avatar
 
Alessandro
Join Date: May 2009
Location: Genova
Posts: 47
Rep Power: 17
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, 09:00
Default Meaning of deltaT in the simualation
  #9
New Member
 
Amit Mangtani
Join Date: May 2012
Posts: 5
Rep Power: 14
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, 12:39
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
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 Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 2, 2012, 13:05
Default Error in using fixed deltaT
  #11
New Member
 
Amit Mangtani
Join Date: May 2012
Posts: 5
Rep Power: 14
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, 13:57
Default How to define fast chemistry in reactingFoam???
  #12
New Member
 
Amit Mangtani
Join Date: May 2012
Posts: 5
Rep Power: 14
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, 16:39
Default
  #13
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
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 Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 15, 2012, 12:34
Default
  #14
New Member
 
Join Date: Jul 2012
Posts: 4
Rep Power: 14
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, 22:25
Default help
  #15
New Member
 
TONG LIN
Join Date: Jul 2013
Posts: 4
Rep Power: 13
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, 19:11
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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

Old   July 13, 2015, 14:03
Default
  #17
Member
 
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 11
Howard is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Tony,


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
In my opinion, using another ODE solver may be helpful, http://www.openfoam.org/version2.3.0/numerics.php
Howard is offline   Reply With Quote

Old   July 14, 2015, 07:30
Default combustionProperties in kivaTest
  #18
Member
 
Join Date: Jul 2015
Posts: 33
Rep Power: 11
kaveh19 is on a distinguished road
hi guys,
I've started up to work with combustion.
Is there anyone to help me ?
I want some information about combustionProperties in kivaTest,explaining the items.
kaveh19 is offline   Reply With Quote

Old   September 10, 2015, 19:25
Default Co +0.5o2 =co2
  #19
New Member
 
Sameer
Join Date: Jan 2012
Posts: 3
Rep Power: 14
samningoo is on a distinguished road
When I add the above reaction in the reactions file, it says CO is not a valid species.
I get the following error:

FOAM FATAL ERROR:
CO not found in table. Valid entries:
5
(
N2
CO2
O2
CH4
H2O
)

Can CO be modelled in OpenFoam?
samningoo is offline   Reply With Quote

Old   September 12, 2015, 15:42
Default
  #20
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer - @samningoo: Take a better look into all of the files in the tutorial case that you're using as a reference.
For example, in the tutorial case "combustion/reactingFoam/ras/counterFlowFlame2D" you should find in the folder "constant" a lot of files, among which are a few that relate to combustion.
Saeng Kinley likes this.
wyldckat is offline   Reply With Quote

Reply

Tags
combustion, janaf, reactingfoam, tutorials


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


All times are GMT -4. The time now is 12:08.