CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

General rules for choosing pimpleFoam vs. icoFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By RobertHB
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2018, 11:20
Default General rules for choosing pimpleFoam vs. icoFoam
  #1
Senior Member
 
Join Date: Jul 2013
Posts: 124
Rep Power: 12
wildfire230 is on a distinguished road
Hi all,


I have been a long-time user of the icoFoam solver for my transient flow problems. However, I have now run into a case which requires several million grid cells for spatial convergence, and tens of thousands of time steps using the icoFoam solver due to the time step limitation. I am wondering if I should switch to the pimpleFoam solver for my case in order to take advantage of the higher Courant numbers that can be used, but I am unclear about when exactly it makes sense to do use pimpleFoam vs. icoFoam. For example, pimpleFoam can often use tens or hundreds of additional iterations per time step, so it is not obvious to me that the overall calculation will actually proceed faster, even if you can use a 10x larger time step.


Are there any general guidelines on when to pick one or the other, especially regarding accuracy and the overall speed of the simulation?


Thank
wildfire230 is offline   Reply With Quote

Old   July 30, 2018, 05:32
Default
  #2
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
TL;DR: Bold text at the end of my post.


Quote:
Originally Posted by wildfire230 View Post
[...]I am wondering if I should switch to the pimpleFoam solver for my case in order to take advantage of the higher Courant numbers that can be used, but I am unclear about when exactly it makes sense to do use pimpleFoam vs. icoFoam.
PimpleFoam is a combination of the transient solver PISO and the steady-state solver SIMPLE. If you use an empty fvSolute PIMPLE { } entry the solver behaves like pisoFoam. If you then use turbulenceModel laminar; in your turbulenceProperties you have a transient, laminar solver. Like icoFoam. As such, there is nothing in icoFoam that pimpleFoam can't do. The benefit of pimpleFoam is the combination of PISO and SIMPLE. Which leads to your next question:
Quote:
Originally Posted by wildfire230 View Post
[...]For example, pimpleFoam can often use tens or hundreds of additional iterations per time step, so it is not obvious to me that the overall calculation will actually proceed faster, even if you can use a 10x larger time step.
The number of iterations is controlled by two keywords:
Code:
PIMPLE
{ 
    nOuterCorrectors             20;
    nCorrectors                 2;
  }
Both values are equal to one (1.0) if the solver behaves like PISO. When you change nOuterCorrectors to any value above one, PIMPLE becomes active and spends nOuterCorrectors iterations (here 20) on finding a steady-state solution for the timestep. Then procedes with the next timestep (like a transient solver) and, again, spends 20 iterations on finding a stable solution. nCorrectors adds further stability but at the cost of more iteration. In General you will have at timestep dt, nOuterCorrectors iterations, each including nCorrectors iterations of pressure correction. In my example for a timestep dt, 20 nOuterCorrectors and 40 nCorrectors iterations.
Combined with relaxationFactors from the SIMPLE algorithm, which restrict the change of a variable from one nOuterCorrectors iteration to the next, you can add a lot of stability to your simulation. And in the same time increase you CFL-number. From my experience a CLF-number of 4.0 works without problems. I tried up to CLF 20.0, but that gets a bit unstable at times.

To return to you original question:
Quote:
Originally Posted by wildfire230 View Post
[...]but I am unclear about when exactly it makes sense to do use pimpleFoam vs. icoFoam.
When your prior simulation is so complex that it eats up alot of computational time or the solution diverges quickly. Then, and if you can live with some averaging of your results, a pimpleFoam simulation may be a good choice.


Further reading:
[cfd-online] pimpleFoam vs simpleFoam vs pisoFoam vs icoFoam?
[Holzmann-cfd.de] Mathematics, Numerics, Derivations and OpenFOAM - For an introduction to pimpleFoam see chapter 11.4.

arvindpj likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   July 30, 2018, 10:52
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Quote:
Originally Posted by RobertHB View Post
If you use an empty fvSolute PIMPLE { } entry the solver behaves like pisoFoam.

Both values are equal to one (1.0) if the solver behaves like PISO.
This is not strictly true, for PISO you can and should also use iterations (Issa recommended up to 3).

Further reading:
R. I. Issa, Solution of the Implicitly Discretized Fluid Flow Equations by Operator-Splitting, Journal of Computational Physics, 62, pp 40-65, 1985
RobertHB likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   July 31, 2018, 02:57
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Quote:
Originally Posted by akidess View Post
This is not strictly true, for PISO you can and should also use iterations (Issa recommended up to 3).

Further reading:
R. I. Issa, Solution of the Implicitly Discretized Fluid Flow Equations by Operator-Splitting, Journal of Computational Physics, 62, pp 40-65, 1985
Thanks for the literature source. I wasn't aware of the fact that pisoFoam should be run with multiple correctors.

Last edited by RobertHB; July 31, 2018 at 04:32.
RobertHB is offline   Reply With Quote

Old   July 31, 2018, 04:31
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Quote:
Originally Posted by RobertHB View Post
I wasn't aware of the fact that pisoFoam should be run with multiple correctors.
This is also done in the pisoFoam tutorials by the way.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimpleFoam vs simpleFoam vs pisoFoam vs icoFoam? phsieh2005 OpenFOAM Running, Solving & CFD 45 March 22, 2021 09:14
IcoFoam with variable time step not writing every writeInterval wildfire230 OpenFOAM Running, Solving & CFD 1 July 31, 2013 17:49
icoFoam vs. pimpleFoam Tobi OpenFOAM Running, Solving & CFD 3 May 21, 2013 10:34
Cell size and prism layer: general rules? sarav Main CFD Forum 0 February 21, 2010 04:47
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 07:52


All times are GMT -4. The time now is 08:47.