Mesh Generation in CFD: Why It Makes or Breaks Your Simulation
- 1 day ago
- 10 min read
"We know embarrassingly little about how the mesh affects the CFD solution." That statement came from Prof. Carl Ollivier-Gooch of the University of British Columbia, one of the leading researchers in CFD meshing. It was published in 2012 and has been referenced in CFD discussions ever since [1].
The paradox is this: every experienced CFD engineer knows that mesh quality is the single most consequential factor in whether a simulation is trustworthy. Yet the field still lacks a unified, rigorous definition of what makes a mesh good. We are, as Prof. John Dannenhoffer of Syracuse University put it, much better at identifying a bad mesh than judging a good one [1].
Mesh generation is where the majority of simulation errors originate, where the most engineering judgment is required, and where the most time is spent. A poorly constructed mesh can produce results that look plausible, converge cleanly, and are completely wrong. A single highly skewed cell in the wrong location can cause a simulation to diverge. A boundary layer that is not resolved correctly will give you the wrong drag coefficient, the wrong heat transfer coefficient, and the wrong pressure distribution, even if everything else in the setup is perfect.
This guide explains what mesh generation is, why it matters so much, what the main mesh types are, and how to evaluate whether a mesh is good enough to trust the results that come from it.

What Is a Mesh in CFD?
Before a CFD solver can compute anything, the fluid domain must be divided into a finite number of discrete cells. This is the mesh: a network of cells covering the entire region where flow will be simulated, from the surface of the object of interest out to the far-field boundaries of the computational domain.
The solver does not see the geometry of your wing, pipe, or vehicle body. It sees the mesh. At each cell, it solves the discretized Navier-Stokes equations for velocity, pressure, and temperature. The results at every cell are assembled into the global flow field you see in post-processing [1, 2].
The mesh is therefore the spatial foundation on which every calculation rests. Its quality determines what the solver can and cannot resolve. Flow features that are smaller than the local cell size are invisible to the simulation. Gradients that span only a few cells are represented inaccurately. The mesh does not just affect how fast the solver runs. It determines what physics the simulation is capable of capturing.
The Main Mesh Types
CFD meshes are classified primarily by their topology: how cells are arranged relative to each other and how their connectivity is defined.
Structured Meshes
A structured mesh consists of cells arranged in a regular, ordered grid. In 2D, cells are quadrilaterals; in 3D, they are hexahedra. The defining characteristic is implicit connectivity: the neighbors of any cell are known by their index in the grid, without needing to store connectivity information explicitly [3].
Structured meshes offer significant computational advantages. Solvers can exploit the regular topology for more efficient memory access and vectorized operations. Hex cells aligned with the flow direction reduce numerical diffusion, which is the artificial smearing of flow gradients that is introduced when cell faces are not aligned with the dominant flow direction [4].
The limitation is geometric. Generating a structured mesh over a complex geometry, such as a full aircraft or an automotive underbody, requires decomposing the domain into multiple structured blocks that are stitched together. This multiblock approach is time-consuming, highly skilled work that can take days or weeks for complex geometries. For simple shapes, structured meshes are the first choice. For complex ones, they often are not practical [5].
Unstructured Meshes
An unstructured mesh uses cells of arbitrary shape, most commonly tetrahedra in 3D and triangles in 2D, with explicit connectivity: each cell must store a list of its neighbors because no implicit ordering exists [5].
The key advantage is automation. Unstructured mesh generators can fill almost any geometry automatically, making them the practical choice for complex shapes that would be prohibitively expensive to mesh in a structured way. Modern algorithms based on Delaunay triangulation and advancing front methods can generate unstructured meshes on complex geometries with minimal user intervention [6].
The trade-off is numerical. Tetrahedral cells introduce more numerical diffusion than hexahedral cells because their faces are rarely aligned with the local flow direction. Unstructured meshes also require more cells than structured meshes to achieve equivalent accuracy in simple flow regions, and they consume more memory due to explicit connectivity storage [5].
Polyhedral Meshes
Polyhedral meshes represent a development in unstructured meshing that addresses some of the limitations of pure tetrahedral meshes. Polyhedral cells have many faces, often generated by merging groups of tetrahedral cells around shared nodes. This gives each cell more neighbors than a tetrahedron, improving gradient computation and reducing numerical diffusion [7].
Polyhedral cells typically require fewer total cells than tetrahedral meshes for the same accuracy: calculations based on polyhedral meshes have been shown to run approximately three times faster than equivalent tetrahedral meshes [8]. This combination of better accuracy and lower cell count makes polyhedral meshing increasingly popular in commercial CFD applications, particularly in automotive and industrial flows.
Hybrid Meshes
Most modern CFD simulations of complex geometries use hybrid meshes: structured cells in regions where the flow is simple and well-aligned, unstructured cells where geometry demands flexibility, and specialized prismatic or hexahedral cells in the boundary layer region near walls [4].
The rationale is straightforward: use the most efficient cell type for each region of the flow. Structured hex cells in the wake region reduce numerical diffusion where flow features are important. Tetrahedral or polyhedral cells fill the complex geometric regions automatically. Prism layers near surfaces resolve the boundary layer accurately without requiring a fully structured approach.
The Boundary Layer: The Most Critical Region
Near a solid surface, fluid velocity drops from the freestream value to zero over a very thin region called the boundary layer. This region is where wall friction, heat transfer, and flow separation are determined. It is the most physically important and numerically demanding region in most CFD simulations.
Resolving the boundary layer accurately requires cells that are very thin in the wall-normal direction but can be elongated in the flow direction, creating cells with high aspect ratios. This is acceptable and expected in boundary layer meshes because the gradients in the flow direction are small compared to the wall-normal direction [9].
The key parameter for boundary layer meshing is y+, a dimensionless wall distance that relates the height of the first cell above the wall to the local wall shear stress and fluid viscosity. The appropriate y+ value depends on the turbulence model being used. Wall-resolved approaches, such as low-Reynolds k-omega models, require y+ values close to 1. Wall function approaches, which model the near-wall region rather than resolving it, typically require y+ values between 30 and 300 [2].
Getting y+ wrong can significantly degrade the accuracy of wall shear stress, heat transfer coefficient, and separation predictions, even when everything else in the simulation is set up correctly. It is one of the most common sources of error in CFD results produced by engineers who are new to the discipline.
Mesh Quality Metrics
A mesh that looks reasonable visually can still contain cells that are numerically problematic. Mesh quality metrics quantify the geometric properties of cells in ways that predict how they will affect solver accuracy and stability [10].
Skewness
Skewness measures how much a cell deviates from its ideal equilateral or equiangular shape. A skewness of 0 is a perfect cell; a skewness of 1 is a completely degenerate cell. For tetrahedral meshes, the maximum skewness should generally be kept below 0.95, with an average below 0.33. Highly skewed cells reduce accuracy and can destabilize the solution in regions with strong flow gradients [9].
Non-Orthogonality
Non-orthogonality measures the angle between the vector connecting two adjacent cell centers and the normal of the shared face. In a perfectly orthogonal mesh, this angle is zero. Non-orthogonality is important because it affects how accurately the solver computes gradients and diffusive fluxes at cell faces. It is recommended to keep non-orthogonality below 70 degrees; meshes with maximum non-orthogonality above 85 degrees are likely to diverge [11]. High non-orthogonality reduces the effective order of accuracy of the numerical scheme, adding artificial numerical diffusion to the solution.
Aspect Ratio
Aspect ratio is the ratio of the longest edge to the shortest edge of a cell. For cells in the bulk flow region, away from walls, it is generally best to avoid aspect ratios above 5:1. Inside the boundary layer, cells can be stretched to aspect ratios of 10:1 or higher in the flow direction without degrading accuracy, because the gradients in that direction are small [9].
Smoothness
Abrupt changes in cell size between neighboring regions add numerical diffusion and can cause stability problems. Good meshing practice involves gradual, smooth transitions in cell size, with growth rates typically kept below 1.2 per layer in regions of high gradient [10].
The collective principle is captured in what CFD engineers call the GIGO rule: "garbage in, garbage out." A mesh with even a small number of very bad cells can distort results badly or lead to divergence. A single highly skewed or non-orthogonal cell in a critical flow region can crash an otherwise well-set-up simulation [12].
Mesh Sensitivity Studies
Because CFD results depend on the mesh, it is never sufficient to run a single mesh and report the results. Best practice requires a mesh sensitivity study, also called a grid convergence study or grid independence test.
The procedure is straightforward: generate two or three meshes of progressively increasing refinement, run the same simulation on each, and compare the results for a key quantity of interest. When results stop changing significantly with further refinement, the solution is considered mesh-independent at that level of refinement.
A well-converged solution exhibits minimal changes with increasing mesh density. In contrast, a poorly converged solution indicates the need for improved mesh quality to obtain accurate results [13]. Reporting CFD results without a mesh sensitivity study is considered poor practice in engineering and is increasingly being flagged by reviewers in both academic publications and industrial validation reports.
The cost of running multiple mesh levels is real. This is where HPC infrastructure becomes important: running mesh sensitivity studies in parallel, on cloud or on-premise clusters, compresses the time required and makes grid independence studies practical even for large models. For teams building out their simulation infrastructure, the SimOps Practitioner certification covers the operational practices for running and managing simulation workflows at this level.
AI and Automated Meshing: Where the Field Is Heading
Mesh generation has historically been one of the most time-consuming steps in the CFD workflow, often consuming more engineer time than the solver run itself. This is changing.
Modern commercial meshing tools have made significant advances in automation: geometry cleanup, surface meshing, volume filling, and boundary layer generation can all be performed with minimal manual intervention for a wide range of geometries. Tools like ANSYS Fluent Meshing, Siemens STAR-CCM+, and Pointwise offer automated meshing pipelines that produce acceptable results for standard industrial geometries.
AI is beginning to enter mesh generation directly. Machine learning models trained on libraries of high-quality meshes are being used to predict optimal cell size distributions, automate defeaturing decisions, and flag regions where manual refinement is needed before the solver is run. The goal is not to eliminate engineering judgment from meshing but to focus that judgment where it matters most, on boundary layers, separation zones, and geometric features that drive the physics, while automating the rest.
For teams using OpenFOAM, snappyHexMesh remains the dominant open-source meshing tool. Its hex-dominant approach, starting from a background Cartesian mesh and snapping to geometry, produces meshes that are efficient for many industrial CFD applications. As discussed in the CFD 101 guide, OpenFOAM combined with cloud HPC gives smaller teams access to enterprise-grade CFD capability without proprietary software costs.
Practical Guidance for Beginners
For engineers new to CFD meshing, a few principles consistently separate reliable results from unreliable ones.
Resolve the boundary layer correctly. Check y+ values after the first run and adjust the near-wall mesh before interpreting results. Most errors in wall-bounded flows trace back to an incorrectly resolved boundary layer.
Check your quality metrics before running. Inspect skewness, non-orthogonality, and aspect ratio distributions after generating the mesh. A few minutes of quality checking before a solver run saves hours of debugging after it.
Run a mesh sensitivity study. No mesh is valid until it has been shown that the results do not change significantly with further refinement. This is not optional for publishable or design-critical work.
Refine locally, not globally. Adding cells uniformly across the entire domain is expensive and often unnecessary. Targeted refinement in regions of high gradient, near walls, in wake regions, and around geometric features of interest delivers accuracy more efficiently than global refinement.
Match the mesh to the turbulence model. The y+ requirements differ significantly between wall-resolved and wall-function turbulence approaches. Know which you are using and design your near-wall mesh accordingly.
Key Takeaways
The mesh is the spatial foundation of every CFD simulation. Its quality determines what physics can be resolved and how accurately the solver represents them. The main mesh types are structured (hexahedral, efficient, geometrically demanding), unstructured (tetrahedral, flexible, automated), polyhedral (fewer cells than tet for equivalent accuracy), and hybrid (the practical choice for complex industrial geometries). The boundary layer is the most critical region: y+ must be appropriate for the turbulence model being used. Mesh quality is quantified through skewness, non-orthogonality, aspect ratio, and smoothness. A single bad cell can crash a simulation or produce wrong results. Mesh sensitivity studies are non-negotiable for any result that will be used to make engineering decisions. AI and automated meshing tools are reducing the time required, but engineering judgment in boundary layer design and quality checking remains essential.
What's Next in This Series?
This is part of SimOps' Simulation 101 series. Related reading:
References
Engineering.com / Cadence. (2012). CFD Mesh Quality: Understanding Accuracy and Convergence. Featuring Prof. Carl Ollivier-Gooch, University of British Columbia, and Prof. John Dannenhoffer, Syracuse University. engineering.com
SimScale. (2024). CFD Meshing: A Practical Guide for Beginners. simscale.com
ScienceDirect Topics. (2024). Structured Mesh. sciencedirect.com
Cadence System Analysis. (2024). CFD Meshing Methods. resources.system-analysis.cadence.com
ResearchGate / Sadrehaghighi. (2020). Unstructured Meshing for CFD. researchgate.net
CFD-Online Wiki. (2007). Unstructured Mesh Generation. cfd-online.com
GridPro. (2024). Different Types of Meshes in CFD. gridpro.com
ResearchGate. (2020). Mesh Generation in CFD. researchgate.net
ANSYS Fluent 12.0 User's Guide. 6.2.2 Mesh Quality. afs.enea.it
Wolf Dynamics / IMR Meshing Maestro. (2022). What is a Good Mesh? wolfdynamics.com
SimScale Documentation. (2024). Mesh Quality. simscale.com
CFD Monkey. (2024). Why You Should Spend a Lot of Time on Your CFD Mesh. cfdmonkey.com
Resolved Analytics. (2024). Mesh Quality and CFD Solution Accuracy. resolvedanalytics.com
About SimOps
Software development was transformed when teams stopped treating infrastructure as an afterthought and started building shared practices around it. That's what DevOps did for code. SimOps is doing the same thing for simulation.
Simulation and HPC have long operated in silos: different tools, different teams, different workflows, with no shared language or common standards. SimOps exists to change that. We're building a framework and a community where simulation engineers, HPC specialists, and CAE teams can work from the same playbook, share best practices, and push the field forward together.
If that mission resonates with you, this series is a starting point. And the community is where the conversation continues.


