mesh generation in cfd

Post on 16-Jul-2015

407 Views

Category:

Engineering

8 Downloads

Preview:

Click to see full reader

TRANSCRIPT

© Z

eus N

um

erix

Defense | Nuclear Power | Aerospace | Infrastructure | Industry

Abhishek Jainabhishek@zeusnumerix.com

Mesh Generation in CFD

© Z

eus N

um

erix

Solving problems using CFD in 6 steps

3

2

Build Computational Domain

Create suitable Mesh

Boundary Conditions & Initial conditions

Solution of discrete equationsPlot flow FieldInterpret solution

© Z

eus N

um

erix

• The grid• Stores discrete values for the field variables

• Helps in the evaluation of partial derivatives (structured meshes)

• Helps in calculation of numerical flux / interpolations using basis functions (unstructured meshes)

• It affects• Correctness of physics

• Accuracy of solution

• Overall efficiency of simulation such as CPU time

• In fact, in terms of wall clock time and human efforts mesh generation is half simulation done!

Importance of mesh

© Z

eus N

um

erix

What meshes are required?

Sr. No. Method Type of Meshes

1 Geometric Optics (GO) / GTD CAD surfaces defined as NURBS,surface quadrilaterals or triangles

2 Physical theory of Diffraction PO/PTD Surface quadrilaterals or triangles

3 Method of Moments Surface quadrilaterals or triangles

4 Finite Element Method Quadrilaterals or triangles in 2D and Hexahedrons or Tetrahedrons in 3D

5 Finite Difference Method No meshes are required in the basic method. Octree meshes in advanced FDTD

6 Finite Volume method Quadrilaterals or triangles in 2D and Hexahedrons or Tetrahedrons in 3D

© Z

eus N

um

erix

Classification of Meshes

CartesianFDTD methods

Multi-block structured for FVDT method

Unstructured for MOM & FEM

methods

Hybrid meshes

x = y = cons

© Z

eus N

um

erix

Structured Meshes

© Z

eus N

um

erix

Creating Structured Meshes

Topological requirements in 2D

Four vertices, four edges

Opposite sides must have similar intervals / mesh points

x

y

Topological requirements

Eight vertices, twelve edges, six faces

Opposite edges must have the same no of mesh points

© Z

eus N

um

erix

Multi-block Structured Grid

Patched Grids

Domain is covered with sub-domain each with rectangular topology

Grids in each blocks are created independently

Grids are smoothened inside the block and also across the block

Block boundary

Each block has 4 edges

Grid lines have C1 continuity

© Z

eus N

um

erix

Patched Blocks with C1 Continuity

Block No1 and Block No. 2 share, Block

boundary completely, But grid lines do

not have even C0 continuity

Block 1

Block 1

Block 1 Block 1

Block 1

Block 1

Block No1 and Block No. 2 share, Block

boundary completely, Grid lines have

C0 continuity

Block No1 and Block No. 2 share, Block

boundary completely, Grid lines have

C1 continuity

C1 continuity across block boundaries gives best numerical results

© Z

eus N

um

erix

Multi-block Structured Meshes – an example

Identify the vertices, edges, faces and blocks in this figure

© Z

eus N

um

erix

Unstructured Meshes : Delaunay and advancing front triangulations

© Z

eus N

um

erix

Properties of Delaunay Triangulation

Uniqueness : The Delaunay triangulation is unique, assuming

that no four sites are circular.

The circumcircle criteria : A triangulation for N > 2 site is Delaunay if and only if

the circumcircle of every interior triangle is point-free

AD

C B

Incircle test fails on the left.

Swapping edges, as on right,

diagonal can be used to

produce Delaunay triangle

AD

C B

Interior is

not empty

© Z

eus N

um

erix

Delaunay Triangulation

All triangles obey empty-circle (sphere) property

Two triangles are highlighted

Properties of Delaunay Triangulation

© Z

eus N

um

erix

Circle shown by dotted lines does not satisfy empty circle (sphere) property

Shaded triangle is not Delaunay

Properties of Delaunay Triangulation

© Z

eus N

um

erix

Nearest neighbour Property

In Delaunay triangulation an edge is obtained by joining the

nearest neighbour

But the nearest neighbour edge is one of the many edges

Properties of Delaunay Triangulation

Nearest neighbour

edge

Minimal roughness Property

Suppose a property fi is given at all vertices Vi , where i = 1 to N

Any triangulation will produce piecewise linear interpolation surface for this data

Delaunay triangulation minimises the integral given by

[(f/x)2 + (f/y)2 ] dx dy for any f

Non-nearest neighbour

edge

© Z

eus N

um

erix

Incremental Insertion Algorithms- Common Features (popular)

New points are added to existing triangulation one

