# Mesh generation for LES simulations of airfoils

Dear PyFR developers and users,

I have successfully reproduced the LES simulation of the flow around a sd7003 airfoil presented in the paper (On the utility of GPU accelerated high-order methods for unsteady flow simulations: A comparison with industry-standard tools, 2017 JCP). The results are quite good.

Now, I want to perform LES of flow around a NACA0015 airfoil with angle of attack near stall angle and Reynolds number of around 60,000. The first difficulty encountered is the mesh generation. I have the following problems:

1. In the PyFR user guide, the free software Gmsh is used to generate mesh. As seen in the above JCP paper by the developers, the mesh used in LES of flow past airfoil is complex. The mesh is refined near the airfoil and in the rectangular wake region, and then quickly coarsened outside these regions. So, is there any example script that can be read into Gmsh to generate such a complex mesh for a LES simulation or any guide for complex mesh generation?

2. For a LES simulation, the grid resolution (dx, dy, dz) in streamwise, wall-normal and spanwise direction respectively must satisfy certain criterion. According to the above JCP paper, y+ in the first layer of mesh near wall is around 0.4. So, what is the grid spacing in streamwise (dx) and spanwise (dz) direction if the Reynolds number is around say 60,000?

3. Pointwise17.3R4 can generate mesh for PyFR. However, its seems that in Pointwise, one cannot specify periodic boundary conditions and there is no option for periodic BC. So, how can we impose the periodic BC when pointwise is used.

It will be greatly appreciated if anyone can help answer the above questions or give some suggestion.

Best regards,

Jianguo

Hi JG

3. Pointwise has a writer for the native format of PyFR However, that writer does not support periodic b.c. at the moment.
The workaround is to use the gmsh writer. So create your mesh in Pointwise making sure the periodic surfaces have the same mesh (1to1 matching). Then select as solver gmsh and assign each periodic surface a name using the convention ‘periodic_ntrasfor_side’, where ntransfor is an integer defining the periodic transformation (there can be more than one) and side is either l or r.
So for instance, you could have the two periodic surfaces named ‘periodic_0_l’ and ‘periodic_0_r’.
Note that in the PyFR .ini file periodic surfaces should no be specified; that information is inferred from the mesh.

Also, for high angle of attack simulations, you may find this paper useful:
https://arc.aiaa.org/doi/10.2514/1.J055304

Best
Giorgio

1 Like

Let me put my two cents into the topic of GMSH regarding the questing 1. I’m a user, too.

Seems to me the process of creating such mesh in GMSH uses boundary layer refinement field and box refinement field. The boundary layer refinement field is only available in a 2d case, so you will have to create a 2D plane and “extrude” it to a 3d domain. It’s also the only way of generating conformal mesh on the two surfaces which you are going to apply periodic condition on. To create your 2D plane, you might have to get the coordinates of the airfoil surface nodes first.

I hope it helps. gmsh script can be lengthy…

Junting

Hi Jianguo,

I can try to help with your first two questions.

1. As mentioned by Junting the first thing to do when generating the 3D airfoil mesh is to start by generating a nice 2D mesh. You then extrude in the spanwise direction. For the initial 2D mesh you can build some structured mesh faces in the boundary layer using the “transfinite line”, “transfinite surface”, and “recombine” options in gmsh. Then, in the unstructured farfield you can use the “Box” mesh refinement option, which lets you specify the element size inside the box and outside the box. Also, make sure to use at least the “set order 2” option in gmsh once the mesh is built, which will use quadratic curves to represent the surface.

2. In the paper, the y+ that is reported is that of the first solution point off the wall when using Gauss points. Since you have the mesh and therefore element sizes, and the Gauss point locations which can be looked up, you should be able to compute the x+ and z+ values from that information.

Hi,

same problem here.
I’m struggling a bit in generating mesh at TE, only been able to generate a fan which would limit the dt on too small values because of the cell that are too small in these region

How via gmsh one can achieve a mesh similar to that of the sd7003 case? (I’m using python api)

This is what I’ve got

This is the SD7003

It seems that no one in the community really seems to know how to do this. I normally use Pointwise, so can’t really be of any use and these meshes where generated by some of the wider PyFR team quite some time ago.

Somewhere you might like to seek help from is the gmsh git. https://gitlab.onelab.info/gmsh/gmsh/-/issues

I suspect the mesh had its boundary layer made by hand rather than using the functionality built into Gmsh. So it was broken up into regions (shown by different colours in the image) and then a structured grid was created inside each of the regions.

Regards, Freddie.

I do agree with you Freddie, unfortunately it is very time consuming such a procedure in gmsh, I’ve hoped someone already did that