We have a need to run a pressu
We have a need to run a pressure\density based compressible steady state solver. I have been fighting with rhoSimpleFoam for a few weeks now.
We would like to be able to specify: 2 inlets with TotalPressure using a fixed pressure. 2 outlets with possibilty of reverse flow and fixed static pressure. I am currently using totalPressure with fixed values for the inlets and outletInlet for the outlets in the p file. I am using pressureInletVelocity for the inlets and inletOutlet for the outlets with the values set to 0 for the U file. The flow field will develop a swirl as this runs. The geometry checks fine using checkMesh. This also runs fine in simpleFoam developing a fully converged solution. For some reason when we run it with the pressure\density solver like rhoSimpleFoam we get an instability in pressure\density after a few hundred steps. I have been able to change the instability by playing with the "phi -= pEqn.flux()" statement in the the code, but never actually get rid of it. I think the problem may reside pressure\density equation for the SIMPLE solvers. Is OpenFoam capable of solving this type of problem? HAS ANYONE BEEN ABLE TO SOLVE A PROBLEM SIMILAR TO WHAT I HAVE DESCRIBED WITH A STEADY STATE SOLVER? |
I have noticed when someone as
I have noticed when someone asks a question about stability problems in rhoSimpleFoam or density correctors in steady state solvers they are never answered. Here are two other posts posing similar questions from other users that never got further response. If there is a problem with rhoSimpleFoam thats alright, but it would be nice to get some sort of response?
Just tell me there is a problem and no one currently has a solution. http://www.cfd-online.com/OpenFOAM_D...es/1/2068.html http://www.cfd-online.com/OpenFOAM_D...es/1/2718.html |
There's no problem in the solv
There's no problem in the solver. What you are seeing is that compressible flows are much more sensitive to solver setting, initial field, time-step and boundary conditions. Unless you get all the components right together, the solver will blow up in your case.
All in all, this just requires lots of care. Hrv |
Alright I can easily believe t
Alright I can easily believe that the problem is in my setup somewhere. Maybe someone would be so kind as to spot where my potential problems are. I will post my checkMesh, fvSolution, fvSchemes, and my 0 files. Please anyone with any ideas let me know what else I should try. No matter what I try I seem to get what looks very much like a low wave mode pressure instability after about 500-600 steps.
Remember this mesh converges in simpleFoam. I also get much more stability by decreasing the pressure drop or increasing viscosity. checkMesh: Number of points: 124105 edges: 649440 faces: 979095 internal faces: 920158 cells: 453762 boundary patches: 19 point zones: 0 face zones: 0 cell zones: 0 Checking topology and geometry ... Point usage check OK. Upper triangular ordering OK. Topological cell zip-up check OK. Face vertices OK. Face-face connectivity OK. Basic topo ok ... Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface Periodic-Center 816 875 ok (not multiply connected) Periodic-Combustor 16178 10957 ok (not multiply connected) Periodic-Holes 328 204 ok (not multiply connected) Periodic-Plenum-2 2792 1522 ok (not multiply connected) Periodic-Plenum-1 2046 1095 ok (not multiply connected) SmallTubes-2 2538 1324 ok (not multiply connected) LargeTubes-2 3107 1707 ok (not multiply connected) SmallTubes-1 2078 1092 ok (not multiply connected) LargeTubes-1 6047 3191 ok (not multiply connected) Wall-6 1032 687 ok (not multiply connected) WallSet-5 7102 3751 ok (not multiply connected) WallSet-4 3742 2016 ok (not multiply connected) WallSet-2 4455 2328 ok (not multiply connected) Wall-3 860 957 ok (not multiply connected) Wall-1 742 409 ok (not multiply connected) BC-PressOut-center 95 113 ok (not multiply connected) BC-PressOut-1 3088 2180 ok (not multiply connected) BC-PressInlet-2 1048 568 ok (not multiply connected) BC-PressInlet-1 843 461 ok (not multiply connected) Patch topo ok ... Topology check done. Domain bounding box: min = (-1.42109e-17 -2.75474e-51 0) max = (0.0757305 0.0245345 0.0245345) meters. Checking geometry... Boundary openness in x-direction = -4.32336e-18 Boundary openness in y-direction = -8.77453e-18 Boundary openness in z-direction = -3.35318e-18 Boundary closed (OK). Max cell openness = 4.27239e-22 Max aspect ratio = 2.58574. All cells OK. Minumum face area = 1.86851e-09. Maximum face area = 1.79996e-06. Face area magnitudes OK. Min volume = 3.02777e-14. Max volume = 1.42021e-09. Total volume = 1.34424e-05. Cell volumes OK. Mesh non-orthogonality Max: 65.6633 average: 17.5979 Non-orthogonality check OK. Face pyramids OK. Max skewness = 119.41 percent. Face skewness OK. Minumum edge length = 5.08262e-05. Maximum edge length = 0.00214438. All angles in faces are convex or less than 10 degrees concave. Face flatness (1 = flat, 0 = butterfly) : average = 0.999994 min = 0.999846 All faces are flat in that the ratio between projected and actual area is > 0.8 Geometry check done. Number of cells by type: hexahedra: 19560 prisms: 44800 wedges: 0 pyramids: 285 tet wedges: 0 tetrahedra: 389117 polyhedra: 0 Number of regions: 1 (OK). Mesh OK. fvSolution: (note I update the relaxation values to .2 on p and .6 on everything else after about 150 steps. It continues to run fine for another 400 steps) solvers { p AMG 1e-06 0 100; U BICCG 1e-06 0; h BICCG 1e-06 0; k BICCG 1e-08 0; epsilon BICCG 1e-08 0; } SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } relaxationFactors { p 0.05; rho 0.05; U 0.3; h 0.1; k 0.05; epsilon 0.05; } fvSchemes: ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,h) Gauss limitedLinear 1; div((muEff*dev2(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear limited 0.5; laplacian((rho|A(U)),p) Gauss linear limited 0.5; laplacian(alphaEff,h) Gauss linear limited 0.5; laplacian(DkEff,k) Gauss linear limited 0.5; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5; laplacian(mut,U) Gauss linear limited 0.5; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } Epsilon: (note I crash almost immediately when I run laminar. I also get increased stability by fiddling with viscosity.) dimensions [0 2 -3 0 0 0 0]; internalField uniform 1.5; boundaryField { Periodic-Center { type cyclic; } Periodic-Combustor { type cyclic; } Periodic-Holes { type cyclic; } Periodic-Plenum-2 { type cyclic; } Periodic-Plenum-1 { type cyclic; } SmallTubes-2 { type zeroGradient; } LargeTubes-2 { type zeroGradient; } SmallTubes-1 { type zeroGradient; } LargeTubes-1 { type zeroGradient; } Wall-6 { type zeroGradient; } WallSet-5 { type zeroGradient; } WallSet-4 { type zeroGradient; } WallSet-2 { type zeroGradient; } Wall-3 { type zeroGradient; } Wall-1 { type zeroGradient; } BC-PressOut-center { type inletOutlet; inletValue uniform 1.5; } BC-PressOut-1 { type inletOutlet; inletValue uniform 1.5; } BC-PressInlet-2 { type fixedValue; value uniform 1.5; } BC-PressInlet-1 { type fixedValue; value uniform 1.5; } k: dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.055; boundaryField { Periodic-Center { type cyclic; } Periodic-Combustor { type cyclic; } Periodic-Holes { type cyclic; } Periodic-Plenum-2 { type cyclic; } Periodic-Plenum-1 { type cyclic; } SmallTubes-2 { type zeroGradient; } LargeTubes-2 { type zeroGradient; } SmallTubes-1 } type zeroGradient; } LargeTubes-1 { type zeroGradient; } Wall-6 { type zeroGradient; } WallSet-5 { type zeroGradient; } WallSet-4 { type zeroGradient; } WallSet-2 { type zeroGradient; } Wall-3 { type zeroGradient; } Wall-1 { type zeroGradient; } BC-PressOut-center { type inletOutlet; inletValue uniform .055; } BC-PressOut-1 } type inletOutlet; inletValue uniform .055; } BC-PressInlet-2 { type fixedValue; value uniform .055; } BC-PressInlet-1 { type fixedValue; value uniform .055; } p: (note I have also tried totalPressure and fixed value for the outlet) dimensions [1 -1 -2 0 0 0 0]; internalField uniform 102928; boundaryField { Periodic-Center { type cyclic; } Periodic-Combustor { type cyclic; } Periodic-Holes { type cyclic; } Periodic-Plenum-2 { type cyclic; } Periodic-Plenum-1 { type cyclic; } SmallTubes-2 { type zeroGradient; } LargeTubes-2 { type zeroGradient; } SmallTubes-1 { type zeroGradient; } LargeTubes-1 { type zeroGradient; } Wall-6 { type zeroGradient; } WallSet-5 { type zeroGradient; } WallSet-4 { type zeroGradient; } WallSet-2 { type zeroGradient; } Wall-3 { type zeroGradient; } Wall-1 { type zeroGradient; } BC-PressOut-center { type fixedValue; value uniform 101325; } BC-PressOut-1 { type fixedValue; value uniform 101325; } BC-PressInlet-2 { type totalPressure; p0 uniform 104531; value uniform 104531; } BC-PressInlet-1 { type totalPressure; p0 uniform 104531; value uniform 104531; } T: dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { Periodic-Center { type cyclic; } Periodic-Combustor { type cyclic; } Periodic-Holes { type cyclic; } Periodic-Plenum-2 { type cyclic; } Periodic-Plenum-1 { type cyclic; } SmallTubes-2 { type zeroGradient; } LargeTubes-2 { type zeroGradient; } SmallTubes-1 { type zeroGradient; } LargeTubes-1 { type zeroGradient; } Wall-6 { type zeroGradient; } WallSet-5 { type zeroGradient; } WallSet-4 { type zeroGradient; } WallSet-2 { type zeroGradient; } Wall-3 { type zeroGradient; } Wall-1 { type zeroGradient; } BC-PressOut-center { type inletOutlet; inletValue uniform 300; } BC-PressOut-1 { type inletOutlet; inletValue uniform 300; } BC-PressInlet-2 { type fixedValue; value uniform 300; } BC-PressInlet-1 { type fixedValue; value uniform 300; } U: (note I have also tried pressureInletOutletVelocity for the outlet) dimensions [0 1 -1 0 0 0 0]; internalField uniform (1 0.1 0.1); boundaryField { Periodic-Center { type cyclic; } Periodic-Combustor { type cyclic; } Periodic-Holes { type cyclic; } Periodic-Plenum-2 { type cyclic; } Periodic-Plenum-1 { type cyclic; } SmallTubes-2 { type fixedValue; value uniform (0 0 0); } LargeTubes-2 { type fixedValue; value uniform (0 0 0); } SmallTubes-1 { type fixedValue; value uniform (0 0 0); } LargeTubes-1 { type fixedValue; value uniform (0 0 0); } Wall-6 { type fixedValue; value uniform (0 0 0); } WallSet-5 { type fixedValue; value uniform (0 0 0); } WallSet-4 { type fixedValue; value uniform (0 0 0); } WallSet-2 { type fixedValue; value uniform (0 0 0); } Wall-3 { type fixedValue; value uniform (0 0 0); } Wall-1 { type fixedValue; value uniform (0 0 0); } BC-PressOut-center { type inletOutlet; inletValue uniform (0 0 0); } BC-PressOut-1 { type inletOutlet; inletValue uniform (0 0 0); } BC-PressInlet-2 { type pressureInletVelocity; phi phi; rho rho; value uniform (0 0 0); } BC-PressInlet-1 { type pressureInletVelocity; phi phi; rho rho; value uniform (0 0 0); } |
Even though this should be a l
Even though this should be a low mach number(<0.3) would it still make sense to experiment with the pressureTransmissive outlet BC since it seems to be a growing oscillating pressure wave in a cylinder that seems to be causing the problems???
|
Hi Daniel,
Your set-up seem
Hi Daniel,
Your set-up seems fine. Apart from that "low wave instabiltiy" what happens to the other fields, do they converge towards reasonable values, do they oscillate consequently too? You can always try to take the immoral and cowardly step of using upwind for all your variables. Maybe you might also try to tighten your pressure solver tolerance. Take it easy Pierre |
probably try one of the transi
probably try one of the transient codes like rhoSonicFoam and rhopSonicFoam. Using different codes helps spotting errors in the setup.
The total pressure boundary condition should be alright. markus |
Thank you very much for your r
Thank you very much for your replies,
We get the same thing when upwinding all values and I have tried playing with the tolerances of pressure, it still develops a unstable pressure wave. The problem with pressure is usually preluded by a sharp drop in the minimum Ux. A drop from around -33 to around -60. After a couple steps velocity is back to normal, but pressure develops a growing oscillating wave. Rho of course ocsillates with pressure. Temperature and velocity look pretty good for a few steps until variance in pressure begins driving them. We have played with rhoTurbFoam a little but haven't spent much time with the transient codes yet. |
As Markus suggested maybe rhop
As Markus suggested maybe rhopSonicFoam might help, as it uses a slightly different way of biulding fluxes. Quite a stable code I hear.
Pierre |
Does anyone have anything else
Does anyone have anything else we can try on this? We get the low wave pressure mode on both rhoTurbFoam and rhoSimpleFoam. It always develops in the channel(cylinder). It always develops after the swirling flow field begins to setup. We have tried more generic cases and the problem persists. The swirl develops then pressure oscillates and becomes unstable.
We have began trying rhopSonicFoam, but have not gotten very far. Any other suggestions would be a great help. Thanks |
Quote:
Did you solve your issue? If not, I will post my issue here. If affirmatively, I will try your solution. Regards, Guilherme |
Hi, the last comment before yours is from 2006. It is probably more convenient if you open a new thread, and maybe provide a sample case that reproduces the problem.
Best, |
Hi Alberto,
The last post is from 2006 but the user joined in 2009! Certainly I will open a new thread. Thanks. Regards, Guilherme |
Oh, I guess this is due to the forum migration.
|
solver for steady compressible flow in OpenFOAM 1.7.1
Hai all,
I am new to OpenFoam.With my experience in Fluent ( simulated supersonic flow at Mach number 2.2 over Gemini Reentry capsule) thought to try OF. Simulation condition of my Fluent work is steady, Density based, M=2.2, inviscid both inviscid and turbulent flow. So far , I converted my fluent mesh file (.msh) as OpenFOAM mesh file. For steady , compressible flow rhoSimpleFoam seems to be a equivalent solver, but in OpenFOAM 1.7.1 (which is the one I installed in my machine) only rhoPorousSimpleFoam solver is available. Kindly explain what does this porous in rhoPorousSimpleFoam means for, and suggest me with correct solver.. Thanks in advance. Quote:
|
rhoSimpleFoam is part of OpenFOAM 1.7.1
|
Dear Alberto,
I would like to thank you for your reply . And I feel very Sorry for my mistake., can you please suggest me any other solver other than rhoSimpleFoam for my case.. |
rhoSimpleFoam is the only compressible steady solver available.
There is rhoCentralFoam, which is suitable for viscid/inviscid flows with high Mach number, but it is unsteady. Similarly, sonicFoam is fine for transonic/supersonic turbulent unsteady flows. Best, |
Dear Alberto,
Thanks a lot for your reply.Now I decided the rhoSimpleFoam solver for my work. Sorry for bothering you again, Kindly send any test case for rhoSimpleFoam to my mail id rock.senthilkumar@gmail.com ., so that I can do any case study also. Quote:
|
Take a look at the tutorials :-)
|
Dear Alberto,
Thanks for your quickest replies.If I am not wrong, OF 1.7.1 tutorials does not have example case for rhoSimpleFoam. Even I searched through Internet to download but failed, then only came to know lot of people are looking for test case. Please correct me if I am wrong. Quote:
|
1 Attachment(s)
Quote:
I added the required entries to the attached case, but I did not clean the dictionaries up. |
Dear Alberto,
Thank you for your attachments. I will clean up the dictionaries, and let you know how it works for my case. Thank you again. Quote:
|
Hi aerothermal
I have the same problem with pressure instability with RhoPorousSimpleFoam inducing speed oscillations (up to crash). I made a research with your name on this CFD Online forum and found no trace of a new thread dealing with this problem written by you. Could you be kind enough to tell me (if ever you did it) where this thread is located. In case of no new thread, could you explain me how you stabilized such pressure instabilities. I reduced the p relaxation factor down to 0.0005! it helps but each time I reduce the outlet pressure, to progressively reach higher speeds (I wish I could reach Mach1 at the outlet, but still am at ~Mach 0.1), I need to reduce further this factor. Is it sufficient to reduce p relaxation factor? Any other tricks you succeeded with? Many thanks. Best regards |
Hi Patty,
Try to use divSchemes div(phi,U) Gauss limitedLinearV 1.0 Usually it helps to stabilize. I manage to converge my case but the results are not good. I will posto some results here later. regards, aerothermal |
Quote:
Could you post a simple case that reproduces the problem? Best, Alberto |
Quote:
Thanks for answering. I have tried in my next iterations to use "divSchemes div(phi,U) Gauss limitedLinearV 1.0" instead of "Gauss upwind", as you suggested but using, as initially, a p relaxation factor of 0.2. It has diverged after only 20 iterations. So I kept your suggestion but combine it with a 0.00025 p relaxation factor, waiting for more information from you. By the way, what is the meaning of the constant 1.0 in "Gauss limitedLinearV 1.0". I tried to watch in the C++ files, but really, it is not clear for an "end user" like me. Is it to be tuned like relaxation factors or just a constant setup for openFoam solvers? Best regards |
Quote:
Well, the case I am studying is quite big and absolutely confidential. So, I will try to make another model, oversimplified but that could recreate this behavior. However, in case of success, how to post a full case in this forum? Do you need the mesh files or just the dictionaries setting up the rhoPorousSimpleFoam solver? Being new in this forum, I never did it before. Have you a suggestion? A thread to read that describes the best procedure according to your experience? Other similar advices? I read that the attachment to a post in this forum is 98KB max, so may be a zip or tar file could be suitable, but what to place in it? Be patient, I will try to do it with your recommendations during the next week-end. Many thanks |
Quote:
Quote:
P.S. If you have large files, you can use a service like dropbox (free up to 2GB). Best, |
RhoPorousSimpleFoam case with instability
Quote:
Here it is. I follow your suggestion and place a complete case very similar in boundary conditions as the one I try to solve, and run it Sunday evening. This case presents all the typical behavior I mentioned previously. Here I have also reduced p relaxation factor down to 0.0025, and even like that it is still unstable. The dropBox links to get the full solved problem is http://dl.dropbox.com/u/21252587/14cfdtest.tar.gz (Sorry for the size of the full simulation ~1.4GB, I think it is better you get all to understand). I used RhoPorousSimpleFoam because I finally want to use the porous element I place in the middle part, but for the moment (to simplify) the Darcy parameters are so low that they do not influence. Moreover, I never see instability from that porous area. Have a look with paraFoam making a slice at middle XZ plane. The exhaust pipe show very clear instability with time (like waves) that I can really not understand. In my other models these sudden instabilities sometimes happen in the larger inlet pipe during transition regime, although I am very far from my Mach 1 objective at the outlet section ( I wish to decrease progressively the outlet pressure to force the simulation to reach M1 at the outlet pipe). From what I read, description of problem from other participant to this forum are sometimes similar. Could you help us? Many Thanks |
my case converged
2 Attachment(s)
Dear ptbs,
My low Mach cylinder case in a small tunnel (almost a duct) converged. The waves still does appear but they are not as critical as before. I used the OF1.6-ext instead of OF1.7.1. It helped a lot in convergence. See attached the fvSchemes and fvSolution. Also pay attention in your boundary conditions. Place adequate values for k, epsilon, mut and alphat. Regarding U and p, you should take even more care with the combination of types. Take a look in the tutorial for rhoPorousSimpleFoam. It will help you. Regards, aertothermal Attachment 6523 Attachment 6524 |
Quote:
Best, Alberto |
Hi Alberto,
I do not know yet the causes but I am still investigating. The mesh is tetra based with one region and a prism layer around the cylinder. From wikki site I saw that 1.6-ext has some extra capabilities over 1.7. Quote:
Regards, Guilherme da Silva |
Yes, but that only applies if you use reconCentral scheme, at least in my understanding.
Anyway, if you find something, please let us know! :-) |
Quote:
The under-relaxation factors do not make much sense to me. You relax way too much the pressure, and way too little the density. Better values: rho - 0.05 p - 0.3 The minimum bound on pressure is too close to the value at the outlet (iterations might trigger bounding too easily). Also, are pressures set to physical values? 120 Pa? Additionally, use leastSquares for gradients computation: Code:
Finally, do you work with a modified version of the solver? Your fvSolution has a nUCorrectors, while the correct syntax in rhoPorousSimpleFoam is nCorrectors. Best, |
One thing that helped a lot was to mirror the mesh.
In case of cylinder I mirrored it at mid plane from top to bottom. So the numerical disturbances did not cause any further symmetry issues. |
Hi, in Patty's case the mesh seems OK. I run the for a while, and the solution is smooth. Instabilities originate from the outlet (meaning they probably depend on some physical element not set properly), but that I cannot know for sure since we do not know the details of physical problem.
|
OK. I am downloading it now to take a look.
|
Quote:
I will have a look at your comments and I am very interested hearing even more from you if you make some more tests on this case. Concerning the physical problem, the case I gave is just an illustrative way to show you the instability I have in my study, as such no real meaning excepted I need very low pressure i.e. very low density. For a more practical case (I can not describe) just imagine that you want to homogenize a pressure and a flux (thanks to the porous part not yet used) before an exit which is at such a low pressure that you reach sonic speed... In this test case, I take air at room temperature. Concerning the solver, as seen in the submitted case files, I use openFoam.1.7.1 as downloaded from official site released in June 2010. I did it this classical way under a Ubuntu-Linux terminal: 1) echo "deb http://www.openfoam.com/download/ubuntu lucid main" >> /etc/apt/sources.list 2) apt-get update 3) apt-get install openfoam171 Best regards |
Quote:
You are going to have a sort of wave reflection at the outlet I think. Maybe you want to give a try to waveTransmissive BC's and an unsteady run (rhoPisoFoam, rhoPimpleFoam). Quote:
Best, |
All times are GMT -4. The time now is 01:43. |