by one

New points are assumed to lie in the existing

triangulation

All incremental insertion algorithms start with a

phantom triangle large enough to enclose all the

given points

The edges formed by these points, if given as a part

of input data is initially ignored. These edges will

be built later after all the points are inserted.

Every insertion of new point requires locating (i) a

triangle or (ii) circumcircles containing this point.

In mesh adaptation the location is known. In initial

triangulation ‘search is required

Phantom

triangle

Points to be

inserted

Edge ignored

© Z

eus N

um

erix

X

Given a Delaunay Triangulation of N nodes and having inserted n nodes How do I insert the next given n+1 th node? Lawson Algorithm (not

the global edge swapping!)

Locate triangle containing X

Subdivide triangle

Recursively check adjoining triangles to ensure empty-circle property.

Swap diagonal if needed

Point Insertion Algorithm in Delaunay

© Z

eus N

um

erix

Criteria

• Insert node in the largest triangle

• Insert node on the largest edge

• Insert points at random

• Insert points arranged as a lattice

The boundary points of domain are rarely adequate for unstructured meshes. How do insert additional nodes in the domain.

Point Insertion Algorithm in Delaunay

X

© Z

eus N

um

erix

Begin with Bounding Triangles (or Tetrahedra)

Delaunay Triangulation in action

Initial Triangulation

© Z

eus N

um

erix

Insert boundary nodes using Delaunay method (Lawson or Bowyer-Watson)

Initial Triangulation

Delaunay Triangulation in action

© Z

eus N

um

erix

Insert boundary nodes using Delaunay method (Lawson or Bowyer-Watson)

Initial Triangulation

Delaunay Triangulation in action

© Z

eus N

um

erix

Insert boundary nodes using Delaunay method (Lawson or Bowyer-Watson)

Initial Triangulation

Delaunay Triangulation in action

© Z

eus N

um

erix

Insert boundary nodes using Delaunay method (Lawson or Bowyer-Watson)

Initial Triangulation

Delaunay Triangulation in action

© Z

eus N

um

erix

Insert boundary nodes using Delaunay method (Lawson or Bowyer-Watson)

Initial Triangulation

Delaunay Triangulation in action

© Z

eus N

um

erix

Recover boundary

Delete outside triangles

Insert internal nodes

Recovering Triangulation

Delaunay Triangulation in action

© Z

eus N

um

erix

Grid Based Node Insertion

Nodes introduced based on a regular latticeLattice could be rectangular, triangular, quadtree, etc…Outside nodes ignored

h

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced based on a regular latticeLattice could be rectangular, triangular, quadtree, etc…Outside nodes ignored

Grid Based Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

Centroid Based Node Insertion

Nodes introduced at triangle centroidsContinues until edge length, hl

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced at triangle centroidsContinues until edge length, hl

l

Centroid Based Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

Circumcenter (“Guaranteed Quality”) Node Insertion

