132
ME469B/2/GI 1 Geometry Modeling & Grid Generation

Geometry Modeling & Grid Generation

Embed Size (px)

Citation preview

Page 1: Geometry Modeling & Grid Generation

ME469B/2/GI 1

Geometry Modeling &

Grid Generation

Page 2: Geometry Modeling & Grid Generation

ME469B/2/GI 2

Geometry Modeling & Grid Generation

• Geometry definition (simple shapes, CAD import)• Grid generation algorithms• GAMBIT• Grid quality and improvement• Automation

Acknowledgements: Fluent Inc. Gambit User ManualS. Owen: Introduction to unstructured mesh generation

Page 3: Geometry Modeling & Grid Generation

ME469B/2/GI 3

Simulation Process

3

2

1. Build CAD Model 2. Mesh 3. Apply BoundaryConditions

4. Computational Analysis 5. Visualization

Page 4: Geometry Modeling & Grid Generation

ME469B/2/GI 4

Adaptive Simulation Process

3

2

1. Build CAD Model 2. Mesh 3. Apply Boundary Conditions

4. Computational Analysis

7. Visualization

5. Error Estimation

Error?

6. Remesh/Refine/Improve

Adaptivity Loop

Error < ε

Error > ε

Usersupplies meshing

parameters

Analysis Codesupplies meshing

parameters

Page 5: Geometry Modeling & Grid Generation

ME469B/2/GI 5

Geometry

Mesh Generation

Geometry Engine

Page 6: Geometry Modeling & Grid Generation

ME469B/2/GI 6

Grid generation package: GAMBIT

Geometry Grid BC Tools

GeometryTools

VolumeTools

VisualizationTools

GraphicsWindow

Special

TextWindow

File I/O Defaults GridFormat

Page 7: Geometry Modeling & Grid Generation

ME469B/2/GI 7

GAMBIT

gambit -id <namefile>Interactive execution with GUI

gambit -inp <journalfile>Batch execution without GUI

Geometry & Grid are saved in a database file (*.dbs)The mesh is saved into a solver-dependent file (*.msh)

At the end of each session Gambit automatically saves a journal file (*.jou)

Batch and GUI execution are EXACTLY equivalent!

Page 8: Geometry Modeling & Grid Generation

ME469B/2/GI 8

Geometry

vertices:x,y,z location

Page 9: Geometry Modeling & Grid Generation

ME469B/2/GI 9

vertices:x,y,z location

curves: boundedby two vertices

Geometry

Page 10: Geometry Modeling & Grid Generation

ME469B/2/GI 10

vertices:x,y,z location

surfaces: closedset of curves

curves: boundedby two vertices

Geometry

Page 11: Geometry Modeling & Grid Generation

ME469B/2/GI 11

vertices:x,y,z location

surfaces: closedset of curves

volumes: closedset of surfaces

curves: boundedby two vertices

Geometry

Page 12: Geometry Modeling & Grid Generation

ME469B/2/GI 12

group: collectionof volumes

vertices:x,y,z location

surfaces: closedset of curves

volumes: closedset of surfaces

curves: boundedby two vertices

Geometry

Page 13: Geometry Modeling & Grid Generation

ME469B/2/GI 13

Volume 1

Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Surface 6

Volume 2

Surface 8 Surface 9 Surface 10 Surface 11

Surface 7

Volume 1

Volume 2

Surface 11

Surface 7

Manifold Geometry:Each volume maintainsits own set of uniquesurfaces

Geometry

Page 14: Geometry Modeling & Grid Generation

ME469B/2/GI 14

Volume 1

Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Surface 6

Volume 2

Surface 8 Surface 9 Surface 10

Surface 7

Volume 1

Volume 2

Surface 7

Non-ManifoldGeometry: Volumesshare matching surfaces

Geometry

Page 15: Geometry Modeling & Grid Generation

ME469B/2/GI 15

Geometry & Topology

Geometry types in Gambit

• Real Geometry: entities characterized by a direct definition of their geometry

example: a vertex defined by its coordinates (0,0,0)

• Virtual Geometry: entities characterized ONLY by an indirect definition, i.e. a reference to another entity.

example: a vertex is defined as the mid-point of an edge

• Faceted Geometry : entities characterized ONLY by an indirect definition with respect to an underlying grid

example: a vertex is defined as the corner of a mesh element

Page 16: Geometry Modeling & Grid Generation

ME469B/2/GI 16

Geometrical types - Topology

• Vertex

• Edge (2 or more vertices) • Face (3 or more edges)

