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/)
-   -   --> FOAM FATAL ERROR: Maximum number of iterations exceeded (http://www.cfd-online.com/Forums/openfoam-solving/105561-foam-fatal-error-maximum-number-iterations-exceeded.html)

adambarfi August 2, 2012 11:12

--> FOAM FATAL ERROR: Maximum number of iterations exceeded
 
hi everybody,

I'm solving free convection in 3D in OpenFOAM. my model is a cubic that its bottom temperature is at 400K and the upper plane is at 300K. the sides are isolated.

I'm using buoyantPimpleFoam and when I ran it the below error appeared:

Code:


--> 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-2.0.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#3  Foam::hRhoThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam"
#5  __libc_start_main in "/lib/libc.so.6"
#6 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam"
Aborted

anybody knows what is the source of this error?

Thank you

mturcios777 August 2, 2012 12:45

The crash occurs because there is no convergence when solving for the temperature from the enthalpy using the hConst species thermo model. Have a look at the following thread for some insight into what is happening:

Declaration of function TH()

As for how to fix it, have a look at your enthalpy values and see what they are doing. It could be failing for any number of reasons:

Newton's Method - Failure Analysis

How many iterations have you run when it crahes? Do you notice anything odd about the temperature? Make your write interval smaller to try and see where the problems occur.

adambarfi August 2, 2012 13:54

Quote:

Originally Posted by mturcios777 (Post 375075)
The crash occurs because there is no convergence when solving for the temperature from the enthalpy using the hConst species thermo model. Have a look at the following thread for some insight into what is happening:

Declaration of function TH()

As for how to fix it, have a look at your enthalpy values and see what they are doing. It could be failing for any number of reasons:

Newton's Method - Failure Analysis

How many iterations have you run when it crahes? Do you notice anything odd about the temperature? Make your write interval smaller to try and see where the problems occur.

Dear Marco,
Thank you for your reply.
this is the full results:

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec  : buoyantSimpleFoam
Date  : Aug 02 2012
Time  : 22:15:47
Host  : mostafa-desktop
PID    : 2069
Case  : /home/mostafa/OpenFOAM/mostafa-2.0.1/run/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Reading g
Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu            0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt            1;
}

Calculating field g.h

Reading field p_rgh


SIMPLE: convergence criteria
    field p_rgh    tolerance 0.01
    field U    tolerance 0.001
    field h    tolerance 0.001
    field "(k|epsilon|omega)"    tolerance 0.001


Starting time loop

Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 0.995791, Final residual = 0.0952429, No Iterations 15
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 0.06838, No Iterations 30
DILUPBiCG:  Solving for Uz, Initial residual = 6.30029e-13, Final residual = 6.30029e-13, No Iterations 0
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.0953589, No Iterations 46
DICPCG:  Solving for p_rgh, Initial residual = 0.999987, Final residual = 0.00846449, No Iterations 70
time step continuity errors : sum local = 3.32469, global = 1.6675e-16, cumulative = 1.6675e-16
rho max/min : 2.09115 0.229763
DILUPBiCG:  Solving for epsilon, Initial residual = 0.881107, Final residual = 0.0484186, No Iterations 20
DILUPBiCG:  Solving for k, Initial residual = 1, Final residual = 0.053242, No Iterations 2
bounding k, min: -0.00328955 max: 561.915 average: 38.5853
ExecutionTime = 1.66 s  ClockTime = 4 s

Time = 2

DILUPBiCG:  Solving for Ux, Initial residual = 0.778599, Final residual = 0.0675986, No Iterations 34
DILUPBiCG:  Solving for Uy, Initial residual = 0.707139, Final residual = 0.0665317, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.778599, Final residual = 0.0675986, No Iterations 34
DILUPBiCG:  Solving for h, Initial residual = 0.974791, Final residual = 0.0548783, No Iterations 4
DICPCG:  Solving for p_rgh, Initial residual = 0.995251, Final residual = 0.0099475, No Iterations 24
time step continuity errors : sum local = 618.141, global = -1.12147e-13, cumulative = -1.11981e-13
rho max/min : 897.524 -2804.43
DILUPBiCG:  Solving for epsilon, Initial residual = 0.0118022, Final residual = 0.0118152, No Iterations 1001
bounding epsilon, min: -1.005e+14 max: 8.22138e+13 average: 6.92457e+08
DILUPBiCG:  Solving for k, Initial residual = 1.41234e-07, Final residual = 1.41234e-07, No Iterations 0
ExecutionTime = 6.83 s  ClockTime = 9 s

