In field of aerodynamic is often required to test different geometries, most of them are standard airfoils. The aim is usually to identify promising geometry for a specific application. Many operations repeat mechanically, and are tedious and time consuming. In specific, the mesh creation is a fundamental but routine task, similar but not identical for all the airfoil and all the test cases. This is where GmshAirfoil.jl comes in handy.
It allows the user to create in a few clicks a .geo file containing all the information for the open-source widely used GMSH software to create properly structured meshes. Before exporting the mesh, the user can visualize the preview, and modify almost all the parameters (number of divisions and or the growth ratio in the inlet, airfoil surface or shear ...) and see the new results in real-time. The package also adds the physical tag (inlet, outlet, airfoil and limits) to the entities relieving the workload from the user. The mesh created is compatible with the most popular CFD software (Fluent, STARCCM+). In reality, this package, was born to create airfoil meshes that are compatible with the FEM package Gridap.
The primary purpose of this package is to create a .geo that can be read by GMSH. It has been decided to write a .geo file and not directly the .msh file for three main reasons. Firstly, the .geo file is easy to read and interpret. In this way, the user can perform some easy changes directly on it, without the need to dig deeply into the code. Secondly, it can be imported into GMSH, all the parameters can be modified so the user can visually verify that the mesh is good enough for its purpose. Lastly, the API of GMSH for Julia at the moment does not provide all the features that are needed. The package is simple but quite powerful, it provides basically only two functions:
It can detect the shape of the trailing edge, that can be sharp or not, and so the mesh will be different. Meshing the trailing edge has always been troublesome for engineers due to its strong curvatures and strange shapes.
For a 3D mesh, the user can specify the boundaries surfaces normal to x-axis to be periodic.
The mesh, once the .geo file is open in GMSH, is highly customizable. The user can specify the number of nodes in the inlet section, over the airfoil, over the vertical lines, in the shear, as well as the geometrical growth of the cells. The user can also define the length of the domain. Furthermore, it creates a refinement region close to the airfoil in order to customize the parameters to have a better-refined mesh. The user can also specify the angle of attack of the profile, which is a fundamental parameters for evaluating airfoil performance. By default it is set to zero. Increasing the AoA leads the airfoil to rotate, as well as the shear and refinement mesh. Class Shape Transformation (CST) is also implemented. It allows increasing the number of points defining the profile.