Meshing for CFD is 50% capability and 50% art!

A good mesh might not lead to the ideal solution, but a bad mesh will always lead to a bad solution - Patrick Baker (Pointwise)

Solid modeling (required to create 3D geometry) and mesh generation are at present separate steps, performed using different programs and software environment, and a greater seamless integration is still in distant future. The first step of meshing is to ensure the "topological consistency" of the 3D geometry when the data is transfered from "Solid Modeling" environment or "mesh generation" environment. The topology refers to the way points, lines and surfaces connect to form a three-dimensional space.

Meshing is not same as Tessellation.

This step involves division of the computational domain into small sub-divisions called a grid or mesh of cells/elements/control volumes. The 2D boundaries of this smaller (discretized) domains are called Faces, the 1D boundaries are called Edges and 0-D boundaries are called Nodes or Vertices. The solution of flow problems are defined at the nodes of the cells. In general, the accuracy of CFD simulation is governed by cell size. Finer the mesh (lower the cell size), better is the result. However, the hardware resource increase with increase in no. of cells (elements) in the mesh. Hence, a trade-off is required.
  1. The mesh resolution near walls affect calculation of wall shear as well as separation zone and location of separation. Appropriate mesh sizing is critical because fidelity of local wall shear predictions affects the prediction of frictional drag for external flows or pressure drop (which is also a form of frictional drag) for internal flows. Both the frictional and pressure drag for bluff bodies is dependent upon extent of separation zones.
  2. The requirement of a non-uniform mesh is a necessity and not a limitation. The cell size is smaller is the regions of sharp gradients of field variables (velocity, pressure, temperature, shear stress, etc) and larger in the regions of less gradients.
  3. Though the region of sharp gradients cannot be anticipated a priori, this is the time where an insight into the physics of the problem is helpful.
  4. Most modern solvers come with a feature called "mesh-adaption". The solver automatically refines the mesh based on various setting such as Y+ refinement. However care should be taken so that enough memory is available after such refinements as the mesh size (no. of cells / elements) can increase significantly after such adaptation.
  5. If machine time in computation is ignored, it takes approximately 70~80% of the overall simulation time in a good mesh generation activity.
Some of the jargons associated with meshing are:
  • Bi-directional associativity between CAD environment and pre-processing environment: This refers to the automatic updation of mesh when associated CAD geometry is updated.
  • Virtual topology such as slicing in Ansys Workbench, imprint in STAR-CCM+: This refer to changing the geometry to suit meshing requirements without affecting the underlying geometrical description. Note that there is a difference the way CAD environment treats geometrical entities and the way mesh generator software use those information.
  • Swept meshing, Multi-zone meshing, Paving, Blocking

Mesh Duality

Mesh Top Down Approach
One important aspect of mesh is the node-element relation for tri/tetra and quad/hexa elements. It is worth noting the fact that the ratio of nodes/elements tend to 1.0 for quadrilaterals and the ratio of number of nodes and number of elements defined by those nodes tend to 0.5 for triangles. They are explained in two sketches below. Hence, the memory space required to store triangle elements would be approx twice that of quadrilateral elements.
Node-Element Topology for Quad elements
Node-Element Topology for Quad elements

Node-Element Topology for Tri elements
Node-Element Topology for Triangle elements
One important consideration in generating mesh is also to capture the physics of the flow. Most of the time, we are focused on the boundary layer resolution over the walls and near the separation and reattachment regions. The underlying principle is to capture the gradient of field variables, in whatever direction they might be present. One such similar consideration is flow gradient in the entrance region when "uniform flow velocity" is to be applied. Here the gradient is along the direction of flow, similar to the one we observe perpendicular to the wall. Following images demonstrates the recommended mesh in the entrance region.
Mesh in Entrance Region
Mesh Not OK for Entrance Region
Mesh in Entrance Region
Mesh OK for Entrance Region

All hexa mesh in T- and Y-Junction

The O-grid techniques can be used to generate hexahedron meshed in complicated geometries such as Tee-junctions and Wye-junctions as demonstrated in following image.
Mesh: Y- and T-junction

The content on CFDyna.com is being constantly refined and improvised with on-the-job experience, testing, and training. Examples might be simplified to improve insight into the physics and basic understanding. Linked pages, articles, references, and examples are constantly reviewed to reduce errors, but we cannot warrant full correctness of all content.