Grid Generation for CFD Simulation : Introduction

Rate this item
(3 votes)
14 February
File (s) are available for download. You must login to access the file(s).

After a brief introduction to computational fluid dynamics (CFD) in the earlier blog Introduction to CFD, let-us further try to understand and have greater insights into the meshing process in the pre-processing step of CFD simulations.

Simulation is a broad subject area that is currently used to analyse or design products and processes. Within simulations we can analyse different aspects like structural, as well as thermal and fluid flow analysis, however the basis for all simulation softwares and studies is the mesh, also called a grid.

So before we start any simulation study to get any result the first step followed is creating a mesh or a CFD CAD model. Therefore meshing is an extremely critical part of CFD process and without understanding it we cannot proceed to solve or even expect any relevant results. Also the accuracy of the CFD simulation results is directly linked to meshing. the better the mesh in quality, the more accurate results can be expected. Almost 50% of the CFD simulation time of any CFD engineer is involved into meshing or mesh generation and hence it is a critical part of the CFD simulation process that needs thorough understanding of the meshing/ grid generation steps.

The CFD Simulation Process :

Pre-processing : Mesh generation is a combination of CAD model generation as well as CAD clean-up and termed as pre-processing in the entire CFD simulation process. Pre-processing means, before we move ahead to the solver we need to process CAD model in order to fit into the solver or provide the solver with the correct information.

Within pre-processing we create the geometry, and perform clean-up so that unwanted parts if any are deleted or modified. We generate the mesh, & specify the boundary conditions (B.C), then this entire meshed CAD model is exported to a CFD solver along with B.C. A few CAD models are shown below with their meshing.

Solver : In the solver we import the meshed CAD model and solve the CFD problem specifying additional models like the physics, numerical computation methods etc.

Post-processing : Extracting results out of the CFD model that has been solved, is called as post-processing. Here we analyze and try to understand the results using various color, contour plots, lines, contour data, graphs etc. We can extract data like heat transfer coefficient, drag, lift in the analysis of product design and generate good analysis report.

For more details about the CFD simulation process please refer to : Understanding CFD Simulation Process with Examples

Mesh Generation :

Mesh or grid is defined as a discrete cell or elements into which the domain/ model is divided. All the flow variables & any other variables are solved at centres of these discrete cells. This entire process of breaking up a physical domain into smaller sub-domains (elements/ cells) is called as mesh generation.

Why we need a Mesh ?

Basically a mesh is required because by physics or mathematical theory we are solving the variables like flow and heat transfer and any other variable at these cell centres or nodes.  Also the theoretical methods that are used for any CFD study like the fine difference method (FDM), finite element method (FEM) and the finite volume method (FVM) actually solve the variable at these discrete cells/ nodes.

There are different types of grid/ cell shapes e.g. triangles, quadrilateral, tetrahedra, hexahedra etc, that will we shall see in detail. for e.g. the image below shows a glimpse of a CFD random mesh between two circles, the domain of analysis. We have filled the space (torus) by many small triangles called as cells or elements. A grid or mesh is a collection of all these triangles.

Here the point that needs to be noted is that the mesh composed of many triangles are always connected with each other, however they never intersect with each other.

The domain inputs that would be needed for solving the equation are:

  1. Appropriate shape & size of domain in which the equation will be solved.
  2. The domain needs to be discretized as it will be given to the solver for solving equation in discretized form.
  3. Domain & boundary tags (boundary conditions); making sense of physics.
  4. Write output file needed for the solver.

Below shows a pre-processing example of a fin-tube heat exchanger.

Meshing of a fin tube heat exchanger

The typical steps involved during pre-processing can be summarized as:

  1. Creating the shape & size of domain, generally supplied through CAD data.
  2. Standard CAD software – Used for complex geometries and involves repair operation as the result of import/export issues.
  3. Pre-processing tool like ANSYS ICEM-CFD – For simple geometries. Almost negligible repair operation.
  4. Dividing the domain in small cells - Also called as mesh generation, grid generation, domain discretization.
  5. Various methods like structured multiblock, Cartesian, unstructured methods
  6. Putting tags on the boundaries and domain
  7. Boundary or surface tags – Inlet, outlet, wall etc.
  8. Domain tags – Solid, fluid etc.
  9. Exporting mesh to various solver
  10. Writing the mesh in specific solver format

Meshing Terminologies :

  1. Cells & element types : The cells & elements shapes should be supported by the used solver. Typical cell shapes supported by commercial solvers (ANSYS Fluent, ANSYS CFX) are of following types:
  2. For 2-D & 3-D elements :

2D Elements

3D Elements

Pre-processing software, ANSYS ICEM CFD :

ANSYS ICEM CFD is a complete and standalone preprocessing software. We can do CAD model creation, CAD repair as well as mesh generation within ICEM CFD. Typical tasks that CFD engineer performs is:

  1. Geometry creation
  2. Import repair
  3. Mesh generation
  4. Multiblock Structure Hexa
  5. Unstructured hexahedral
  6. Unstructured tetra
  7. Cartesian with H-grid refinement
  8. Hybrid meshes
  9. Quadrilateral and triangular surface meshes
  10. Boundary conditions
  11. Creating tags for boundary conditions
  12. Exporting mesh
  13. Exporting mesh for different solvers

A typical GUI of ANSYS ICEM CFD is as shown in figure below :

Graphic User Interface (GUI) of a commercial preprocessor, ANSYS ICEM CFD

