CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

All about the PIMPLE algorithm - Part II

Register Blogs Community New Posts Updated Threads Search

Rating: 3 votes, 5.00 average.

All about the PIMPLE algorithm - Part II

Posted October 21, 2014 at 18:55 by Tobi
Updated January 18, 2018 at 03: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
Views 24840 Comments 33 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 33

Comments

  1. Old Comment
    Tobi's Avatar
    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.
    permalink
    Posted November 10, 2015 at 05:55 by Tobi Tobi is offline
  2. Old Comment
    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
    permalink
    Posted November 20, 2015 at 02:11 by cfdopenfoam cfdopenfoam is offline
    Updated November 21, 2015 at 08:14 by cfdopenfoam
  3. Old Comment

    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
    permalink
    Posted December 18, 2015 at 08:40 by Gary Gary is offline
  4. Old Comment
    Tobi's Avatar
    wrong entry.
    permalink
    Posted December 18, 2015 at 09:11 by Tobi Tobi is offline
  5. Old Comment
    Thanks Tobi

    how can I print out the residual at the end of each pimple loop for U T or P?

    Regards,
    Gary
    permalink
    Posted December 18, 2015 at 09:35 by Gary Gary is offline
  6. Old Comment
    Tobi's Avatar
    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!
    permalink
    Posted December 18, 2015 at 09:58 by Tobi Tobi is offline
  7. Old Comment
    Than you so much for your very useful explanation of PimpleFOAM
    permalink
    Posted February 6, 2016 at 21:23 by aghsin aghsin is offline
  8. Old Comment
    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
    permalink
    Posted October 22, 2016 at 10:59 by emjay emjay is offline
    Updated October 22, 2016 at 15:30 by emjay
  9. Old Comment
    Tobi's Avatar
    Dear Emjay,

    first check out the section about the PIMPLE algo in my book.
    permalink
    Posted October 22, 2016 at 19:12 by Tobi Tobi is offline
  10. Old Comment
    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
    permalink
    Posted March 5, 2017 at 22:50 by j91 j91 is offline
    Updated March 6, 2017 at 01:26 by j91
  11. Old Comment
    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 View Comment
    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
    permalink
    Posted March 7, 2017 at 05:38 by haze_1986 haze_1986 is offline
  12. Old Comment
    rezaeimahdi's Avatar
    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?
    permalink
    Posted July 19, 2017 at 03:07 by rezaeimahdi rezaeimahdi is offline
  13. Old Comment
    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
    permalink
    Posted August 24, 2017 at 07:48 by fimbull fimbull is offline
 

All times are GMT -4. The time now is 16:40.