|
[Sponsors] |
November 13, 2016, 14:41 |
Structured mesh around airfoil
|
#1 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
Hello all,
I'm trying to simulate the flow around the airfoil 23012. Using matlab, I have created an unstructured mesh, starting from the node point of the airfoil (you can see as attachment), then achieved the .msh file i've imported in openfoam successfully. Now i have two separated problems: The first one is: simulating the airfoil (using simpleFoam) with various attack angle under 15° to avoid the complete separation (with the advised setting in the tutorial incompressible->simpleFoam->airfoil2D), i have obtained a flow very bad almost detached and it is not possible. How can i fix it? The second one is: I'm wondering how to create the structured mesh (maybe using snappyhexmesh), starting from my unstructured mesh. How can I create the stl? Could you kindly help me? Thanks in advance |
|
November 13, 2016, 15:11 |
|
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Nicola,
I suggest you to firstly run simulations on well known airfoil such as NACA0012 so you know that your numerical setup is OK. Have you done mesh independence study? The radius of your mesh should be approximately 50-500 chord lengths. How about your turbulence model and first cell size (yPlus)? SnappyHexMesh results in unstructured mesh. BlockMesh creates structured meshes but it is quite difficult to use. I would suggest you to use hyperbolic extrusion algorithm which is easy to use and results in high quality mesh. There are a few open-source softwares with hyperbolic extrusion such as Construct2D (https://sourceforge.net/projects/construct2d/), Overture (http://overtureframework.org/) and Cassiopee (http://elsa.onera.fr/Cassiopee/). Construct2D is minimal grid generator for airfoils and could suit perfectly for you. Regards, Mikko Last edited by Flowkersma; November 13, 2016 at 17:46. |
|
November 16, 2016, 03:20 |
|
#3 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
Thank you very much for answering me, with your advices i succeeded in fixing some problems.
I am using Spalart Allmaras Ras model. Now, i am very keen on learning something else about the software you suggested me, Construct2D. It is recommended to use it on linux or windows? Another important question for me is the meaning of the relaxation factor inside fvsolution(or fvscheme) and the correct value for Nut and NuTilda in 0 folder (velocity=45, nu=1.5e-5, Re=3e+6, rho=1.225). Again thank everyone who would helps. |
|
November 16, 2016, 05:21 |
|
#4 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Construct2D should work with all common operating systems and it comes with already compiled binaries.
Spalart Allmaras is already decades old model so you should be able to find easily the recommended boundary conditions by googling a bit. Same goes with the under relaxation factors. If you are using a new version of the "official" OpenFOAM you can also enable SIMPLEC algorithm which allows using higher relaxation factors (e.g. here, lines 40 and 50-57). |
|
November 17, 2016, 11:54 |
|
#5 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
I installed successfully Construct2D and running the program I have created 3 files (.p3d and .nmf) but there is no way to import the file into a in Openfoam.
How can i solve it? |
|
November 17, 2016, 12:16 |
|
#6 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
OpenFOAM comes with utility to convert Plot3D format to OpenFOAM. Example:
Code:
plot3dToFoam nameofyourfile.p3d -singleBlock -2D 1 -noBlank |
|
November 17, 2016, 12:48 |
|
#7 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
Yes, thanks again.
Now i have a great structured mesh but with only one patch inside constant/polymesh called "wall". At least I need other two patch/boundary in order to manage a simulation, i mean FrontAndBack and velocity-inlet. How can i enter the nFaces and startFace setting? I have also used the autoPatch utilities but it creates automatically several patch, maybe useless. |
|
November 18, 2016, 04:24 |
|
#8 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
If you look at the utilities that I mentioned in my previous post, you will be able to do everything you need. Firstly, split the mesh with autoPatch and then "collect" and rename the relevant to patches to desired boundaries with createPatches utility. You will need at least three patches: farfield, frontAndBack and walls.
|
|
November 18, 2016, 08:28 |
|
#9 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
I have already tried what you had suggested me.
autoPatch created 296 patch inside boundary Then I added createPatchDict in system folder, but running createPatch in the terminal, I got an error as you can see as attachment. Before using createPatches utilities should I modify polyMesh/Boundary ? Is it corrected the file i have created? Thanks again and again. |
|
November 22, 2016, 08:17 |
|
#10 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
I really do not know how to solve it...
|
|
November 22, 2016, 08:50 |
|
#11 | ||
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Here are the steps to a mesh for naca0012 with blunt trailing edge (o-grid). You can find the .dat file from the Construct2d sample_airfoils directory.
1. Run Construct2D and create the mesh Code:
construct2d path/to/construct2d/directory/sample_airfoils/naca0012.dat grid smth quit Code:
plot3dToFoam naca0012.p3d -2D 1 -singleBlock -noBlank Code:
autoPatch 45 -overwrite Quote:
Quote:
|
|||
November 22, 2016, 10:05 |
|
#12 |
New Member
Nicola Forconi
Join Date: Nov 2016
Posts: 7
Rep Power: 10 |
Finally it works perfectly!
Thanks you very much for your kind availability! |
|
August 14, 2019, 05:24 |
|
#13 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 17 |
Hello Flowkersma,
This post helped me a lot to create the mesh. Thanks a lot! I had a query regarding this, I need a blunt aerofoil to study the effect of cavitation thus I use interPhaseChangeFoam. In this I need to explicity mention the outlet boundary condition for pressure (fixed value) and for inlet fixed velocity value hence is it possible to have different boundary patches for inlet and outlet? Or in other words could I have 4 patches instead of 3? Many thanks! |
|
August 14, 2019, 08:39 |
|
#14 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi chandra shekhar pant,
You can use the OpenFOAM utilities topoSet and createPatch to split the farfield patch.
Best, Mikko |
|
August 14, 2019, 08:48 |
|
#15 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 17 |
Many thanks for your prompt reply. But since, I am a OpenFoam beginner and have a feeling that I don't understand that completely. Will it be possible for you to simplify this post? In which directory, may be system (where the createPatchDict)? It will be very helpful and kind if could elucidate the post as you have explained earlier.
Thanks again for the help. |
|
August 14, 2019, 11:47 |
|
#16 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 17 |
Thanks for letting me know the way, after getting your clue I am trying it. Hope it will work.
Thanks! |
|
August 18, 2019, 11:23 |
|
#17 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 17 |
Hello Mikko,
I am finding it difficult to write the topoSet, thus won't it be possible if I directly change the createPatch (which you had written in the post). Lets say I put the auto4 to outlet and auto3 as inlet? Although not sure about the notations "auto". Sorry for bothering you again and again. Thanks! |
|
February 3, 2021, 10:44 |
How can I find out which parts belong to each other?
|
#18 |
New Member
Alex
Join Date: Feb 2021
Posts: 5
Rep Power: 5 |
Hello together!
After using autopatch 45 I'll get unfortunatly 6 patches: Code:
Create time Create polyMesh for time = 0 Mesh read in = 0.16 s Feature:45 minCos :0.707107 Assigned 34551 faces to patch auto0 Assigned 34551 faces to patch auto1 Assigned 198 faces to patch auto2 Assigned 123 faces to patch auto3 Assigned 1 faces to patch auto4 Assigned 125 faces to patch auto5 Assigned 349 faces to patch auto6 End 1. Why do the differ by using autpatch? 2. How can I find out which patches belong to which part of the mesh. The opening in paraFoam give me a segmentation fault? Moreover the automatic patches dont looking good to me. I cannot imagine why one patch only has 1 face. Thank you! P.S. Sorry I am completly new in OpenFoam, maybe there is just an easy mistake |
|
February 3, 2021, 14:51 |
|
#19 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi Alexander,
1. autoPatch divides the boundary faces based on the feature angle that you give it as an input. If you are using a different airfoil than the one that I am using above, you may get more patches. Try using exactly the same airfoil or try to increase the feature angle from 45 to 85 degrees. 2. Can you open any OpenFOAM case with paraFoam or is the crash related to this case only? You can try using ParaView's native reader by running following commands in the case directory: Code:
touch foam.foam paraview foam.foam Best, Mikko |
|
March 3, 2021, 18:31 |
|
#20 | |
Member
Join Date: Feb 2021
Posts: 30
Rep Power: 5 |
Quote:
Hi Mikko, Can you please elaborate on this? after having created the mesh, used autoPatach, and createPatch, what are the next commands? Thank you |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 AOA optimization | 454514566@qq.com | SU2 | 9 | March 7, 2022 17:17 |
Volume mesh for Cyclone separator | Rajan | Pointwise & Gridgen | 17 | May 4, 2014 06:38 |
[snappyHexMesh] How to Do External Mesh for Airfoil sHM | msuaeronautics | OpenFOAM Meshing & Mesh Conversion | 1 | September 23, 2012 05:00 |
[ICEM] Unstructure Meshing Around Imported Plot3D Structured Mesh ICEM | kawamatt2 | ANSYS Meshing & Geometry | 17 | December 20, 2011 12:45 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |