CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interFoam: timestep / mesh / PISO nCorrector dependency (https://www.cfd-online.com/Forums/openfoam-solving/81268-interfoam-timestep-mesh-piso-ncorrector-dependency.html)

linch October 21, 2010 10:09

interFoam: timestep / mesh / PISO nCorrector dependency
 
Hi guys,

as an interFoam introduction I wanted to recompute a couple of DNS calculations of falling droplet in a closed channel from some paper.

Trying to do that I experienced following difficulties: decreasing the time step or enlarging of mesh cell (Courant number was kept under 0.5 in all simulations) cause a significant (almost linear) increase of droplet acceleration and consequently produces an absolutely different solution. Even more incomprehensible for me is the fact, that an increasing the PISO correction loops number (nCorrectors option in fvSolution) has the same effect on the solution. E.g. I get approximately the same solution by halving the time step size and doubling the nCorrectors number simultaneously.

Does it mean the solution are not converged? So, I'm sure I do something wrong, but I don't know what exactly:-) As usual hoping for your help!

Regards,

P.S. here are some examples of time step & nCorrectors variation:http://www.file-upload.net/download-...hment.zip.html
Both cases with (deltaT = 0.005 & nCorrectors = 3) and (deltaT = 0.01 & nCorrectors = 6) deliver equal results. The free fall time in these both case is only a half as in the case with (deltaT = 0.01 & nCorrectors = 3).

linch October 21, 2010 10:34

When I go for adaptive time step with a target Courant number of 0.5 (as it is the case in the dam break tutorial), the droplet becomes two times slower again: http://www.file-upload.net/download-...eStep.zip.html

So is the Courant number of 0.5 way too large for the interFoam?

santiagomarquezd October 21, 2010 17:40

Illya, I was about to start a new thread relative to this topic, but I found yours, thanks for share your experiences. I'm having the same problems. I run an sloshing problem last year and now I'm trying to reproduce the results of the rising bubble benchmark proposed by Hysing et. al. (http://mox.polimi.it/it/progetti/pub...ni/23-2008.pdf). In both cases I had to decrease the timestep a lot to match a correct velocity prediction. Now I'm trying to see the effect of to set o not to set the momentum predictor and the PISO iteration, you gave us some insight. What I can't figure too is the reason of this behavior, following Issa PISO, corrections beyond 3 are unnecessary, but your examples show that this isn't the case in FOAM.

Let's continue sharing our results.

Regards.

kumar October 22, 2010 05:41

about the time step and accuracy of interFoam simulation
 
Hello,
I have also noticed the difference of velocity for a case with CFL-0.2 and CFL -0.005.But I use LES for turbulence modeling. I am still in the process of validating this difference by performing a DNS case .

Anyhow in the mean time I came across this article.
Flux-blending schemes for interface capture in two-fluid flows , International Journal of Heat and Mass transfer, 52 (2009) , 5547-5556.

In this paper they compare the numerical error with the CFL number for different interface capturing schemes. They also propose a scheme for improving the accuracy. The schemes include CICSAM and HRIC.

I wanted to know if something similar to that can be done in interFoam to improve its accuracy for reasonable CFL number.

If you dont get hold of the paper, give me your email I.D , I can send it to you.

bye
regards
K.Suresh kumar

santiagomarquezd October 22, 2010 09:52

Kumar, thanks for the reference, I downloaded from the digital library. I was wondering how to cope this problem in FOAM too. I read the article briefly and there are some differences with FOAM,

1. The VOF evolution equation is different from FOAM.
2. No further reconstruction schemes are used in FOAM, such as CICSAM.
3. FOAM applies a FCT technique over nonlinear flux in VOF equation, while only NVD/TVD schemes are used in the blending part in the paper.

If I understood well you are suggesting that problems in velocity prediction are due div schemes?

I'll read the paper in deep I try to imagine how to apply these concepts in interFoam, nevertheless I think we have to finish the analysis with respect PISO implementation, due strange behavior we post previously. BTW, I changed div schemes in FOAM, using less diffusive ones and no differences were found.

Keep in touch.

kumar October 26, 2010 04:58

Hi santiago,
Thanks for the reply and suggestions. I think you are correct that the approach in interFoam is different form the one used in the paper.

But I was just wondering if there is a way to some how have a better prediction of velocity for reasonable CFL numbers like 0.2 or 0.5. Is it possible to do some diffusion correction as done in Level set methods, like the one done in the paper

" Marangoni effects caused by contaminants adsorbed on bubble surfaces" JFM 2010, vol 647

I mean along with the interface compression step, if we add another intermediate step for diffusion correction, do you think it would help.

Just a suggestion, probably you have been looking into the source of interFoam more deeply than I have been looking. So you could suggest me if it is a good idea to do it.

bye
regards
K.Suresh kumar

santiagomarquezd October 26, 2010 08:12

Kumar, thanks again for the suggestions, I'm reading the paper from IJHMT and its references, and I'm learning a lot, thanks for the reference, on the other hand, changes I made in settings for interFoam run didn't give new results, now a new case is running with a small timestep. CFL beyond 0.2 would be marvelous, but I never could obtain good velocity predictions at these values. I'm still trying to figure out what is the source of this problems, would be necessary to design a test to detect whether it is caused by momentum equation of by alpha equation or even worst by a combination of both.
Actually the main drawback of alpha equation is nevertheless it is assembled by standard divergence schemes plus, eventually, interfaceCompression, the solution is driven by MULES which is an FCT limiter. This limiter controls the amount of anti-diffusive flux that is applied to a bounded flux created by upwind, then I don't how much of the initial proposal by TVD/NVD or whatever you want to use for assemble the alpha equation remains after applying the MULES::limiter.

Regards.

psosnows November 19, 2010 12:07

Hello everybody,

lately we performed several tests regarding dependency of PISO algorithm on the number of corrections.

The tests were performed firstly on a plane channel flow. We used slightly modified icoFoam solver (with added forcing term), and performed DNS simulation of turbulent flow.

As most of you probably already know, the increasing number of PISO corrections over 2 does not increase the precision of the solution.

But- what you may find interesting, the increasing number of corrections does increase stability of the method! This observation was confirmed using unstructured grid on a non-trivial geometry. The case with 2 corrections blew up after some time, while the one with greater number of corrections was able to run further (of course the cases differed only with number of corrections).

An open question is- how to determine the right number of PISO corrections for a specific case to be stable? Right now- one has to do it empirically.

Summing up, additional PISO corrections (over 2) increase stability of the method.

Best,
Pawel

stevenvanharen November 22, 2010 11:17

This is interesting, just my thoughts:

  • Issa compares to first order implicit Euler, his statement for the number of PISO-correctors to be used is based on an order-of-accuracy comparison between first order implicit Euler and the PISO algorithm. Keep this in mind if you use CN or backward Euler in OF.
  • Order of accuracy says noting about absolute error, so the number of PISO-corrections needed could indeed change with different time-step
  • for DNS: continuity error decreases with increasing corrector steps. Ask yourself: Is your mass conserved to machine accuracy?
  • in my experience the CPU-time does not necessarily increase with more corrector steps (the total number of iterations stays the same or even decreases) If it comes for free, or even speeds up your calculation, why not use it?
To put this in perspective, I use 4 PISO-corrections for DNS. Happy iterating!

alberto November 23, 2010 03:59

Quote:

Originally Posted by santiagomarquezd (Post 280244)
What I can't figure too is the reason of this behavior, following Issa PISO, corrections beyond 3 are unnecessary, but your examples show that this isn't the case in FOAM.

Hi Santiago,

I would not take that "3 correctors" as something written in stone. The actual number of correctors depends on your mesh quality, on the case you are simulating, and on the set of equations you are trying to couple.

This said, I am not particularly fond of using PISO without outer corrections, because it does not ensure anything about the convergence of the equations, and this is particularly true in multiphase flows, where the coupling is more complex than in single-phase flows.

P.S (for linch). It would be so useful to have a case to look at when you report a problem ;-)

