Do Mesh Still Play a Critical Role in CFD ?

Figure 1: Structured multi-block CFD mesh using GridPro for Onera M6 configuration with pressure fill contour.

2069 words / 10 minutes read

Introduction

Nowadays discretization of a flow field for CFD goes by the idiom, do as you would be done by. Unrelenting studies by many researchers show that no detail is too small. This article compares standard test cases namely the NACA-0012 and the Onera M6 wing to throw light on the importance of a keen eye for the details in a CFD mesh.

The key differences in the grids chosen for the exercise are the type of elements (structured, unstructured, cartesian, polyhedral) and the way in which they are arranged to fill the domain. Each element type has its inherent merits and demerits in their ability to handle complex geometries, time taken to generate the grid, ease of handling geometric variants, solver residual convergence levels achievable, quality and accuracy of the CFD solution obtained, etc.

Unfortunately, there is no universal gridding system to address all the above CFD requirements. So the gridding approach adopted by a CFD practitioner depends on what his quest is, whether it is quality and accuracy of CFD solution or ease of grid generation or flexibility in handling parametric variants, etc, at the cost of other factors for his chosen CFD problem.

The two flow problems discussed here can throw some light on the performance of some of the common gridding systems used in the industry. The case of turbulent flow past a NACA-0012 airfoil and Onera M6 wing has been chosen for this exercise. These are popular CFD validation cases in the aerospace community with reliable wind-tunnel experiments available for comparison.

Computational domain around NACA0012 airfoilFigure 2: Computational domain around NACA0012 airfoil.

Gridding Details

Six grids were generated for the 2D NACA-0012 airfoil case. Two-hybrid unstructured grids, 2 structured grids using GridPro, one cartesian grid using SnappyHex, and one polyhedral grid. All the grids have nearly the same total cell count, the number of points on the body, and a number of layers in the viscous padding and first spacing. Only the points distribution on the body and in the field varied based on the gridding approaches and the options available in the various grid-generators. Figures 2-5 show the generated grids at different regions around the airfoil.

Zoomed view showing the cell distribution in the near vicinity of the airfoilFigure 3: Zoomed view showing the cell distribution in the near vicinity of the airfoil.

Appreciating the Diversity in Grids

Though the gridding guidelines followed is the same for all the grid types, each grid seems to have their own characteristics and uniqueness. The grids Uns1 and Uns2 are unstructured hybrid grids with quad cells in the viscous padding and unstructured triangles outside. Uns1 has orthogonal cells in the viscous padding and a fair bit of order in the arrangement of triangles in the field. On the other hand, Uns2 has viscous layers which are non-orthogonal with a wavy nature to them as can be seen in Figure 5 and there is randomness in the arrangement of triangles in addition to abrupt transitions from fine to coarse cells.

The polyhedral CFD mesh is a derivative of the Uns1 grid. The quad cells in the viscous padding were retained and the triangles were converted to honey-comb cells. The Cartesian grid was created using SnappyHex from OpenFoam. The orthogonal quad cells in the viscous padding wrapping neatly at the trailing edge give an O-type structure to the viscous padding.

Cell distribution near the leading edgeFigure 4: Cell distribution near the leading edge.
Cell distribution near the trailingFigure 5: Cell distribution near the trailing.

Lastly, 2 structured grids were generated using the structured multi-block grid generator GridPro. Structured1 is an O-type grid while Structured2 is C-type. The 2 grids are more or less similar except near the trailing edge.

In O-type the cells are wrapped around the trailing edge resulting in the creation of a few skewed cells inside the viscous padding at the singularity point, while in C-type, the boundary layer extends downstream carrying the boundary layer fitness till the farfield. The grid quality at the trailing edge is ideal in C-type when compared to O-type.

Likewise, the viscous padding in the Uns2, polyhedral, and Cartesian grids are O-type in nature. In Uns1, the cells are wrapped-up at the trailing edge singularity point, without compromising on the cell quality. This is one of the ideal ways of capturing the trailing edge singularity point in a highly efficient way.

