# OF Compressible equations SIMPLE/PISO

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

 April 17, 2010, 12:41 OF Compressible equations SIMPLE/PISO #1 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 Dear Foamers, I am currently investigating on OF abilities with compressible flows. Basically, three cases: strictly subsonic flow (Mach .6) then shockwave (Mah .725, .75) on an airfoil. In order to choose the solver I will use, I decided to open the source code I found that OF uses PISO/SIMPLE algorithms for compressible flows! Why ? I am quite sure that PISO/SIMPLE are pressure-velocity coupling methods for incompressible flows because NS PDE system (continuity, momentum) does not include pressure equation but pressure gradient. On the contrary, for compressible flows, the NS PDE system includes continuity, momentum, energy and the coupling equation is the equation of state. So no need for pressure-velocity coupling. Can someone help me on this point ? Thanks a lot

 April 18, 2010, 03:05 #2 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,911 Rep Power: 28 You should refer to the literature to learn the details. A good starting point could be the book: Ferziger, Peric, Computational Methods for Fluid Dynamics, Springer. This should give you the information you're looking for. To make it short: SIMPLE and PISO can be applied also to compressible flows, with the due changes (basically the addition of the energy equation and the incorporation of compressibility effects in the pressure equation) compared to their incompressible formulation. You might want to take a look at rhoCentralFoam and rhopSonicFoam for your cases. Best, mm.abdollahzadeh likes this. __________________ Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 April 19, 2010, 05:29 #3 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 Thanks for your reply Alberto, I will certainly take a look at the reference. I went on my investigations. I saw that both solvers you mentioned are Euler solvers ? I need NS Solvers beause I want to capture the boundary layer. Therefore, NS solvers adapted to aerodynamics include: rhoPimpleFoam, rhoPisoFoam, , rhoSimpleFoam, sonicFoam. Only one solver is steady, rhoSimpleFoam. When I analyze its source code, it seems that OF consider steady state as d/dt = 0. How can it be possible to solve with stability such equations ? I am thinking of pseudo-transient simulations (as rhoPimple make) and CFL notions (if there is no deltaT, no CFL can be calculated ). Basically, my problems are steady-state. It would be very expensive to compute my 2D airfoil with an unsteady solver, right (of course, depending on my mesh) ? Thanks for your help, hope my question aren't too dummy

April 19, 2010, 10:31
#4
Senior Member

Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,911
Rep Power: 28
Quote:
 Originally Posted by truong_nm Thanks for your reply Alberto, I will certainly take a look at the reference. I went on my investigations. I saw that both solvers you mentioned are Euler solvers ? I need NS Solvers beause I want to capture the boundary layer. Therefore, NS solvers adapted to aerodynamics include: rhoPimpleFoam, rhoPisoFoam, , rhoSimpleFoam, sonicFoam.
