Grid Generation for CFD Simulation Introduction

7
Grid Generation for CFD Simulation: Introduction learncax.com /blog/2013/02/14/grid-generation-f or-cf d-simulations-introduction/ Ganesh Visavale 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

description

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.

Transcript of Grid Generation for CFD Simulation Introduction

Grid Generation for CFD Simulation: Introductionlearncax.com /blog/2013/02/14/grid-generation-f or-cf d-simulations- introduction/

Ganesh Visavale

After a brief introduction to computational fluid dynamics (CFD) in the earlier blog Introduction to CFD, let-us furthertry 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. Withinsimulations we can analyse different aspects like structural, as well as thermal and fluid flow analysis, however thebasis for all simulation softwares and studies is the mesh, also called a grid. So before we start any simulation studyto get any result the first step followed is creating a mesh or a CFD CAD model. Therefore meshing is an extremelycritical part of CFD process and without understanding it we cannot proceed to solve or even expect any relevantresults. 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 involvedinto meshing or mesh generation and hence it is a critical part of the CFD simulation process that needs thoroughunderstanding of the meshing/ grid generation steps.

The CFD Simulat ion Process:

Pre-processing: Mesh generation is a combination of CAD model generation as well as CAD clean-up and termedas pre-processing in the entire CFD simulation process. Pre-processing means, before we move ahead to thesolver 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 ormodified. We generate the mesh, & specify the boundary conditions (B.C), then this entire meshed CAD model isexported 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 modelslike the physics, numerical computation methods etc.

Post-processing: Extracting results out of the CFD model that has been solved, is called as post-processing. Herewe analyze and try to understand the results using various color, contour plots, lines, contour data, graphs etc. We

Mes hing o f a fin tube heat exchanger

can extract data like heat transfer coefficient, drag, lift in the analysis of product design and generate good analysisreport.

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

Mesh Generat ion:

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 physicaldomain 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 andheat transfer and any other variable at these cell centres or nodes. Also the theoretical methods that are used forany 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 shallsee in detail. for e.g. the image below shows a glimpse of a CFD random mesh between two circles, the domain ofanalysis. We have filled the space (torus) by many small triangles called as cells or elements. A grid or mesh is acollection of all these triangles.

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

The domain inputs that would be needed for solving theequation are:

1. Appropriate shape & size of domain in which theequation will be solved.

2. The domain needs to be discretized as it will be givento 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 heatexchanger.

Thetypicalstepsinvolvedduringpre-

processing can be summarized as:

1. Creating the shape & size of domain, generally supplied through CAD data.

2-D e lem ents

2. Standard CAD software – Used for complex geometries and involves repair operation as the result ofimport/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 cellshapes supported by commercial solvers (ANSYS Fluent, ANSYS CFX) are of following types:

2. For 2-D & 3-D elements:

3-D elements

Pre-processing sof tware, ANSYS ICEM CFD:

ANSYS ICEM CFD is a complete and standalonepreprocessing software. We can do CAD model creation, CADrepair as well as mesh generation within ICEM CFD. Typicaltasks 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:

Types of Grid / Mesh:

Graphic Us er In ter face (GUI) o f a com m ercia l p reproces s or , ANSYS ICEM CFD

Types & clas s i fica tion o f gr id / m es h

Thetypicaltypes ofgrid/meshused fora

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 aparticular 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, wehave triangular tetrahedron & with Hybrid grid we have a mix of above discussed elements.

1. Cartesian Grid:

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

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

2. St ructured Grid:

Here a single block is used to cover the entiregeometry. Also used for simple shapes, wherea single block is sufficient for covering the CADmodel.

Car tes ian m es h generation exam ple

Structured gr id generation o f a cyl inder us ing m ono-b lock

In a

Structured Mesh, elements are alignedin a specific manner or they follow astructured pattern & hence the namestructured mesh. Conversely, if theelements are arranged in a randomfashion or haphazardly they are calledun-structured mesh.

2.1. Structured Mono-Block Grid:

For preparing a structured mesh a singlebounding block is used to cover theentire geometry. Also used for simpleshapes where a single block is sufficientfor actually covering the entire CADmodel.

In order to generate mesh for thecylinder (example below) we can coverthe cylinder with a bounding box that canbe a single bounding box & thengenerate the mesh for entire cylinder,called a mono-block since a singlebounding block is used for generatingmesh.

2.1. Structured Multi-Block Grid:

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

3. Unst ructured Grid : It is the

Structured gr id generation o f a cyl inder us ing m ul ti -b locks

Uns tructured gr id generation exam ples us ing tr iangu lar & te trahedron e lem ents

3. Unst ructured Grid : It is theentire discrete cells we generatewithin the CFD space arerandomly spaced & do not followany single pattern & hence thename un-structured mesh. Thetypes of unstructured mesh areshown in figure below:

Triangular/ Tet rahedron

Quadrilateral/ Hexahedron:

4. Hybrid Grid:

Most of the complex meshingprocess used to study complexgeometries as shownin figure below. The top part of theimage has squares and trianglesi.e. tetrahedrons & hexahedrons involume. Since the shape/geometry is complex we cannotcapture the shape profile by usinga single element type, hence weuse multiple types so we usetriangles, prisms, wedges as wellas hexahderon. Similarly forvolume mesh of a sphere alongthe sphere surface we usetetrahedron and inside we usehexahedron. Thus combination ofdifferent shapes gives us a hybridmesh.

Coming up next, Grid Generation forCFD Simulations: Tips & Tricks

scrolling="no" frameborder="0"style="border:none; overflow:hidden;width:100px; height:27px;"allowTransparency="true">Share

Uns tructured gr id generation exam ples us ing quadr i la tera l & hexahedron e lem ents

Exam ple o f hybr id gr id generation wi th d i ffe rent s hape e lem ents