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

On the pimpleFoam solution algorithm

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

Like Tree1Likes
  • 1 Post By fsaltara

Reply
 
LinkBack Thread Tools Display Modes
Old   February 1, 2011, 09:23
Default On the pimpleFoam solution algorithm
  #1
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Hi all, I'm trying to go deeper into the solution algorithm implemented in the pimpleFoam transient solver, especially for what concerns URANS incompressible applications. This is what I have understood about the solver till now (please, correct me if I'm wrong)

1) At the beginning of the time step, the solver applies the PISO algorithm for pressure-velocity coupling (with a given number of PISO loops, tipically 2) and then solves the transport equations for the turbulent quantities

2) If the outer loops parameter (nOuterCorrectors) is set > 1, the solver turns back and performs an additional integration (formally identical to the procedure described in point (1) ), but this time using as initial values the final values (eventually under-relaxed) obtained after the previous time integration.

3) Point 2 is repeted a number of times depending on the nOuterCorrectors value

First question: if all of those statements are correct, this means that with nOuterCorrectors set to 1 the whole procedure reduces to the classical PISO algorithm, is it right?

Second question: using the outer loops (and under-relaxation) allows to increase a lot the Courant number without loosing stability of the solution. However, what is the dependency between the number of the outer loops and the max Co allowed? I mean, using only one additional loop (thus performing two complete integrations per time step) is enough for pushing the max Co above 2 (maybe 4-5)?

Third question: what about the time accuracy? Of course the time resolution is far less critical in the URANS approach than in the LES one, but how will be affected the solution by a very large time step (assuming that the outer correction still preserves from instability)?

Any opinion and/or suggestion will be really appreciated

Thank you all

V.
vkrastev is offline   Reply With Quote

Old   February 2, 2011, 05:28
Default
  #2
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
So no one interested in this topic?

V.
vkrastev is offline   Reply With Quote

Old   February 2, 2011, 05:45
Default
  #3
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 213
Rep Power: 9
santos is on a distinguished road
Send a message via Skype™ to santos
I am very interested on this topic.

From my limited knowledge on PIMPLE, I would say that the answer to your first question is positive.

Your second question is more difficult to answer. I have used PIMPLE-based solvers quite a lot, mostly using maxCo=1, so what PIMPLE gives me is more stability in each time-step iteration in comparison to PISO. Working with maxCo>1 has mixed results in my case-studies: I can work with, eg, maxCo = 2, but anything higher than that blows-up the simulations.

Regards,
Jose
santos is offline   Reply With Quote

Old   February 2, 2011, 07:26
Default
  #4
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Quote:
Originally Posted by santos View Post
I am very interested on this topic.

From my limited knowledge on PIMPLE, I would say that the answer to your first question is positive.

Your second question is more difficult to answer. I have used PIMPLE-based solvers quite a lot, mostly using maxCo=1, so what PIMPLE gives me is more stability in each time-step iteration in comparison to PISO. Working with maxCo>1 has mixed results in my case-studies: I can work with, eg, maxCo = 2, but anything higher than that blows-up the simulations.

Regards,
Jose
Hi Josè, thanks for the reply! About my second question, at this moment I'm running an exeternal aerodynamics case in URANS mode (Realizable k-epsilon turbulence model, mesh of about 3 milions cells) using the pimpleFoam solver: the case is running with nOuterCorrectors set to 2 (thus, only one additional integration over the time step), number of PISO correctors also equal to 2 and with a constant time step value wich corresponds to a max Co of about 3.4. Well, the run seems to go ahead without stability issues, but it's still too early to say if the results will be also reasonable or not...As you have noticed, my questions come from two issues which I consider quite interesting in running unsteady simulations: the first one is to speed up as much as possible the solution (here in my department the available computing power is quite low...) and you will probably agree with me that running with 2 outer correctors and a max Co equal to 2 would improve the stability (as actually did in your cases), but should also not have a noticeable impact on the computing time (the time step doubles, but you have to integrate over it 2 times); the second one can be summarized as follows: ok, my run goes on with 2 outer correctors and a max Co of 3.4, I'm so happy about it, but...will it be accurate as (or at least nearly as) the same run with, for instance, no additional time step integration but max Co equal to 1? Is it possible to identify a good compromise between these two factors (speed and accuracy)? And if so, would it depend from other factors (such as, for instance the number PISO correctors in the single sub-step)? However, I'll let you know what happens with my ongoing run...

Best Regards

V.
vkrastev is offline   Reply With Quote

Old   February 2, 2011, 10:12
Default
  #5
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 100
Rep Power: 8
tehache is on a distinguished road
It probably all depends on your case - but, for my calculations, experience has shown that, when using CrankNicholson=1 for time discretization, results do not depend (much..) on timestep, as long as it remains stable, which is up to max. Co around 10-15. Euler, however, is rather sensitive to time step size. I would perform a small test series with different timesteps.
tehache is offline   Reply With Quote

