
[Sponsors] 
July 11, 2014, 15:57 
rhoPimpleFoam: Maximum number of iterations exceeded

#1 
New Member
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 5 
Hi, everyone!
Now I am dealing with a 3D flow over cavity case. The inlet velocity is 25m/s. This case works well with pimpleFoam solver, but when I use the rhoPimpleFoam, the simulation fails in the first time step. For both pimpleFoam and rhoPimpleFoam, I used Smagorinsky model. The error reported by the solver is shown below. Code:
Starting time loop Courant Number mean: nan max: nan Time = 1e10 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.00987529, No Iterations 53 DILUPBiCG: Solving for Uy, Initial residual = 0.999208, Final residual = 0.00748302, No Iterations 6 DILUPBiCG: Solving for Uz, Initial residual = 0.997524, Final residual = 0.00913999, No Iterations 11 DILUPBiCG: Solving for h, Initial residual = 0.641519, Final residual = 0.0063589, No Iterations 383 DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00344435, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.196095, Final residual = 0.000314945, No Iterations 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 0.0008077, global = 8.25322e05, cumulative = 8.25322e05 rho max/min : 0.5 0.5 DICPCG: Solving for p, Initial residual = 0.00111702, Final residual = 8.44647e08, No Iterations 2 DICPCG: Solving for p, Initial residual = 8.44713e08, Final residual = 8.44713e08, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.7256e07, global = 2.26498e08, cumulative = 8.25095e05 rho max/min : 0.5 0.5 PIMPLE: iteration 2 DILUPBiCG: Solving for Ux, Initial residual = 0.942571, Final residual = 1.21683e11, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.999999, Final residual = 7.82111e14, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.992188, Final residual = 2.7063e12, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 1.30358e10, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.77429, Final residual = 1.4941e17, No Iterations 1 DICPCG: Solving for p, Initial residual = 1.02409e09, Final residual = 1.02409e09, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.54149e07, global = 2.99545e08, cumulative = 8.24796e05 rho max/min : 0.5 0.5 DICPCG: Solving for p, Initial residual = 1.2577e09, Final residual = 1.2577e09, No Iterations 0 DICPCG: Solving for p, Initial residual = 1.2577e09, Final residual = 1.2577e09, No Iterations 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.89314e07, global = 2.99545e08, cumulative = 8.24496e05 rho max/min : 0.5 0.5 PIMPLE: iteration 3 DILUPBiCG: Solving for Ux, Initial residual = 1.58157e05, Final residual = 1.31853e16, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.999953, Final residual = 1.4473e12, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.623948, Final residual = 3.77706e10, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.116029, Final residual = 4.94384e10, No Iterations 1 [7] [8] [10] [11] [12] [13] [15] [0] [2] [2] [3] [3] [4] [4] [4] > FOAM FATAL ERROR: [4] Maximum number of iterations exceeded [4] [4] From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const [4] in file /apps/rhel6/OpenFOAM/OpenFOAM2.2.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line [15] The boundary condition is attached. Any help will be appreciated! Billions of thanks! Last edited by gxy200992243; July 11, 2014 at 17:43. 

July 11, 2014, 18:03 

#2 
Senior Member
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 8 
try taking a smaller time step.


July 11, 2014, 19:26 

#3 
New Member
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 5 
Thank you very much for your reply!
The time step is 1e10s. It cannot be any smaller. I have tried the compressible solver in fluent with the same mesh, and fluent gives me a good simulation results even with a time step of 1e4s. In the simulation using pimpleFoam, I can also get the results with a time step of 1e5s. The mach number of my simulation is quite low (0.073), but I have to take the compressibility into consideration, because I have to do acoustic analysis about the simulation results. I think this problem may be brought my two reasons: 1 the low mach number of the simulation 2 I have to take the boundary layer into consideration. ( to keep the near wall courant number low, small time step should be used ) The second one can be solved by reducing the time step. But How can I deal with the first one? Is there a compressible solver in OpenFOAM that can simulate cases with low mach number? Best regards, Xiangyu Gao 

July 11, 2014, 20:34 

#4 
Senior Member
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 8 
I do not understand how a lower Mach Number can create problem. I use inflation in Ansys Meshing to get my first cell within desired limits, if this is what you mean by BL consideration in 2.
I recently attended a course by Ansys and there the trainer who is a PhD and Professor at University of Sydney advised that people do LES for simple problems. If you are doing LES, perhaps you can take some other model like HybridRANS where it does kepsilon and komega and see if it gets you the right results. Maybe that can help. However if you can go in detail a bit about Boundary Layer consideration, I shall be grateful. Regards 

July 11, 2014, 22:04 

#5 
New Member
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 5 
It is only my guesses that the problem is created by low mach number and boundary layer, because I think the low mach number and boundary layer are the only things that are different from normal compressible cases. I just cannot understand why the simulation starts with an infinitely large courant number.
Could you please tell me why? Every time I do a simulation with OpenFOAM, I will compare it with the same simulation (same mesh, same BC, similar solution method) using fluent. I find I have to use much smaller time step in OpemFOAM whenever I take boundary layer into consideration. And in OpenFOAM simulation, the maximum courant number is always 100 times larger than the mean courant number. I think the maximum courant number may occur in boundary layer. That is why I think boundary layer may be a problem. Last edited by gxy200992243; July 11, 2014 at 23:12. 

July 12, 2014, 00:05 

#6 
Senior Member
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 8 
I am stumped. I hope someone would post a better reply and if you understand yourself, perhaps you can also let me know. When I was doing it, I was advised by an expert that it might be a solver problem and that is why my supervisor told me to run my simulations for incompressible case rather than compressible because in Masters, normally solver designing is a bigger scope.


July 12, 2014, 10:52 

#7 
New Member
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 5 
Hi Sihaqqi,
Thank you very much for your patient reply. After one night's sound sleep, my mind is refreshed, and the problem is solved. I am embarrassed to tell you that I made a low level mistake. In my case, I chose perfect gas. p=rou*R*T. I set the p of internal field to be 0 as I usually did in incompressible case. rou=p/R/T. Then zero density everywhere in my initial domain. Then the courant number in compressible solver is calculated as (magnitude of mass flux)*deltaT/rou/(cell volume), zero density is in the denominator! This is why I have infinite courant number in the initial field. This is really a terrible mistake. Now it is solved. The solver gives me a reasonable courant number. And the simulation works well by now. I am really sorry to bother you with this kind of terrible mistake. Best regards, Xiangyu 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Foam::error::PrintStack  almir  OpenFOAM Running, Solving & CFD  66  November 23, 2016 15:42 
simpleFoam error  "Floating point exception"  mbcx4jc2  OpenFOAM Running, Solving & CFD  12  August 4, 2015 02:20 
buoyantSimpleFoam and watertank  Tobi  OpenFOAM Running, Solving & CFD  48  December 26, 2014 09:49 
should Courant number always be kept below 1?  wc34071209  OpenFOAM Running, Solving & CFD  16  March 9, 2014 20:31 
Floating point exception error  Alan  OpenFOAM Running, Solving & CFD  10  April 6, 2012 14:02 