CL vs Alpha plot for the NACA 0012 airfoilFigure 6: CL vs Alpha plot for the NACA 0012 airfoil.

Solver Run Details

The simulations were done using the commercial CFD solver Fluent. Coupled solver option with the SA turbulence model was invoked for the simulation and runs were made for alpha ranging from 0 to 19 degrees. On all grids, convergence was achieved within 3000 iterations for runs in the linear leg of the CL-alpha curve, and about 5000 iterations for runs in the non-linear part of the curve.

Flattening of the aerodynamic forces of CL and CD, as well as the fall in density residue by at least 3 decades, were seen as the convergence criteria. The parallel computations were done on a Windows machine with an i7 processor using 2 cores.

CD vs Alpha plot for the NACA 0012 airfoilFigure 7: CD vs Alpha plot for the NACA 0012 airfoil.

Analyzing the Results

Figure 7 shows the lift and drag polar for the airfoil on various grids. As seen, in the linear leg of the curves i.e. up to 8 degrees of angle of attack, all the grid predicts CL, CD values very close to that of Experiments. Interestingly in the non-linear leg, i.e. beyond 8 degrees, when the flow starts to separate from the upper surface of the airfoil, CFD prediction starts to deviate from experiments.

In this region of the CL-alpha curve, the two structured grids and Uns1 does reasonably better prediction compared to the other grids. Out of the 2 structured grids, C-grid seems to do a better CFD prediction in the non-linear leg when compared to O-type. The stall angle and maximum lift are very much comparable to the experimental data.

After the stall, where large flow separation occurs, the force prediction on all grids types is off by a significant amount. This is understandable as steady-state RANS computations are unreliable in these flow conditions and hence after stall, the RANS-based CFD results are usually ignored.

X-velocity plot heightening the wake capturing by various gridsFigure 8: X-velocity plot heightening the wake capturing by various grids

Surprisingly, the variations in results as seen in the aerodynamic forces are not seen in the Cp distribution even at an alpha of 15 degrees close to stall angle. However, if zoomed in near to TE location in the Cp plot, variations in Cp prediction among the various grids can be observed. This can be attributed to the differences in grid clustering around the trailing edge singularity point. The Uns1 and the 2 structured grids have better resolutions of cells in this region. This is in line with observations made by other researchers, who have reported that the solution is very sensitive to the point distribution around the TE singularity point. For better prediction, finer grid point placement on the body nearer to TE is a critical factor.

Differences in the flow field can also be seen. Figure 8 shows the X-velocity fill plot, highlighting the wake as predicted on various grids. The wake in the two unstructured grids, the Cartesian and polyhedral grids seems to dissipate out after about 2 chord lengths behind the trailing edge. While, in the two structured grids with better flow alignment and finer points placement, the wake has reasonable strength up to 4 chord length downstream of the TE.

If such variations in CFD predictions are seen for a simple airfoil at a 2D level, the question arises, are these differences carried forward for a 3D case also? To understand this, numerical experiments were made on the Onera M6 wing configuration.

CFD mesh around the Onera M6 wingFigure 9: CFD mesh around the Onera M6 wing.

Numerical Experiments with Onera M6 Wing

On similar lines to the NACA gridding experiment, four grids were generated for the configuration – two unstructured, one structured, and one polyhedral. This popular test case often used for turbulence model verification, involves turbulent computations at transonic Mach Number of 0.84 and Reynolds Number of 14 million at a 3.04-degree angle of attack.

Extreme care was taken to ensure that all grids were similar in terms of the total number of cells, number of surface elements, number of layers in the viscous padding, and first spacing. Farfield was placed at a distance of 30 chords from the wing in all directions. Among the turbulence model, the SA model was chosen as it is known to do pretty decent predictions for external aerodynamics with mildly separated flows. Other options invoked in Fluent include coupled solver and pseudo-transient algorithm with higher-order term relaxation for faster convergence.

CFD mesh near the wing-symmetry junction regionFigure 10: CFD mesh near the wing-symmetry junction region.CFD mesh near the wing tip regionFigure 11: CFD mesh near the wing tip region.

The set convergence criteria involved flattening of aerodynamic forces to 3 decimal places and fall in density residue by at least 4 decades. On all grids, these convergence criteria were met within 250 iterations.

The computed results on all 4 grids are in reasonable agreement with the experiment. Table 1 below shows the aerodynamic forces obtained on various grids. As can be seen, out of the four grids, structured grids seem to show results nearer to the that obtained on a 60 million ultra-fine grid using Fun3D.

The pressure fill plot shows the lambda shock sitting on the wing surface. All the grids for the given density are able to capture the shock features reasonably well with structured grids capturing the flow features more crisply especially the shock-shock interaction location. This is also clearly brought out in the sectional Cp at various spanwise stations as seen in Figure 12.

Computed CL, CD values on the various grid and their comparison with the FUN3D results computed on a 60 million ultra-fine CFD meshTable 1: Computed CL, CD values on the various grid and their comparison with the FUN3D results computed on a 60 million ultra-fine CFD mesh.

Figure 12: Sectional Cp distribution at various span-wise stations.Sectional Cp distribution at various span-wise stations

Discussion

What is observed from this gridding exercise is that CFD solutions vary drastically with the grids used in their computations. Apart from the grid quality aspects like skewness, warpage, aspect ratio, etc, the type of elements used, the arrangement of them, their judicious placement in the computational domain play a vital role. This sets apart the good grids from the average grids.

Though the gridding guidelines with clear instructions regarding fineness in element size, growth rate, first cell placement, total cell count, etc, helps to ensure generating a quality healthy grid, they don’t talk about subtle aspects of grid generation like flow alignment, smoothness in grid size transition, intelligent allocation of grid points based on physics, etc.

In a way, at this juncture grid generation becomes subjective. The Engineers ‘intuition’ for the flow field, the way the software meshes, features in the grid-generator starts to take an upper hand.

Pressure fill plot with the background CFD mesh displayed.Figure 13: Pressure fill plot with the background CFD mesh displayed.

Though theoretically, with infinite refinement, all grids should tend towards the same results, on day-to-day runs, we work with grids of finite sizes and expect to get reasonably accurate results with a small error band.

Further, even though the solution quality differences between structured and unstructured grids have reduced considerably with better algorithmic development over the years, the ordered flow-aligned grids still show their superiority. The numerical dissipation in randomly arranged grids is hard to ignore. This fact is clearly brought out even among the 2 unstructured grids Uns1 and Uns2 used for NACA airfoil. As Figure 6 shows Uns1 with more orderly arranged triangles does a better prediction than Uns2.

One could brush aside these observations citing, that though the gridding guidelines are the same, the grids have different cell-to-point count ratios. Though the argument is valid and could be one of the reasons for the variation in solution prediction, conversely, we would never have arrived at a set of grids that are comparable enough.

Surface streamlines near the tip region. A structured CFD mesh very clearly captures the subtle flow physics while on other grids it is unclear
Figure: Surface streamlines near the tip region. A structured CFD mesh very clearly captures the subtle flow physics while on other grids it is unclear.

Concluding Remarks

The take-home factor is that CFD Engineers need to fine-tune their ‘intuition’ for the subtle ways in which grids influence CFD prediction. Qualitatively one might do a good job, of adhering to a set of good gridding guidelines, but the ‘black art’ of generating flow aligned grids with orthogonal cells in the viscous padding, along with smoother transitions from finer to coarser cells and effective grid clustering helps to create ‘superior’ grids with exceptional predicting capabilities. A grid generator having the innate abilities to introduce these features effortlessly makes meshing a five-finger exercise.

Further Reading

  1. Grid Convergence Study! – Is it Necessary?
  2. Nesting your way to mesh Multi-Scale CFD Simulation!
  3. The Art and Science of Meshing Airfoil
Twitter
Visit Us
Follow Me
YouTube
LinkedIn
Share

Subscribe To GridPro Blog

By subscribing, you'll receive every new post in your inbox. Awesome!

2 Comments on “Do Mesh Still Play a Critical Role in CFD ?”

Leave a Reply

Your email address will not be published. Required fields are marked *