Old   February 2, 2011, 10:46
Default
  #6
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Quote:
Originally Posted by tehache View Post
It probably all depends on your case
I agree.


Quote:
Originally Posted by tehache View Post
when using CrankNicholson=1 for time discretization
What do you mean exactly? In OF 1.6 (don't know if it's still true for later releases) if you want to integrate your unsteady problem using the Crank Nicolson metod you simply have to use the arithmetic mean of the explicit and fully implicit terminologies implemented in OF (0.5*(fvc::...+fvm::...))


Quote:
Originally Posted by tehache View Post
Euler, however, is rather sensitive to time step size
.

Again, what do you mean with Euler? Fully explicit (fvc::...) or fully implicit (fvm::...)? If the latter, this time step dependency sounds a bit strange to me, as it should be at least as stable as the Crank Nicolson one...


Quote:
Originally Posted by tehache View Post
I would perform a small test series with different timesteps.
I agree once again...the problem is that I have to delay this sistematic study because our computing facilities are at the moment saturated by much "heavier" runs (such as the once described above...)

Thanks for the reply

V.
vkrastev is offline   Reply With Quote

Old   February 2, 2011, 13:10
Default
  #7
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Ok, I got it: you are talking about differencing schemes and not integration methods...However, still the higher time step sensitivity of the Euler scheme sounds strange to me...And, by the way, what exactly is the Crank-Nicolson differencing scheme (as I've read tons of literature about the integration method, bot nothing about a differencing scheme called this way...sorry for my ignorance)?

Best Regards

V.
vkrastev is offline   Reply With Quote

Old   February 2, 2011, 14:53
Default pimple and courant number
  #8
New Member
 
Join Date: Mar 2009
Posts: 18
Rep Power: 8
fsaltara is on a distinguished road
I have carried out some experiments and I think that:

1) Yes, if you use nOuterCorrectors=1, it is a PISO methos. But in this case you must not underrelax.

2) Simulating laminar flow around a circular cylinder (Re=180), I tried nOuterCorrectors=10 and this allowed me to have maxCo=5.
vbnhfylbh likes this.
fsaltara is offline   Reply With Quote

Old   February 3, 2011, 05:44
Default
  #9
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Quote:
Originally Posted by fsaltara View Post
1) Yes, if you use nOuterCorrectors=1, it is a PISO methos. But in this case you must not underrelax.
Ok, that's my understanding too.

Quote:
Originally Posted by fsaltara View Post
2) Simulating laminar flow around a circular cylinder (Re=180), I tried nOuterCorrectors=10 and this allowed me to have maxCo=5.
That's interesting, but what about the computing time? Using 10 outer correctors and max Co equal to 5 seems not so convenient in that sense compared with, for instance, 1 outer corrector and max Co equal to 1...Have you increased a lot the outer correctors for some specific reason (need for better accuracy and/or stability compared with the max Co=1 and nOuterCorrectors=1 case)?

Thanks for sharing your experience

V.
vkrastev is offline   Reply With Quote

Old   February 3, 2011, 11:48
Default pimple and courant number
  #10
New Member
 
Join Date: Mar 2009
Posts: 18
Rep Power: 8
fsaltara is on a distinguished road
I was simply testing the software, and you are right about the time. Does not make sense to use a lot of outer corretions. It is better to use a lower value of maxCo and stick to one or two outer corrections.
fsaltara is offline   Reply With Quote

Old   February 7, 2011, 06:11
Default
  #11
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 100
Rep Power: 8
tehache is on a distinguished road
Vesselin,

Sorry for the inaccuracy and saying integration instead of differencing...
Crank-Nicholson to me means second order, implicit time differentiation, as opposed to first order for Euler. And just to clarify: I did not say Crank-Nicholson was more stable, I wanted to say that (as to be expected for a second order scheme..) results depend much less on time step size using that scheme, something one easily forgets as all tutorials I have seen seem to be set to use Euler scheme.
tehache is offline   Reply With Quote

Old   February 7, 2011, 06:39
Default
  #12
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Quote:
Originally Posted by tehache View Post
Vesselin,

Sorry for the inaccuracy and saying integration instead of differencing...
Crank-Nicholson to me means second order, implicit time differentiation, as opposed to first order for Euler. And just to clarify: I did not say Crank-Nicholson was more stable, I wanted to say that (as to be expected for a second order scheme..) results depend much less on time step size using that scheme, something one easily forgets as all tutorials I have seen seem to be set to use Euler scheme.
Ok, thanks for the clarification. However, since your results are quite interesting, I have some additional questions:

1) Apart from the time differentiation choice, how did you reach a max Co of 10-15? I mean, what about the number of outer correctors, of PISO correctors and the URFs?