Best,

alberto November 23, 2010 04:04

Quote:

Originally Posted by psosnows (Post 284128)
But- what you may find interesting, the increasing number of corrections does increase stability of the method! This observation was confirmed using unstructured grid on a non-trivial geometry. The case with 2 corrections blew up after some time, while the one with greater number of corrections was able to run further (of course the cases differed only with number of corrections).

An open question is- how to determine the right number of PISO corrections for a specific case to be stable? Right now- one has to do it empirically.

Check the behaviour of the continuity error and of the residuals on the pEqn and (adding some bit of code) of the UEqn.

If you notice an improved stability of the solution with more corrector, most probably it means that with less corrector you do not achieve perfect coupling of the equations :cool:

Best,

santiagomarquezd November 23, 2010 17:26

Quote:

Originally Posted by alberto (Post 284434)
Hi Santiago,
I would not take that "3 correctors" as something written in stone. The actual number of correctors depends on your mesh quality, on the case you are simulating, and on the set of equations you are trying to couple.

This said, I am not particularly fond of using PISO without outer corrections, because it does not ensure anything about the convergence of the equations, and this is particularly true in multiphase flows, where the coupling is more complex than in single-phase flows.
Best,

Hi Alberto, thanks for your insights, I'll have your comments in mind. Actually my advisor is about to face the emulation of icoFoam and interFoam and we'll focused on this matter.

Regards.

ngj December 2, 2010 09:49

Hi Alberto

I have a question related to the following comment from your post #10:

Quote:

Originally Posted by alberto (Post 284434)
Hi Santiago,
This said, I am not particularly fond of using PISO without outer corrections, because it does not ensure anything about the convergence of the equations, and this is particularly true in multiphase flows, where the coupling is more complex than in single-phase flows.

When you are saying outer corrections, then you are talking about something similar to what is done in pimpleFoam?

Thanks for any insights,

Niels

alberto December 2, 2010 13:38

Hi Niels,

yes I meant something like PIMPLE or unsteady SIMPLE.

My point is that the convergence of all the equations should be ensured at each time-step (It is not so easy in some case to have it in only one iteration, even with small time-steps).

Best,

ngj December 3, 2010 08:53

Hi Alberto

Thanks, I will take a look at it and report back whether or not it does improve on the interFoam approach.

Best regards,

Niels

Ueb January 10, 2011 03:22

free fall time
 
We have the same problems with diverging free fall times in interFoam depending on different CFL numbers. We found out that the solver predicts the free fall correctly if one set viscosities to zero. Then with almost every CFL number (not too high, because of divergence) the solver predicts the correct free fall time.
I want to use different interpolation schemes and do some tests and comparison. In fact FLUENT has the same problems, but not that worse.

regards Ueb


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