CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Combustion modelling in OpenFOAM - Difficulties (http://www.cfd-online.com/Forums/openfoam-solving/83322-combustion-modelling-openfoam-difficulties.html)

AleDR December 23, 2010 06:17

Combustion modelling in OpenFOAM - Difficulties
 
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! :rolleyes:

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!!! :cool:

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!!! :cool:

.Alex.

alberto December 24, 2010 03:28

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?

nileshjrane December 26, 2010 14:38

Same problem: Janaf error
 
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??

alberto December 26, 2010 16:10

You have to set the ODE solver properly.

nileshjrane December 27, 2010 04:44

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

alberto December 27, 2010 05:03

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,

nileshjrane December 29, 2010 09:21

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::printStack(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::psiChemistryModel, Foam::sutherlandTransport<Foam::specieThermo<Foam: :janafThermo<Foam::perfectGas> > > >::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...

AleDR January 10, 2011 10:33

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.

amitmangtani July 2, 2012 08:00

Meaning of deltaT in the simualation
 
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

alberto July 2, 2012 11:39

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,

amitmangtani July 2, 2012 12:05

Error in using fixed deltaT
 
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 July 2, 2012 12:57

How to define fast chemistry in reactingFoam???
 
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

alberto July 2, 2012 15:39

Quote:

Originally Posted by amitmangtani (Post 369327)
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.

ToTh August 15, 2012 11:34

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?:confused:

tonylin July 29, 2013 21:25

help
 
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 (Post 288505)
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??


wyldckat August 18, 2013 18:11

Hi Tony,

Quote:

Originally Posted by tonylin (Post 442697)
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

Howard July 13, 2015 13:03

Quote:

Originally Posted by wyldckat (Post 446507)
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

kaveh19 July 14, 2015 06:30

combustionProperties in kivaTest
 
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.


All times are GMT -4. The time now is 19:31.