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

Maximum number of iterations exceeded

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By Chris Lucas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2010, 08:41
Unhappy Maximum number of iterations exceeded
  #1
New Member
 
Alexander
Join Date: May 2010
Posts: 4
Rep Power: 16
wise is on a distinguished road
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 = 4e-05

Courant Number mean: 7.45518e-06 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.66354e-06, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.0136957, Final residual = 4.54394e-06, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 0.0133979, Final residual = 4.08719e-06, No Iterations 3
DILUPBiCG: Solving for e, Initial residual = 0.000582351, Final residual = 1.84041e-06, 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/OpenFOAM-1.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!
Attached Files
File Type: zip 0.zip (4.0 KB, 33 views)
wise is offline   Reply With Quote

Old   July 28, 2010, 05:53
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
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
Chris Lucas is offline   Reply With Quote

Old   July 28, 2010, 06:18
Default
  #3
New Member
 
Join Date: Jun 2010
Posts: 23
Rep Power: 16
NorbertB is on a distinguished road
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.8e-05 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
NorbertB is offline   Reply With Quote

Old   July 28, 2010, 09:29
Default
  #4
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
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
Chris Lucas is offline   Reply With Quote

Old   July 28, 2010, 09:39
Default
  #5
New Member
 
Join Date: Jun 2010
Posts: 23
Rep Power: 16
NorbertB is on a distinguished road
Hi Christian,

I found this in my FsSolution :

h
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}


When you said to increase the h relaxation, you meant to increase the solver tolerance ?

Regards
NorbertB is offline   Reply With Quote

Old   July 28, 2010, 15:40
Default
  #6
New Member
 
Alexander
Join Date: May 2010
Posts: 4
Rep Power: 16
wise is on a distinguished road
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!
wise is offline   Reply With Quote

Old   July 29, 2010, 05:07
Default
  #7
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
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
raghu.tejaswi, mgg and gullu92 like this.
Chris Lucas is offline   Reply With Quote

Old   September 14, 2013, 00:49
Default
  #8
Senior Member
 
starter
Join Date: Sep 2012
Posts: 125
Rep Power: 16
sihaqqi is on a distinguished road
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
sihaqqi is offline   Reply With Quote

Reply


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
Forces in OF15 richard OpenFOAM Running, Solving & CFD 180 July 9, 2018 11:54
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 13:30
Error log vw.cfd OpenFOAM 6 August 7, 2009 06:44
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


All times are GMT -4. The time now is 20:11.