Time = 3

DILUPBiCG:  Solving for Ux, Initial residual = 0.885872, Final residual = 0.0430187, No Iterations 21
DILUPBiCG:  Solving for Uy, Initial residual = 0.828654, Final residual = 0.0514202, No Iterations 26
DILUPBiCG:  Solving for Uz, Initial residual = 0.887219, Final residual = 0.0527398, No Iterations 21
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.041242, No Iterations 3
DICPCG:  Solving for p_rgh, Initial residual = 0.999199, Final residual = 9.20109, No Iterations 1001
time step continuity errors : sum local = 3.15157e+11, global = -6.37253e-06, cumulative = -6.37253e-06
rho max/min : 3.06985e+11 -2.33027e+11
DILUPBiCG:  Solving for epsilon, Initial residual = 0.516331, Final residual = 0.0441885, No Iterations 1
bounding epsilon, min: -2.26825e+24 max: 1.63517e+26 average: 3.51799e+21
DILUPBiCG:  Solving for k, Initial residual = 0.981172, Final residual = 0.0828003, No Iterations 1
bounding k, min: -1.60611e+23 max: 4.27903e+27 average: 1.01515e+23
ExecutionTime = 9.48 s  ClockTime = 11 s

Time = 4

DILUPBiCG:  Solving for Ux, Initial residual = 0.909059, Final residual = 0.062452, No Iterations 4
DILUPBiCG:  Solving for Uy, Initial residual = 0.987006, Final residual = 0.0514382, No Iterations 4
DILUPBiCG:  Solving for Uz, Initial residual = 0.967417, Final residual = 0.03232, No Iterations 4
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.084893, 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-2.0.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::hPsiThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#3  Foam::hPsiThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
#5  __libc_start_main in "/lib/libc.so.6"
#6 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
Aborted


mturcios777 August 2, 2012 14:00

You've got a lot of problems with your case setup; rho, k and epsilon are all blowing up! My guess is that paying more attention to your boundary and initial conditions will solve the issues. Have a look at the tutorial cases and see if your boundary conditions are consistent for walls and open boundaries.

adambarfi August 2, 2012 14:33

Quote:

Originally Posted by mturcios777 (Post 375088)
You've got a lot of problems with your case setup; rho, k and epsilon are all blowing up! My guess is that paying more attention to your boundary and initial conditions will solve the issues. Have a look at the tutorial cases and see if your boundary conditions are consistent for walls and open boundaries.

Wooow!
Thanks Marco,
I'm trying to solve natural convection in a closed box. in first post I explain it. I check the boundary, they are alright.
I'm so confused! I guess this errors are originated from my meshes. I should check it.

adambarfi August 2, 2012 15:10

hi
My bottom temperature is 3000K. when I reduce it to 400K there is no error!!! why?!? anybody knows?

mturcios777 August 2, 2012 15:12

What do you mean bottom temperature? Bottom of the room, bottom range of interpolation?

adambarfi August 2, 2012 16:05

Quote:

Originally Posted by mturcios777 (Post 375099)
What do you mean bottom temperature? Bottom of the room, bottom range of interpolation?

sorry, bottom of the room!!! I get results with T=1000K. but It don't work for 3000K!!!!!!!
but I think they aren't true. the convection occurs weakly, but temperature is pretty high!!!!

mturcios777 August 2, 2012 16:39

Sounds like its a matter of tweaking the model, maybe selecting a different species thermophysical models. I haven't done much with free convection, so you'll have to ask someone with more experience.

Mojtaba.a August 2, 2012 16:46

Maybe you can try a lower deltaT in you controlDict file.
Regards

adambarfi August 3, 2012 03:18

Quote:

Originally Posted by Mojtaba.a (Post 375118)
Maybe you can try a lower deltaT in you controlDict file.
Regards

