CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

rhoPimpleFoam: Maximum number of iterations exceeded

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 11, 2014, 15:57
Question rhoPimpleFoam: Maximum number of iterations exceeded
  #1
New Member
 
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 3
gxy200992243 is on a distinguished road
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 = 1e-10

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.25322e-05, cumulative = -8.25322e-05
rho max/min : 0.5 0.5
DICPCG:  Solving for p, Initial residual = 0.00111702, Final residual = 8.44647e-08, No Iterations 2
DICPCG:  Solving for p, Initial residual = 8.44713e-08, Final residual = 8.44713e-08, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.7256e-07, global = 2.26498e-08, cumulative = -8.25095e-05
rho max/min : 0.5 0.5
PIMPLE: iteration 2
DILUPBiCG:  Solving for Ux, Initial residual = 0.942571, Final residual = 1.21683e-11, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.999999, Final residual = 7.82111e-14, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.992188, Final residual = 2.7063e-12, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 1.30358e-10, No Iterations 1
DICPCG:  Solving for p, Initial residual = 0.77429, Final residual = 1.4941e-17, No Iterations 1
DICPCG:  Solving for p, Initial residual = 1.02409e-09, Final residual = 1.02409e-09, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.54149e-07, global = 2.99545e-08, cumulative = -8.24796e-05
rho max/min : 0.5 0.5
DICPCG:  Solving for p, Initial residual = 1.2577e-09, Final residual = 1.2577e-09, No Iterations 0
DICPCG:  Solving for p, Initial residual = 1.2577e-09, Final residual = 1.2577e-09, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.89314e-07, global = 2.99545e-08, cumulative = -8.24496e-05
rho max/min : 0.5 0.5
PIMPLE: iteration 3
DILUPBiCG:  Solving for Ux, Initial residual = 1.58157e-05, Final residual = 1.31853e-16, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.999953, Final residual = 1.4473e-12, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.623948, Final residual = 3.77706e-10, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.116029, Final residual = 4.94384e-10, 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/OpenFOAM-2.2.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line [15]
Why do I have infinitely large courant number in first time step? Why does the solver report Maximum number of iterations exceeded?

The boundary condition is attached. Any help will be appreciated!

Billions of thanks!
Attached Files
File Type: zip 0.zip (2.6 KB, 4 views)

Last edited by gxy200992243; July 11, 2014 at 17:43.
gxy200992243 is offline   Reply With Quote

Old   July 11, 2014, 18:03
Default
  #2
Senior Member
 
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 6
sihaqqi is on a distinguished road
try taking a smaller time step.
sihaqqi is offline   Reply With Quote

Old   July 11, 2014, 19:26
Default
  #3
New Member
 
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 3
gxy200992243 is on a distinguished road
Thank you very much for your reply!

The time step is 1e-10s. 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 1e-4s. In the simulation using pimpleFoam, I can also get the results with a time step of 1e-5s. 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
gxy200992243 is offline   Reply With Quote

Old   July 11, 2014, 20:34
Default
  #4
Senior Member
 
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 6
sihaqqi is on a distinguished road
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 Hybrid-RANS where it does k-epsilon and k-omega 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
sihaqqi is offline   Reply With Quote

Old   July 11, 2014, 22:04
Default
  #5
New Member
 
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 3
gxy200992243 is on a distinguished road
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.
gxy200992243 is offline   Reply With Quote

Old   July 12, 2014, 00:05
Default
  #6
Senior Member
 
starter
Join Date: Sep 2012
Posts: 109
Rep Power: 6
sihaqqi is on a distinguished road
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.
sihaqqi is offline   Reply With Quote

Old   July 12, 2014, 10:52
Default
  #7
New Member
 
Xiangyu Gao
Join Date: Sep 2013
Location: West Lafayette, IN, USA
Posts: 29
Rep Power: 3
gxy200992243 is on a distinguished road
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
gxy200992243 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 51 June 28, 2015 16:36
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 11 June 25, 2015 13:53
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


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