Beruflich Dokumente
Kultur Dokumente
&
Grid Generation
ME469B/2/GI 1
Geometry Modeling & Grid Generation
Acknowledgements:
Fluent Inc. Gambit User Manual
S. Owen: Introduction to unstructured mesh generation
ME469B/2/GI 2
Simulation Process
4. Computational Analysis
5. Visualization
ME469B/2/GI 3
Adaptive Simulation Process
User
supplies meshing
parameters
2
3
Adaptivity Loop
6. Remesh/Refine/Improve
4. Computational Analysis 5. Error Estimation
Error < ε
ME469B/2/GI 4
7. Visualization
Geometry
Mesh Generation
Geometry Engine
ME469B/2/GI 5
Grid generation package: GAMBIT
Special
Geometry Grid BC Tools
File I/O Defaults Grid
Format
Geometry
Tools
Graphics
Window
Volume
Tools
Visualization
Text Tools
Window
ME469B/2/GI 6
GAMBIT
At the end of each session Gambit automatically saves a journal file (*.jou)
ME469B/2/GI 7
Geometry
vertices:
x,y,z location
ME469B/2/GI 8
Geometry
curves: bounded
vertices: by two vertices
x,y,z location
ME469B/2/GI 9
Geometry
curves: bounded surfaces: closed
vertices: by two vertices set of curves
x,y,z location
ME469B/2/GI 10
Geometry
curves: bounded surfaces: closed
vertices: by two vertices set of curves
x,y,z location
volumes: closed
ME469B/2/GI
set of surfaces 11
Geometry
curves: bounded surfaces: closed
vertices: by two vertices set of curves
x,y,z location
group: collection
volumes: closed of volumes
ME469B/2/GI
set of surfaces 12
Geometry
Manifold Geometry:
Each volume maintains
Surface 11
its own set of unique
Volume 1
surfaces
Volume 2
Volume 2
Surface 7
Surface 8 Surface 9 Surface 10 Surface 11
Volume 1
Non-Manifold
Geometry: Volumes
share matching surfaces
Volume 1
Volume 2
Volume 2
Surface 7
Surface 8 Surface 9 Surface 10
Volume 1
ME469B/2/GI 15
Geometrical types - Topology
• Vertex
ME469B/2/GI 16
Vertex:
• Input Coordinates…
Edge:
http://www.ibiblio.org/e-notes/Splines/NURBS.htm
ME469B/2/GI 18
Face:
• Rectangular
• Circular
•…
• Sweep (translation or rotation of an edge)
• Wireframe (connecting 3 or more edges)
ME469B/2/GI 19
Volume:
• Cuboid
• Sphere
• Cone
• Pyramids
•…
• Sweep (translation or rotation of a face)
• Wireframe (connecting 3 or more faces)
ME469B/2/GI 20
Manipulate Geometry - Boolean Operations:
Volume 1
• Unite
• Substract
• Intersect
Volume 2
it generates the
intersection edge
ME469B/2/GI 21
Manipulate Geometry - Blend
ME469B/2/GI 23
Create Entities - Faces
Some entities generated using “primitives” have fewer lower topological entities
Example:
Cube volume: 6 faces, 12 edges, 8 vertices
Cylinder volume: 3 faces, 2 edges, 2 vertices
ME469B/2/GI 24
Manipulate Geometry – Create Entities
Create a vertex on a face
Parametric representation
of the face
ME469B/2/GI 25
Manipulate Geometry – Create Entities
ME469B/2/GI 26
Manipulate Geometry – Scaling
Geometrical scaling of a volume (isotropic)
ME469B/2/GI 28
Connect Geometry
Inconsistent
connections
Consistent
connections
ME469B/2/GI 29
Import Geometries
ME469B/2/GI 31
Clean-Up a CAD Model
ME469B/2/GI 32
Example: Helicopter Rotor
ME469B/2/GI 33
Geometrical entities
ME469B/2/GI 35
Example: Import STEP Model
ME469B/2/GI 36
Components “exploded”
connector-1
support
blade
connector-2
ME469B/2/GI 37
Geometry simplification
Connectors eliminated
Support generated as a
“simple” cylinder with
blended side
ME469B/2/GI 38
Geometry simplification
Blade-support connector
is a “simple” cuboid
ME469B/2/GI 39
Clean Geometry
ME469B/2/GI 40
Virtual Geometry
ME469B/2/GI 41
Virtual Geometry
ME469B/2/GI 42
Virtual Geometry Clean-Up
REAL VIRTUAL
ME469B/2/GI 43
Clean-Up Cracks
A "crack" is defined as a geometry consisting of an edge pair
that 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.
ME469B/2/GI 44
Clean-Up Hard Edges
Hard edges (dangling edges) are those that are included in the list of
edges that define a face but which do not constitute necessary parts of
the 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.
ME469B/2/GI 45
Grid Generation
ME469B/2/GI 46
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
ME469B/2/GI 47
Grid generation techniques
From S. Owen, 2005
ME469B/2/GI 48
Grid generation techniques
Cubit is a “research” grid generator and the latest approaches are typically
included (several of them have been actually invented by the Cubit team)
http://cubit.sandia.gov/
ME469B/2/GI 49
Grid generation techniques
From S. Owen, 2005
ME469B/2/GI 50
Structured Grids: Mapping
Transfinite Interpolation
Side B
eC
k=NK
Side A1 Side A2
Side C
Side D
k k=1
Side D
j
Side A1
ME469B/2/GI 51
Structured Grids: Sub-mapping
ME469B/2/GI 52
Vertex-face type
User can specify the behavior of the grid at a certain node
ME469B/2/GI 53
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)
ME469B/2/GI 54
Delaunay
circumcircle
Delaunay Triangulation:
Obeys empty-circle (sphere) property
ME469B/2/GI 56
Delaunay
Non-Delaunay Triangulation
ME469B/2/GI 57
Delaunay
Given a Delaunay
Triangulation of n nodes,
How do I insert node n+1 ?
X
Lawson Algorithm
•Locate triangle containing X
•Subdivide triangle
•Recursively check adjoining
triangles to ensure empty-
circle property. Swap
diagonal if needed
•(Lawson,77)
ME469B/2/GI 58
Delaunay
Lawson Algorithm
•Locate triangle containing X
•Subdivide triangle
•Recursively check adjoining
triangles to ensure empty-
circle property. Swap
diagonal if needed
•(Lawson,77)
ME469B/2/GI 59
Delaunay
Bowyer-Watson Algorithm
•Locate triangle that contains
the point
•Search for all triangles
X whose circumcircle contain
d the point (d<r)
r c
•Delete the triangles (creating
a void in the mesh)
•Form new triangles from the
new point and the void
boundary
•(Watson,81)
Given a Delaunay
Triangulation of n nodes,
How do I insert node n+1 ?
ME469B/2/GI 60
Delaunay
Bowyer-Watson Algorithm
•Locate triangle that contains
the point
•Search for all triangles
X whose circumcircle contain
the point (d<r)
•Delete the triangles (creating
a void in the mesh)
•Form new triangles from the
new point and the void
boundary
•(Watson,81)
Given a Delaunay
Triangulation of n nodes,
How do I insert node n+1 ?
ME469B/2/GI 61
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
ME469B/2/GI 62
Advancing Front
A B
•Begin with boundary mesh - define as initial front
•For each edge (face) on front, locate ideal node C based on front AB
ME469B/2/GI 63
Advancing Front
C D
r
A B
ME469B/2/GI 64
Advancing Front
r
C
A
B
•Where multiple choices are available, use best quality (closest
shape to equilateral)
•Reject any that would intersect existing front
•Reject any inverted triangles (|AB X AC| > 0)
•(Lohner,88;96)(Lo,91)
ME469B/2/GI 69
Advancing Front
ME469B/2/GI 70
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
ME469B/2/GI 71
Octree/Quadtree
Triangulation Paving
ME469B/2/GI 73
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
ME469B/2/GI (Blacker,92)(Cass,96) 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
ME469B/2/GI (Blacker,92)(Cass,96) 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
ME469B/2/GI (Blacker,92)(Cass,96) 76
Unstructured-Quad
Form new row
and check for
overlap
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
ME469B/2/GI (Blacker,92)(Cass,96) 77
Unstructured-Quad
Insert
“Wedge
”
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
ME469B/2/GI (Blacker,92)(Cass,96) 78
Unstructured-Quad
Seams
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
ME469B/2/GI (Blacker,92)(Cass,96) 79
Unstructured-Quad
Close
Loops and
smooth
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
ME469B/2/GI (Blacker,92)(Cass,96) 80
Unstructured-Quad
ME469B/2/GI 81
Unstructured-Quad
ME469B/2/GI 83
Unstructured Grids: Coopering
• 2D mesh sweeping
• Only for cylindrical volumes
• unstructured surface mesh is generated
on surface A (source face)
ME469B/2/GI 84
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 85
Coopering/Sweeping
linking
surfaces
target
source
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 86
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 87
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 88
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 89
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 90
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 91
Coopering/Sweeping
Geometry Requirements
•source and target surfaces
topologicaly similar
•linking surfaces mapable
Sweeping or submapable
ME469B/2/GI 92
Unstructured Grids: 3D elements
Standard Elements:
ME469B/2/GI 93
Unstructured Grids: Hex or Tets?
Mesh sizes
Speed
• Structured gridding (mapping) + + + - +
- + +/- + -
• Unstructured triangulation (2D/3D)
- - +/- + +
• Unstructured paving (2D)
+ - +/- - +
• Unstructured coopering (3D)
Straightforward
ME469B/2/GI 96
Grid generation – 2D - Faces
Easy
ME469B/2/GI 97
Grid generation – 2D - Faces
elements
forced to
be triangles
ME469B/2/GI 98
Grid generation – 2D - Mesh-patching options
ME469B/2/GI 99
Grid generation – 3D - Volumes
Not so easy
ME469B/2/GI 100
3D Grid generation – Advanced Cooper technique
ME469B/2/GI 101
Grid generation – Sizing functions
ME469B/2/GI 102
Grid generation – Clustering points
ME469B/2/GI 103
Grid generation – Boundary Layers
ME469B/2/GI 104
Example – meshing a circle
ME469B/2/GI 105
Mesh linking
ME469B/2/GI 106
Grid quality
ME469B/2/GI 107
Quality measures available in GAMBIT
ME469B/2/GI 108
Examine meshes
ME469B/2/GI 109
Mesh improvement
ME469B/2/GI 110
Mesh improvement/smoothing
P4
Averaging
P3
Methods
P
P5
P2
P1
(Field, 1988)
ME469B/2/GI Laplacian 111
Mesh improvement/smoothing
P4
Averaging
P3
Methods
P
P5 Centroid of
attached nodes
Can create
inverted elements
P2 n
! Pi
P1
P = i =1
n
(Field, 1988)
ME469B/2/GI Laplacian 112
Mesh improvement/smoothing
P4
Averaging
Methods
P
Centroid of
P5 attached nodes
P1
Can create
inverted elements
P3
n
! Pi
P6 P = i =1
P2 n
ME469B/2/GI Laplacian 113
Mesh improvement/smoothing
P4
Averaging
Methods
Centroid of
P5 attached nodes
P1
Can create
inverted elements
P3
P
n
! Pi
P6 P = i =1
P2 n
ME469B/2/GI Laplacian 114
Mesh improvement/smoothing
P4
Averaging Weighted Laplacian: Do not
Methods move node unless minimum
distortion metric is improved
P
Centroid of
P5 attached nodes
P1
Can create
inverted elements
P3
n
! Pi
P6 P = i =1
P2 n
ME469B/2/GI Laplacian 115
Mesh improvement/smoothing
Averaging Weighted
Methods average of
C4 triangle centroids
C4 P
n
C3 ! AiCi
P = i =1n
C1
A1
C2
! Ai
i =1
A2 Ai=area of triangle i
Ci=centroid of triangle i
• GAMBIT saves a “journal” file with the commands issues during a session
ME469B/2/GI 117
GAMBIT Journal file
The command:
$W = 2.3
$D = 1.5
$H = 4
Volume create width $W depth $D height $H offset 0 0 0 brick
ME469B/2/GI 118
GAMBIT Journal file
$SUM = $A + 0.5*$B
$SUM = SIN($A)
ME469B/2/GI 119
GAMBIT Journal file
Conditional statements:
Loops:
$Z = 0
do para "$Z" init 6 cond ($Z .le. 24) incr ($Tmp*3)
volume create sphere radius $Z
Enddo
.and. .or.
ME469B/2/GI 120
/ --------------------------------------------------------
Example of Journal file / 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
/
/
ME469B/2/GI 121
Grid generation research
ME469B/2/GI 122
Grid generation research
Unstructured hex-dominant grids: OCTREE based
SAMM – Computational Dynamics Ltd.
Hexpress – Numeca International Inc.
ME469B/2/GI 123
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 124
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 125
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 126
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 127
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 128
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 129
Grid generation using Medial Axis
Medial Axis
•Medial Object - Roll a Maximal circle or sphere through the model. The
center traces the medial object
•Medial Object used as a tool to automatically decompose model into
simpler mapable or sweepable parts (Price, 95;97)(Tam,91)
ME469B/2/GI 130
Grid generation using Medial Axis
ME469B/2/GI 131
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
ME469B/2/GI 132