
[Sponsors] 
July 27, 2010, 07:41 
Maximum number of iterations exceeded

#1 
New Member
Alexander
Join Date: May 2010
Posts: 4
Rep Power: 8 
I use sonicFoam and 3D model (calculation grid from ANSYS), then Mach is small all calculated good, but if Mach>2, i see this error:
Time = 4e05 Courant Number mean: 7.45518e06 max: 50.5163 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 0.000171815, Final residual = 4.66354e06, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.0136957, Final residual = 4.54394e06, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.0133979, Final residual = 4.08719e06, No Iterations 3 DILUPBiCG: Solving for e, Initial residual = 0.000582351, Final residual = 1.84041e06, No Iterations 2 > FOAM FATAL ERROR: Maximum number of iterations exceeded From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const in file /home/opencfd/OpenFOAM/OpenFOAM1.7.0/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67. FOAM aborting #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Foam::ePsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::eConstThermo<Foam:: perfectGas> > > > >::calculate() in "/opt/openfoam170/lib/linuxGccDPOpt/libbasicThermophysicalModels.so" #3 Foam::ePsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::eConstThermo<Foam:: perfectGas> > > > >::correct() in "/opt/openfoam170/lib/linuxGccDPOpt/libbasicThermophysicalModels.so" #4 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/sonicFoam" #5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #6 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/sonicFoam" I know that P<0 or T<0 but i do not know why, help me please! 

July 28, 2010, 04:53 

#2 
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 200
Rep Power: 10 
Hi,
your problem is the function T in the file specieThermoI.H. This function is used to get the temperature for a given enthalpy. In this function, a simple Newton solver is used. Your error is related to the fact that the Newton solver can't find the correct temperature to the given enthalpy. What type of thermophysical model do you use? Firstly, you could try to increase the "h" relaxation. The second option might be to modify or even replace the Newton solver. You could use a more stable version of the Newton solver. The other option is to use a completely different solver like the Brent solver (numerical Recipes). Regards, Christian 

July 28, 2010, 05:18 

#3 
New Member
Join Date: Jun 2010
Posts: 23
Rep Power: 8 
I got exactly the same problem in my case !
I use buoyantPisoFoam with following LESProperties : LESModel oneEqEddy; delta vanDriest; printCoeffs on; turbulence on; My thermophysicalProperties looks like the tutorials : thermoType hRhoThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>; mixture air 1 28.9 1000 0 1.8e05 0.7; pRef 100000; I use linear models in divSchemes. My simulations blow up after some thousand timesteps, k value suddenly increasing without any valuable reason ... @Christian : First of all thank you for your answer. Could you explain us how to change the "h relaxation", in my 0/ directory I have no such parameter . About the solver, I did not try buoyantBoussinesq yet, does anybody know if it is more relevant for a turbulent case ? Thank you in advance 

July 28, 2010, 08:29 

#4 
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 200
Rep Power: 10 
Hi Norbert,
you can change the h relaxation in system/fvSolution. Maybe you have to include the command yourself. If so, have a look at other tutorials. Regards, Christian 

July 28, 2010, 08:39 

#5 
New Member
Join Date: Jun 2010
Posts: 23
Rep Power: 8 
Hi Christian,
I found this in my FsSolution : h { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } When you said to increase the h relaxation, you meant to increase the solver tolerance ? Regards 

July 28, 2010, 14:40 

#6 
New Member
Alexander
Join Date: May 2010
Posts: 4
Rep Power: 8 
Chris Lucas thank you for your answer!
my thermoType ePsiThermo<pureMixture<constTransport<specieThermo <eConstThermo<perfectGas>>>>>; I tried simulated my unit in ANSYS CFX, and they give me the same result. Near supersonic nozzle pressure less than zero. Image: Near supersonic nozzle P<0 in ANSYS CFX >Firstly, you could try to increase the "h" relaxation. It does not help >The second option might be to modify or even replace the Newton solver. You could use a more stable version of the Newton solver. The other option is to use a completely different solver like the Brent solver (numerical Recipes). How can I do this? I'm new in OpenFoam Thank you! 

July 29, 2010, 04:07 

#7 
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 200
Rep Power: 10 
Hi,
about the relaxation, have a look at the tutorials e.g. rhoPimpleFoam. You will find this relaxationFactors { U 0.7; p 0.3; rho 0.05; h 0.7; k 0.7; omega 0.7; } You should then decrease the value behind the h. About changing the solver. Have a look at the file a said before. You will find the Newton solver in this file. Have a look in a numeric’s book and find a better solver in change in solver in OpenFoam. Have a look at: (Have a look at the copyright) http://kolhoz.tiera.ru/M_Mathematics...281018s%29.pdf You will find the code of a brent solver in this book. You could also use the open Source library "gsl". However, if you get negative pressure, the problem might be related to your case setup. The problem is that if you have a positive enthalpy or internal energy and a negative pressure in one cell. The enthalpy (h= cp * T) is positive and cp is positive and constant. So the temperature is positive and the density is negative due to the perfect gas law. So, have a look at your case setup. Regards, Christian 

September 13, 2013, 23:49 

#8 
Senior Member
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 7 
Chris
I am using rhoPimpleFoam. In my case rhoMin decreases sharply. I think from this discussion that my problem is same.I have been stuck at this error for the last 5 weeks. I am a beginner with CFD and Openfoam doing my postgrad work. I have modified h values by decreasing and increasing it. I cannot solve this. Kindly advise how can I develop a new solver because I do not have much programming experience and if there is an easy way out. You pdf link for Brent solver is also not working. If you can send me your email, I can send you my folder as it is 178KB and this forum does not permit more than 97KB attachment to see if this is the same problem which everyone is discussing. If you have any key to developing solvers in Openfoam, kindly let me know. Regards 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Forces in OF15  richard  OpenFOAM Running, Solving & CFD  167  June 18, 2016 06:04 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 
lift and drag on ship superstructures  vaina74  OpenFOAM Running, Solving & CFD  3  June 8, 2010 12:30 
Error log  vw.cfd  OpenFOAM  6  August 7, 2009 05:44 
Trimmed cell and embedded refinement mesh conversion issues  michele  OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...  2  July 15, 2005 04:15 