• Volume (4 or more faces)

Bottom-up approach: generate low dimensional entities and build on top of them higher dimensional entities

Top-bottom approach: generate upper dimensional entities and use boolean operation to define the other entities

Page 17: Geometry Modeling & Grid Generation

ME469B/2/GI 17

Vertex:

Edge:

• Input Coordinates…

• Line segment (connect 2 vertices)• Circular arc• Quadratic functions• NURBS: Non-Uniform Rational B-Splines (connect N vertices)

Topologically any edge is ALWAYS a connection between 2 vertices(additional vertices used to build the geometry are NOT part of the edge)

Page 18: Geometry Modeling & Grid Generation

ME469B/2/GI 18

Edge by NURBS

Non-Uniform Rational B-Splines

Generalization of Bezier interpolants: each point is computed as the weightedsum of all the knot points

NURBS can use various blending/control functions (for the weights)Can achieve high degree of continuity

http://www.ibiblio.org/e-notes/Splines/NURBS.htm

Page 19: Geometry Modeling & Grid Generation

ME469B/2/GI 19

Face:

• Rectangular• Circular• …• Sweep (translation or rotation of an edge)• Wireframe (connecting 3 or more edges)

Page 20: Geometry Modeling & Grid Generation

ME469B/2/GI 20

Volume:

• Cuboid• Sphere• Cone• Pyramids• …• Sweep (translation or rotation of a face)• Wireframe (connecting 3 or more faces)

Page 21: Geometry Modeling & Grid Generation

ME469B/2/GI 21

Manipulate Geometry - Boolean Operations:

• Unite• Substract• Intersect

Volume 1

Volume 2

it generates theintersection edge

Page 22: Geometry Modeling & Grid Generation

ME469B/2/GI 22

Manipulate Geometry - Blend

smooth sharp edges

Page 23: Geometry Modeling & Grid Generation

ME469B/2/GI 23

Create Entities - Faces

Page 24: Geometry Modeling & Grid Generation

ME469B/2/GI 24

Create Entities - Faces

Some entities generated using “primitives” have fewer lower topological entitiesExample:

Cube volume: 6 faces, 12 edges, 8 verticesCylinder volume: 3 faces, 2 edges, 2 vertices

Page 25: Geometry Modeling & Grid Generation

ME469B/2/GI 25

Manipulate Geometry – Create Entities

Parametric representationof the face

Create a vertex on a face

Page 26: Geometry Modeling & Grid Generation

ME469B/2/GI 26

Manipulate Geometry – Create Entities

Create two edges by splitting an edge

Parametric representationof the edge

Page 27: Geometry Modeling & Grid Generation

ME469B/2/GI 27

Manipulate Geometry – Scaling

Geometrical scaling of a volume (isotropic)

Scaling is based on a Reference PointDefault (0,0,0) - origin of the original Cartesian coordinate systemIt is possible to introduce additional coordinate systems

Page 28: Geometry Modeling & Grid Generation

ME469B/2/GI 28

Manipulate Geometry – Align

Modify the geometry of an entity with referenceto another one

Page 29: Geometry Modeling & Grid Generation

ME469B/2/GI 29

Connect Geometry

Building upper topological entities from the lower onesrequires that they are properly connected

Inconsistentconnections

Consistentconnections

Page 30: Geometry Modeling & Grid Generation

ME469B/2/GI 30

Import Geometries

• Realistic geometries are TOO complicated to be generated from “simple” shapes• Engineering design is based on CAD systems

