|
[Sponsors] |
November 11, 2011, 11:07 |
mesh airfoil NACA0012
|
#1 |
New Member
|
I am trying to mesh a NACA0012 airfoil.
Let me be frank and tell you that I am a complete newcomer to Openfoam and to this field of CFD.What I want to do is to compare the lift and drag coefficients for this airfoil vs same airfoil with Gurney flap(its a flap perpendicular to chord,fitted at the trailing edge more about it here http://en.wikipedia.org/wiki/Gurney_flap) I think salome is the probably good way to mesh this airfoil(but haven't tried blockmesh yet)so what i did is get co-ordinates for airfoil(using javaFoil),the number of co-ordinates is 61,then I created a wire,also created test area and cut that airfoil from test area. I am getting a very weird kind of mesh(see image) Also i am not able to convert mesh from IdeasunvToFoam. what is the most appropriate way to mesh airfoil with quadratic elements so that mesh will be fine around airfoil and at the region past trailing edge? Last edited by anand_30; November 13, 2011 at 11:02. |
|
November 13, 2011, 22:41 |
|
#2 |
New Member
|
Can snappyHexmesh be used to mesh such airfoil?can anyone please exaplain how?please shed a light on this subject...
|
|
November 22, 2011, 10:25 |
|
#3 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi there,
from your picture I see you have a 2D problem is that right? If so I would suggest you to model everything with blockmesh. For my graduation thesis I modelled a complete NACA 0012 profile with blockMesh and it was completly fine. This is how I did it: - create 8 blocks for the background domain and arrange them like follows: 0 1 2 3 4 5 6 7 Block 1 and 2 have at their "bottom" edge with the upper half of the profile and 5 and 6 at their top the lower part of the foil. to get this simply define these edges as polyline and as gridpoints you use a list with offset points (can easily be manipulated with excel and then copy and paste to blockMeshDict) The flap you can introduce with some more blocks (5 more). All this is a little bit complex when using grading but still doable ( As I told you I did it for my graduation thesis) I hope this help regards |
|
November 27, 2011, 11:58 |
|
#4 |
New Member
|
Hey Thank you very much Colin,its because of you I was able to do my first mesh in openfoam but ofcourse with lots of warnings.
Your advice proved very useful to me. (and sorry for replying late I finally got time to work on openfoam today) As you suggested I created 8 total blocks in order 0 1 2 3 4 5 6 7 The bounding box is lot bigger though,so I will have to change its length. I have attached the blockMeshDict file,the problem is I am getting al lot of warnings about negative volume. This is what I get as output from blockMesh Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.0.1-51f1de99a4bc Exec : blockMesh Date : Nov 27 2011 Time : 21:13:07 Host : lotus PID : 3787 Case : /home/anand/Documents/airfoil2d/try1/airFoil2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Creating block mesh from "/home/anand/Documents/airfoil2d/try1/airFoil2D/constant/polyMesh/blockMeshDict" Creating curved edges Creating topology blocks Creating topology patches Reading patches section Creating block mesh topology --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.25 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.1375 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 0, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0822308 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0798333 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.081032 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.081032 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0257629 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.136301 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 1, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0921153 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0949488 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.093532 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.093532 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0259808 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.161083 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 2, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.25 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.1125 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 3, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.19375 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.1375 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.25 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 4, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0822308 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0798333 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.081032 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.081032 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.136301 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0257629 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 5, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0921153 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0949488 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.093532 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.093532 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.161083 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.0259808 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 6, probably defined inside-out --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 0 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 1 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 2 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.18125 for face 3 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.1125 for face 4 --> FOAM Warning : From function cellModel::mag(const labelList&, const pointField&) in file meshes/meshShapes/cellModel/cellModel.C at line 128 zero or negative pyramid volume: -0.25 for face 5 --> FOAM Warning : From function blockMesh::createTopology(IOdictionary&) in file blockMesh/blockMeshTopology.C at line 255 negative volume block : 7, probably defined inside-out Reading physicalType from existing boundary file Default patch type set to empty --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 881 Found 8 undefined faces in mesh; adding to default patch. Check topology Basic statistics Number of internal faces : 8 Number of boundary faces : 32 Number of defined boundary faces : 32 Number of undefined boundary faces : 0 Checking patch -> block consistency Creating block offsets Creating merge list . Creating polyMesh from blockMesh Creating patches Creating cells Creating points with scale 1 Writing polyMesh ---------------- Mesh Information ---------------- boundingBox: (-5 -3 0) (6 3 0.1) nPoints: 26240 nCells: 12800 nFaces: 51520 nInternalFaces: 25280 ---------------- Patches ---------------- patch 0 (start: 25280 size: 80) name: inlet patch 1 (start: 25360 size: 80) name: outlet patch 2 (start: 25440 size: 160) name: wall patch 3 (start: 25600 size: 25600) name: frontAndBack patch 4 (start: 51200 size: 320) name: defaultFaces End I know the mesh needs a lot of modification to get good results as the leading and traling edge region should have very fine mesh,but how to get that?do I need to create more blocks or should I use cell expansion ratio or edge grading using the current blocks only? |
|
November 28, 2011, 05:13 |
|
#5 | |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi
Quote:
define x1 as z as well the only thing that matters is that you do it consistently throughout the entire domain. For these kind of issue as you mentioned the user guide is quite helpful because it describes the way blockMesh works quite good (though you maybe have to read it 2 or three times before you understand it (at least that worked for me). This also helps to avoid negative pyramids which cause your warning messages, because if you consistently define the blocks you actually don't have trouble with these. For further help I recommend you pyFoam which has a functionality for showing blockMeshDict files in a graphic window even though they might not work because of ill definitions. These kind of ill definitions are then shown and you can correct them directly. http://openfoamwiki.net/index.php/Contrib_PyFoam the feature you are looking for is called: pyFoamDisplayBlockMesh.py For the rest for me it worked out fine to use simpleGrading to get a sufficient mesh. Though the numbers are getting funny ( see therefore the attached blockMeshDict file) only for a submerged hydrofoil I used edgeGrading which was far more complex. so far I hope I could help you regards |
||
November 29, 2011, 09:16 |
|
#6 |
New Member
|
Hey thanks alot ColinB,I figured out my problem in blockMesh file,replaced all 0.1 with -0.1 to get rid of negative volume warnings,the only warning I am getting now is of undefined faces which are at top and bottom.
I can see you specified the bottom faces as inlet and top faces as outlet.Your mesh is a perfect mesh and I ran airfoil2d case using your mesh with some changes in boundry conditions U and it gave expected velocity and pressure profiles,I will also be trying to get such mesh in vacations.But the question is why everybody uses such meshes with semicircle at leading edge and then a square??Does it provide any advantage over other types such mine with only a rectangular test area or even a circle???(sorry I might sound stupid but I have just started exploring this and it fun) Another question is how you obtanied expansion ratios as 0.02631578947 or 0.25?????Is there any formula for that?? Thanks a lot for your help,I really appreciate it. |
|
November 29, 2011, 10:05 |
|
#7 | |||
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Quote:
Quote:
Another reason is the avoidance of cells with high aspect ratios. If you define your mesh without arcs you get in some corners cells which look more or less diamond shaped which influences the accuracy of the computation as well. Quote:
simpleGrading 1 1 1 went to simpleGrading 1 1 2 and ended up with 1 1 38 (or likewise) now if you take the inverse value of 38 you get a strange number which you find in my file. This is because some block are oriented contrary to the adjunct blocks and since everything has to match these values come out. Guidance for the grading was for me that the cells in front of the foil are more or less square shaped on top of the foil they should be long and flat rectangular-shaped and in the back again square shaped. |
||||
December 1, 2011, 08:08 |
|
#8 |
Member
Laurens Van Dyck
Join Date: Jul 2011
Location: Netherlands/Germany
Posts: 34
Rep Power: 15 |
One word of warning, for my graduation thesis (same uni as Colin I suppose) I worked together with a student who meshed a NACA0012 airfoil in snappHexMesh. However, at points where the unstructured triangles met with the structured boundary layer (I do assume you want a structured boundary layer if you want reasonable lift and drag coefficients) he had pressure oscillations which gave him bad results. This was for flow at around Mach 0.8. At low velocities I dont think he had that problem.
The solution was to generate a completely structured mesh (easy for the NACA0012 airfoil, a bit harder for your other airfoil). He did that with GMSH. |
|
December 3, 2011, 02:42 |
|
#9 | |||
New Member
|
Thank you very much ColinB.
Quote:
Quote:
Also initally while creating mesh I got many errors of max skewness of about 60 faces or so,I worked on blocks and their grading to get rid of it. Even now checkMesh shows my max skewness is 3.34,is it too high?? Quote:
Now I have only 6 blocks as 012 345 with 0 and 3 forming semicircle. How can I improve it further????I added the code for getting force coefficient in controlDict but how to get its value? I have attached blockMesh file of my mesh.Is it necessary that the x2 for both block 0 and 3 should be parallel to Y axis???when they one block didn't satisfy this condition I get errors from blockMesh about inconsistent faces between blocks. Last edited by anand_30; December 3, 2011 at 07:02. |
||||
December 3, 2011, 02:46 |
|
#10 | |
New Member
|
Quote:
Since i am considering a subsonic flow of very low Mach number,I don't think I will get so much uncertainties in results.GMSH I haven't used that yet though. |
||
December 6, 2011, 10:48 |
|
#11 | |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Quote:
however the skewness can be reduced with the proposed method(3.34 seems to be a good value). For further improvement use checkMesh and let it run over your mesh usually if checkMesh says your blockMesh is ok then it is OK Apart from that I suggest you to read some literature (sry I just have german books in mind, but reading wikipedias reference list of some cfd articles should give you some hints) for the rest I just can tell you that the blocks don't need to be perpendicular/parallel to any axis but they have to be linked towards each other, they have to have the same number of elements on the face they touch (which then effects the opposite side as well) and the same grading (or the inverse number if their orientation is contrary) |
||
December 11, 2011, 07:33 |
|
#12 | |
New Member
|
Quote:
Finally I got time to do this case after a hectic week of Exam(I really should have studied,i was like ) I started working on flap geomtry generation thinking that it I would be able to show at least pressure and velocity distribution tomorrow of this airfoil with flap. And as always I am stuck.The problem is with the wedge block that I have formed,its causing 6 highly skewed faces.Hence CheckMesh isn't accepting it. Also I am getting some weird mesh at leading edge region. Please Help!! |
||
December 12, 2011, 05:16 |
|
#13 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi,
again I can recommend you pyFoam: http://openfoamwiki.net/index.php/Contrib_PyFoam to check your blockMeshDict file, it really helps! In the second picture you can see (at least thats my first interpretation) that two faces are orientated contrary which gives you something like a sand clock, when you solved this problem you should get rid of the highly skewed faces. For your flap try using 6 blocks but for the location where the flap is use a different offset from a NACA Profile this should work. please don't ask me for details since I haven't done anything like that before, also don't ask me about the resulting mesh quality. regards |
|
March 7, 2022, 18:22 |
|
#14 |
New Member
jose daniel
Join Date: Apr 2020
Posts: 26
Rep Power: 6 |
I suggest you visit https://aeroptimal.com/mesh (you must create an account to use this module), where you can create a full structured airfoil mesh - https://youtu.be/4Opu0zk7gFk . You can export .su2 .msh .foam .vtk
|
|
Tags |
airfoil, mesh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] 3D Inflation mesh on an airfoil | kennyboy | ANSYS Meshing & Geometry | 1 | April 26, 2017 04:12 |
Problem with restart solution in shape_optimization.py | robyTKD | SU2 Shape Design | 21 | May 29, 2013 10:26 |
mesh size requirement for NACA0015 airfoil | zhengjg | Main CFD Forum | 0 | March 20, 2013 22:58 |
[Other] 2D hex mesh on multi element airfoil | Verfblikje | OpenFOAM Meshing & Mesh Conversion | 0 | January 19, 2012 11:55 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |