CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   why PIMPLE doesn't converge at each time step but no diverging? (http://www.cfd-online.com/Forums/openfoam-solving/113890-why-pimple-doesnt-converge-each-time-step-but-no-diverging.html)

immortality February 28, 2013 12:02

why PIMPLE doesn't converge at each time step but no diverging?
 
I have set Pimple nCorrectors to 10 but despite of this high value pimple doesn't converge at each time step.my problem is transient.
what does that message about not converging mean?then why diverging doesnt occurs immediately after not converging at a time step?
Code:

PIMPLE: iteration 9
DILUPBiCG:  Solving for Ux, Initial residual = 1.660614399e-06, Final residual = 1.382107362e-16, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 2.725991237e-05, Final residual = 1.71994151e-15, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 4.640570901e-07, Final residual = 2.664924362e-17, No Iterations 2
FDICPCG:  Solving for p, Initial residual = 1.311912104e-06, Final residual = 3.564637383e-15, No Iterations 6
FDICPCG:  Solving for p, Initial residual = 7.244953397e-14, Final residual = 2.568884643e-15, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.343009192e-16, global = 1.367661713e-17, cumulative = 2.07229617e-08
rho max/min : 2.417134107 2.398184636
FDICPCG:  Solving for p, Initial residual = 2.735098395e-09, Final residual = 5.153284331e-15, No Iterations 4
FDICPCG:  Solving for p, Initial residual = 5.535348519e-14, Final residual = 2.142343159e-15, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.334873446e-16, global = 1.47642379e-17, cumulative = 2.072296172e-08
rho max/min : 2.417134107 2.398184636
FDICPCG:  Solving for p, Initial residual = 1.335350283e-11, Final residual = 6.963764942e-16, No Iterations 3
FDICPCG:  Solving for p, Initial residual = 4.134830709e-14, Final residual = 1.474027945e-15, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.301559708e-16, global = 1.40876864e-17, cumulative = 2.072296173e-08
rho max/min : 2.417134107 2.398184636
PIMPLE: iteration 10
DILUPBiCG:  Solving for Ux, Initial residual = 1.82942849e-06, Final residual = 5.541810383e-17, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 2.959945528e-05, Final residual = 2.277521743e-15, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 6.035283727e-07, Final residual = 9.136129994e-17, No Iterations 2
FDICPCG:  Solving for p, Initial residual = 1.595530764e-06, Final residual = 3.504793444e-15, No Iterations 6
FDICPCG:  Solving for p, Initial residual = 7.14289137e-14, Final residual = 2.634399827e-15, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.339840533e-16, global = 1.340257095e-17, cumulative = 2.072296174e-08
rho max/min : 2.417134107 2.398184636
FDICPCG:  Solving for p, Initial residual = 2.868202145e-09, Final residual = 5.345704264e-15, No Iterations 4
FDICPCG:  Solving for p, Initial residual = 5.420100184e-14, Final residual = 1.936677383e-15, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.324211337e-16, global = 1.342398081e-17, cumulative = 2.072296176e-08
rho max/min : 2.417134107 2.398184636
FDICPCG:  Solving for p, Initial residual = 1.966838831e-11, Final residual = 6.116982397e-16, No Iterations 3
FDICPCG:  Solving for p, Initial residual = 4.085579847e-14, Final residual = 1.43049529e-15, No Iterations 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.304000431e-16, global = 1.357813178e-17, cumulative = 2.072296177e-08
rho max/min : 2.417134107 2.398184636
PIMPLE: not converged within 10 iterations

my fvSolution is:
Code:

solvers
{
    p
    {
      solver PCG;
      preconditioner FDIC;
      tolerance  1e-14;
      relTol 0;
      nsweeps 1000;
      maxIter 25000;

    /*solver          GAMG;
        smoother  DICGaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 200;
        nPreSweeps      0;
        nPostSweeps    2;
        nFinestSweeps  2;
        agglomerator  faceAreaPair;
        mergeLevels 2;
        tolerance      1e-012;
        relTol          0;*/
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    "rho.*"
    {
        $p;
        tolerance      1e-12;
        relTol          0;
    }

    "(U|e|h|R|k|epsilon|omega)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-12;
        relTol          0;
        maxIter 25000;
    }

    "(U|h|R|k|epsilon|omega)Final"
    {
        $U;
        relTol          0;
    }
}


PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 10;
    nCorrectors    5;
    nNonOrthogonalCorrectors 1;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] .6;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 8.5;
    //convergence        1e-16;

residualControl
    {
        "(p|U|k|omega)"
        {
            relTol          0;
            tolerance      0.0000000001;
        }
    }
}
/*relaxationFactors
 {
  fields
  {
  p  0.9;
  }
equations
{
  U    .99;
  k    .99;
  omega .99;
  h    .99;
  e    .99;
}*/


santiagomarquezd March 1, 2013 16:49

What value of residuals are expected for convergence?

Regards.

immortality March 2, 2013 01:35

what do you mean?should not all values converge?
The PIMPLE says that it doesn't converge as its shown but values are converged(final residuals are low) then what does that mean that PIMPLE doesn't converge?

wyldckat March 2, 2013 08:17

Greetings to all!

@Ehsan: I don't have a test case for confirming this myself, but I believe the issue is as follows:
  1. You're specifying that "p", "U", "k" and "omega" have to abide to the tolerance of... :confused:... "1e-10 == 0.0000000001":
    Code:

    residualControl
        {
            "(p|U|k|omega)"
            {
                relTol          0;
                tolerance      0.0000000001;
            }
        }

  2. If you look at the output you've provided, on the last iteration you have:
    Code:

    DILUPBiCG:  Solving for Ux, Initial residual = 1.82942849e-06, Final residual = 5.541810383e-17, No Iterations 2
    DILUPBiCG:  Solving for Uy, Initial residual = 2.959945528e-05, Final residual = 2.277521743e-15, No Iterations 2

    It's the initial residual that counts for control and both "Ux" and "Uy" are well above 1e-10. I think this is why Santiago made that quick question.
Best regards,
Bruno

immortality March 2, 2013 09:08

thank you dear Bruno.
Please verify im correct or not:variables set in residualControl check for initial residuals that be lower than set value.
But tolerances of variables that set in other dictionaries are related to final residuals.is it ok?
Then
1)how can i be certain that solution at each time step is converged?
2)What is better for tolerances in separate dictionaries for p,U,k,omega,...
3)which value for tolerances in residualControl is appropriate for sureness of convergency at each time step?
4)whats the usage and beneficient of residualControl totally?

wyldckat March 2, 2013 09:38

Hi Ehsan,

Questions 1 to 3 - read this excellent post on the topic of convergence: http://www.cfd-online.com/Forums/flu...nvergence.html

Question 4: AFAIK, it's an automated feature that hard-core CFD users rarely use ;). It will stop when the defined value is reached, but it cannot decide whether it's the right time to stop or not...

Hard-core CFD users look at the residual plots and decide from there when it's converged or what needs adjusting. I think the decision process is described in the post above.

Good luck! Best regards,
Bruno

santiagomarquezd March 2, 2013 10:43

Hi, my question was about what value you set in the residualControl option.

Regards.

immortality May 19, 2013 14:16

Hi dear Santiago
sorry for delay in reply.
in fact i have seen your message now accidently.
thanks.I never use residualControl anymore.
I think its for steady_state problems rather than transients.
is my conclusion true?
thanks for your before reply again.


All times are GMT -4. The time now is 10:35.