CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Other] OpenFOAM mesh generation of an aerofoil (https://www.cfd-online.com/Forums/openfoam-meshing/112162-openfoam-mesh-generation-aerofoil.html)

Thomas Jacob January 23, 2013 04:33

OpenFOAM mesh generation of an aerofoil
 
Please suggest a method to generate an aerofoil profile using random points in OpenFOAM.Kindly help me as I am a beginner in OpenFOAM.This is a part of my final year project.

vainilreb January 23, 2013 04:46

Hi Thomas,

I don't know if this is the best way to do it, but there are several NACA generators, like this one. It creates the point coordinates for you. Then you could use gmsh to create the geometry. Make a small slice, if you want to do it in 2D. Then mesh it, save the mesh as an stl surface mesh and create a hexagonal mesh with snappyhexmesh.
Or simply generate a tetragonal mesh with gmsh.
I did this for a project at university two years ago and it worked out fine.

Best regards,

Robert

linnemann January 25, 2013 03:16

Hi

you can try this pre-Alpha software http://sourceforge.net/projects/cmeshfoil/

It might do what you want but I dont know if its working properly as I havent tested.

elvis January 25, 2013 04:40

Hi,

maybe sourcecode from http://sourceforge.net/projects/bladedesigner/ can be changed for your need as well. It was made to create mesh for OpenFoam at least and (python)scripting capabilaties are included.

Others looked at Salome http://www.salome-platform.org/forum/forum_10/367832063

alternative Salome =>pythonflu http://pythonflu.wikidot.com/hybridflu => OF

Or Blender http://openfoamwiki.net/index.php/Tut_andrew_blender

http://jak-o-shadows.users.sourcefor...blairfoil.html

Blender can be imported into engrid

haakon January 25, 2013 05:55

You might want to have a look at the scripts posted here: https://www.hpc.ntnu.no/display/hpc/...l+Calculations which describe the meshing around a NACA 4-digit airfoil.

There are two scripts: one that make an STL-file that you can use in combination with snappyHexMesh, and one that makes a blockMeshDict-file for a C-mesh. They both have their advantages and disadvantages, and you should probably play around with both if you are not very familiar with OpenFOAM.

immortality April 14, 2013 13:54

hi
how to download and compile cMeshFoam and bladeDesigner?

linnemann April 15, 2013 14:30

Hi

Found this awesome page but I do not know who created it.
Please let the author cometh forth to get our appraisal.

Well basically it can create a blockMesh dict file for a blade geometry.

http://hvirvel.dk/airfoilmesher/

Try it out.

MadsR July 29, 2013 11:05

Thanks for the kind words :)

I made it some years ago - it has its flaws I am sure, but seems to be used quite a bit. You are of course most welcome to send me feedback.

Mads


Quote:

Originally Posted by linnemann (Post 420757)
Hi

Found this awesome page but I do not know who created it.
Please let the author cometh forth to get our appraisal.

Well basically it can create a blockMesh dict file for a blade geometry.

http://hvirvel.dk/airfoilmesher/

Try it out.


s.m August 13, 2013 15:33

Quote:

Originally Posted by immortality (Post 420482)
hi
how to download and compile cMeshFoam and bladeDesigner?

Ehsan , do you learn how should download and compile cMeshFoam and bladeDesigner?

please tell me if you found:)

immortality August 13, 2013 16:39

I downloaded what has come in post #7 (airfoilmesher) Saideh.
it was interesting.you can email the creator if have any questions.

s.m August 14, 2013 04:55

Quote:

Originally Posted by immortality (Post 445539)
I downloaded what has come in post #7 (airfoilmesher) Saideh.
it was interesting.you can email the creator if have any questions.

yes i saw that site yesterday , but i can't find how should i download it a last.

immortality August 14, 2013 05:12

email him:madsreck(at)gmail.com
he replies friendly and quickly
ask him if he could give you the program.

MadsR October 22, 2013 06:51

Just to clarify: there is nothing to download from http://hvirvel.dk/airfoilmesher/ . You just upload your airfoil x,y data and you get a blockMeshDict thrown back in your face :)

Mads

s.m October 22, 2013 08:24

Quote:

Originally Posted by MadsR (Post 458257)
Just to clarify: there is nothing to download from http://hvirvel.dk/airfoilmesher/ . You just upload your airfoil x,y data and you get a blockMeshDict thrown back in your face :)

Mads

Thank you MadsR, but i can't access the site that you have been addressed:o

MadsR October 22, 2013 09:10

Hi saeidehmohamadi,

then there is something wrong with your Internet connection...I just checked from a remote place and it works just fine.

Mads

immortality October 22, 2013 11:41

