48
Grid Generation – An Overview Dr. K. P. Sinhamahapatra Aerospace Engineering Department IIT Kharagpur

Grid Generation

Embed Size (px)

Citation preview

Page 1: Grid Generation

Grid Generation – An Overview

Dr. K. P. Sinhamahapatra

Aerospace Engineering Department

IIT Kharagpur

Page 2: Grid Generation

What a Grid is?

• A mesh/grid is an artificial geometric construction that facilitates the spatial discretization of the governing equations to be solved.

• The mesh determines the locations in the field where the variables will be evaluated and the stencil of the discrete equations.

Page 3: Grid Generation

The Importance

• The final accuracy and efficiency of any numerical solution are highly dependent on the particular meshing strategy and mesh density distribution employed.

• A good matching of the strengths and weaknesses of the grid generation and flow solution techniques and a strong and favourable interplay between the two is the key to an efficient overall numerical solution.

Page 4: Grid Generation

Classification of Meshing Strategies

• Structured Mesh – Physical location of any mesh point and the identity of its neighbours are known implicitly. Physical locations may have to be stored.

• Unstructured Mesh – Physical location of a mesh point and the identity of its neighbours, i.e., the connectivity of the mesh are to be determined explicitly.

• Hybrid Mesh – A combination of the two above.

• Gridless Mesh – A set of disconnected points distributed throughout the field.

Page 5: Grid Generation

Structured Mesh

• Cartesian Mesh – Mesh generation is trivial. The grid points and their connectivity are known implicitly. Methods can be extended to complex geometries using cut-cell approach.

• Body-Fitted Mesh – Grid lines/surfaces conform to the boundary lines/surfaces. A warped or mapped Cartesian-type mesh where the boundaries of the mesh coincide exactly with the the boundaries of the physical domain. Physical location of the mesh points must be stored but the identity of the neighbours known implicitly.

Page 6: Grid Generation

Structured Mesh – Contd.

• Overset Mesh – Multiple overlapping grids to discretize the domain, the solver interpolates values between the various grids in the regions of overlap.

• Block-Structured Mesh – The domain is decomposed into a number of topologically simpler domains and each domain is meshed independently with a structured grid.

Page 7: Grid Generation

Single block structured mesh about a wing configuration

Page 8: Grid Generation

An overset grid for a complex geometry

Page 9: Grid Generation

A multi-block structured grid

Page 10: Grid Generation

Structured Grid Generation

• Algebraic Methods – Geometric data of the Cartesian coordinates in the interior of a domain are generated from specified values at the boundaries through interpolations or specific functions of the curvilinear coordinates.

• PDE Mapping Methods – Mapping by solving PDEs with the dependent and independent variables being the physical domain coordinates and transformed computational domain coordinates respectively.

Page 11: Grid Generation

Algebraic Methods

• Domain Vertex Method – utilize tensor products of unidirectional FEM interpolation functions (Lagrangian, Hermite or Spline) for two or three dimensions.

ˆ ˆ ˆ , 1, 2,3, , , 1, 2

, , , 1, 2,3, 1,....,8

i L M N iLMN

i N iN

x x i L M N

or

x x i N

Page 12: Grid Generation

Algebraic Methods – Contd.

• Transfinite Interpolation – tensor products of unidirectional interpolation but with all sides of the boundaries interpolated and matched. The corner nodes are also matched.

• Steps (2-dimensions)1. Pick four points on which are identified

as the images of the four corners of .

Page 13: Grid Generation

TFI – Contd.

2. The resulting four curve segments are identified as the graphs of the four vector valued functions F(0,), F(1,), F(,0) and F(,1) – the 4 segments of the physical boundary are images of the 4 sides of the computational domain.

3. A bilinearly blended transfinite function U(, ) is constructed using (Boolean sum projection) the four F functions that maps the boundary of the computational domain to that of the physical domain.

4. Check for univalency criteria – nonsingular Jacobian

Page 14: Grid Generation

