mesh airfoil NACA0012
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?
Can snappyHexmesh be used to mesh such airfoil?can anyone please exaplain how?please shed a light on this subject...
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
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
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?
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.
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
only for a submerged hydrofoil I used edgeGrading which was far more
so far I hope I could help you
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.
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.
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.
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.
Thank you very much ColinB.
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??
Now I have only 6 blocks as
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.
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.
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)
Finally I got time to do this case after a hectic week of Exam(I really should have studied,i was like :confused:)
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.
again I can recommend you 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.
|All times are GMT -4. The time now is 07:09.|