2) Have you also tried the backward time-differncing scheme?

Thank you once again

V.
vkrastev is offline   Reply With Quote

Old   February 7, 2011, 09:19
Default
  #13
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 100
Rep Power: 8
tehache is on a distinguished road
I have modified the solver to repeat the inner PISO loop until initial residuals for all equations are below a given value, 1e-4 seemed to be enough ( as INITIAL residual). For maxCo=15, this results in several (up to something like 7,8,..., depends also on mesh size) outer iterations, and doing this number of outer iterations it seems not to be important anymore how many corrector steps I do, 1 seems to be enough. URF's are 0.8 to 0.9 for pressure and momentum.

I did not try the backward time differencing scheme.

Have a lot of fun!
tehache is offline   Reply With Quote

Old   February 7, 2011, 09:50
Default
  #14
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 361
Rep Power: 10
vkrastev is on a distinguished road
Quote:
Originally Posted by tehache View Post
I have modified the solver to repeat the inner PISO loop until initial residuals for all equations are below a given value, 1e-4 seemed to be enough ( as INITIAL residual). For maxCo=15, this results in several (up to something like 7,8,..., depends also on mesh size) outer iterations, and doing this number of outer iterations it seems not to be important anymore how many corrector steps I do, 1 seems to be enough. URF's are 0.8 to 0.9 for pressure and momentum.

I did not try the backward time differencing scheme.

Have a lot of fun!
Thanks a lot, your explanations could be quite useful!

Regards

V.
vkrastev is offline   Reply With Quote

Old   July 25, 2011, 10:46
Default PIMPLE solver -dieselEngineFoam
  #15
New Member
 
Arun
Join Date: Mar 2009
Posts: 25
Rep Power: 8
arun is on a distinguished road
Hi All,
I am currently simulating direct injected diesel engine simulations with dynamic meshing dieselEngineFoam solver. I with PISO algorithm, I get maxCo number about 0.1- 0.3, with stable solution for time-step between 0.005 – 0.05 CAD, with 1mm mesh size.

The I have tried using PIMPLE solver, and the both the corrector values was set to 4. I thought but doing this I could reduce the computing time since it involves chemical reactions as well. However, from my testing so far I see that the simulations crashes during the “chemistry solve” part, when larger time-step size is being used (e.g 0.1, 0.25). So even by using PIMPLE solver I don’t really gain in reducing computing time, in fact I think it takes longer at the moment as compared to my original PISO settings, since no matter what my maxCo number is well around 0.1-0.3.

Any suggestion to reduce computing time?

So my question here, is there any other way to reduce computing time? Is it possible for me to increase the mesh size (more than 1mm) and reduce computing time by using PIMPLE?

Parallel processing is not an option here due to the version of OF i am using at the moment.

A
arun is offline   Reply With Quote

Old   September 6, 2012, 08:28
Default
  #16
Senior Member
 
Julien
Join Date: Jun 2012
Location: France
Posts: 153
Rep Power: 5
Djub is on a distinguished road
Hi everybody,

excuse me for not answering any question. I just want to share my little experience.
I am running external aerodynamics; th egoal is about Vortex Shedding with high Reynolds number. I was running with PISO, trying to have macCo near to 1.

Then, I just changed the application to pipleFoam, with an adjustableTimeStep and maxCo = 5. In fvsolutions, I copied my solver parameters to the "Final" ones (e.g. "(U|k)" to "(U|k)Final" and choose nOuterCorrectors 2 .

And it seems to work well! In this case, my calculation is much faster! In this case, about 2,45 times faster.
Djub is offline   Reply With Quote

Old   November 15, 2012, 03:06
Default
  #17
Member
 
Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 6
sdharmar is on a distinguished road
What is your mesh size and what is your maximum velocity. I am facing a similar type of problem with LES
sdharmar is offline   Reply With Quote

Old   November 15, 2012, 05:25
Default
  #18
Senior Member
 
Julien
Join Date: Jun 2012
Location: France
Posts: 153
Rep Power: 5
Djub is on a distinguished road
(I am not sure I am concerned by sdharmar, but I will answer anyway...)

My cell size is 1cm and my object is 10cm x 20cm. I know it seems very coarse, but it gives the results I want! (I am interested in the vortex shedding, thus in large unsteadyness, not in small eddies...)
Djub is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
grid dependancy gueynard a. Main CFD Forum 19 June 27, 2014 21:22
Exact solution of Burgers equation mcaro Main CFD Forum 3 January 25, 2011 07:46
How to get the solution of last time step? lzgwhy Fluent UDF and Scheme Programming 0 September 15, 2010 22:23
Integration along a line during solution DaRumpel CFX 16 September 2, 2010 11:17
Energy Equation Solution Algorithm Chandra Main CFD Forum 6 June 23, 2006 08:05


All times are GMT -4. The time now is 18:52.