TFI – Contd.

• The univalent function matches F on the boundary of and interpolates to F at a finite set of points.

:U

1 1 2 2

1 1 2 2

0, 1,

,0 ,1

N M NM

U F F F F

F F F

F F F

F F

Page 15: Grid Generation

b

Physical domain

Transformed computational domain

Transfinite interpolation

Page 16: Grid Generation

FNM match the function at four corners but not on all boundaries

Page 17: Grid Generation

Parameterization for 2D C-type structured grid

Page 18: Grid Generation

PDE Mapping Methods

• Elliptic Grid Generator – Solution of a set of elliptic PDE, (Laplace or Poisson equations)

Iterative solution in the computational domain to determine the grid coordinates (x,y).

2 2 2 2 2

2 2 2 2 2

2

2

x y x x x y y x x y x J Px Qx

x y y x x y y y x y y J Py Qy

Page 19: Grid Generation

1. Smooth grid point distribution

2. Orthogonality at boundaries

3. Desired clustering using appropriate control functions P and Q

4. Construction of the control functions is often difficult

5. Larger computational time

6. Most widely used

Page 20: Grid Generation

Hyperbolic Grid Generator

• Applicable to open domain problem

• Computationally efficient and less expensive marching type solution

• Inability to match prescribed point distribution on all boundaries

• Hyperbolic PDE for constraints of orthogonality and cell volume/arc length

22 2 2 2

0x x y y and

either x y y x V

or x y x y s

Page 21: Grid Generation

Treatment of doubly and multiply connected domain for O-type grid

Treatment of doubly and multiply connected domain for O type grid

Page 22: Grid Generation

O type elliptic grid with control

Page 23: Grid Generation

Geometry Definition – Surface Modeling & Surface Grid

• Point Sets – Union of ordered point sets that define multiple cross-sections of the geometry. Inaccurate and ambiguous form of surface discretization. Geometry details like small gaps, slope and curvature continuity not preserved.

• B-Rep – Geometry definition by a set of 3 or 4 sided curved surface patches and trimmed surfaces.

Page 24: Grid Generation

Approximation of a surface with hole by two patches and by a single trimmed surface

Page 25: Grid Generation

B-Rep

• Surface Repair – Removal of unrealistic gaps, discontinuities and small overlaps created by the CAD packages – modified input geometry.

• Projection Surface – The surface grid is constructed on a projection surface which is then placed over the collection of surface patches that defines the actual geometry.

Page 26: Grid Generation

Mesh generation on the surface patches

• Physical space approach – grid points must coincide with the actual surface and need to be determined from the actual surface geometry.

• Parametric space approach – 2D meshing problem. To be mapped back to physical space. Possibility of invalid physical surface mesh for highly warped surface or irregular parameterization. Global or quilted patches solely for meshing.

Page 27: Grid Generation

Elliptic Surface Grid

• The governing equations are

1 222 ,11 11 ,22 12 ,12 1 ,1 2 ,2 1 2

2 2 2 2 2 211 11

12 ,1 ,2

,11 ,22 ,12

1 21 2

1ˆ2

, , ,

, , , , , ,

, , , , , , , ,

,

T T

T T T

a r a r a r Pr P r b b na

a x y x y a x y z a x y z

a x x y y z z r x y z r x y z

r x y z r x y z r x y z

b b ar

e principal curvatures

Page 28: Grid Generation

Algebraic Surface Grid

• Construction of curves on the surfaces and surface patches using appropriate basis polynomials and control vectors – NURBS are most widely used.

• Union of the patches is the global surface.

• For valid mesh the curves bordering each patch are to be meshed the same way in all patches containing them.

• Mesh each patch, parametric space preferred.

Page 29: Grid Generation

Structured surface grid on the top surface of a generic hyperplane

Page 30: Grid Generation

Structured surface grid on the bottom surface of the hyperplane

Page 31: Grid Generation

Surface patches created on a hypersonic vehicle for unstructured grid generation