Hello dear MadsR,
I want to have an airfoil with a channel into it(from bottom of attack region to the top of back of airfoil),can it be done with your code?
could you make some corrections in the code and upload in the page?
the channel will be a line,the user can assign thicknes,the start point and the angle of it and your program will make the mesh and return it backto the user.
could it be done without a too much efforts?
thanks.

MadsR October 23, 2013 07:54

Ehsan, not really sure what you mean. Anyway I don't think I will customize the mesher much, I am thinking maybe implementing some more general functionality at some point, but not at the moment.

Mads

zahid hussain September 28, 2014 06:37

hi plz tall me tha procedure creating airfoil on ansys cfd i have co-ordinates but i dont know how can i creat tha airfoil.....plzzz its argent

yrganiri May 7, 2015 07:14

Airfoil Meshing
 
4 Attachment(s)
Hi everyone,

I am running tests on the RAE2822 transonic airfoil http://www.grc.nasa.gov/WWW/wind/val...af/raetaf.html and I already have a mesh which looks like in the picture (closeup and afar)

I used GMSH to generate the mesh and I would like to do something similar to what I have found in a book online http://www.pdas.com/refs/tm81198.pdf (pages 41 and 43) because I believe I will be getting better results.

Can you help me with that?

My Mesh closeup: Attachment 39293

My Mesh from afar: Attachment 39294

Type 1: Attachment 39295

Type 2: Attachment 39296

hk318i May 16, 2015 17:46

I think you mean hexahedral mesh instead of tetrahedral. If that what you mean, you need to use the transfinite algorithm in GMSH. Check the structured mesh tutorials for GMSH.
Also it is possible to mesh it using blockMesh, check this tutorial
https://www.hpc.ntnu.no/display/hpc/...l+Calculations



Quote:

Originally Posted by yrganiri (Post 545403)
Hi everyone,

I am running tests on the RAE2822 transonic airfoil http://www.grc.nasa.gov/WWW/wind/val...af/raetaf.html and I already have a mesh which looks like in the picture (closeup and afar)

I used GMSH to generate the mesh and I would like to do something similar to what I have found in a book online http://www.pdas.com/refs/tm81198.pdf (pages 41 and 43) because I believe I will be getting better results.

Can you help me with that?

My Mesh closeup: Attachment 39293

My Mesh from afar: Attachment 39294

Type 1: Attachment 39295

Type 2: Attachment 39296


yrganiri June 19, 2015 12:21

2 Attachment(s)
Thank you for the help.

I have tried exactly that but I cannot make gmshToFoam to work with what I have and I really don't know what I'm doing wrong.

So, I am using the data points of RAE2822 and surround it with a C-type grid.

It looks like this: Attachment 40246

Now, my problem is that in order to make it look like that, I used many line loops and plane surfaces and I don't know how to name the physical surfaces:

Code:

Physical Surface("back") = {1042,1020,1064,1108,1125,1086};
Physical Surface("front") = {50,52,54,55,53,51};
......

I am attaching the .geo file Attachment 40247

The gmshToFoam output is:
Code:

...
Mapping region 2 to Foam patch 0
Mapping region 1 to Foam patch 1
Mapping region 4 to Foam patch 2
Mapping region 5 to Foam patch 3
Mapping region 3 to Foam patch 4
Cells:
    total:0
    hex  :0
    prism:0
    pyr  :0
    tet  :0

--> FOAM FATAL IO ERROR:
No cells read from file "naca5012_step3_structured.msh"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?
...


hk318i June 19, 2015 12:35

I had a quick look

Code:

Physical Volume("internal") = {50,52,54,55,53,51};
This definition is wrong because you don't have these volumes.

It should be
Code:

Physical Volume("internal") = {1,2,3,4,5,6};
Try it again and see if you have another problem.


Quote:

Originally Posted by yrganiri (Post 551245)
Thank you for the help.

I have tried exactly that but I cannot make gmshToFoam to work with what I have and I really don't know what I'm doing wrong.

So, I am using the data points of RAE2822 and surround it with a C-type grid.

It looks like this: Attachment 40246

Now, my problem is that in order to make it look like that, I used many line loops and plane surfaces and I don't know how to name the physical surfaces:

Code:

Physical Surface("back") = {1042,1020,1064,1108,1125,1086};
Physical Surface("front") = {50,52,54,55,53,51};
......

I am attaching the .geo file Attachment 40247

The gmshToFoam output is:
Code:

...
Mapping region 2 to Foam patch 0
Mapping region 1 to Foam patch 1
Mapping region 4 to Foam patch 2
Mapping region 5 to Foam patch 3
Mapping region 3 to Foam patch 4
Cells:
    total:0
    hex  :0
    prism:0
    pyr  :0
    tet  :0

--> FOAM FATAL IO ERROR:
No cells read from file "naca5012_step3_structured.msh"
Does your file specify any 3D elements (hex=5, prism=6, pyramid=7, tet=4)?
Perhaps you have not exported the 3D elements?
...



