CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OF Compressible equations SIMPLE/PISO (http://www.cfd-online.com/Forums/openfoam-solving/75147-compressible-equations-simple-piso.html)

truong_nm April 17, 2010 12:41

OF Compressible equations SIMPLE/PISO
 
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 :D
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 :o

alberto April 18, 2010 03:05

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,

truong_nm April 19, 2010 05:29

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 :confused:).
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 :o

alberto April 19, 2010 10:31

Quote:

Originally Posted by truong_nm (Post 255215)
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 :confused:).
simpleFoam uses the SIMPLE algorithm, under-relaxing the solution.

Best,

truong_nm April 19, 2010 10:49

Quote:

Originally Posted by alberto (Post 255278)
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 :confused:. 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 :p

alberto April 19, 2010 11:57

Quote:

Originally Posted by truong_nm (Post 255284)
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 :confused:.
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,

truong_nm April 19, 2010 14:59

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.

truong_nm April 24, 2010 11:33

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 :p

dohnie May 14, 2010 07:46

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?

alberto May 14, 2010 10:15

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 May 14, 2010 10:23

Quote:

Originally Posted by truong_nm (Post 256191)
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 :p

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,

truong_nm May 17, 2010 09:40

Thanks Alberto, I'll do what you recommend and I'll let you know :o

dohnie May 17, 2010 10:05

Thank you, Alberto, I'll have a look at the publication.

truong_nm May 17, 2010 10:34

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 :)

alberto May 17, 2010 13:13

It looks like there is some problem in the setup, but it's hard to say without having the case :-)

Good luck

truong_nm May 18, 2010 03:42

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 :o
Do you think this technique is a good alternative ?

alberto May 18, 2010 09:52

Yes. You can do pseudo-transient runs with rhoPimpleFoam too, which should allow larger Co numbers, maybe with your local time stepping.

Best,

truong_nm May 18, 2010 10:06

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 :D

smart May 18, 2010 10:17

rhoSimpleFoam
 
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

truong_nm May 18, 2010 10:40

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.:rolleyes:


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