Page 32: Grid Generation

Adaptive Meshing

• Mesh point movement or mesh redistribution – structure and connectivity preserved.

1. Spring analogy – each edge a spring, stiffness depends on the quantity to be minimized.

2. Variational principle – minimization functional containing various solution based criteria as well as grid quality criteria simultaneously.

3. Control functions – modified to produce clustering based on solution gradients or truncation errors.

• Mesh enrichment – addition of extra vertices, structure and connectivity lost.

Page 33: Grid Generation

Unstructured Grid

• Requirement of structure in the mesh removed offering increased flexibility.

• Nodes numbered in any order, and have arbitrary number of neighbours.

• Arbitrary but homogeneous connectivity Single data structure for the entire mesh unlike block structured mesh.

• Adaptive meshing is easy to implement• Algorithms closely tied to computational

geometry.

Page 34: Grid Generation

Unstructured Grid

• Elements are generally triangles and tetrahedrons – but need not be.

• Two most prevalent mesh generation approaches.

1. Advancing Front Method

2. Delaunay Triangulation Method

Page 35: Grid Generation

Advancing Front Method

• Initial Front – union of the edges that discretize the geometry boundary. This front advances out into the field. A stack or priority queue.

• Selecting an edge from this list, a new point is created based on specified criteria so that an optimal triangle is formed.

• Updating the front – by removing the current edge and adding the two newly created edges depending on their visibility.

• Process terminates when the stack (front) is empty.

Page 36: Grid Generation

Advancing Front Concept. Dotted line is the initial front

Page 37: Grid Generation

Point Selection

Field points are created to produce triangles of optimal shape and size.

1. Specification of parameters

2. Field function or distribution function

3. Background grid

4. Interpolation

5. Cross-over (intersection) with other edges

6. Smaller edge or angle later

7. Smooth variation of triangle sizes

Page 38: Grid Generation

For 3D

1. Initial front is the surface grid (2D triangular mesh on the boundary surfaces.

2. New points ahead of the front to form tetrahedra.

3. Both edge-edge and edge-face intersection check.

Local transformation (edge and/or face swapping) for quality improvement.

Boundary integrity guaranteed

Page 39: Grid Generation

Delaunay Triangulation

• Triangulation of a set of points using Delaunay criterion – “No triangle can contain a point other than its forming vertices within its circumcircle”

Unique triangulation (in 2D) More efficient than AF Boundary integrity lost, boundary to be

recovered Max-min property – maximizes the

smallest angle in the triangulation.

Page 40: Grid Generation

Incremental Delaunay Triangulation

Predetermined mesh points put in a list. Initial triangulation of just a few triangles

to completely cover the domain to be gridded.

Mesh points inserted sequentially into the existing triangulation

Page 41: Grid Generation

Incremental Delaunay Triangulation

Insertion of a new point into an existing triangulation is locating and deleting all existing triangles whose circumcircle

contain the inserted point. A new triangulation is then constructed by joining the new point to all boundary vertices of the cavity created. (Bowyer-Watson Algorithm)

Page 42: Grid Generation

Point insertion technique

Page 43: Grid Generation

Automatic Point Placement

• An initial coarse triangulation• A priority queue based on some triangle

parameter.• Field distribution of the parameter as desired.• Triangles in the queue are sequentially examined

and if required a point is inserted at the circumcentre

• New triangles are put in the queue if not acceptable.

Page 44: Grid Generation

Boundary Integrity

• Not guaranteed if the domain is concave. Edges or faces that define the boundary do not form a subset of the triangulation.

• Boundary to be recovered by local transformation (edge and face swapping) and modifying the boundary point resolution.

• Constrained triangulation.

Page 45: Grid Generation

Edge swapping process

Edge-face swapping

Page 46: Grid Generation

Breakthrough of boundary in Delaunay triangulation

Page 47: Grid Generation

Example of a 2D unstructured grid

Page 48: Grid Generation

A tetrahedral unstructured grid for a 3D geometry