The Importance of Flow Alignment of Mesh

Figure 1: Flow-aligned mesh around an MDA -3 element configuration.

                                                                                                                                                                                                                              1350 words / 7 minutes read

Alignment of grid lines with the flow aid in lower diffusion and numerical error, faster convergence and accurate capturing of high gradient flow features like a shock. This subtle gridding detail makes a significant difference to the CFD simulation’s solution quality and accuracy.

Introduction

In the rapid world of product design, CFD simulations are expected to generate quick results. Quick results mean faster grid generation, which inevitably leads to a loss of attention to subtle gridding details. One such critically important gridding aspect that most CFD practitioners have less appreciation for is that of alignment of the grid to the flow.

Three aspects of gridding dictate the final solver solution outcome – grid quality, mesh resolution and grid alignment. Most grid generators pay attention to the first two aspects of mesh cell quality and refinement but ignore grid line alignment to the flow. This is understandable as rapid domain filling algorithms like unstructured meshing and Cartesian will not be able to meet the meshing criteria of flow alignment, as these algorithms are inherently handicapped to do so. Only inside the boundary layer, where they adopt stacking of prism or hexahedral cells, is some flow alignment achieved. Currently, only the structured multi-block technique is capable of orienting the grid cells to the flow inside the boundary layer padding as well as outside.

It is critically essential that CFD practitioners know how alignment or non-alignment of the grid to flow, how the presence of different degrees of mesh singularities affects the flow field and how grid alignment to high gradient flow phenomena like shock influences the final solution outcome. This article attempts to address these meshing aspects.

A Gridding Experiment to Demonstrate the Need for Alignment of Grid to Flow:

Flow aligned grids with no diffusion or numerical error.
Figure 2: a. Structured grid with cells aligned to the flow. a. Cells aligned to the regular cartesian coordinate system. b. Cells not aligned to the regular cartesian coordinate system. Image source Ref [4].

The importance of grid cell orientation w.r.t to the flow can be demonstrated with a simple convective-diffusive flow in a square domain. Figures 2 and 3 show the errors produced due to different orientations of the cells to the flow direction.

If we have two velocities, V1 and V2, flowing on a structured mesh in the direction of the grid lines, the solution will be completely conformal without any diffusion or numerical error, as shown in Figure 2a. This is true, even for a grid where the mesh lines are not oriented in the direction of the coordinate system, as illustrated in Figure 2b.

Flow dissipation due to non-alignment of cells in unstructured meshes to flow direction.
Figure 3: a. Random orientation of cells to the flow direction. b. Structured mesh with cells not oriented to flow direction. Image source Ref [4].

However, if we have an unstructured mesh or a structured mesh, but the flow is not aligned, then there is diffusion taking place. The amount of diffusion depends on differencing scheme used in the flow solver and on the size of the mesh. The finer the mesh, the lower the diffusion. But, never the less, it still exists.

Effect of Grid Singularities

A grid singularity is nothing but a grid point in 2-Dimension where more or less than four grid lines radiate from a point. Singularities exist in large numbers in unstructured meshes and in very small numbers in multi-block meshes for complex configurations.

Negligible flow disruption due to 3- and 5-way singularities.
Figure 4: 3 and 5-way singularities. Image source Ref [3].

Results from the gridding experiment on singularities show that the error magnitudes are least for lesser singularities ( 3-way singularity) while it is high for larger singularities like an 8-way singularity, as shown in Figures 5 and 6.

Flow dissipation due to 6 -point singularity.
Figure 5: 3- and 6- way singularities. Image source Ref [3].

A closer review of the results shows that the results for 3- and 5- way singularity grids are quite acceptable and actually are as good as the results from the non-singular grids from the same grid generator.

Flow dissipation due to 8 -point singularity.
Figure 6: 3- and 8-way singularities. Image source Ref [3].

Hex Cells in Cartesian and Structured Grids are Not the Same

Though both Cartesian grids and the classical structured grids use hexahedral cells, the effect of the grid on the flow solver output is not the same. The subtle difference in the alignment of the cells and the need for interpolation in Cartesian grids show up in the computed results. In a Cartesian grid, the grid lines are aligned to the regular Cartesian coordinates, while the grid lines in structured grids are aligned to the geometric body and the flow field.

Interpolation results on cartesian and flow aligned structured meshes.
Figure 7: Comparison of the interpolation on a cartesian mesh ( thin line) and on a structured flow aligned mesh (thick line) with the exact solution for two different stoichiometric scalar dissipation rates of 0.014 and 653. a. Mass fraction of H vs mixture fraction Z. b. Temperature in Kelvin vs mixture fraction Z. Image source Ref [1].

Figure 7 illustrates the computed species mass fraction and temperature distribution for a CFD simulation involving fuel injection in a combustor of a hypersonic vehicle. As shown in Figure 7a, the Cartesian interpolation leads to dramatic spurious oscillations for the species mass fraction, especially at small stoichiometric scalar dissipation rate. On the other hand, structured curvilinear meshes show a very smooth interpolation without any oscillation. Similar results can be seen in the computed temperature distribution in Figure 7b. As V. E. Terrapon, the author of the research work [ref 1], says,

“The small additional lookup cost in a curvilinear mesh is largely compensated by a much smoother interpolation.”

Flow Aligned Mesh for Boundary Layer Capturing

