Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum Solution Stopping criteria Reply To: Solution Stopping criteria

• ### Barış Bicer

Moderator
March 2, 2022 at 7:20 am

Hi Zeinab,

First of all, almost all OpenFOAM solvers are segregated solvers which means that equations are solved separately one by one. Thats why we have to define and declare tolerance value for each parameter. So if a tolerance value is reached to smaller than given value for any parameters that equation is not solved anymore.

For example if we look at the fvSolution of cavity case : it looks as below:

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.05;
}

pFinal
{
\$p;
relTol 0;
}

U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-05;
relTol 0;
}
}

PISO
{
nCorrectors 2;

when we look at the log file of last steps it is seen as below:

Time = 1

Courant Number mean: 0.222159 max: 0.852134
smoothSolver: Solving for Ux, Initial residual = 2.58804e-08, Final residual = 2.58804e-08, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 6.1466e-08, Final residual = 6.1466e-08, No Iterations 0
DICPCG: Solving for p, Initial residual = 8.23011e-07, Final residual = 8.23011e-07, No Iterations 0
time step continuity errors : sum local = 8.23402e-09, global = -2.52952e-19, cumulative = 7.67715e-18
DICPCG: Solving for p, Initial residual = 1.01439e-06, Final residual = 2.01785e-07, No Iterations 1
time step continuity errors : sum local = 3.13812e-09, global = 7.74406e-19, cumulative = 8.45155e-18
ExecutionTime = 0.25 s ClockTime = 0 s

End

What does it mean that? For Ux and Uy tolerance is given 1e-5, so when we look at log file above inital residual is around 2.58804e-08 which is more less than given tolerance thats why it shows no iteration 0 anymore. Since the initial residual is less than given tolerance U equation is not solved anymore. On the other hand for P tolerance is set to 1e-6 where initial tolerance is around 8.23011e-07 that is smaller than given tolerance so there is no iteration again.

As summary the given tolerance for each parameter does not have any relation such as neither AND nor OR… each parameters works independently.