• Gambit is based on ACIS geometrical libraries• ACIS (Andy, Charles & Ian’s System) is the most widely used 3D modeling software technology (http://www.spatial.com)

• It can also import:• STEP (STandard for Exchange of Product model data; ISO standard)• IGES (Initial Graphics Exchange Specification; ANSI standard)• STL (STereo Lithography; Rapid Prototyping Standard)• ….

Translation between CAD and CFD system is a major bottleneck

Page 31: Geometry Modeling & Grid Generation

ME469B/2/GI 31

Import Geometries

Page 32: Geometry Modeling & Grid Generation

ME469B/2/GI 32

Clean-Up a CAD Model

• Eliminate components not exposed to the flow

• Eliminate duplicated entities

• Eliminate small details

• Water-proofing the surfaces

• Rebuild geometrical connectivity between parts

Page 33: Geometry Modeling & Grid Generation

ME469B/2/GI 33

Example: Helicopter Rotor

The rotor-shaft connectionis VERY complicated

Page 34: Geometry Modeling & Grid Generation

ME469B/2/GI 34

Geometrical entities

The geometry consists of 10 components3 blades, 1 shaft support, 6 connectors

Page 35: Geometry Modeling & Grid Generation

ME469B/2/GI 35

Example: Import IGES Model

IGES export is available from everyCAD system

IGES models are a collection of“untrimmed” edges and faces

Imported geometry consists of:0 volumes~250 faces~1100 edges~1000 vertices

Page 36: Geometry Modeling & Grid Generation

ME469B/2/GI 36

Example: Import STEP Model

STEP export is available from manyCAD system

STEP models are a collection of partsor components

Imported geometry consists of:10 volumes~190 faces~450 edges~300 vertices

Page 37: Geometry Modeling & Grid Generation

ME469B/2/GI 37

Components “exploded”

For aerodynamic analysis the details of the rotor-shaftconnection are not important. The geometry of theblades MUST be preserved

blade

supportconnector-1

connector-2

Page 38: Geometry Modeling & Grid Generation

ME469B/2/GI 38

Geometry simplification

Connectors eliminated

Support generated as a “simple” cylinder with blended side

Page 39: Geometry Modeling & Grid Generation

ME469B/2/GI 39

Geometry simplification

Blade edge cleaned andsealed

Blade-support connectoris a “simple” cuboid

Page 40: Geometry Modeling & Grid Generation

ME469B/2/GI 40

Clean Geometry

This example is available on the class Web site

Page 41: Geometry Modeling & Grid Generation

ME469B/2/GI 41

Virtual Geometry

GAMBIT operates on two different type of entities

REAL: with corresponding geometrical and topological characteristicsVIRTUAL: defined only with reference to REAL or other VIRTUAL entities

REAL entities are what we used and described so far;VIRTUAL are used to SIMPLIFY, CLEAN UP, DECOMPOSE real entities

Note that some geometry tools cannot be applied to virtual entities(boolean operation, volume blending, creation of volumes by sweeping faces, etc.)

Page 42: Geometry Modeling & Grid Generation

ME469B/2/GI 42

Superset: Entity that references two or more real entitiesInterpolant: Entity represents an average/interpolant ot various real entitiesParasite: Entity defined completely from a real entity

The virtual geometry is typically constructed using a host entity

Virtual Geometry

Real entities can be transformed in virtual but NOT ALWAYS viceversa

Page 43: Geometry Modeling & Grid Generation

ME469B/2/GI 43

REAL VIRTUAL

Virtual Geometry Clean-Up

Example of edge connecting operation: virtual interpolant

Page 44: Geometry Modeling & Grid Generation

ME469B/2/GI 44

Clean-Up CracksA "crack" is defined as a geometry consisting of an edge pairthat meets the following criteria.

・Each edge in the pair serves as a boundary edge for a separate face.・The edges share common endpoint vertices at one or both ends.・The edges are separated along their lengths by a small gap.

Page 45: Geometry Modeling & Grid Generation

ME469B/2/GI 45

Hard edges (dangling edges) are those that are included in the list ofedges that define a face but which do not constitute necessary parts ofthe closed edge loop that circumscribes the face.

Such edges often result from face-split operations in which the split-tool face only partially intersects the target face.

Clean-Up Hard Edges

Page 46: Geometry Modeling & Grid Generation

ME469B/2/GI 46

Grid Generation

• Geometry definition (simple shapes, CAD import)• Grid generation algorithms• GAMBIT• Grid quality and improvement• Automation

Page 47: Geometry Modeling & Grid Generation

ME469B/2/GI 47

Grid generation techniques

• Structured grids• Ordered set of (locally orthogonal) lines• Several Techniques can be used to Map a computational domain into a physical domain: Transfinite Interpolation, Morphing, PDE Based, etc.• The grid lines are curved to fit the shape of the boundaries

• Unstructured grids• Unorganized collection of polygons (polyhedron) • Three main techniques are available to generate automatically triangles (tetrahedra): Delaunay triangulation, Advancing front, OCTREE• Paving for automatic generation of quads in 2D

Page 48: Geometry Modeling & Grid Generation

ME469B/2/GI 48

Grid generation techniques From S. Owen, 2005

Page 49: Geometry Modeling & Grid Generation

ME469B/2/GI 49

Grid generation techniques

http://cubit.sandia.gov/

Gambit is a “commercial” grid generator and includes only few (relativelystandard) algorithms. New methods are slow to gain robustness andgenerality and therefore are not directly available

Cubit is a “research” grid generator and the latest approaches are typicallyincluded (several of them have been actually invented by the Cubit team)

Page 50: Geometry Modeling & Grid Generation

ME469B/2/GI 50

Grid generation techniques From S. Owen, 2005

Page 51: Geometry Modeling & Grid Generation

ME469B/2/GI 51

k

j

j=NJ=1j=1=NJ

k=1

k=NK

Physical Domain Computational Domain

Side

A1

Sid

e A

2

Side

C

Side B

Side D

Structured Grids: Mapping Si

de A

2

Side A1

Side C

Side B

Side

D

Transfinite Interpolation

Page 52: Geometry Modeling & Grid Generation

ME469B/2/GI 52

Structured Grids: Sub-mapping

Regions are automatically subdivided in “mappable areas”

Number of grid elementshave to be chosen consistently

The grid type is controlledby a vertex attribute

Page 53: Geometry Modeling & Grid Generation

ME469B/2/GI 53

Vertex-face type

User can specify the behavior of the grid at a certain node

Page 54: Geometry Modeling & Grid Generation

ME469B/2/GI 54

Unstructured Grids: Triangulations

• Delaunay• Empty circle principle: any node must not be contained within the circumcircle (circle passing through the vertices of a triangle) on any triangle within the mesh• Automatic triangulation of random set of nodes• Nodes are inserted locally in a triangulation and triangles are redefined locally to satisfy the Delaunay criterion (available mathematical tools)

+ Inherent grid quality+ Elegant mathematical basis - Boundary integrity

Page 55: Geometry Modeling & Grid Generation

ME469B/2/GI 55

Delaunay

circumcircle

Empty Circle (Sphere) Property:No other vertex is contained within the circumcircle(circumsphere) of any triangle (tetrahedron)

Page 56: Geometry Modeling & Grid Generation

ME469B/2/GI 56

Delaunay Triangulation:Obeys empty-circle (sphere) property

Delaunay

Page 57: Geometry Modeling & Grid Generation

ME469B/2/GI 57Non-Delaunay Triangulation

Delaunay

Page 58: Geometry Modeling & Grid Generation

ME469B/2/GI 58

Lawson Algorithm•Locate triangle containing X•Subdivide triangle•Recursively check adjoiningtriangles to ensure empty-circle property. Swapdiagonal if needed•(Lawson,77)

X

Given a DelaunayTriangulation of n nodes,How do I insert node n+1 ?

Delaunay

Page 59: Geometry Modeling & Grid Generation

ME469B/2/GI 59

X

Lawson Algorithm•Locate triangle containing X•Subdivide triangle•Recursively check adjoiningtriangles to ensure empty-circle property. Swapdiagonal if needed•(Lawson,77)

Delaunay

Page 60: Geometry Modeling & Grid Generation

ME469B/2/GI 60

Bowyer-Watson Algorithm•Locate triangle that containsthe point•Search for all triangleswhose circumcircle containthe point (d<r)•Delete the triangles (creatinga void in the mesh)•Form new triangles from thenew point and the voidboundary•(Watson,81)

X

r cd

Given a DelaunayTriangulation of n nodes,How do I insert node n+1 ?

Delaunay

Page 61: Geometry Modeling & Grid Generation

ME469B/2/GI 61

X

Bowyer-Watson Algorithm•Locate triangle that containsthe point•Search for all triangleswhose circumcircle containthe point (d<r)•Delete the triangles (creatinga void in the mesh)•Form new triangles from thenew point and the voidboundary•(Watson,81)

Given a DelaunayTriangulation of n nodes,How do I insert node n+1 ?

Delaunay

Page 62: Geometry Modeling & Grid Generation

ME469B/2/GI 62

Unstructured Grids: Triangulations

• Advancing front• Triangles are built inward from the boundary surfaces• The last layer of elements constitutes the active front • An optimal location for a new nodes is generated for each segment on the front; the new node is generated by checking all existing nodes and this new optimal location • Intersection checks are required to avoid front overlap

+ Surface grid preserved+ Specialized layers near surfaces - Computationally complex - Low quality

Page 63: Geometry Modeling & Grid Generation

ME469B/2/GI 63

Advancing Front

A B

C

•Begin with boundary mesh - define as initial front•For each edge (face) on front, locate ideal node C based on front AB

Page 64: Geometry Modeling & Grid Generation

ME469B/2/GI 64

Advancing Front

A B

Cr

•Determine if any other nodes on current front are within searchradius r of ideal location C (Choose D instead of C)

D

Page 65: Geometry Modeling & Grid Generation

ME469B/2/GI 65

Advancing Front

•Book-Keeping: New front edges added and deleted from front astriangles are formed•Continue until no front edges remain on front

D

Page 66: Geometry Modeling & Grid Generation

ME469B/2/GI 66

Advancing Front

•Book-Keeping: New front edges added and deleted from front astriangles are formed•Continue until no front edges remain on front

Page 67: Geometry Modeling & Grid Generation

ME469B/2/GI 67

Advancing Front

•Book-Keeping: New front edges added and deleted from front astriangles are formed•Continue until no front edges remain on front

Page 68: Geometry Modeling & Grid Generation

ME469B/2/GI 68

Advancing Front

•Book-Keeping: New front edges added and deleted from front astriangles are formed•Continue until no front edges remain on front

Page 69: Geometry Modeling & Grid Generation

ME469B/2/GI 69

Advancing Front

A

B

C

•Where multiple choices are available, use best quality (closestshape to equilateral)•Reject any that would intersect existing front•Reject any inverted triangles (|AB X AC| > 0)•(Lohner,88;96)(Lo,91)

r

Page 70: Geometry Modeling & Grid Generation

ME469B/2/GI 70

Advancing Front

Remarkable high-quality grid

Page 71: Geometry Modeling & Grid Generation

ME469B/2/GI 71

Unstructured Grids: Triangulations

• OCTREE• Squares containing the boundaries are recursively subdivided until desired resolution is obtained• Irregular cells (or triangulation) are generated near the surface where square intersect the boundary

+ Requires least of surface representation+ Highly automated - Cannot match surface grid - Low quality near surfaces

Page 72: Geometry Modeling & Grid Generation

ME469B/2/GI 72

Octree/Quadtree

•Define intial bounding box (root of quadtree)•Recursively break into 4 leaves per root to resolve geometry•Find intersections of leaves with geometry boundary•Mesh each leaf using corners, side nodes and intersections with geometry•Delete Outside•(Yerry and Shephard, 84), (Shepherd and Georges, 91)

Page 73: Geometry Modeling & Grid Generation

ME469B/2/GI 73

Unstructured Grids: Paving

• Advancing front technique based on quads (instead of triangles)• Only in 2D

Triangulation Paving

Page 74: Geometry Modeling & Grid Generation

ME469B/2/GI 74

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

(Blacker,92)(Cass,96)

Page 75: Geometry Modeling & Grid Generation

ME469B/2/GI 75

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

(Blacker,92)(Cass,96)

Page 76: Geometry Modeling & Grid Generation

ME469B/2/GI 76

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

(Blacker,92)(Cass,96)

Page 77: Geometry Modeling & Grid Generation

ME469B/2/GI 77

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

Form new rowand check for

overlap

(Blacker,92)(Cass,96)

Page 78: Geometry Modeling & Grid Generation

ME469B/2/GI 78

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

Insert“Wedge

(Blacker,92)(Cass,96)

Page 79: Geometry Modeling & Grid Generation

ME469B/2/GI 79

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

Seams

(Blacker,92)(Cass,96)

Page 80: Geometry Modeling & Grid Generation

ME469B/2/GI 80

Unstructured-Quad

Paving•Advancing Front: Begins with front at boundary•Forms rows of elements based on front angles•Must have even number of intervals for all-quad mesh

CloseLoops and

smooth

(Blacker,92)(Cass,96)

Page 81: Geometry Modeling & Grid Generation

ME469B/2/GI 81

Unstructured-Quad

Reproduces an uniform mesh

Page 82: Geometry Modeling & Grid Generation

ME469B/2/GI 82

Unstructured-Quad

Reproduces an uniform mesh…almost. But itallows flexibility in the edge meshing

Page 83: Geometry Modeling & Grid Generation

ME469B/2/GI 83

Unstructured Quad-to-Tri

Page 84: Geometry Modeling & Grid Generation

ME469B/2/GI 84

Unstructured Grids: Coopering

• 2D mesh sweeping• Only for cylindrical volumes• unstructured surface mesh is generated on surface A (source face)

• structured grids are generated on cylindrical surfaces C & D

• mesh on surface A is sweeped in the volume to generate the full 3D m esh

Page 85: Geometry Modeling & Grid Generation

ME469B/2/GI 85Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 86: Geometry Modeling & Grid Generation

ME469B/2/GI 86

source

target

Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

linkingsurfaces

Coopering/Sweeping

Page 87: Geometry Modeling & Grid Generation

ME469B/2/GI 87Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 88: Geometry Modeling & Grid Generation

ME469B/2/GI 88Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 89: Geometry Modeling & Grid Generation

ME469B/2/GI 89Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 90: Geometry Modeling & Grid Generation

ME469B/2/GI 90Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 91: Geometry Modeling & Grid Generation

ME469B/2/GI 91Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 92: Geometry Modeling & Grid Generation

ME469B/2/GI 92Sweeping

Geometry Requirements•source and target surfacestopologicaly similar•linking surfaces mapableor submapable

Coopering/Sweeping

Page 93: Geometry Modeling & Grid Generation

ME469B/2/GI 93

Standard Elements:

Hex Tet Pyramid Wedge

Hex: Maximum Volume Covered per Edge Size Hex: Maximum Ratio Nodes/Elements Hex/Wedges: Clustering at Solid Wall with High Quality Elements Tets: Automatic Meshing of Extremely Complicated Regions Pyramids/Wedges: Transition Between Tets & Hex

Unstructured Grids: 3D elements

Page 94: Geometry Modeling & Grid Generation

ME469B/2/GI 94

35K Total Elements 410K Total Elements

We NEED Hex-Based Meshing because: Equiangular Tets are NOT Good for Thin Volumes Too Many Elements for Reasonable Resolutions (estimated >2M grid Points in conical-annular Swirler)

Cross-Section of the Swirler

Unstructured Grids: Hex or Tets?

Page 95: Geometry Modeling & Grid Generation

ME469B/2/GI 95

What is available in GAMBIT

• Structured gridding (mapping)

• Unstructured triangulation (2D/3D)

• Unstructured paving (2D)

• Unstructured coopering (3D)

All GAMBIT meshes are exported as unstructured collection of (mixed) elements

+-+/--+

+++/---

-++/-+-

+-+++

Spee

d

Rob

ustn

ess

Qua

lity

& C

ontro

l

Com

plex

Geo

met

ry

Mes

h si

zes

Page 96: Geometry Modeling & Grid Generation

ME469B/2/GI 96

Grid generation – 1D - Edges

Straightforward

Select number of pointsSelect distribution of points

Edge direction is defined from 1st to 2nd vertexClustering toward one side is defined accordingly

Page 97: Geometry Modeling & Grid Generation

ME469B/2/GI 97

Grid generation – 2D - Faces

Easy

Select number of points• use predefined edge meshes• use uniform spacing

Select meshing scheme• constraints on the edge meshing for mapping and paving schemes

Page 98: Geometry Modeling & Grid Generation

ME469B/2/GI 98

Grid generation – 2D - Faces

It is possible to force the cell element typeat face-vertices

Mixing element-type is one of the main advantages of unstructured meshtechnology

elementsforced tobe triangles

Page 99: Geometry Modeling & Grid Generation

ME469B/2/GI 99

Grid generation – 2D - Mesh-patching options

Matching interface Non-conformal interface

Overlapping interface Mixed-element interface

Page 100: Geometry Modeling & Grid Generation

ME469B/2/GI 100

Grid generation – 3D - Volumes

Not so easy

Select number of points• use predefined face meshes• use uniform spacing

Select meshing scheme• constraints on the face meshing for mapping and cooper schemes

Page 101: Geometry Modeling & Grid Generation

ME469B/2/GI 101

3D Grid generation – Advanced Cooper technique

“Creative” way of coopering: multisurface to multisurface sweep

Page 102: Geometry Modeling & Grid Generation

ME469B/2/GI 102

Grid generation – Sizing functions

Instead of the bottom-up approach (1D to 3D) grid generationSizing functions can be specified to mesh volumes directly

Page 103: Geometry Modeling & Grid Generation

ME469B/2/GI 103

Grid generation – Clustering points

Sizing functions can be used effectively to define the size of thecells BUT they cannot provide directional control (anisotropy)

One option is to build (grow) elements from the boundaries andto form “viscous” layers

Page 104: Geometry Modeling & Grid Generation

ME469B/2/GI 104

Grid generation – Boundary Layers

Page 105: Geometry Modeling & Grid Generation

ME469B/2/GI 105

Example – meshing a circle

Mapping Triangulation Paving Multiblock mapping

Boundary Layer Boundary Layer Boundary Layer Boundary Layer Transition Paving Paving Multiblock Paving Multiblock Paving

Circle defined as segments

Page 106: Geometry Modeling & Grid Generation

ME469B/2/GI 106

Mesh linking

Edges, faces and volume meshescan be linked

Define corresponding entitiesand ALSO reference entities

Needed to “enforce” coincidentgrids on different entities (i.e.for periodicity bc)

Page 107: Geometry Modeling & Grid Generation

ME469B/2/GI 107

Grid quality

Quality measures are NOT absolute but should be considered inconnection with solution schemes

The final accuracy of a procedure is ALWAYS a function of the gridquality

Several geometrical measures can be defined:

• Depending on the size of the elements• Depending on the shape of the elements• Depending on relative dimensions of neighboring elements

Page 108: Geometry Modeling & Grid Generation

ME469B/2/GI 108

Quality measures available in GAMBIT

Page 109: Geometry Modeling & Grid Generation

ME469B/2/GI 109

Examine meshes

Equiangular skewAspect ratio

• Define mesh element to examine• Define a cutting plane • Define the quality measure

Page 110: Geometry Modeling & Grid Generation

ME469B/2/GI 110

Mesh improvement

• Smoothing operators are applied to redistribute nodes

Equiangular skewAspect ratio

Typically, improvement in 3D meshes are based on improved 2D meshes

Page 111: Geometry Modeling & Grid Generation

ME469B/2/GI 111

P1

P2

P3

P4

P5

P

Laplacian

AveragingMethods

(Field, 1988)

Mesh improvement/smoothing

Page 112: Geometry Modeling & Grid Generation

ME469B/2/GI 112

P1

P2

P3

P4

P5P

Laplaciann

n

i

i!== 1

P

P

AveragingMethods

Centroid ofattached nodes

Can createinverted elements

(Field, 1988)

Mesh improvement/smoothing

Page 113: Geometry Modeling & Grid Generation

ME469B/2/GI 113

P1

P2

P3

P4

P5

P

Laplaciann

n

i

i!== 1

P

P

AveragingMethods

Centroid ofattached nodes

Can createinverted elements

P6

Mesh improvement/smoothing

Page 114: Geometry Modeling & Grid Generation

ME469B/2/GI 114

P6 P2

P3

P4

P5

P

Laplaciann

n

i

i!== 1

P

P

AveragingMethods

Centroid ofattached nodes

Can createinverted elements

P1

Mesh improvement/smoothing

Page 115: Geometry Modeling & Grid Generation

ME469B/2/GI 115

P1

P2

P3

P4

P5

P

Laplaciann

n

i

i!== 1

P

P

AveragingMethods

Centroid ofattached nodes

Can createinverted elements

P6

Weighted Laplacian: Do notmove node unless minimumdistortion metric is improved

Mesh improvement/smoothing

Page 116: Geometry Modeling & Grid Generation

ME469B/2/GI 116

C1

P

Area Centroid Weighted

AveragingMethods

Weightedaverage oftriangle centroids

C2

C3

C4C4

A1

A2

!

!

=

==n

i

i

n

i

ii

A

A

1

1

C

P

Ai=area of triangle i

Ci=centroid of triangle i

Mesh improvement/smoothing

Page 117: Geometry Modeling & Grid Generation

ME469B/2/GI 117

Grid Generation Automation

• GAMBIT saves a “journal” file with the commands issues during a session

• Journal file are ASCII editable files

• Commands are quasi-English and easy-to-use

• They are useful to trace-back sessions to find errors

• They can be made general by introducing User Defined Parameters

Page 118: Geometry Modeling & Grid Generation

ME469B/2/GI 118

GAMBIT Journal file

The command:

Volume create width 1 depth 1 height 1 offset 0 0 0 brick

Generates a cube of size 1 centered at 0 0 0

On the other hand the sequence

$W = 2.3$D = 1.5$H = 4Volume create width $W depth $D height $H offset 0 0 0 brick

Generates a cuboid of User-Specified Size centered at 0 0 0

Page 119: Geometry Modeling & Grid Generation

ME469B/2/GI 119

GAMBIT Journal file

It is possible to perform operations on input parameters

$SUM = $A + 0.5*$B

Math. functions are available:

$SUM = SIN($A)

In addition, geometrical operations

$X = INTERSECTING(volume, “volume.5”, “volume.12”)$X = BBOX("volume.3")$X = GETNORMAL("face.3", 1, 13, 89)(…)

Page 120: Geometry Modeling & Grid Generation

ME469B/2/GI 120

GAMBIT Journal file

Conditional statements:

if cond ($A .eq. 5) volume create sphere radius ($A+3)endif

Loops:

$Z = 0do para "$Z" init 6 cond ($Z .le. 24) incr ($Tmp*3)

volume create sphere radius $ZEnddo

Relation and logical operators :

.eq. .le. .lt. (…)

.and. .or.

Page 121: Geometry Modeling & Grid Generation

ME469B/2/GI 121

/ --------------------------------------------------------/ CYCLONE GRID GENERATION/ ME269B - Spring 2002/ --------------------------------------------------------// R1 = External radius of Cyclone/ R2 = Gas Outlet Pipe (External)/ R3 = Gas Outlet Pipe (Internal)/ RB = Particles Outlet (Bottom)/ H1 = Height of the Cylindrical Part of Cyclone/ H2 = Height of the Conical Part/ HE = Depth of the Outlet Channel into the Cyclone// inletl = Length (x) of the Gas Inlet Channel/ inleta = Height (z) of the Gas Inlet Channel/ inletb = Span (y) of the Gas Inlet Channel/ outletl = Length (z) of the outlet (gas) pipe// cellsize = Average size of the cells// Remark: z-axis is the Cyclone Axis/ --------------------------------------------------------// Input Quantities/$R1 = 1.555$R2 = 0.45$R3 = 0.4$RB = 0.75$H1 = 4.5$H2 = 5$HE = 3.6$inletl = 2$inleta = 1.03$inletb = 0.7$outletl = 7.2$cellsize = 0.18//

Example of Journal file

Page 122: Geometry Modeling & Grid Generation

ME469B/2/GI 122

Grid generation research

Structured grids: automatic generation of mappable subdomains

NLR 2000-366 Report(PDF available from class web site)

Unstructured tetrahedral grids: anisotropic Delaunay schemesShimada et al. “High quality anisotropic tetrahedral mesh generationvia ellipsoidal bubble packing” (PDF available)

Page 123: Geometry Modeling & Grid Generation

ME469B/2/GI 123

Grid generation research

Unstructured hex-dominant grids: OCTREE basedSAMM – Computational Dynamics Ltd.Hexpress – Numeca International Inc.

Unstructured purely hexahedral grids: Whisker-WeavingCUBIT – Sandia National Lab. (PS report available)

Page 124: Geometry Modeling & Grid Generation

ME469B/2/GI 124

Medial Axis

(Price, 95;97)(Tam,91)

•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts

Grid generation using Medial Axis

Page 125: Geometry Modeling & Grid Generation

ME469B/2/GI 125

Medial Axis•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts (Price, 95;97)(Tam,91)

Grid generation using Medial Axis

Page 126: Geometry Modeling & Grid Generation

ME469B/2/GI 126

Medial Axis•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts (Price, 95;97)(Tam,91)

Grid generation using Medial Axis

Page 127: Geometry Modeling & Grid Generation

ME469B/2/GI 127

Medial Axis•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts (Price, 95;97)(Tam,91)

Grid generation using Medial Axis

Page 128: Geometry Modeling & Grid Generation

ME469B/2/GI 128

Medial Axis•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts (Price, 95;97)(Tam,91)

Grid generation using Medial Axis

Page 129: Geometry Modeling & Grid Generation

ME469B/2/GI 129

Medial Axis•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts (Price, 95;97)(Tam,91)

Grid generation using Medial Axis

Page 130: Geometry Modeling & Grid Generation

ME469B/2/GI 130

Medial Axis•Medial Object - Roll a Maximal circle or sphere through the model. Thecenter traces the medial object•Medial Object used as a tool to automatically decompose model intosimpler mapable or sweepable parts (Price, 95;97)(Tam,91)

Grid generation using Medial Axis

Page 131: Geometry Modeling & Grid Generation

ME469B/2/GI 131

3D Medial Object examples(from FEGS website, URL: http://www.fegs.co.uk/medial.html)

Grid generation using Medial Axis

Page 132: Geometry Modeling & Grid Generation

ME469B/2/GI 132

Grid generation – Links and References

• Links• Mesh generation and grid generation on the Web http://www-users.informatik.rwth-aachen.de/~roberts/meshgeneration.html• Meshing research corner http://www.andrew.cmu.edu/user/sowen/mesh.html• General CFD: Topic mesh generation http://www.cfd-online.com

• References:• Handbook of grid generation. Thompson, Soni, Weatherill, CRC Press• Numerical Grid Generation: Foundation & Applications. Thompson, Warsi, Mastin. North Holland Press