Flow-aligned cells in the viscous padding to accurately capture the boundary layer profile.
Figure 8: Flow-aligned mesh inside the viscous padding to capture the boundary layer profile accurately. Image source leap australia.

The boundary layer, which is home to wall-bounded viscous flows, experiences high gradients. To capture the high gradients, finely stacked flow-aligned cells are required. Maintaining cell orthogonality w.r.t to the wall is another key factor in boundary layer generation. So, to maintain optimal cell count and yet finely resolve the boundary layer, stretched elements in the form of prisms or hexahedral cells are preferred. For the same reason, even the hybrid unstructured meshing approach adopts stacked prism cells in the viscous padding, as stacking high aspect ratio tetrahedral is not preferred due to deterioration in cell skewness.

Orderly arranged flow-aligned mesh in the boundary layer are critical and essential as it aids in the accurate representation of its profile, leading to accurate predictions of wall shear stress, surface pressure and also the effect of adverse pressure gradients and forces.

Further, at very high Mach numbers in the supersonic or hypersonic flow regimes, the laminar to turbulent boundary layer transition and shock boundary layer interactions significantly influence aircraft aerodynamic characteristics. They affect the thermal processes, the drag coefficient and the vehicle lift-to-drag ratio. Hence, it is critical essentially to pay attention to how well the cells are arranged in the boundary layer padding.

Flow Aligned Mesh for Shock Capturing

Figure showing flow aligned mesh to curved shock and grid misalignment leading to non-physical waves.
Figure 9: a. Near the leading edge, the O-grid edge is aligned with the curved shock, and the cells follow the shape of the sonic line. b. Grid misalignment results in non-physical waves. Image source Ref [5].

To capture the effects of high gradient flow phenomena like shocks on the flow field downstream, it is essential to align the grid lines to the shock shape and have refined cells.

For this, hexahedral meshes are better suited. They can be tailored to the shock pattern and can be made finer in the shock normal direction or can be adaptively refined. This not only brings the captured shock thickness closer to its physical value but also allows for the improvement of the solution quality by aligning the faces of the control volumes with the shock front. Aligned grids reduce the numerical errors induced by the captured shock waves and thereby significantly enhance the computed solution quality in the entire region downstream of the shock.

Grid alignment is necessary for both oblique and normal bow shock. Grid studies have shown that solver convergence is extremely sensitive to the shape of the O-grid at the stagnation point. Matching the edge of the O-grid with the curved standing shock and maintaining cell orthogonality at the walls was found to be necessary to get good convergence.

Effect of fair and poorly flow aligned mesh with shock.
Figure 10: Effect of a. Fair b. Poor mesh alignment with the leading edge shock. Image source Ref [5].

Also, grid misalignment is observed to generate non-physical waves, as shown in Figure 10. For CFD solvers with low numerical dissipation, a strong shock generates spurious waves when it goes through a ‘cell step’ or moves from one cell to another. Such numerical artefacts can be avoided, or at least the strength of the spurious waves can be minimized by reducing the cell growth ratio and cell misalignment w.r.t the shock shape.

Check out the importance of flow alignment and comparison on various grid types for an airfoil and Onera M6 wing.

Do Mesh Still Play a Critical Role in CFD?

Conclusion

For ultra-accurate CFD results, flow alignment of grids is a must. It is a subtle detail in grid generation which can make a mammoth difference in the computed solution. Out of all the gridding methodologies developed to date, structured hexahedral meshing is the best candidate for the job. Whether it is near the wall in the boundary layer or in the interior of the domain to discretize shocks, structured meshes optimally align to the flow features and helps to avoid dissipation or numerical errors.

To sum up, if accurate CFD results are the top priority in your CFD cycle, then having flow-aligned grids is your secret recipe.

To know about generating flow-aligned meshes in GridPro, contact us at: support@gridpro.com.

Further Reading

References

1. “A flamelet-based model for supersonic combustion”, V. E. Terrapon et al, Center for Turbulence Research Annual Research Briefs, 2009.
2. “HEC-RAS 2D – AN ACCESSIBLE AND CAPABLE MODELLING TOOL“, C. M. Lintott Beca Ltd, Water New Zealand’s 2017 Stormwater Conference.
3. “Effect of Grid Singularities on the Solution Accuracy of a CAA Code”, R. Hixon et al, 41st Aerospace Sciences Meeting and Exhibit, 6-9 January 2003, Reno, Nevada.
4. “Challenges to 3D CFD modelling of rotary positive displacement machines”, Prof Ahmed Kovacevic, SCORG Webinar.
5. “Experimental Study of Hypersonic Fluid-Structure Interaction with Shock Impingement on a Cantilevered Plate”, Gaetano M D Currao, PhD Thesis, March 2018.

Twitter
Visit Us
Follow Me
YouTube
LinkedIn
Share

Subscribe To GridPro Blog

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

3 Comments on “The Importance of Flow Alignment of Mesh”

  1. Thank you for this insightful article on the critical importance of flow alignment in CFD simulations. It highlights the often-overlooked aspect of grid generation and its profound impact on the accuracy of computational fluid dynamics results. Understanding how grid alignment influences everything from boundary layer capturing to shock interactions is essential for achieving precise and reliable CFD outcomes. Your article serves as a valuable reminder of the significance of this detail in the CFD process.

Leave a Reply

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