Types of Grid / Mesh :

The typical types of grid/ mesh used for a commercial software for academic or industrial applications are:

  1. Cartesian
  2. Structured
  3. Unstructured
  4. Hybrid

The mesh generally may not always consist of a single type of elements viz., triangles or rectangular blocks etc. Sometimes we need to use different meshing techniques to shape the model in order to capture the shape of a particular CAD model. The mesh elements therefore at the same time may consist of cartesian, structured, unstructured & hybrid mesh. Within structured grid we have mono-block & multi-block type of mesh. Mono-block & multi-block meshing are the processes we follow to get a structured type of mesh. Within unstructured grid, we have triangular  tetrahedron & with Hybrid grid we have a mix of above discussed elements.

Types & classification of grid/ mesh

1. Cartesian Grid :

Cartesian grid means that the entire set of discrete cells that we will be using in order to fill the CFD space are aligned along the orthogonal axis, i.e. alignment along the x, y & z axis. eg. as below :

Cartesian mesh generation example

This facilitates the use of square or rectangles/ cubes, the most simple form of mesh but it does not capture the shape exactly & hence used rarely. Also the result obtained with this will not be that accurate & typically used for very simple type of geometries.

2. Structured Grid :

Here a single block is used to cover the entire geometry. Also used for simple shapes, where a single block is sufficient for covering the CAD model.

Structured grid generation of a cylinder using mono-block

In a Structured Mesh, elements are aligned in a specific manner or they follow a structured pattern & hence the name structured mesh. Conversely, if the elements are arranged in a random fashion or haphazardly they are called un-structured mesh.

Structured Mono-Block Grid : 

For preparing a structured mesh a single bounding block is used to cover the entire geometry. Also used for simple shapes where a single block is sufficient for actually covering the entire CAD model.

In order to generate mesh for the cylinder (example below) we can cover the cylinder with a bounding box that can be a single bounding box & then generate the mesh for entire cylinder, called a mono-block since a single bounding block is used for generating mesh.

Structured Multi-Block Grid :

Within structured mesh the other method we use to mesh a complex geometry is called a multi-block. Let us say, if suppose in the core of cylinder we want to generate a finer mesh or a different pattern compared to the outer region, thus to seperate this we at times use more than one bounding box (figure below). Similarly for a complex geometry like the catalytic converter, we cannot cover the shape by a single bounding box so we generate diffrent bounding box for diffrent shapes within the same CFD space & then combining these blocks we make a single structured mesh. Since there are multiple blocks involved in the mesh generation process this is called multi-block structured mesh.

Structured grid generation of a cylinder using multi-blocks

3. Unstructured Grid :

It is the entire discrete cells we generate within the CFD space are randomly spaced & do not follow any single pattern & hence the name un-structured mesh. The types of unstructured mesh are shown in figure below:

Triangular/ Tetrahedron :

Unstructured grid generation examples using triangular & tetrahedron elements

Quadrilateral/ Hexahedron :

Unstructured grid generation examples using quadrilateral & hexahedron elements

4. Hybrid Grid :

Most of the complex  meshing process used to study complex geometries as shown in figure below. The top part of the image has squares and triangles i.e. tetrahedrons & hexahedrons in volume. Since the shape/ geometry is complex we cannot capture the shape profile by using a single element type, hence we use multiple types so we use triangles, prisms, wedges as well as hexahderon. Similarly for volume mesh of a sphere along the sphere surface we use tetrahedron and inside we use hexahedron. Thus combination of different shapes gives us a hybrid mesh.

Example of hybrid grid generation with different shape elements

The Author

Praveen Kumar

Praveen is working as a Manager of CFD consultancy department in CCTech. Praveen has more than 7 years of experience in the field of CFD, with an expertise in Multi-Block Structured mesh generation. Over these years, he has successfully completed CFD projects in various domains like Aerospace, Automobile, Turbomachinery and Thermal equipment design. He has a vast experience in handling the CFD software tools such as ANSYS ICEMCFD, ANSYS FLUENT, ANSYS CFX, and EnSight.

Praveen has written blogs and conducted webinars on Pre-processing related topics like CAD repair and Mesh generation. He has interest in teaching and creating courses on fundamental topics like 'Aerodynamics'. He acted as a Mentor for engineering students and guided them in execution of their CFD projects, offered by industry or assigned by the university. He has mentored around 7 post graduate students, through LearnCAx Mentor Program.

Praveen holds a Bachelor’s degree in Mechanical Engineering and a P.G. Diploma in Advanced Computational Fluid Dynamics (DACFD).

Share thisShare on FacebookShare on Google PlusShare on TwitterShare on LinkedIn
  • Co Author(1):


    Ganesh Visavale

    Co-Founder & General Manager, 
    Inspire | Educate | Mentor


    Website: | Email: This email address is being protected from spambots. You need JavaScript enabled to view it.This email address is being protected from spambots. You need JavaScript enabled to view it.

    Share thisShare on FacebookShare on Google PlusShare on TwitterShare on LinkedIn
Read 5334 times
Grid Generation for CFD Simulation : Introduction - 5.0 out of 5 based on 3 votes

Latest from Praveen Kumar

Add comment

Security code

Browse Knowledge Base

Recommended By

Get Instant Updates

Subscribe to get instant updates about CFD courses, projects, blogs, webinars, software tutorials & CFD jobs

Search Knowledge Base

By Keyword

By Author

By Tag