
[Sponsors] 
April 19, 2007, 16:35 
Hello everybody,
I am using

#1 
Guest
Posts: n/a

Hello everybody,
I am using the reactingFoam solver for a very simple case: the geometry is 2D axisymmetric geometry, the fuel is methane in a coflow of air and the chemistry is simply a 1 step reaction. Unfortunately I have some problems in the enthalpy equation. During the calculations in some cells the temperature reaches a value higher than 5000K which is the maximum value available for the estimation of transport properties in the gaseous mixture; then the following error message appears:  > FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 > 5000; T = 5081.35#0 Foam::error::printStack(Foam::Ostream&) #1 Foam::error::abort() #2 Foam::specieThermo<foam::janafthermo<foam::perfect gas> >::H(double) const #3 Foam::hMixtureThermo<foam::reactingmixture>::calcu late() #4 Foam::hMixtureThermo<foam::reactingmixture>::corre ct() #5 main #6 __libc_start_main #7 __gxx_personality_v0 From function janafThermo<equationofstate>::checkT(const scalar T) const in file /home/dm2/henry/OpenFOAM/OpenFOAM1.4/src/thermophysicalModels/specie/lnInclude/ janafThermoI.H at line 73. FOAM aborting Aborted  I tried different initial conditions and different meshes and I also changed the chemistry of my case but the problem remains. I saw that many people experienced the same problem but nobody explained the reason and proposed a solution. I am wondering if it is possible to force a maximum value in the temperature field (for example 3500K); this is the solution I usually use in FLUENT, but I don't know how to implement it in OpenFoam Do you have any suggestions? Is there anybody who fixed this problem? Thank you, Danilo 

April 20, 2007, 12:51 
Hi Danilo,
i can tell you h

#2 
Senior Member
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 8 
Hi Danilo,
i can tell you how to fudge it and limit the enthalpy. Create 'hEqn.H' in the folder '$FOAM_APP/solvers/combustion/reactingFoam'. If no 'hEqn.H' exists locally, the one from 'XiFoam' is taken. hEqn.H:  { solve ( fvm::ddt(rho, h) + mvConvection>fvmDiv(phi, h)  fvm::laplacian(turbulence>alphaEff(), h) == DpDt ); const scalar maxH = ....; forAll(h.internalField(), cellI) { h.internalField()[cellI] = maxH; } forAll(h.boundaryField(), patchI) { forAll(h.boundaryField()[patchI], faceI) { h.boundaryField()[patchI][faceI] = maxH; } } thermo>correct(); } 

April 20, 2007, 14:07 
Hi Markus,
thank you for yo

#3 
Guest
Posts: n/a

Hi Markus,
thank you for your reply! Unfortunately I didn't understand the solution you proposed. In particular: 1. It seems to me that using your solution a uniform value of enthalpy is fixed in every cell; on the contrary I would to correct the value only for the cells where the temperature is higher than Tmax 2. Even if I can choose the cells where the temperature is higher than Tmax it should be simpler to correct the temperature field, not the enthalpy field... in fact the value of enthalpy is not only related to the temperature but also to the composition and therefore the maxH reported in your code is not a uniform and constant value but should be calculated for every cell I met this problem also using the reactingFoam tutorial reported in the wiki page without making any changes... I don't know if the other combustion solvers are affected by the same problem, but for reactingFoam I never reached a steady solution: I tried different geometries, different meshes, kinetic schemes and fuels but I always had the same error... The strange thing is that in the iteration preceding the message error the thermal field seems to be correct and the maximum value of temperature seems to be correct (around 2500K for methane, for example)... suddenly in the next iteration the temperature is some cells reaches a value higher of 5000K or in some case is negative!!! Danilo 

April 20, 2007, 14:49 
1.) yes, you're right, i forgo

#4 
Senior Member
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 8 
1.) yes, you're right, i forgot to insert an ifstatement:
if ( h.internalField()[cellI] > maxH) { ... } and so on 2.) since you're solving for the enthalpy which feeds into 'hCombustionThermo' with 'thermo>correct()' you have to limit the enthalpy, unless you want to change the 'hCombustionThermo', which i wouldn't recommend for a start. As you say the maximum enthalpy needs to be caluclated for each cell, which should be possible. regarding your instability: havent' used it, no clue, but general things:  try upwind for the convection terms  try different boundary conditions  increase the solution tolerances  decrease timesteps  underrelax the enthalpy, for steadystate only good luck markus 

April 20, 2007, 15:15 
i meant: decrease solution tol

#5 
Senior Member
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 8 
i meant: decrease solution tolerances


April 20, 2007, 16:10 
Hi Markus,
thank you very m

#6 
Guest
Posts: n/a

Hi Markus,
thank you very much for your suggestions... I'll try in the next days... Danilo 

November 26, 2009, 08:29 

#7 
New Member
Simon
Join Date: Nov 2009
Posts: 3
Rep Power: 7 
Hello everyone,
I tried to limit the enthalpy in the XiFoamsolver as described above but it doesn`t work... Maybe here is anyone who can help me. Sim 

November 26, 2009, 08:42 

#8 
New Member
Simon
Join Date: Nov 2009
Posts: 3
Rep Power: 7 
Its all new for me so i dont know if its right...
here is what I´ve written in the hEqn.H: { solve ( fvm::ddt(rho, h) + mvConvection>fvmDiv(phi, h)  fvm::laplacian(turbulence>alphaEff(), h) == DpDt ); if ( h.internalField()[cellI] > maxH) { const scalar maxH = 1000; forAll(h.internalField(), cellI) { h.internalField()[cellI] = maxH; } forAll(h.boundaryField(), patchI) { forAll(h.boundaryField()[patchI], faceI) { h.boundaryField()[patchI][faceI] = maxH; } } } thermo>correct(); } 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Total enthalpy equation  cosimobianchini  OpenFOAM Running, Solving & CFD  0  August 24, 2007 05:21 
Error in the enthalpy equation  danilo  OpenFOAM PreProcessing  0  April 19, 2007 16:33 
enthalpy equation in saturated  asghari  Main CFD Forum  1  May 25, 2006 15:48 
Energy equation and Enthalpy  Martin  FLUENT  1  January 25, 2001 18:11 
Enthalpy equation and Cp dependency upon specis  Mads Bang  Main CFD Forum  1  July 30, 2000 06:43 