

24 % 25 %- bump: a value which defines the mesh concentration degree around the leading and trailing edge. N(4) is similar to N(3) but applied to the vertical gaps between the airfoil and the top/bottom walls defining the box. N(3) is the number of elements into which the horizontal leading edge-inlet and trailing edge-outlet gaps will be discretized. N(2) is the number of elements normal to the chord and inside a semiellipse closely enclosing the airfoil (a value between 25 and 100 should suffice for most applications). 22 % 23 %- N: four integers vector whre N(1) is the number of hexahedra along the airfoil chord, therefore the whole contour of the airfoil will be discretized in 2*N(1) elements. If the medium is water, it is the non-stagnated flow temperature in Celsius degrees. 20 % 21 %- T0: if the medium is air or nitrogen, it is the stagnation temperature in Kelvin degrees. Compressible fully subsonic flows should not be a problem. Although the applied formulas hold for transonic and supersonic flows, the resulting mesh might not be suitable for those cases. If the medium is water, it is the freestream speed magnitude in m/s. 18 % 19 %- M: if the medium is air or nitrogen, it is the Mach number. The reference chord and that of the airfoil in the coordinates file must coincide. 16 % 17 %- Re: Reynolds number based on airfoil chord and freestream speed. Only three posibilities are allowed, 'a' for normal air, 'h' for distilled water and 'n' for nitrogen. 14 % 15 %- eter: string defining material medium where airfoil is submerged.

Spacing between susecquent cells normal to the airfoil surface is done with an authomatically defined geometric progression. 12 % 13 %- yplus: desired y+ value around the airfoil. Also, the section plane coincides with the mesh XY plane. The mesh generated will be so in wind axis system, where wind velocity coincides in sense and direction with the positive X axis, so when defining inlet speed, Y and Z components should be zero. 10 % 11 %- alfa: desired angle of attack in degrees. If you wish to include text in your coordinates file, please add a percentage sign on the first column, otherwise an error will occur. The output file will have the same name with the string '.geo' appended. 9 %The file must be located in the active directory. The coordinates can be off-centered by small amounts. The author consider's this is useful to compare further results with experimental data. The coordinates don't need to be adimensionalized, but the program won't do it either, as the airfoil chord will be estimated automatically from it. The coordinates must be given in XFoil format starting from the trailing edge and circling counterclockwise. 7 % 8 %- archi: string which defines the complete name of the airfoil coordinates file. 6 %The on-screen output displays a summary of the input, some statistics of the mesh to be created and useful information for definition of the case in CFD softwares, specially Code_Saturne.
#Gmsh extrude layer progression code
So far this code can only deal with monoelement airfoils and 2D simulations for finite volume CFD codes. Raw file 1 function foilgmsh (archi,alfa,yplus,eter,Re,M,T0,N,bump ) 2 3 %foilgmsh(archi,alfa,yplus,eter,Re,M,T0,N,bump) 4 % 5 %foilgmsh will create a GEO file with all necessary instructions to mesh an airfoil geometry only with hexahedra in Gmsh, departuring from a set of points defining the airfoil section contour.