rhoCentralFoam is also for viscous flows (I'm looking at 1.6.x). See the "if (!inviscid) ...".

Quote:
 Only one solver is steady, rhoSimpleFoam. When I analyze its source code, it seems that OF consider steady state as d/dt = 0. How can it be possible to solve with stability such equations ? I am thinking of pseudo-transient simulations (as rhoPimple make) and CFL notions (if there is no deltaT, no CFL can be calculated ).
simpleFoam uses the SIMPLE algorithm, under-relaxing the solution.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

April 19, 2010, 10:49
#5
Member

Ngoc-Minh Truong
Join Date: Feb 2010
Location: Toulouse, France
Posts: 42
Rep Power: 9
Quote:
 Originally Posted by alberto rhoCentralFoam is also for viscous flows (I'm looking at 1.6.x). See the "if (!inviscid) ...". simpleFoam uses the SIMPLE algorithm, under-relaxing the solution. Best,
Well, thanks for your reply. I took a look at the code for rhoCentralFoam. To me, Kurganov and Tadmor are designed for hyperpolic equations, i.e. Euler equations. Moreover, when I read the code, there is indeed "if (!inviscid)" but after that, no 'turbulence -> correct()' term.
For sure, that confirms your reply concerning that equations are no more Euler equations but NS equations without turbulence model . Finally, none of the tutorials have turbulenceProperties file with them.

Concerning rhoSimpleFoam, my computation crashes almost immediately when 'transonic' is off and waits for crash whan 'transonic' is on ... Even with under-relaxing factors, even very low ones (1e-2,1e-3)

Let the show go on

April 19, 2010, 11:57
#6
Senior Member

Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,911
Rep Power: 28
Quote:
 Originally Posted by truong_nm Well, thanks for your reply. I took a look at the code for rhoCentralFoam. To me, Kurganov and Tadmor are designed for hyperpolic equations, i.e. Euler equations.
Turganov and Tadmor schemes are basically Riemann-free schemes were developed also for convection-diffusion equations

Kurganov, A; Tadmor, E, New high-resolution central schemes for nonlinear conservation laws and convection-diffusion equations, J. Comp. Phys, Vol. 160, Issue 1, pp 241-282.
Quote:
 Moreover, when I read the code, there is indeed "if (!inviscid)" but after that, no 'turbulence -> correct()' term. For sure, that confirms your reply concerning that equations are no more Euler equations but NS equations without turbulence model .
Yes. rhoCentralFoam solves the N-S equations without turbulence model.

Quote:
 Concerning rhoSimpleFoam, my computation crashes almost immediately when 'transonic' is off and waits for crash whan 'transonic' is on ... Even with under-relaxing factors, even very low ones (1e-2,1e-3)
What case? Flow conditions? Solver configuration?

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 April 19, 2010, 14:59 #7 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 My case(s) is(are): 2D Airfoil RAE2822 Mach .75, non-zero angle of attack (when 'transonic' boolean is true, Mach .6 otherwise, Reynolds about 6M) Turbulence model: Spalart Allmaras.

 April 24, 2010, 11:33 #8 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 Any idea ? I succeeded in running my cases with sonicFoam, rhoPisoFoam and rhoPimpleFoam with their own settings. But still failed with rhoSimpleFoam. Case: Mach .6 on 2D Airfoil RAE2822 U: "freestream" inlet/outlet, "zerogradient" wall P: "freestream" inlet/outlet, "zerogradient" wall T: "freestream" inlet, "zerogradient" outlet/wall Numerical schemes: I tried different settings for every sections: Gauss linear, upwind for convection even Minmod. I stayed with Gauss linear for gradient and laplacian. Thanks for your reply

 May 14, 2010, 07:46 #9 Member   Florian Ettner Join Date: Mar 2009 Location: Munich, Germany Posts: 41 Rep Power: 10 Alberto, mentioning Ferziger's textbook, I suppose you were referring to the Rhie-Chow interpolation. However, if it is true that we need this (as OpenFOAM uses collocated grids), then I don't understand why a solver like rhoSonicFoam works. Its formulation is completely density based, p is gained from the ideal gas equation, and there is no PISO loop or anything comparable. Can you enlighten me, please?

 May 14, 2010, 10:15 #10 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,911 Rep Power: 28 Hello, no, I was referring to pressure-based compressible algorithm they describe, in reply to the first question on the use of PISO and SIMPLE algorithms for compressible flows. You can also take a look at the paper Demirdzic, I., Lilek, Z., Peric, M., A collocated finite volume method for predicting flows at all speeds, International Journal for Numerical Methods in Fluids, Vol. 16, 1029 -- 1050, 1993 which contains the detailed explanation of the same approach explained in the book. In a density-based approach you clearly do not have a pressure equation, and you use directly the continuity equation for the density, relying on the equation of state to compute the pressure. Best, __________________ Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.

May 14, 2010, 10:23
#11
Senior Member

Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,911
Rep Power: 28
Quote:
 Originally Posted by truong_nm Any idea ? I succeeded in running my cases with sonicFoam, rhoPisoFoam and rhoPimpleFoam with their own settings. But still failed with rhoSimpleFoam. Case: Mach .6 on 2D Airfoil RAE2822 U: "freestream" inlet/outlet, "zerogradient" wall P: "freestream" inlet/outlet, "zerogradient" wall T: "freestream" inlet, "zerogradient" outlet/wall Numerical schemes: I tried different settings for every sections: Gauss linear, upwind for convection even Minmod. I stayed with Gauss linear for gradient and laplacian. Thanks for your reply
Technically if rhoPisoFoam converges, rhoSimpleFoam should too. Usually in steady simulations what might kill your run are the first iterations, because the solution can change very steeply.

Did you try to set pMin, rhoMin and rhoMax at appropriate values in the SIMPLE subdictionary?

In general, the relaxation should not be so strong (I use: p: 0.6, U: 0.4, rho: 0.05, 0.4 for all the rest, or, alternatively p:0.3, U:0.7, but the first usually converges much faster. Of course you might need smaller values than these, but 10^-3 seems too small :-)). If you need that, you've probably something wrong somewhere else in the problem setup.

Simply take the pimpleFoam case that converges, change name to the PIMPLE dictionary into SIMPLE, add the limitation on rho in the same dictionary, and try.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 May 17, 2010, 09:40 #12 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 Thanks Alberto, I'll do what you recommend and I'll let you know

 May 17, 2010, 10:05 #13 Member   Florian Ettner Join Date: Mar 2009 Location: Munich, Germany Posts: 41 Rep Power: 10 Thank you, Alberto, I'll have a look at the publication.

 May 17, 2010, 10:34 #14 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 This is what happened: 1. Following your advice for relaxation factors and keywords in the SIMPLE sub-dictionary, the computation crashes quite immediately. 2. When I add the 'transonic' keyword, the computation makes about 800 steps but the 'cumulative error' dramatically grows up and then the computation crashes. 3. Even with low relaxation factors. That is to say that these relaxation factors (in this case) only delay the crash. Thanks for your suggestion and the investigations go on

 May 17, 2010, 13:13 #15 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,911 Rep Power: 28 It looks like there is some problem in the setup, but it's hard to say without having the case :-) Good luck __________________ Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 May 18, 2010, 03:42 #16 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 I tried another setup: rhoPisoFoam + local time in order to reproduce pseudo-transient computations that can be found in paying CFD softs. It seems that computations run Do you think this technique is a good alternative ? babala likes this.

 May 18, 2010, 09:52 #17 Senior Member   Alberto Passalacqua Join Date: Mar 2009 Location: Ames, Iowa, United States Posts: 1,911 Rep Power: 28 Yes. You can do pseudo-transient runs with rhoPimpleFoam too, which should allow larger Co numbers, maybe with your local time stepping. Best, __________________ Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 May 18, 2010, 10:06 #18 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 rhoPisoFoam + SLTS local time step technique works very well. But with rhoPimpleFoam, density increases dramatically (relaxation factor at .05 as you suggested) and the computation finally crashes. How many sub-iterations (nOuterCorrectors) do you recommend to me ? Thanks

 May 18, 2010, 10:17 rhoSimpleFoam #19 Member   Sylvain Martel Join Date: Apr 2009 Location: University of Sherbrooke/Quebec/Canada Posts: 51 Rep Power: 10 Hi, in previous post, you said: "Concerning rhoSimpleFoam, my computation crashes almost immediately when 'transonic' is off and waits for crash whan 'transonic' is on ... Even with under-relaxing factors, even very low ones (1e-2,1e-3)" Do you have to define transonic "on" or "off" condition? I would like to switch from OF 1.5 to 1.6 to try solving steady-state critical flow in a nozzle. Have you progressed with this task? Sylvain

 May 18, 2010, 10:40 #20 Member   Ngoc-Minh Truong Join Date: Feb 2010 Location: Toulouse, France Posts: 42 Rep Power: 9 Basically, this option appears in the source code of the solvers (rhoSimple, rhoPimple or rhoPiso) [transonic is actually a boolean and its default value is false]. After reading the source code and a post on CFDOnline (http://www.cfd-online.com/Forums/ope...transonic.html), I tried. For the moment, I did not succeed in using this option. All my successful computations ran with transonic as false.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post pete Site Help, Feedback & Discussions 20 June 16, 2015 13:52 oe Main CFD Forum 7 September 8, 2008 21:28 dave Main CFD Forum 4 July 16, 2003 09:08 GACEM Hatem Phoenics 1 June 3, 2001 05:30 sanku Main CFD Forum 1 January 30, 2000 22:01

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