CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   how to increase maximum number iterations to > 1000? (

phsieh2005 June 11, 2011 21:50

how to increase maximum number iterations to > 1000?

I am solving an interFoam case. When solving p_rgh, maximum iterations is 1000 (when using PCG). Is there a way to increase to a higher number?



boger June 12, 2011 08:18

lduMatrix has a maxIter parameter, at least in the version of OpenFOAM I'm looking at

phsieh2005 June 12, 2011 09:28

Hi, David,

Thanks for the reply!

But,where can I find lduMatrix?


phsieh2005 June 12, 2011 09:40

Hi, David,

OK, I found lduMatric.H that references maxIter. But, I am still looking for where maxIter is given.

See you at PSU tomorrow.


boger June 12, 2011 09:41

You can find lduMatrix as a class in the C++ code, either through the files or through Doxygen (e.g. go to and search for maxIter).

If you're not interested in the source code, the point is this: you can add maxIter as an entry in your PCG dictionary in fvSolution and set its value to whatever you want. (1000 is the default.)

phsieh2005 June 12, 2011 09:50

Hi, David,

Thanks a lot!

I found out that the default was set in lduMatrixSolver.C.

Also nice to know that I can specify this in PCG dictionary without changing the source code.


dimyriy September 25, 2011 17:02

Thanks. Your topic unbelievable helps me!!

All times are GMT -4. The time now is 02:06.