CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Max iteration exceeded (https://www.cfd-online.com/Forums/openfoam-solving/79442-max-iteration-exceeded.html)

tookey_1989 August 24, 2010 07:57

Max iteration exceeded
 
Hello,

I'm having problems running a case involving relatively slow airflow (100m/s) with heat transfer. I'm trying to use rhoSimpleFoam which keeps spitting out an error for exceeding the max number of iterations.

Playing with the rho max and min values and the relaxation factors seems to change how long it takes for the error to appear, but didn't solve. I assume its due to a diverging solution.

I have gone back and looked at the boundary conditions several times and believe everything to be correct.

Can anyone please shed some light on whats going on here and a course of action to solve it.

Thanks for your help
James

Error:

Time = 48

smoothSolver: Solving for Ux, Initial residual = 0.015928, Final residual = 0.000956812, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.024058, Final residual = 0.00145616, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.0187837, Final residual = 0.0011141, No Iterations 4
DILUPBiCG: Solving for h, Initial residual = 0.0419237, Final residual = 0.00245746, No Iterations 6
GAMG: Solving for p, Initial residual = 0.00629986, Final residual = 0.000211266, No Iterations 2
time step continuity errors : sum local = 83.3833, global = 4.52158, cumulative = -350.1
rho max/min : 1.99995 0.00792878
ExecutionTime = 10.33 s ClockTime = 11 s

Time = 49

smoothSolver: Solving for Ux, Initial residual = 0.0150919, Final residual = 0.00090136, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.023529, Final residual = 0.00143824, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.0184029, Final residual = 0.00111382, No Iterations 4
DILUPBiCG: Solving for h, Initial residual = 0.0404039, Final residual = 0.00330438, No Iterations 12


--> 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/james/OpenFOAM/OpenFOAM-1.7.x/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/home/james/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/james/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::hPsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::calculate() in "/home/james/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#3 Foam::hPsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::correct() in "/home/james/OpenFOAM/OpenFOAM-1.7.x/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#4
in "/home/james/OpenFOAM/OpenFOAM-1.7.x/applications/bin/linux64GccDPOpt/rhoSimpleFoam"
#5 __libc_start_main in "/lib64/libc.so.6"
#6
at /usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/x86_64/elf/start.S:116
Aborted

Chris Lucas August 24, 2010 08:18

Hi,

the problem is related to the thermo physical model you're using. The problem is that the function T (class specieThermo), which uses a Newton solver to get the temperature for a given enthalpy, can't find a solution within a 100 iteration.

The main reason for this problem might be that your pressure or enthalpy is out of bound.

Decrease the relaxation factors, and check the pressure and enthalpy before the error occurs

Regards,
Christian

tookey_1989 August 25, 2010 11:22

1 Attachment(s)
Thanks for your help chris,

I reduced the relaxation factors but hasn't seem to have solved the problem. Definitely pressure field thats going wrong but not sure how to fix.

I've uploaded my case (minus the mesh), if someone wouldn't mind having a quick look to see if i'm doing something stupid it would be greatly appreciated!

James

tookey_1989 August 26, 2010 04:21

Fixed problem. I had a wave instability problem. I went back and looked at my relaxation factors and after some careful changes got stability.

Chris Lucas August 26, 2010 07:32

Hi,

would it be possible to upload the working case file?

By "wave instability problem", what exactly do you mean? Was the flow reflected at the outlet BC?

Regards,
Christian

Tarak May 9, 2011 12:00

FOAM FATAL ERROR: Maximum number of iterations exceeded
 
Hii,

I am facing a similar problem while running rhoPisoFoam. Can someone please let me know how to avoid it?

Thanks,
Tarak

suh August 24, 2011 05:43

problem in rhoPorusMRFSimpleFoam
 
Hello Foamers,
I am using rhoPorousMRFSimpleFoam for compressor simulation. the mesh is came from starccm+ and checkMesh is ok. Then these are my boundary conditions. I am starting with very slow rotational velocity, i.e. w=1 rad/sec.

for p
inlet-zeroGradient,
outlet-fixedValue, $internalField
wall-zeroGradient internalField uniform 2e5;

for U
inlet-fixedValue, uniform (150 0 0)
outlet-zeroGradient,
wall-fixedValue, uniform (0 0 0) internalField uniform (1 10 10)

for T
inlet-totalTemperature, T0 uniform 300, gamma 1.4
outlet-inletOutlet, value $internalField, inletValue $internalField
wall-zeroGradient, internalField uniform 298;

for mut
inlet-calculated uniform 0,
outlet-calculated uniform 0,
wall-mutkWallFunction uniform 0, internalField uniform 0.018;

for k
inlet-fixedValue, uniform 70
outlet-zeroGradient
wall-compressible: :kqRWallFunction uniform 7, internalField uniform 7;

for epsilon
inlet-fixedValue, uniform 19222.91
outlet-zeroGradient
wall-compressible: :epsilonWallFunction uniform 1922.291, internalField uniform 7;

for alphat
inlet-calculated uniform 0,
outlet-calculated uniform 0,
wall-alphatWallFunction uniform 0, internalField uniform 0;


my relaxation factors from fvSolution files are
p 0.1;
rho 1;
U 0.3;
"(k|epsilon)" 0.5;
h 0.5;


and rhomax - 1.9
rhomin - 0.6

and

thermoType hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>;
mixture
{
specie
{
nMoles 1;
molWeight 28.9;
}
thermodynamics
{
Cp 1007;
Hf 2.544e+06;
}
transport
{
mu 0.1835e-04;
Pr 0.72;
}
}

and I am getting this error after 200 iterations.

--> 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 (s pecieThermo<Thermo>::*dFdT)(const scalar) const) const
in file /opt/software/OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) in "/share/openfoam/2.0/OpenFOAM/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/share/openfoam/2.0/OpenFOAM/platforms/linux64Gcc45DPOpt/lib/libOpenFOAM.so"
#2 Foam::hPsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::ca lculate() in "/share/openfoam/2.0/OpenFOAM/platforms/linux64Gcc45DPOpt/lib/libbasicThermophysicalModels.so"
#3 Foam::hPsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::co rrect() in "/share/openfoam/2.0/OpenFOAM/platforms/linux64Gcc45DPOpt/lib/libbasicThermophysicalModels.so"
#4 main in "/share/openfoam/2.0/OpenFOAM/platforms/linux64Gcc45DPOpt/bin/rhoPorousMRFSimpleFoam"
#5 __libc_start_main in "/lib64/libc.so.6"
#6 Foam::UOPstream::write(char) in "/share/openfoam/2.0/OpenFOAM/platforms/linux64Gcc45DPOpt/bin/rhoPorousMRFSimpleFoam"
Abort

Please tell me where I am going wrong.
Is anybody using rhoPorousMRFSimpleFoam?

Regards
Suhas


All times are GMT -4. The time now is 15:13.