Personal tools
You are here: Home Forum Use Re: C-grid around an airfoil, for viscous CFD analysis

Re: C-grid around an airfoil, for viscous CFD analysis

Up to Use

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Luca Cirrottola at September 26. 2012

Hi everybody,

I'm new to salome (i've been using it for less than a month), and I'm interested in hexahedral meshes for CFD simulations.

I'm trying to create a C-grid around a NACA airfoil for a 2D viscous CFD simulation in OpenFOAM. Using Python scripts, I have managed to create a face around the airfoil and to mesh it with a 2D quadrangle algorithm, using propagation of 1D hypotheses from the airfoil contour to the external boundary. Once this grid is properly refined, I will extrude it of one cell.

However, in my mesh the cells are very inclined near the wall. I'd like to ask whether there is a way to impose grid orthogonality to the face edges, as it happens when dealing with C-grid structured meshes.

I'll attach some images to make what i mean more clear.

Thank you in advance,

Luca

Attachments

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Luca Cirrottola at September 26. 2012

The first image refers to the grid i wish to create. The following one is a zoom of my current mesh.

Thanks.

Attachments

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Saint Michael at September 27. 2012

Hi Luca

I propose splitting the face around the airfoil into several logic quadrangles by lines normal to airfoil boundary (see the attached picture). Sptitting can be done using Partition.

St.Michael

Attachments

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Luca Cirrottola at September 27. 2012

Thank you, St.Michael.

I will try your hint. However, in this way, I can only satisfy the orthogonality approximately: the higher the number of partitions, the better approximation I will get. I was wondering if there is any means to put this requirement into the mesh hypotheses, but if there is not, I'll try to make your method suite my needs.

Luca

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Saint Michael at September 27. 2012

Unfortunately it's impossible to set orthogonality constraint to meshing parameters.

Maybe the mesh would become closer to your need if you created the face around airfoil from a scaled airfoil profile?


St.Michael

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Luca Cirrottola at September 27. 2012

Ok, so I deduce that the only way is to adjust the boundaries shape and to split the face into several parts, to keep the cells distortion under control as mush as possible.

Thank you, your expertise has been very helpful.

Luca

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by gned at November 12. 2012

Previously Luca Cirrottola wrote:

Ok, so I deduce that the only way is to adjust the boundaries shape and to split the face into several parts, to keep the cells distortion under control as mush as possible.

Thank you, your expertise has been very helpful.

Luca

Luca, scusa.

Sto cercando praticamente di fare la tua stessa cosa (griglia a C), programmando in Fortran (non sto ancora adoperando Salomé). Se mi riesce, vorrei poi passare anch'io a degli scritti Python. Sono quindi curiosa di sapere come è andata a finire. Tu ci sei poi riuscito? come ?

grazie,

i

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by William Tougeron at November 13. 2012

Hello Luca,

Viscous layer meshing is not easy with Salome. But I developed a user friendly Python library to do so in few steps only (and even more). It will be soon available from the VZLU website. I am finishing the documentation.

I let you know went it will be available.

Concerning your issue, you can create edges perpendicular to your airfoil by this way:

First, extrude your airfoil in its plane normal direction (eg. in the Z direction if your airfoil lies on the XY plane).

Then, create a vertex on your airfoil where you want the edge to start.

Then create a normal to the extruded surface at your vertex position. You will get a vector normal to your airfoil. You can then construct your perpendicular edge by extruding your vertex or copy it and create an edge from two vertexes.

Concerning the external viscous layer shape, I mean the "offset" of the airfoil, you can close your extruded face to make a solid. Then, you can use the offset tool of Salome (which applies only on solids) to create an offset around the whole solid. But then you can just cut this offset face with a plane and you will get your airfoil offset.

Sometimes, this offset method doesn't work properly. So you can create a Python routine which will create one hundred normal vectors around the airfoil with the method I gave above and construct one hundred offset vertexes, then link them with a spline. This is what my library does, among other possibilities.

Please, be patient. :)

William

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by William Tougeron at November 29. 2012

Hello,

The script I told about is now available. You can generate easily C grids around foils (or other things) thanks to it. I present this script here :

http://www.salome-platform.org/forum/forum_12/238346311

It is optimized for hybrid meshing but I don't see any reason not to use it for fully structured grids.

Best regards,

William

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Dirk Schweitzer at June 21. 2013

Hello William,

I'm trying to follow your instructions above. At the point

"Then create a normal to the extruded surface at your vertex position. You will get a vector normal to your airfoil."

I'm always getting normal vectors pointing into my airfoil. Is there an easy way to reverse the direction of a normal vector upon creation? I can of course rotate the vector by 180° but I'm just wondering whether there's a faster way to achieve this.

Thanks,

Dirk

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by William Tougeron at June 21. 2013

Hello Dirk,

You just have to use the Repair > Change Orientation. :)

Best regards

William

Re: C-grid around an airfoil, for viscous CFD analysis

Posted by Dirk Schweitzer at June 29. 2013

Hello William,

sorry for my late reply and thank you for your useful answer. Seems kind of obvious now ;)

Merci,

Dirk

 

Powered by Ploneboard
Document Actions