|
[Sponsors] |
March 2, 2022, 10:59 |
Uncontrolled blowup in simpleFoam
|
#1 |
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Hello everyone.
I am a new user to OpenFoam and I would like to use this tool to obtain a base flow in a axisymmetric jet flow at Reynolds 10^4. I have started with the case detailed in : https://turbmodels.larc.nasa.gov/jetsubsonic_val.html that I refer to as ASJ. Using NASA's mesh in an incompressible setting, with significantly slower flow and a velocity driven inlet, I have obtained results for simpleFoam with a SA model that look reasonable (see step 500 attached). This case is at Re=10^5. My case file is attached, I use the mesh available at : https://turbmodels.larc.nasa.gov/Jet..._129.p3dfmt.gz. Copying the p3dfmt file inside the case and using ./Allrun should work. However, when I try my own mesh made with gmsh (nozzle case) the calculation always blows up in about 10 iterations (floating point error, arbitrary velocities, there's a picture at the first calculation step attached). I have made minimal changes compared to the above case - running a diff --recursive between the two provided case directories should return 4 entries only.
Changing mesh refinement (my mesh is less adaptative than the NASA one but finer by one order of magnitude), time step or viscosity doesn't seem to help. I cannot share my mesh file because of attachment size constraint, but I can share the .geo file. I'm running gmsh v4.7.1 and openfoam v2112. I'm out of ideas. |
|
March 2, 2022, 11:16 |
Scaled mesh
|
#2 |
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Writing the above message there was a scale difference in the geometry between the cases. It's removed in the attached geo file, my problem remains.
|
|
March 24, 2022, 06:07 |
|
#3 |
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Implementing a continuation method for viscosity (incrementally reducing viscosity, see Viscouscont script) and a structured mesh (see attached pictures, the .geo file is also included) allows me to get more results, but I still get a blowup before getting to interesting regions.
Worse, the flows I am getting look laminar (see the attached picture, meant to be a Re=10^3 flow right before blowup, the inlet wall is a 2D baffle) - which raises the question of why to go for a RANS model to obtain something a Newton solver could have spewed... I am pretty disappointed with OpenFoam. It is a very opaque tool (I once had a gmshToFoam error because of excessive refinement on a boundary that was more misleading than human-readable), the documentation is spread across very shallow guides, gigabytes of tutorials and a wiki that's more designed for supporters of the software than end user and often presents a single line of explanation for the meaning of anything. Besides, my previous posts on this forum (very old-school) have gone unanswered despite almost 80 views. I feel like OpenFoam is only open-source in name and designed for paid users - when confronted to any practical problem with it, one has to know an expert to get anything done... Last edited by Quentin Chevalier; March 28, 2022 at 05:54. |
|
March 24, 2022, 07:10 |
|
#4 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Without full understanding of your case... You have a disputable mesh: High aspect ratio, sudden changes of element sizes come into view. It looks unnecessary complex for me.
My recommendation: Start with an setup more straightforward, less nodes, lower Re, stay with blockmesh. Use first simple 2d and not a wedge. And look what happens. > I am pretty disappointed with OpenFoam. It is a very opaque tool I don't sign this. In contrary, nothing is hidden here. But you need to understand what you do. OpenFoam is not pocket calculator.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 24, 2022, 09:30 |
|
#5 |
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Thanks for the input !
As said in my first post, my progression went from a case with a provided mesh (attached, it looks complex with elongated structures to me) to the same physical equations being solved with my geometry (created with gmsh, that I knew how to use). I understand how the entire process looks debatable from the outside, but I think my mistake instead comes from thinking it would be simple and easy to extrapolate from this case to my case. I've been at it for months now. I'm pretty sure part of the blame lays with me, but I still can't help but feel it shouldn't be this hard to move from one mesh to another. On the whole, OpenFoam seems extremely sensible to mesh quality. Last edited by Quentin Chevalier; March 28, 2022 at 05:54. |
|
March 24, 2022, 10:15 |
|
#6 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Nevertheless, you need a point where to start. If changing the mesh is not an option that change the physics. Start with potential flow, change to laminar and then to low Re flow. And look what happens.
Often, boundary conditions are unphysical or at least introducing instability. A sketch of your case with the b.c. would be helpful. So wen don't need to analyze your files in the first step.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 25, 2022, 13:23 |
|
#7 | |||
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Quote:
Quote:
Not sure how to quantify "less nodes", and I'm definitely not diving into blockMesh. I have made a simpler mesh (picture attached, as well as the whole case) and calculations run until about the same viscosity. As before, there's a pressure blowup at the top right that gradually breaks everything down (again, picture attached). Quote:
Maybe there's something wrong with these but I have difficulty to see how they produce a blowup... I'll stress again I don't observe this in the NASA case. On the other hand, this could have something to do with the "relative" small dimension in R ? I'll think about it. Last edited by Quentin Chevalier; March 28, 2022 at 06:57. |
||||
March 25, 2022, 15:29 |
|
#8 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
I don't understand your b.c. for U. You have three inlets with differen velocities. Are there regions where the meet? Most probably. What happens in the corner elements?
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 25, 2022, 16:37 |
|
#9 | |||
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Quote:
Quote:
As for far & coflow, I believe these two are compatible with u<-(0.1 0 0), this corresponds to the maximum of the hyperbolic tangent profile at r=r_1. Again, at the x,r=0,r_1 corner, I expect u_y=u_z=0. Quote:
I'm not entirely sure what happens at the bottom with the wedge condition to be perfectly honest. Now in the case files there are three codeStreams because of the initial condition that is taken to be the extension of the boundary condition at x=0 all across the domain. In other words at t=0, there is a cylindrical double hyperbolic tangent with u=0 at the shear layer in place of a jet (it's very clear at step 0 of the Viscouscont script). This could be an issue I suppose, but my blowup occurs so late that I think it's a stretch. I think of this initial condition as more of a shortcut to get results faster. |
||||
March 26, 2022, 02:22 |
|
#10 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
> The two inlet profiles meet at the wall where all three BCs (inlet, wall, & coflow) should be compatible and go to u<-(0 0 0).
yes, I see. I recommend calculation to time shortly before exploding. Then reduce time step by far and restart calculation. In the p and U graphics you should where the irregulariyte starts.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 26, 2022, 10:56 |
|
#11 | ||
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Quote:
Quote:
|
|||
March 26, 2022, 11:38 |
|
#12 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Refining the mesh ist not the first thing I would do. Rather omitting the tanh b.c. firts end replacing by a wall.
You may change to pimple Foam and use my timestep advice. I don't use simpleFoam very often because pimpleFoam finishes with steady state too. But may be you may stop the simulation at at certain point and re-run it "slower", means slower convergence. It is important to see where the problem ist. I see problems with the mesh. But of course, I am not sure.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 26, 2022, 15:32 |
|
#13 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Please check the mesh quality with "checkMesh -allGeometry -allTopology", and see any differences in the mesh metrics for the meshes you have. Please do use the same boundary conditions you have used for the NASA case as a first step (just try to replicate the NASA setup as closely as possible.)
For "simpleFoam", using "consistent true;" (SIMPLEC; you will need to change the relaxationFactors, especially p=1) and "bounded" for the schemes can improve the numerical stability. See the web for further info. And a small warning: OpenFOAM is not free and, to my knowledge, it was never free or was never meant to be. I think it is only another business model, which Google and Facebook use a version of it as well (they are also not "free".) So if you do serious/paid work and are short of time, you may need serious/paid help or training.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
March 27, 2022, 01:41 |
|
#14 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Just another thought: What kind of b.c. do you have at the upper and lower wall? Your input stream is full developed there and the b.c. should bi symmtrical or slip. If you have a wall (noslip) bent the wall slightly around the corner.
OpernFoam is free in the sence that is under the Free Software License. https://openfoam.org/licence/ But it is not a free lunch.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 28, 2022, 05:57 |
|
#15 | ||||||
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||||
March 28, 2022, 06:22 |
|
#16 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
> Let me get this straight - you are telling me to replace the inlet BCs that are driving the flow by walls ?
only the two tanh conditions. We have to be sure that they don't arise a problem. > top boundary is called far, it has a no slip condition. It has atmospheric pressure and a prescribed velocity that is purely axial I don't recommend this. If there are tiny differences in the velocity you have nonphaysical b.c. I recommend at least first a slip b.c.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 28, 2022, 06:55 |
|
#17 | ||||
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Quote:
Quote:
Quote:
Quote:
Last edited by Quentin Chevalier; March 28, 2022 at 10:30. |
|||||
March 28, 2022, 11:48 |
Summary
|
#18 |
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
To sum things up :
|
|
March 28, 2022, 11:50 |
|
#19 |
New Member
Quentin Chevalier
Join Date: Jan 2022
Posts: 15
Rep Power: 4 |
Ok I have a fix it works fine now.
The secret sauce was a much stronger coflow. with a 1% coflow I was getting instabilities, with a 5% one I get stable stuff, even when dropping continuation, reducing mesh quality, and shrinking the box. Thanks for your help folks. |
|
Tags |
axis symmetric, gmsh 4.7.1, simplefoam convergence |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simpleFoam tutorial PitzDaily using Reynolds stress tensor (LRR RASModel) | dlahaye | OpenFOAM Running, Solving & CFD | 24 | August 4, 2023 15:29 |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 16:26 |
simpleFoam parallel solver & Fluent polyhedral mesh | Zlatko | OpenFOAM Running, Solving & CFD | 3 | September 26, 2014 07:53 |
Trying to run a benchmark case with simpleFoam | spsb | OpenFOAM | 3 | February 24, 2012 10:07 |
SimpleFoam pipe flow velocity blowup | gzink | OpenFOAM Running, Solving & CFD | 0 | June 9, 2006 17:52 |