Dear Mojtaba,
I tested it, again the convection was very weak. I solve this geometry with Fluent and it solved it correctly. but I don't understand why the temperature distribution is wrong?!?!?!? actually in my model the convection doesn't occur. the bottom plane remains at T=1000K and the rest remains T=300.

do you know what is wrong?

Mojtaba.a August 3, 2012 05:56

Quote:

Originally Posted by adambarfi (Post 375170)
Dear Mojtaba,
I tested it, again the convection was very weak. I solve this geometry with Fluent and it solved it correctly. but I don't understand why the temperature distribution is wrong?!?!?!? actually in my model the convection doesn't occur. the bottom plane remains at T=1000K and the rest remains T=300.

do you know what is wrong?

Dear Mostafa,
I don't have too much experience in free convection. Maybe a person with more knowledge can help you. But i suggest you to have a look at this tutorial by Abolfazl Shiri:

http://www.tfd.chalmers.se/~hani/kur...i/NC_Shiri.pdf

Regards
Mojtaba

adambarfi August 5, 2012 06:45

hi everybody,

again this error appears:

Code:

--> 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-2.0.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::hPsiThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::calculate() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#3  Foam::hPsiThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfectGas> > > > >::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
#5  __libc_start_main in "/lib/libc.so.6"
#6 
 in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/buoyantSimpleFoam"
Aborted

what should I do?!?!?:confused: I'm trying just to solve natural convection in a cubic!!!
please Help me:(

Mojtaba.a August 5, 2012 11:52

Quote:

Originally Posted by adambarfi (Post 375432)
what should I do?!?!?:confused: I'm trying just to solve natural convection in a cubic!!!
please Help me:(

Post your residuals plot and your controlDict file to see what happens.

adambarfi August 6, 2012 03:10

1 Attachment(s)
Quote:

Originally Posted by Mojtaba.a (Post 375460)
Post your residuals plot and your controlDict file to see what happens.

here you are the contrilDict and log files

thank you Mojtaba

Mojtaba.a July 21, 2013 20:07

I could solve it by defining zeroGradient boundary condition for p and p_rgh

mbay101 August 2, 2013 07:58

Hi,

I m having the same Problem with my case. I m trying to simulate a constraction in free convection. After the first Time step i get: maximum number of iterations has been exceeded. exact the sameone that Mostafa got.

can i post my case so you expert :) can take a look in it? because I tried everything and nothing seems to be working :confused:. I change the BC, the solver for AIR, the Delta, checkt the initial condition, working with other Relaxations Factores and checkMesh can find no problem with my Mesh.

My porbleme apears when OP calculate h for my Air region. the T value seems to go higher then it should be.

Please Please someone help.

to Mostafa: dose your case work now? can you please post it ?

Regards

Mojtaba.a August 2, 2013 15:04

Quote:

Originally Posted by mbay101 (Post 443484)
Hi,

I m having the same Problem with my case. I m trying to simulate a constraction in free convection. After the first Time step i get: maximum number of iterations has been exceeded. exact the sameone that Mostafa got.

can i post my case so you expert :) can take a look in it? because I tried everything and nothing seems to be working :confused:. I change the BC, the solver for AIR, the Delta, checkt the initial condition, working with other Relaxations Factores and checkMesh can find no problem with my Mesh.

My porbleme apears when OP calculate h for my Air region. the T value seems to go higher then it should be.

Please Please someone help.

to Mostafa: dose your case work now? can you please post it ?

Regards


Maybe you can use some bounded Div schemes in your fvscheme file.
Try to play with different combinations of schemes.

Try to use more bounded ones, instead of more accurate schemes. after some iterations you can change back to second order and unbounded schemes for more accuracy.

best

mbay101 August 5, 2013 10:12

Hi Mojtaba,

sorry for the comend queation but i m new in OpenFoam.
what do you mean with more bounded div schemes? I m using bounded Gauss upwind for all of my div schemes. Only for div(R) and div((muEff*... i m using Gauss linear.

thank you
Best Regards

slash89 December 5, 2014 13:31

Hi all,
i got the same problem. I am using the buoyantSimpleRadiationFoam. The problems is always at the second time step, when solving the G file. Any suggestions to fix this problem?

Thank you,

Best regards


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