# All about the PIMPLE algorithm - Part II

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

# All about the PIMPLE algorithm - Part II

Posted October 21, 2014 at 17:55 by Tobi
Updated January 18, 2018 at 02:18 by Tobi (Removed content, updated content on wiki and book)

The Pimple Algorithm (21.08.2017)

In this blog I showed (since 2014) a few things about the pimple algorithm and how things are working in OpenFOAM. However, based on the fact that the explanation of the algorithm is given in my book, I removed the content here. The old revised one is still available at the wiki page. Links can be found below.

Thanks
Posted in Uncategorized
« Prev     Main     Next »

1.  If you set lower values you will be less accurate within one time step. This depend on your problem. Imagine a sine wave and you want to approximate it. The first necessary thing is that you should be accurate enough in time to resolve the curvature. If you divide the timestep in a way that you have four time steps within one period (2pi) then you can imagine that you will not get all the informations of the problem. Furthermore consider that the residual control only work if you are using outer loop to leave the outer loop for the next time steps. Most people do not consider that. In the case of the sine wave, the more accurate you want, means that the calculated values should be at the sine curvature itself, the lower the residuals should be. Its not so easy to answer as you already mentioned. Also I have not the time to make a general investigation to that. Thanks for the feedback to my website. Posted November 10, 2015 at 04:55 by Tobi
2.  excellent and wonderful explanation on PIMPLE! what you post here reaaaally made my day. thanks so much Tobi. but one question: in the equations subDict in relaxationFactors Dict, the relaxed equation is UEqn but why it gives "U|k|epsilon" and "(U|k|epsilon)Final" ? is this related to the turbulence modeling? how should i organize my equations subDict if i use the zeroEquation turbulent model? ( my UEquation: turbulence->divR(U) ) BTW, i've got several questions about the shallowWaterFoam implemented with the PIMPLE algo post here. http://www.cfd-online.com/Forums/ope...t-h-relax.html do you mind taking a look? best regards, karelke Posted November 20, 2015 at 01:11 by cfdopenfoam Updated November 21, 2015 at 07:14 by cfdopenfoam
3. ### residualControl does not work

Hi Tobi,

I found the your tips of using PIMPLE very useful.

I don't know why somehow the residualControl does work for my case.

I deliberately set very big values see below and set nOuterCorrectors = 30. I have expected the PIMPLE loop will exit without reaching the maximum (30), but in fact at each time level the PIMPLE loop exits only after reaching the maximum.

could you think of any thing possibly wrong in my fvSolution file?

residualControl
{
"T.*|U.*"
{
tolerance 1;
relTol 1;
}

"p_rgh.*|alpha.liquid.*"
{
tolerance 1;
relTol 1;
}
}

Many thanks

Gary
Posted December 18, 2015 at 07:40 by Gary
4.  wrong entry. Posted December 18, 2015 at 08:11 by Tobi
5.  Thanks Tobi how can I print out the residual at the end of each pimple loop for U T or P? Regards, Gary Posted December 18, 2015 at 08:35 by Gary
6.  Hi Gary, ohh... my fault. I read some old comment and replayed. You can Print out the residuals using gnuplot - search the forum to get a script. I think also in the foamwiki you can find something. To your values... relTol should be 0. You can play with the other value. At least start your simulation and check if your solver realize the convergence criterions! Posted December 18, 2015 at 08:58 by Tobi
7.  Than you so much for your very useful explanation of PimpleFOAM Posted February 6, 2016 at 20:23 by aghsin
8.  Hi Tobi, are there any advantages using a PIMPLE in a transient simulation when the Courant Number is below 1? My thoughts are that when the Co-Number is below 1 the nOuterCorrectors could set 1 and don't waste any computational resources. But i don't know if there are any advantages to increase nCorrectors when the solver is working in PISO mode. And by the way, in that case that the solver is running in pimple mode with a Courant number greater than 1, are there any artifacts like wiggles/overshoots when calculating with a passive scalar? Best wishes, emjay Posted October 22, 2016 at 09:59 by emjay Updated October 22, 2016 at 14:30 by emjay
9.  Dear Emjay, first check out the section about the PIMPLE algo in my book. Posted October 22, 2016 at 18:12 by Tobi
10.  Hi, When using PIMPLE in a dynamic mesh solver such as interDyMFoam, the solver seems to execute mesh.update() in every PIMPLE iteration. Is this usually necessary or do you happen to know if it's appropriate to modify this and only update the mesh once per timestep? It's quite computationally intensive to update it in every outer loop. EDIT: My mistake, the reason for the remeshing in every outer loop correction was due to accidentally mixing together some settings for sixDoF and prescribed motion solvers. The question might still be relevant for other cases, but in my case PIMPLE is running smoothly again. Thank you for the guide, it was a useful read. Thanks, Jonathan Posted March 5, 2017 at 21:50 by j91 Updated March 6, 2017 at 00:26 by j91
11.  I would say yes, with rigid body FSI, updating of the mesh in every outer loop is a must for dynamic simulations. Both the interFoam solver and sixDoF solvers should be required to converge before moving on to the next time step. This usually takes about 6 - 10 iterations even for the most dynamic cases with a reasonably good adaptive relaxation technique. Quote: Originally Posted by j91 Hi, When using PIMPLE in a dynamic mesh solver such as interDyMFoam, the solver seems to execute mesh.update() in every PIMPLE iteration. Is this usually necessary or do you happen to know if it's appropriate to modify this and only update the mesh once per timestep? It's quite computationally intensive to update it in every outer loop. EDIT: My mistake, the reason for the remeshing in every outer loop correction was due to accidentally mixing together some settings for sixDoF and prescribed motion solvers. The question might still be relevant for other cases, but in my case PIMPLE is running smoothly again. Thank you for the guide, it was a useful read. Thanks, Jonathan Posted March 7, 2017 at 04:38 by haze_1986
12.  Hello all, I have a simple question about Pimple algorithm. I'm using pimple for my solver in combustion, but I don't know why still pressure doesn't converge after long time simulation. The residual is still same as Piso for pressure. I'm using GAMG solver for pressure with tolerance 1e-9 for pressure.3 iterations for inner part and 50 iterations for outer iteration and normally pressure reached 10e-9 in 10-12 iterations. The discretization method is limitedlinear 1, and BCs is zerGrad for pressure in inlet and totalPressure in outlet. for velocity fixedValue in inlet and inletOutlet for outlet. Could you please tell me why still I have oscillation in pressure residual between 0.1 to 0.001 without convergence? Posted July 19, 2017 at 02:07 by rezaeimahdi
13.  hi, Quote: I have a simple question about Pimple algorithm. I'm using pimple for my solver in combustion, but I don't know why still pressure doesn't converge after long time simulation. The residual is still same as Piso for pressure. I'm using GAMG solver for pressure with tolerance 1e-9 for pressure.3 iterations for inner part and 50 iterations for outer iteration and normally pressure reached 10e-9 in 10-12 iterations. The discretization method is limitedlinear 1, and BCs is zerGrad for pressure in inlet and totalPressure in outlet. for velocity fixedValue in inlet and inletOutlet for outlet. Could you please tell me why still I have oscillation in pressure residual between 0.1 to 0.001 without convergence? some thoughts 1) maybe you should refine your mesh and doing the simulation again 2) depending of which OpenFOAM you are currently using you could try out a PCG or ICCG solver to calculate your pressure 3) if checkMesh shows some errors it could also help to add one or two nonorthogonal corrector steps in fvSolution to improve the quality of your results Posted August 24, 2017 at 06:48 by fimbull

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