e.g , a strategy: Nodes introduced at triangle circumcentersOrder of insertion based on minimum angle of any triangleContinues until minimum angle > predefined minimum

)30(

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced at triangle circumcentersOrder of insertion based on minimum angle of any triangleContinues until minimum angle > predefined minimum )30(

Circumcenter (“Guaranteed Quality”) Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

“Front” structure maintained throughoutNodes introduced at ideal location from current front edge

A B

C

Advancing Front Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

“Front” structure maintained throughoutNodes introduced at ideal location from current front edge

Advancing Front Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced at midpoint of segment connecting the circumcircle centers of two adjacent triangles

Voronoi-Segment Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced at midpoint of segment connecting the circumcircle centers of two adjacent triangles

Voronoi-Segment Node Insertion

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced at along existing edges at l = hCheck to ensure nodes on nearby edges are not too close

h

h

h

Edges

Delaunay Triangulation in action

© Z

eus N

um

erix

Nodes introduced at along existing edges at l = hCheck to ensure nodes on nearby edges are not too close

Edges

Delaunay Triangulation in action

© Z

eus N

um

erix

Boundary Constrained

Boundary IntersectionNodes and edges introduced where Delaunay edges intersect boundary

Delaunay Triangulation in action

© Z

eus N

um

erix

Boundary IntersectionNodes and edges introduced where Delaunay edges intersect boundary

Boundary Constrained

Delaunay Triangulation in action

© Z

eus N

um

erix

Boundary Constrained

Local SwappingEdges swapped between adjacent pairs of triangles until boundary is maintained

Delaunay Triangulation in action

© Z

eus N

um

erix

Local SwappingEdges swapped between adjacent pairs of triangles until boundary is maintained

Boundary Constrained

Delaunay Triangulation in action

© Z

eus N

um

erix

Local SwappingEdges swapped between adjacent pairs of triangles until boundary is maintained

Boundary Constrained

Delaunay Triangulation in action

© Z

eus N

um

erix

Boundary Constrained

Local SwappingEdges swapped between adjacent pairs of triangles until boundary is maintained

Delaunay Triangulation in action

© Z

eus N

um

erix

Boundary Constrained

Local SwappingEdges swapped between adjacent pairs of triangles until boundary is maintained

Delaunay Triangulation in action

© Z

eus N

um

erix

Algorithm (in 2D)

• Boundary is discretised based upon the points per wavelength (ppw) criteria

• Initialize front as a set of line segments defining the boundary completely

• The front is advanced in to the domain producing triangles as it advances.

• Front advances in a variety of ways depending on the angle between two consecutive edges of the front:

• Three possibilities arise : as discussed in the next slide

Advancing front Algorithm

A B

Advancing

front Domain :/ppw

© Z

eus N

um

erix

Case Deleting vertices Deleting edges Adding vertices Adding edges Included angle

Case A 1 2 Nil 1 < 30

Case B 1 2 1 2 30 < < 120

Case C Nil 1 1 2 > 120

New front

Trial point

Advancing front Algorithm

• Determine whether element formed with the trial point crosses any edge.

• If yes, select a new trial point and try again.

• Add the new point, edges and triangles to the respective lists. Delete base edge from the front and add new edge(s) to the front till front is empty

Case A Case BCase C

© Z

eus N

um

erix

Advancing Front

A B

C

Step 1:

Create a list of vertices, edges and triangles

Consider boundary as the initial front. Advance the front by creating a triangle in the domain with an edge (say AB). Locate vertex C (trial point) for the purpose.

If point C is acceptable form a triangle in the domain

Trial point

initial front

© Z

eus N

um

erix

A’ B’

C’r

Step 2:

Delete one edge, add one vertex, add two edges and add one triangle from / to the respective lists

Choose a new advancing front (A’ B’). Determine if trial point C’ is within radius r (= /ppw) , if not, accept D.

D

Advancing Front (contd.)

Edge deleted

Triangle added

Vertex added

© Z

eus N

um

erix

Step 3 :

Delete two edges, add one edge and add one triangle to the respective lists

Note that “Book-Keeping” of the vertices, edges and triangles is important

D

Advancing Front (contd.)

Triangle 1 added

Triangle 2 added

Edge deleted

Edge

dele

ted

© Z

eus N

um

erix

Step 4 :

Delete two edges, add one edge and add one triangle to the respective lists

Advancing Front (contd.)

© Z

eus N

um

erix

Advancing Front (contd.)

Step 5 :

Delete one edge, add two edges and add one triangle to the respective lists

Note that so far only one vertex has been added to the list of vertices

© Z

eus N

um

erix

Advancing Front (contd.)

Step 6 :

Delete four edges, delete four vertices and add two triangles

Where multiple choices are available, use best quality (closest shape to equilateral) triangle

Reject any triangle that intersects existing front

© Z

eus N

um

erix

A

B

C

Step 7:

To recover , reject any inverted triangles AB X AC < 0)

r

Advancing Front (contd.)

© Z

eus N

um

erix

Advantages:

Method can be used for surfaces and volume though a lot of modification is required

Anisotropic grids can be produced

Disadvantages

Grid quality is not high

Advancing fronts collide to produce poor grids

Front Advancing in the process and triangulation completed

Advancing Front Algorithm

© Z

eus N

um

erix

Hybrid Meshes

© Z

eus N

um

erix

Hybrid Methods

Structured mesh + tet meshes

Image courtesy of acelab, University of Texas, Austin, http://acelab.ae.utexas.edu

Image courtesy of Roy P. Koomullil, Engineering Research Center, Mississippi State University, http://www.erc.msstate.edu/~roy/

When two or more meshes / methods are used

© Z

eus N

um

erix

Hybrid Mesh Through Advancing Front

Discretize Boundary

© Z

eus N

um

erix

Hybrid Mesh Through Advancing Front

Concave Corner

Convex Corner

© Z

eus N

um

erix

Closure

• Mesh generation consists of

• 3D Mesh Generation : Dividing volume where electromagnetic field is required to be calculated in to tetrahedrons or hexahedrons

• 2D/ Surface Mesh Generation : Diving surfaces which limits the electromagnetic field or material boundaries into triangles or quadrilaterals

• Mesh generation affect the accuracy of solution

• Mesh Generation requires domain experience

• Mesh generation affects the duration and cost of

simulation

• Zeus Numerix uses it proprietary software GridZ™ for

the purpose.

© Z

eus N

um

erix

Thank You!

3 November 2014 60

© Z

eus N

um

erix

Questions?

top related