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

pisoFoam and pimpleFoam are unstable in foam-extend 4.0/4.1 (misunderstanding ?)

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

Like Tree3Likes
  • 1 Post By arjun
  • 2 Post By Kombinator

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2019, 10:25
Default pisoFoam and pimpleFoam are unstable in foam-extend 4.0/4.1 (misunderstanding ?)
  #1
New Member
 
Artem
Join Date: Apr 2014
Posts: 29
Rep Power: 12
Kombinator is on a distinguished road
Dear Foamers,

Some time ago I ran into a problem which I would like to put here in order to clarify or to share the experience.
I work mainly with pisoFoam in foam-extend 4.0, and the solver works properly besides a few bugs ( e.g. not able to use pFinal and uFinal in fvSolution).
Recently I decided to try pimpleFoam in foam-extend 4.0 because I wanted to use PIMPLE algorithm. However, when I applied pimpleFoam to my case (3d duct LES flow y+ < 1, Co < 1, Smagorinsky SGS - which worked properly with pisoFoam) I found that the solution immediately blew up after 2-3 iterations, although I used exactly the same schemes settings as for pisoFoam. I tried to simulate the laminar duct flow and again the solution immediately diverged after a few iterations. Then I tried to simulate a standard pimpleFoam tutorial with the standard settings in foam-extend 4.0 - "t-junction tutorial" and it diverged as well.
When I went through the pimpleFoam solver code, I found that compare to other OpenFoam versions (foam-extend 3.2, OpenFoam 7 etc), the algorithm in foam-extend 4.0 is different. The main difference is that in foam-extend 4.0 developers do not include a time derivative term into HUeqn:
Foam-extend 4.0:
pimpleFoam/UEqn.H
Code:
fvVectorMatrix HUEqn
(
    fvm::div(phi, U)
  + turbulence->divDevReff()
);
pimpleFoam/PEqn.H
Code:
    // Prepare clean Ap without time derivative contribution and
    // without contribution from under-relaxation
    // HJ, 26/Oct/2015
    aU = HUEqn.A();

    // Store velocity under-relaxation point before using U for the flux
    // precursor
    U.storePrevIter();

    U = HUEqn.H()/aU;
And in foam-extend 3.2 or other versions they include a time derivative term:
Foam-extend 3.2:
pimpleFoam/UEqn.H
Code:
tmp<fvVectorMatrix> UEqn
(
    fvm::ddt(U)
  + fvm::div(phi, U)
  + turbulence->divDevReff(U)
);
pimpleFoam/PEqn.H
Code:
U = rUA*UEqn().H();
And based on that, both version of algorithms have a few more diffrenceses further. So, that seems that in foam-extend 4.0 developers introduced the new algorithm for pimpleFoam and for pisoFoam they kept the old algorithm.
Then I moved to foam-extend 4.1 and found that besides pimpleFoam they introduced the same feature for pisoFoam as well:

Foam-extend 4.1:
pisoFoam.C
Code:
// Pressure-velocity PISO corrector
  {
  // Momentum predictor
  // Time-derivative matrix
     fvVectorMatrix ddtUEqn(fvm::ddt(U));

    // Convection-diffusion matrix
     fvVectorMatrix HUEqn
     (
         fvm::div(phi, U)
       + turbulence->divDevReff()
     );
And now even pisoFoam standard LES tutorials (pitzDailyDirectMapped and pitzDaily) don't work in foam-extend 4.1. They immediately diverge after 2-5 iterations.
After numerous tries, I found out that for these new algorithms the laminar duct flow would work only if I initialize the velocity field with the values closed to expected and the LES duct flow would work only with highly dissipative schemes for the convection term (like upwind schemes that is obviously not good for results). Additionally, I found the paper where developers explained the advantages of approximately the same algorithm:
https://www.sciencedirect.com/scienc...495?via%3Dihub
However, it seems that on practice even standard tutorials do not work or maybe I just don't understand how to use it properly.

Any explanations or experience sharing would be very appreciated. Thank you.

Regards,
Artem

Last edited by Kombinator; October 20, 2019 at 13:41.
Kombinator is offline   Reply With Quote

Old   October 20, 2019, 12:40
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,288
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
i looked at the paper you mentioned and based on my experience with flow solvers i can point out to you that the most probable culprit is the extrapolation of velocity and pressure to new time level.

My experience says that this idea more or less does not work, it creates more problems then it helps. It might have worked for the test problems they have used so it is pushed in.



The reasons as to why extrapolation does not work it that in practice the extrapolated velocity does not satisfy the continuity (which kind of play critical role in convection term, the one they are trying to fix).
savya likes this.
arjun is offline   Reply With Quote

Old   October 21, 2019, 11:42
Default
  #3
New Member
 
Artem
Join Date: Apr 2014
Posts: 29
Rep Power: 12
Kombinator is on a distinguished road
Hey Arjun,

Thank you for the answer and for the explanation.
In case somebody needs this - I adapted the "old" usual pimpleFoam algorithm from the previous version in order to be compiled in foam-extend 4.0 (and probably in foam-extend 4.1 but I didn't check). It works properly so far - I attached the solver here.

Best regards,
Artem
Attached Files
File Type: zip truePimpleFoam.zip (3.7 KB, 27 views)
blue8803 and hef like this.
Kombinator is offline   Reply With Quote

Old   July 28, 2020, 02:43
Default
  #4
New Member
 
Chaewoong Ban
Join Date: Jun 2013
Posts: 18
Rep Power: 13
blue8803 is on a distinguished road
Thanks for sharing your experiences.

I have been suffered with same problem with you. pimpleFoam in version of FE41 always diverged except for using Euler for ddt term and Gauss upwind for div(phi,U) term. In addition, the solution is too dissipative that I cant get any expected results from simulation.
blue8803 is offline   Reply With Quote

Old   January 14, 2021, 05:10
Default
  #5
hef
New Member
 
H Fossum
Join Date: Jan 2021
Posts: 3
Rep Power: 5
hef is on a distinguished road
I also add my thanks for this post, as I've been having the same problems. I will definitely try the truePimpleFoam code. Meanwhile, I also came across this ticket in SourceForge:

https://sourceforge.net/p/foam-extend/tickets/39/

It appears to address the same issue, but as far as I can see, there has been no reply from foam-extend devs. I guess we'll have to wait and see if anything is changed in the next version of foam-extend.
hef is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 10:14
pisoFoam and pimpleFoam showing steady for UNsteady phenomena aerospain OpenFOAM Running, Solving & CFD 0 May 10, 2016 11:56
pimpleFoam - pisoFoam residuals RodriguezFatz OpenFOAM Running, Solving & CFD 1 September 25, 2014 09:37
pisoFoam, pimpleFoam - Fluent user's questions RodriguezFatz OpenFOAM Running, Solving & CFD 0 September 4, 2013 05:26
I got complete different results for pisofoam and pimplefoam? lakeat OpenFOAM Running, Solving & CFD 6 December 27, 2012 05:25


All times are GMT -4. The time now is 17:26.