yrganiri June 19, 2015 12:45

Ok, so now the checkMesh fails (when I use transfinite)

Code:

Checking geometry...
    Overall domain bounding box (-7.07107 -5 0) (5 5 1)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (1.63561e-17 9.81367e-18 -1.21481e-14) OK.
 ***High aspect ratio cells found, Max aspect ratio: 2729.23, number of cells 396
  <<Writing 396 cells with high aspect ratio to set highAspectRatioCells
    Minimum face area = 1.11556e-05. Maximum face area = 0.26532.  Face area magnitudes OK.
    Min volume = 1.11556e-05. Max volume = 0.0248775.  Total volume = 114.187.  Cell volumes OK.
    Mesh non-orthogonality Max: 88.9723 average: 40.767
  *Number of severely non-orthogonal (> 70 degrees) faces: 10057.
    Non-orthogonality check OK.
  <<Writing 10057 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 2.08422 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.


It works wonderfully if I comment all the transfinite lines and just let gmsh do its meshing work.

Quote:

Originally Posted by hk318i (Post 551259)
I had a quick look

Code:

Physical Volume("internal") = {50,52,54,55,53,51};
This definition is wrong because you don't have these volumes.

It should be
Code:

Physical Volume("internal") = {1,2,3,4,5,6};
Try it again and see if you have another problem.


hk318i June 19, 2015 12:54

It isn't easy to get the right mesh from the first trial. You can check the location of these high aspect ratio cells in paraView

makayasa June 23, 2015 14:08

3 Attachment(s)
Hello all. After converting gmsh to foam and I run , why the results in the show is not like the one in the tutorial ? I run simplefoam for airfoil2d case . Location of faults where ? How do I fix it ? This is my final project. Please advise. Thank you very much

yrganiri June 23, 2015 15:20

Quote:

Originally Posted by makayasa (Post 551805)
Hello all. After converting gmsh to foam and I run , why the results in the show is not like the one in the tutorial ? I run simplefoam for airfoil2d case . Location of faults where ? How do I fix it ? This is my final project. Please advise. Thank you very much

Did you properly edit the 0/p 0/U ... and system/controlDict files with the same patch names as your mesh? Look at this example: https://community.dur.ac.uk/g.l.ingr...torial2012.pdf

hk318i June 23, 2015 15:28

It looks like the initial conditions, zero time.

bfigueroae November 4, 2015 14:16

Quote:

Originally Posted by MadsR (Post 442615)
Thanks for the kind words :)

I made it some years ago - it has its flaws I am sure, but seems to be used quite a bit. You are of course most welcome to send me feedback.

Mads

hi MadSr. How do I cite http://hvirvel.dk/airfoilmesher/ (in a PhD thesis) ?

elmo555 March 15, 2018 10:56

Quote:

Originally Posted by MadsR (Post 458257)
Just to clarify: there is nothing to download from http://hvirvel.dk/airfoilmesher/ . You just upload your airfoil x,y data and you get a blockMeshDict thrown back in your face :)

Mads

Hey Mads,

I just tried to use your mesher with default settings (also no airfoil data file), and unfortunately the generated blockMeshDict seems to be broken:

Code:

        Basic statistics
                Number of internal faces : 4
                Number of boundary faces : 16
                Number of defined boundary faces : 16
                Number of undefined boundary faces : 0
        Checking patch -> block consistency



--> FOAM FATAL ERROR:
Block mesh topology incorrect, stopping mesh generation!

    From function void Foam::blockMesh::check(const Foam::polyMesh&, const Foam::dictionary&) const
    in file blockMesh/blockMeshCheck.C at line 228.

FOAM exiting


sibo March 31, 2019 18:38

Quote:

Originally Posted by MadsR (Post 458257)
Just to clarify: there is nothing to download from http://hvirvel.dk/airfoilmesher/ . You just upload your airfoil x,y data and you get a blockMeshDict thrown back in your face :)

Mads

Hi Mads,

I'm wondering which format should we use for the coordinates file when generating a different airfoil?

Thanks!

sibo March 31, 2019 18:51

Quote:

Originally Posted by MadsR (Post 442615)
Thanks for the kind words :)

I made it some years ago - it has its flaws I am sure, but seems to be used quite a bit. You are of course most welcome to send me feedback.

Mads

Hi Mads,

Firstly, thanks for the mesher you provided. I'm just wondering when we submit the airfoil coordinates, which format should we use?
Because I tried .dat, .txt and .rtf, they don't work.

Thanks a lot for the help!
Sincerely

sibo April 1, 2019 09:48

Hi Niels,

I'm wondering which format should we use when submitting a file?

Thanks a lot!


All times are GMT -4. The time now is 21:39.