# A question on the PIMPLE algorithm

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

 February 10, 2015, 04:45 A question on the PIMPLE algorithm #1 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 I am running an incompressible simulation using PIMPLE. I noticed something with the p residuals which I can't explain to myself: The initial residual for p decreases over the PIMPLE iterations. However, the initial residual of the last iteration is of the same order of magnitude as the initial residual at the beginning of the PIMPLE iteration. Why is this the case? From the code I see nothing that is done differently at the last iteration (except solving for turbulence, but that happens after solving for p anyway. So that might not be the reason.) Code: ```PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 3.60231e-05, Final residual = 1.66706e-09, No Iterations 2 ... GAMG: Solving for p, Initial residual = 0.342611, Final residual = 3.12937e-05, No Iterations 17 GAMG: Solving for p, Initial residual = 0.00752642, Final residual = 6.27839e-07, No Iterations 16 time step continuity errors : sum local = 1.37565e-12, global = -2.03189e-13, cumulative = -1.55453e-09 PIMPLE: iteration 2 DILUPBiCG: Solving for Ux, Initial residual = 0.000179105, Final residual = 4.61726e-08, No Iterations 1 ... GAMG: Solving for p, Initial residual = 0.0170125, Final residual = 1.33717e-06, No Iterations 22 GAMG: Solving for p, Initial residual = 0.0023444, Final residual = 2.1267e-07, No Iterations 16 time step continuity errors : sum local = 4.58019e-13, global = -6.99882e-14, cumulative = -1.5546e-09 PIMPLE: iteration 3 DILUPBiCG: Solving for Ux, Initial residual = 5.00896e-05, Final residual = 4.90796e-08, No Iterations 1 ... GAMG: Solving for p, Initial residual = 0.0047698, Final residual = 3.81808e-07, No Iterations 20 GAMG: Solving for p, Initial residual = 0.000571794, Final residual = 4.58333e-08, No Iterations 16 time step continuity errors : sum local = 9.82129e-14, global = -1.57202e-14, cumulative = -1.55461e-09 PIMPLE: iteration 4 DILUPBiCG: Solving for Ux, Initial residual = 1.71822e-05, Final residual = 2.14214e-10, No Iterations 2 ... GAMG: Solving for p, Initial residual = 0.00145923, Final residual = 1.36203e-07, No Iterations 18 GAMG: Solving for p, Initial residual = 0.000143427, Final residual = 1.27477e-08, No Iterations 18 time step continuity errors : sum local = 2.72637e-14, global = -5.41738e-15, cumulative = -1.55462e-09 PIMPLE: iteration 5 DILUPBiCG: Solving for Ux, Initial residual = 6.04597e-06, Final residual = 7.98942e-10, No Iterations 2 ... GAMG: Solving for p, Initial residual = 0.000479671, Final residual = 4.53569e-08, No Iterations 17 GAMG: Solving for p, Initial residual = 4.41661e-05, Final residual = 8.06229e-09, No Iterations 15 time step continuity errors : sum local = 1.7232e-14, global = -3.20335e-15, cumulative = -1.55462e-09 PIMPLE: iteration 6 DILUPBiCG: Solving for Ux, Initial residual = 3.72214e-06, Final residual = 1.18203e-09, No Iterations 2 ... GAMG: Solving for p, Initial residual = 0.327238, Final residual = 3.2432e-05, No Iterations 16 GAMG: Solving for p, Initial residual = 0.0132261, Final residual = 8.92727e-09, No Iterations 41 time step continuity errors : sum local = 1.61865e-14, global = 2.78977e-15, cumulative = -1.55462e-09 DILUPBiCG: Solving for epsilon, Initial residual = 3.86725e-06, Final residual = 4.98789e-10, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 2.39725e-06, Final residual = 3.44058e-10, No Iterations 1 PIMPLE: converged in 6 iterations``` Note: I removed some output from solving for U (the dots).

 February 11, 2015, 19:53 pimpleFoam : last pimple loop residual ? #2 Member   Join Date: Feb 2014 Posts: 62 Rep Power: 12 Hi Gerhard, I have the same problem with my pimpleFoam residuals, did you find an explanation for this? Thank you.

 February 12, 2015, 17:03 #3 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 650 Rep Power: 21 I think the "problem" is that for the last iteration, no underrelaxation is done. This means that the (non-underrelaxed) result for U is used in the p equation. Then the result of the previous iteration of p is not fitting anymore.

 February 13, 2015, 04:21 #4 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 I chose this relaxation factors in fvSolution Code: ```relaxationFactors { equations { "(k|epsilon|omega)" 0.6; p 0.4; U 0.6; } }```

 February 13, 2015, 06:49 #5 Senior Member   Blanco Join Date: Mar 2009 Location: Torino, Italy Posts: 193 Rep Power: 17 Hi, I'm not using pimpleFoam actually but if I remember well no underrelaxation is done on the last iteration, that's why we have this behavior, because we have to keep time consistency therefore we can't underrelax the solution from the "inner" loop to the "outer" loop. But we can play with nCorrectors to perform more "outer" loop in the pimple scheme if I'm not wrong. From an old tut case I have: Code: ```PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 3; //1-3 nOuterCorrectors 50; // relaxationFactors { fields { p 0.3; pFinal 1; } equations { "U|k|epsilon" 0.3; "(U|k|epsilon)Final" 1; } }```

 Tags pimple, residuals