APPLICATION OF DIGITAL CELLULAR RADIO FOR MOBILE LOCATION ESTIMATION IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 203 STUDY OF MESH QUALITY IMPROVEMENT FOR CFD ANALYSIS OF AN AIRFOIL FARAH AQILAH, MAZHARUL ISLAM1*, FRANJO JURETIC2 , JOEL GUERRERO3, DAVID WOOD4 AND FARID NASIR ANI5 1 Department of Mechanical and Production Engineering, Ahsanullah University of Science and Technology, Dhaka-1208, Bangladesh 2 Creative Fields Ltd, Dragutina Golika 63, 10000 Zagreb, Croatia 3 DICAT, University of Genova, 1, Via Montallegro, 16145 Genova Italy 4 Department of Mechanical and Manufacturing Engineering, Schulich School of Engineering, University of Calgary T2N1N4, Canada 5 Faculty of Mechanical Engineering, Universiti Teknologi Malaysia, Johor, Malaysia *Corresponding author: mazharul.islam.mpe@aust.edu (Received: 27th Feb 2018; Accepted: 19th Nov 2018; Published on-line: 1st Dec 2018) https://doi.org/10.31436/iiumej.v19i2.905 ABSTRACT: Airfoils generate lift in engineering applications such as for airplanes, wind turbines, automotive spoilers, etc. For accurate CFD analysis of airfoils, the quality of the mesh is of paramount importance, especially when dealing with turbulent flows commonly encountered in real life applications. Currently there are different tools that are available to improve the quality of the mesh required for CFD studies. This paper describes a study to assess the significant of the quality of the mesh on CFD analyses of NACA 23012 airfoil by using selected open source tools. The turbulence is modeled using the well-known k-ω Shear Stress Transport model. For validation, results have been compared with experimental datasets which were obtained from “TAG Stuttgart #1” tunnel. ABSTRAK: Sayap pesawat dapat menghasilkan daya angkat dalam aplikasi kejuruteraan seperti kapal terbang, turbin angin, spoiler automotif, dan sebagainya. Kualiti pada jaringan adalah amat penting bagi mendapatkan analisa CFD yang tepat pada sayap pesawat, terutamanya apabila berhadapan situasi aliran turbulen sebenar. Pada masa ini terdapat pelbagai perisian bagi meningkatkan mutu jaringan dalam kajian CFD. Kertas kerja ini membentangkan satu kajian bagi menilai kepentingan kualiti jaringan pada analisis CFD bagi sayap pesawat NACA 23012 dengan menggunakan sumber terpilih perisian terbuka. Model turbulen dibangunkan mengguna pakai model k-ω Shear Stress Transport (SST) yang terkenal. Bagi pengesahan, keputusan uji kaji telah dibandingkan dengan set data yang diperoleh dari terowong "TAG Stuttgart #1”." KEY WORDS: NACA 23012, OpenFoam, cfMesh, mesh quality, FVM, CFD 1. INTRODUCTION Airfoils are widely used for different engineering applications like airplanes, wind turbines, automotive spoilers, etc. Simulating the aerodynamic performance of airfoils at different angles of attack (AOA) is essential for most engineering applications which rely IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 204 on the lift (L) to drag (D) ratio. With the improvement in computing hardware and parallel algorithms, researchers and industry are increasingly relying on CFD simulations. The airfoil NACA 23012 [1] has been chosen in the present study with airfoil chord length c = 1m. NACA 23012 is interesting for some CFD analyses due to is high aerodynamic performance at low flying velocities. It develops high maximum lift coefficient (CLmax) and high stall angle (αstall). According to reference [1] , its geometric characteristics are as follows:  Thickness: 12%  Maximum thickness position: 30%  Maximum chamber: 1.83%  Maximum chamber position: 13% In the present work, the incompressible Reynolds-Averaged Navier-Stokes (RANS) equations are numerically approximated by using the open source finite volume solver OpenFOAM [2]. In the present research, a parametric CFD study of the flow around a NACA airfoil have been conducted and the significance of mesh quality on prediction of lift and drag coefficients have been discussed. 2. MESH QUALITY In CFD simulations, the accuracy of the solutions are highly dependent upon on the quality of the mesh. There are several mesh quality metrics, some of the most critical parameters are orthogonality, skewness, smoothness (also termed as uniformity, growth factor, growth rate or change in cell size) and aspect ratio. It should be noted that the present study is done for two dimensional situations only. According to reference [3] - "skewness has an adverse effect on the accuracy of interpolation on the face, non-orthogonality increases the error of the approximation of the surface-normal gradient, and nonuniformity reduces the order of the approximation of the surface-normal gradient to first order". Interested readers can consult references [4]–[7] for more information about mesh quality and influence these parameters for successful CFD analysis. Brief explanation regarding each parameters that affect the mesh quality is described below as stated in reference [8]. 2.1. Non-orthogonality Fig. 1 shows a simple representation of mesh non-orthogonality. By definition, mesh non-orthogonality is the angular deviation of the vector S (located at face center f) from vector d connecting the two adjacent cell centers P and N. Mesh non-orthogonality mainly affects the diffusive terms as it adds diffusion to the solution [8]. Fig. 1 Mesh Orthogonality IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 205 2.2. Skewness According to reference [8], mesh skewness is the deviation of vector d that connects the two adjacent cells for example P and N from the face center, f as shown in Fig. 2. It mainly adds diffusion to the solution and affects convective terms of the solution [8]. Fig. 2 Mesh Skewness 2.3. Smoothness Smoothness (also known as expansion rate or growth rate) is the ratio of transition in size between cells. Further explanation is as illustrated in Fig. 3. Large transition ratios between cells add diffusion to the solution [8]. Fig. 3 Smoothness 2.4. Aspect Ratio Mesh aspect ratio is the ratio between ∆x and ∆y as shown in Fig. 4. High AR will smear the gradients, therefore it adds numerical diffusion to the solution [8]. Fig. 4 Mesh Aspect Ratio IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 206 3. METHODOLOGY To demostrate the importance of mesh qualiy on the solution accuracy, we conducted a parametric study using open source tools. Different stages of the study and the tools used are shown in Fig. 5. Fig. 5 Methodology of investigation 3.1. Geometry Preparation The initial stage in a CFD study is preparation of the geometry. To prepare the geometry of the computational domand aaround a NACA 23012 airfoil, we used GNU Octave [9] and a script was written following the guidelines given in reference [10]. To generate the geometry, this script used the following inputs:  Angle of attack (AOA)  y+  Reynolds Number  Mach Number  Temperature  N  Bump Among these parameters,“Bump“ and “N“ vector are critical for generating good quality meshes around airfoils. A brief description about these two parameters are given below as decribed in [10]. 1. Bump: defines the degree of grid concentration around leading and trailing edge of the airfoil. When bump=1 the cell length is uniformly distributed along the airfoil contour. When bump>1 the grid are concentrated along the midchord of the airfoil. If bump is between 0 and 1, the grid will be concentrated around the edges. The quality of mesh varies with the value of bump [10]. 2. N1: Refers to the number of hexahedra cells along the airfoil chord [10]. 3. N2: Refers to the number of grid which is normal to the chord and inside a semiellipse closely enclosing the airfoil [10]. 4. N3: Refers to the number of elements located at the horizontal leading edge-inlet and trailing edge-outlet [10]. IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 207 5. N4: Similar to N3 but applied to the vertical gaps between the airfoil and the top/bottom walls defining the box [10]. 6. Specified yPlus (y+) : The value of y+ mesh variable specified at the beginning of the analysis. y+ value of 50 is use for the analyses. In this study, geometry files for generating computational domains around a NACA 23012 airfoil have been prepared for two different angles of attack which are 0o and 10o. Fig. 6 shows the computational domains of the analyses. (a) (b) Fig. 6 Computational domains of cases: (a) AOA=0o; (b) AOA=10o 3.2. Meshing The geometrical data file generated by the script is then used to generate mesh using an open-source software, GMSH [11]. The mesh files from GMSH can be converted into the OpenFOAM mesh format using the “gmshToFoam“ command in the OpenFOAM environment. Tables 1 and 2 show selected input parameters which can alter the quality of the meshes. Numerous meshes with different qualities have been investigated and only the selected ones are presented in these tables. After preparing the meshes, the quality of each IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 208 mesh have been assessed using the “checkMesh“ command in OpenFOAM and the key quality related parameters are listed in Tables 1 and 2. Table 1: Input and output for Gmsh for AOA = 0o Mesh ID Inputs Outputs bump N1 N2 N3 N4 Maximum aspect ratio Maximum Non- orthogonality Maximum skewness M13 1 400 40 30 30 665.06 69.25 1.35 M14 1 500 40 30 30 664.88 69.25 1.35 M19 10 500 40 30 30 664.88 75.90 2.85 M20 20 500 40 30 30 664.88 78.29 3.58 M21 30 500 40 30 30 664.88 79.29 4.04 M22 0.0001 500 40 30 30 664.8795 78.28 4.28 M23 0.001 500 40 30 30 664.8795 76.11 3.01 M24 0.01 500 40 30 30 664.8795 71.62 1.75 Table 2: Input and output for Gmsh for AOA = 10o Mesh ID Inputs Outputs bump N1 N2 N3 N4 Maximum aspect ratio Maximum Non- orthogonality Maximum skewness U14 1 500 40 30 30 665.1764 71.95165 1.7937 U15 1 500 40 30 30 332.5241 70.41457 1.867064 U16 1 500 40 30 30 3325.454 73.03355 1.908497 U17 1 500 40 30 30 1662.638 73.38908 1.817821 U18 1 500 40 30 30 1109.237 73.68965 1.838289 U19 1 500 40 30 30 169.8483 69.90738 1.27191 U20 1 500 40 30 30 169.8483 70.11737 1.334913 U22 0.0001 500 40 30 30 665.1764 78.28807 4.288395 U30 0.0001 500 40 30 30 332.5241 81.46802 4.287458 To determine the quality of the mesh, the output parameters which are maximum aspect ratio (AR), maximum non-orthogonality and maximum skewness of mesh have been considered. For an ideal mesh, the maximum AR should be closer to 1 and the maximum skewness should be as low as possible. Also, the maximum mesh non-orthogonality should be less than 70%. The high quality mesh case (mesh ID: M14 and U14) and the low quality mesh case (Mesh ID: M22 and U22) were simulated and the resulting aerodynamic coefficients were compared to experimental data [12]. IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 209 3.3. CFD Solutions In this study, we used the open-source numerical library OpenFOAM version 3.0.1 [2], which is a collocated unstructured finite volume solver. The CFD cases were run in a LINUX (Ubuntu 14.04 LTS) platform with 4 processor, maximum speed of 2.59GHz and a total of 12GB of RAM memory. For turbulence modelling, we used the well validated k-ω SST turbulence model of Menter with wall functions [13]. The flow is specified to be incompressible subsonic flow with turbulence intensity (TI) is set to be 0.02% with Reynolds Number (Re) of 1x106 and Mach Number (M2) of 0.04. The cases is solved using the second order unbounded gradient discretization scheme. Each case described in tables 1 and 2, is solved using a method that is at least second order accurate in space. The cases were run until the quantities of interest did not show any oscillations. 3.4. Post-processing The results obtained with OpenFOAM were analyzed using the post-processing software ParaView [14]. Also, quantities of interests (such as the residuals, lift and drag coefficient), were plotted using GNUplot [15]. To show the wake topology, we used the line-integral convulation technique (LIC), implemented in ParaView [14]. This technique, generates high density streamlines plots in two-dimensional view [16]. The LIC technique to show wake topology in this study is more preferable compared to the traditional streamlines technique due to its visualization feature of condense lines which shows the development of wake structure much clearer. 4. RESULTS AND DISCUSSION In the present study, several meshes were investigated at angle of attack, AOA, of 0° and 10o and the best mesh (in terms of mesh quality and its suitability to resolve the physics involve) was selected for subsequent detailed analysis at different AOA. To perform the steady flow simulations, the simpleFoam solver (which uses the SIMPLE algorithm for pressure-velocity coupling) was used. The results obtained from OpenFOAM are compared with experimental results adopted from experimental study at Stuttgart Tunnel #1 in reference [12]. The experimental was carried out in a wind tunnel at six Reynold Numbers ranging from 700,000 to 3,000,000 using a NACA 23012 at TI of 0.02%. To setup the case in OpenFOAM, proper turbulence related parameters were calculated for a turbulence intensity of 0.02% in order to match the experimental results. Table 3 and 4 show the aerodynamic coefficient of the analysed case studies. Table 3: Aerodynamic coefficient for cases AOA = 0o Aerodynamic Coefficient M14 M22 Experimental [12] Lift Coefficient (CL) 0.1271 0.03116 0.15 Drag Coefficient (CD) 0.01203 0.01113 0.0071 Table 4: Aerodynamic coefficient for cases AOA = 10o Aerodynamic Coefficient U14 U22 Experimental [12] Lift Coefficient (CL) 1.0501 0.9388 1.13 IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 210 Drag Coefficient (CD) 0.02447 0.02007 0.0156 M14 and U14 are the studies using good quality mesh for AOA=0o and AOA=10o cases respectively as mentioned before. It can be seen that the obtained results closely matched the experimental results. It can also be seen that although the drag coefficient doesn’t show much effect, lift coefficient shows significant difference. In the present study, a wall function has been used to resolve the boundary layer around the NACA airfoil. However, modeling drag forces for flow over airfoils in CFD analysis is quite challenging and better results are expected from transition and turbulence models. Fig. 7 and 8 show the convergence of CD and CL value of the analysis. It can be seen that a better-quality mesh, M14 and U14 (denoted by the red line) converges faster at approximately 500 time-steps compared to M22 and U22. Fig 7 Convergence of the CD and CL value for case AOA=0 o over time steps and comparison to the experimental data Fig. 8 Convergence of the CD and CL value for case AOA=10 o over time steps and comparison to the experimental data Even with the same computational capability and flow solution, M14 and U14 cases took lesser run time compared to both M22 and U22 case. This shows that with low quality mesh, it is likely to obtain acceptable results but at a cost of increased computation time. Keep in mind that non-orthogonality, skewness and non-uniformity only cause problems in the regions with high gradient variation. Therefore, in this case, mesh quality does not affect drag value much for all 4 cases. IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 211 Fig. 9 and 10 show the post-processing result from both case analysis of AOA=0o and AOA=10o using the Line-integral Convolution (LiC) technique of visualization. It can be observed that there is no wake structure developed from both of the cases. Fig. 9 LiC visualization for case AOA = 0o Fig. 1o LiC visualization for case AOA = 10o 5. CONCLUSION In this article, the effect of mesh quality on the lift and drag coefficients was studied. From the results obtained, it is concluded that the mesh quality plays an important role on the reliability, accuracy and convergence speed of the solution. It was observed that non- orthogonality and skewness has a strong influence on the solution outcome, and these values need to be keep as low as possible, which is difficult, especially for industrial meshes. From the study, we can see that lift and drag coefficient value closely matched the experimental value when using a good quality mesh. Although, drag value for low quality mesh shows an acceptable agreement with the experimental result, lift value differs significantly. It may be due to the cells with high mesh non-orthogonality and high skewness is at an area where does not affect CD. IIUM Engineering Journal, Vol. 19, No. 2, 2018 Aqilah et al. 212 ACKNOWLEDGEMENT The authors are grateful to the Ministry of Higher Education Malaysia for the RU Grant, Vot 05H25 and Research Management Center, UTM for the financial and management support. Preparation of the article was also partly supported by the Research Initiative Grant Scheme (RIGS) funded by the Ministry of Higher Education (MOHE) Malaysia. Also, the preparation of the article was partly supported by the Canadian Natural Sciences and Engineering Research Council (NSERC) and the ENMAX Corporation under the Industrial Research Chairs program. REFERENCES [1] The Foam House [http://the-foam-house5.webnode.es/products/chapter-4-airfoil-case/] [2] OpenFOAM [https://www.openfoam.com] [3] Juretić F. and Gosman A. D. (2010) Error Analysis of the Finite-Volume Method with Respect to Mesh Type. Numer. Heat Transf. Part B Fundam., 57(6): 414–439. [4] Juretic F. (2004) Error analysis in finite volume CFD. PhD thesis, University of London, Department of Mechanical Engineering. [5] Knupp P. M. (2008) Remarks on mesh quality, 46th AIAA Aerospace Sciences Meeting and Exhibit. [6] Katz A. and Sankaran V. (2011) Mesh quality effects on the accuracy of CFD solutions on unstructured meshes, J. Comput. Phys., 230(20):7670–7686. [7] Baker T. J. (2005) Mesh generation: Art or Science?, Prog. Aerosp. Sci., 41(1):29–63. [8] OpenFOAM Introductory Course Material: Module 3. [http://www.wolfdynamics.com/our- services/training/openfoam-intro-training.html?id=50]. [9] GNU Octave [https://www.gnu.org/software/octave/about.html]. [10] Airfoil simulations - A little contribution for meshing [http://code- saturne.org/forum/viewtopic.php?f=10&t=957]. [11] Gmsh: A three-dimensional finite element mesh generator with built-in pre- and post- processing facilities [http://geuz.org/gmsh/]. [12] Miley S. J. (1982) A Catalog of Low Reynolds Number Airfoil Data for Wind Turbine Applications”, Prepared by Department of Aerospace Engineering, Texas A&M University for Rockwell International Corporation, USA. [13] Menter F. R., Kuntz M., and Langtry R. (2003) Ten Years of Industrial Experience with the SST Turbulence Model, Turbul. Heat Mass Transf., 4:625–632. [14] ParaView [https://www.paraview.org]. [15] GNUplot [http://www.gnuplot.info]. [16] Knowles R. D., Finnis M. V., A. J. Saddington, and Knowles K. (2006) Planar visualization of vortical flows, Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng., 220(6): 619–627.