Gambit Tips
Gambit Tips
GAMBIT Overview
CAD Import
Geometry Operations
Meshing Operations
Meshing Strategies
Summary and Conclusions
2
GAMBIT Overview
GAMBIT Defaults
Journal Files
Forms and Picking Geometry
3
GAMBIT Defaults
GAMBIT Defaults are
environmental variables
which affect:
• User Environment
• Meshing Characteristics
• Geometry
5
Journal Files
Extracting lost journal file from existing database file
gambit –res(torejournal) journalfile –id
database
7
Picking Geometric Entities: Mouse
Picking by dragging a box over entities
Picking ‘partially included’
entities when dragging box Picking ‘completely included’ entities
diagonally down when dragging box diagonally up
9
CAD Import
10
CAD Import
GAMBIT offers many options for
importing geometry from CAD systems.
• Direct Translation options for standard CAD
kernels (ACIS, Parasolids, CATIA)
• Standard translation options (STEP and
IGES)
• ProE options: Direct and STEP import
• Faceted/Mesh Import options: FLUENT, STL
etc.
11
CAD Interoperability Issues
CAD interoperability, or the ability to share a CAD model
across different applications has been a challenge for
industrial engineers.
12
CAD Interoperability Strategies
Some specific strategies users can pursue to reduce
interoperability issues:
• Upstream end (originating CAD system)
• Use of a tighter or absolute tolerance (closer to 1e-06)
• Use of solid or native CAD models rather than wireframe.
• If using neutral formats like STEP, importing the data back for a
loop test to ascertain that the solid model can be recreated.
Checking geometry
Repairing Geometry
• Smoothing
• Healing
Geometry Construction tools
Booleans
Cleanup Tools: Virtual Operations
14
Checking Geometry
Geometry imported or created needs to be
checked for integrity, connectivity and
completeness.
• Integrity: corrupt or degenerate volumes, faces or
edges
• Connectivity: Disconnected faces or edges, slivers.
• Completeness: Missing volumes, faces or edges
15
Color by Entity
Check import of volumes/faces using entity based
coloring
• Vertices (white), edges (yellow), faces (light blue), volumes
(green), groups (dark green)
• Virtual/faceted geometry identified by label (v_*/f_*), picking
filter, and color coding
• Vertices (darkkhaki), edges (peru), faces (dodgerblue),
volumes (springgreen)
16
Color by Connectivity
Check connectivity using connectivity based
coloring
• White: Stand-alone vertex or edge
• Orange: Vertex connected to only one edge, or edge
connected to only one face (i.e. unconnected face!)
• Blue: Vertex connected to exactly two edges, or edge
connected to exactly two faces (i.e. connected face)
• Magenta: Vertex connected to three or more edges, or
edge connected to three or more faces (e.g. internal face)
17
ACIS Based Checks
Checks for geometrical and topological
inconsistencies
• Geometric consistency: Assesses model
parametric/geometric continuity and distances between
connected geometry.
• Topology consistency: Assesses model for consistency
in organization (how geometry is constructed or virtual
guest-host relationships)
• Setting
GEOMETRY.GENERAL.REAL_GEOMETRY_CHECK_SUMMARY to
1 will produce a detailed report.
• Geometry not C1 or G1
• Indicates lack of parametric/geometric continuity
• Real operations (booleans, splits, sweeps) may fail
• Can use virtual operations as fallback
• Geometry errors do generally not prevent meshing. If the
model can be shaded, then it can likely be meshed.
18
Fixing Geometry Problems
Problems uncovered by the visual and ACIS
checks can be fixed:
• Fix real geometry problems using tolerant
modeling, smoothing or healing the unconnected
entities, or by regenerating entities.
• Fix topology problems by deleting and
reconstructing entities.
• Fix virtual/faceted geometry problems by
deleting (hiding) and reconstructing entities.
19
Tolerant Modeling
Every CAD system uses a minimum
numerical precision (tolerance) for
describing the geometry.
• Coordinates of vertices/points, length of
edges, size of faces, volumes.
20
Tolerant Modeling
Available by activating the Make Tolerant
option during CAD model import.
• Also available after import inside the Heal
Face (or Volume) Form.
Application
• All Geometry files
• Relatively large gaps
• Real ACIS volumes generated during
import.
21
Smooth/Heal Real Geometry
Geometry imported from other CAD systems
can lack the required accuracy and precision to
render valid or connected ACIS geometry.
• This results from numerical limitations in original
CAD system, neutral file formats, or differences
in tolerances between CAD systems and ACIS.
• Use the check command to verify integrity of
geometry/topology.
22
Smoothing and Healing Options
Smooth Options:
• Replace Bad Geometry: Removes discontinuities or
“kinks” in geometry.
• Reduce Complexity: Simplifies the spline
representation of geometry by reducing the number of
control points.
Healing options:
• Simplify Geometry: Converts spline geometry to
analytic geometry, whenever possible.
• Stitch Faces: Stitch together faces being healed to
form one or more volumes.
• Repair Geometry: Changes the definition of the edges
and faces of geometry so that the model “fits together”
well, especially at boundaries.
23
Smoothing and Healing Examples
Face
smoothing
Healing Faces
24
Real Geometry Operations
25
Real Face From Wireframe
Create face from wireframe
• Coplanar edges
• Any number of coplanar edges within ACIS tolerance can be
stitched into a real face
• Non-coplanar edges
• Any 3 or 4 sided non-planar loop can be stitched into real face
• Loops with 5 or more non-planar edges can be stitched into real
face if
• Edge loop is convex
• Edges don’t turn ‘excessively’
26
Create Planar Tolerant Face Option
• A planar tolerant real face creation option was introduced in
Gambit 2.2 for non-coplanar edge loops, where the edges are
close to being co-planar.
• Tolerant option ignored if ACIS is able to create non-tolerant face.
Maximum
tolerance
reported in
transcript
window
Tolerance should be smaller than intended mesh size
Turn off final projection of mesh from facets to geometry if tolerance
is larger than mesh size (MESH.FACE.PROJECT_TO_SURFACE = 0)
27
Real Volume Stitch
Volume Stitch is a tolerant operation which
allows you to stitch faces into volumes, with
options to:
• Stitch single or multiple volumes
• Create real, virtual or real and virtual volumes in a
single step.
• Automatic/Manual Tolerance Control.
28
Advanced Covering
Advanced Covering is a new
capability to construct new
geometry based on existing
geometry or mesh.
• Better quality faces using existing
faces, edges or vertices as a guide.
• Virtual to real conversion using
existing tri surface mesh on any
arbitrarily shaped single loop face.
Example of face creation with and Example of Original virtual face,
without advanced covering Triangulated and Converted into real
29
New Geometry Operators
30
New Virtual Geometry Capabilities
Virtual geometry can now be used in all edge
and face construction tools.
• Example: Net surface creation can be done using
existing virtual edges.
31
Plug-In Tools
Plug-ins are extra tools which can be
added to GAMBIT.
• Download plugins to:
• \FLUENT.INC\Gambit2.3.x\plugins
(Windows)
• Home directory (UNIX/LINUX)
32
Option to Stitch Single or Multiple
Volumes
Option to stitch single or multiple volumes
• Automatic addition of missing (connected) faces for single
volume
• Extra faces which do not form a closed set automatically
discarded for multiple volumes
• Single volume stitch can handle voids and dangling
faces.
Single volume
stitch
(adds faces
automatically)
Multiple
volumes stitch
(discards extra
faces)
33
Real Boolean Operations
Why Boolean operations can fail:
• Poor geometric quality, complex topology
• Difficulties in finding imprints of connected entities
• Two imprinting algorithms available
GEOMETRY.VOLUME.BOOLEAN_METHOD = 0, 1
• A value of 0 turns on global imprinting (more difficult)
• A value of 1 (the default value) allows local imprinting only.
• Generally stable but requires subsequent bidirectional split.
34
Imprinting in Boolean Operations
GEOMETRY.VOLUME.BOOLEAN_METHOD = 1
Local imprinting
GEOMETRY.VOLUME.BOOLEAN_METHOD = 0
Global imprinting
35
Failing Real Split Operations
What to do if real split operation of entity A
with B fails
• Copy/Heal option
• Copy B (and heal if needed), delete the original B
• Perform the split operation, reconnect before meshing
• Intersection/Subtraction option
• Intersect A with B while retaining A
• Subtract the result (intersection) from A while retaining
the tool
• Connect before meshing
36
Virtual Geometry Operations
‘Overlay’ technology
• Tool of choice to clean-up and simplify imported geometry
• Needed when tolerant modeling and healing/smoothing are
not sufficient
• Modifies size and shape of boundary surfaces while being
constrained by underlying ‘host’ geometry definition
• Represents same geometry but different topology
• Can be derived from real, virtual, or faceted geometry
• Limited use for Boolean operations
• Semi-automatic virtual clean-up tool available
38
Face Connect with T-junction splits
New functionality to ensure connectivity
between non-aligned faces.
• Utilizes projections, splits, and connects
• For real and virtual geometry, resulting
geometry is always virtual
• Easy connecting of poorly matching faces.
• Allows imprinting of complex half geometry on
symmetry planes.
39
Connect Preserving Mesh
Preserve higher topology mesh during edge and face connect
• Mesh on unconnected entities must be topologically equivalent, but
can have different grading
• Might require mesh smoothing after connect operation
Allows easier meshing of geometry of repeated patterns
• Copy geometry using ‘mesh unlinked’ option before connecting.
40
Virtual Face Splits
Face splits by
• Face (Virtual)
• Set GEOMETRY.FACE.VIRTUAL_FACE_FACE_SPLIT to
1 in defaults
• Bi-directional option
• Try exporting surface meshes and splitting imported
faceted faces if virtual face split fails
• Edges (Virtual)
• Endpoints of splitting edge need to be connected to
edges of face
• Tolerance for edge proximity to face
• Vertices (Virtual)
• Tolerance option for vertex proximity to face
• Can produce dangling edges
• ‘Shaped edge’ option
• Locations (Virtual)
• Locations snap to edges near boundaries
• Manually drag and position temporary ‘Locations’
• ‘Shaped edge’ option
41
Decomposing Virtual Volumes
Volume splits by
• Faces (Virtual)
• All split tool faces must be
connected together
• Must share boundary edges with
volume boundary
• If volume split fails (rarely), make
volume invisible (keep lower
topology visible) and stitch together
desired volumes
• Locations (Virtual)
• Easy tool to split virtual volumes
• Manually drag and position
temporary ‘Locations’
• Splitting volumes with voids not
supported
42
Adjusting Virtual Geometry
Adjust virtual geometry using the ‘slide virtual
vertex’ tool
Vertices can be adjusted after meshing
(might require subsequent smoothing of
mesh)
43
Semi-Automated Cleanup Tools
Clean up on models
containing a large number of
faces can be tedious.
44
Semi-Automated Cleanup Tools
Quickly identify, zoom in, highlight areas that cause connectivity and
mesh quality problems.
• Appropriate tools to fix problems are given.
• Graphics color coding set to connectivity based coloring.
• Graphics window pivot set to mouse.
45
Clean Up Short Edges
Tools to identify and highlight the problem
spot
• Cleanup domain
• Select whole model or group
• Maximum length: upper limit
• Default: 10* shortest edge in the Cleanup
domain
• Items List: candidates for cleanup operation
based on Cleanup domain and Maximum
length
• Current length: length of currently picked
edge
• Update: updates the Items list
• Required when Maximum length is modified
• Zoom
• In/Out: quick auto zoom in on or from the
picked items
• Auto: automatically zooms in on selected
item
46
Clean Up Short Edges
Tools to identify and highlight the
problem spot
• Local: current item + all faces
connected to it
• Visible: make everything else invisible
• Shade: shade the local objects
Options to Apply Cleanup Tool
• Apply: applies appropriate fix to
selected item
• A/N: (Apply/Next) applies appropriate
fix to selected item and automatically
picks the next item in the list. The view
is changed.
• Auto: entire list is processes
automatically (only works for the
Method: Edge merge)
• Ignore: removes selected item from list
and selects next item
• Restore: the list is restored
47
Meshing Operations
Size Functions
Boundary Layers
• GAMBIT 2.3 Enhancements
Meshing Tips and Tricks
48
Size Functions
Control mesh distribution on faces and in volumes
• Eliminate the need to premesh edges manually
• Automatically capture important geometry and flow features
• Ensure high-quality meshes
Primarily designed for unstructured meshing
Without Size Function Controlled growth rate with Size Function
49
Size Function Types
Fixed
• Controls mesh element size in a region as a function of distance
from a given location
Curvature
• Controls mesh element size as a function of geometric curvature of
a face or edge and growth of mesh away from source
• Good for highly curved surfaces or edges
Proximity
• Controls the number of of mesh elements in a gap (edge gaps and
face gaps) and growth of mesh away from gap
Meshed
• Uses existing mesh as initial size on source entity
• New Size Function type in Gambit 2.2
50
Fixed Size Function
Requires Source specification Component
sources
• Source is origin of Size Function, center of
region
• Vertices, edges, faces, and volume can be
sources for Fixed Size Function
• Source entity type determines shape of size
function
• Spherical shape around vertex
• Cylindrical shape around straight edge
• Sources can be topologically part of the
attachment (component source) or
independent of attachment (non-component
source)
• Sources can be internal or external
Non-component source
51
Attachment face
Fixed Size Function
Requires Attachment specification
• Attachment is the mesh to be affected
• Fixed Size Function can be attached to edges,
faces, and volumes Attachment volume
• Attachment is ideally the whole model to ensure
high quality mesh
Parameter specification
• Start size
• Mesh element size at source
• Growth rate
• Geometric stretching of mesh away from source
• Cannot be less than 1.0
• Size limit
• Maximum allowable mesh size for attachment
• No further growth if size limit is reached
52
Curvature Size Function
Source specification No Size Function
• Curvature of source entities (edges, faces)
used to determine start size
Parameter specification
• Angle
• Maximum allowable angle between any two With Curvature Size
Function
adjacent face normals on source
• 5-30 degrees is reasonable value
• Growth rate
• Size limit
Edges as source entities
53
Proximity Size Function
Source specification Gap defined by one source face
• Source entities which contain gap
• Gap is volumetric region between
specified faces, or area between
opposing edges of specified face
Parameter specification
• Cells/gap
• Minimum number of mesh cells Gap defined by two source faces
in gap
• Growth rate
• Size limit
54
Meshed Size Function
Ensures that mesh grows controlled away from a
premeshed source entities (edges or faces)
• Very useful after importing mesh
• Local start size taken from premeshed source entities
Parameter specification
• Only growth rate and size limit are required
55
Background Grid Generation
A set of Cartesian boxes forming a grid that bounds the
attachment geometry are generated and refined i.e. split into
smaller boxes.
This successive refinement of the background grid is carried
out until a maximum number of levels of refinement (or “tree
depth”) are reached or the size variation in all the boxes is
less than a specified tolerance limit (“nonlinear error
percent”).
s1 s2 Refined background grid
Sc – (Savg)>
sc tolerance
s3 s4
56
Background Grid Defaults
Use of the background grid default parameters is key
to obtaining the desired meshes
• TOOLS.SFUNCTION.BGRID_MAX_TREE_DEPTH controls
the maximum refinement of the background grid
• Increase the default value (16) until no cells hit the tree
depth as reported in the transcript window
• A value of –1 puts no limits on the background tree depth,
but makes Size Functions slow for larger models
• TOOLS.SFUNCTION.NONLINEAR_ERR_PERCENT
controls the allowable deviation of the local mesh from
the prescribed mesh size
• Default is 25%, can vary between 3 and 25%
• Number of cells above the prescribed tolerance are
reported in the transcript window
• TOOLS.SFUNCTION.REPORT_BGRID_INFO = 1 turns
reporting in the transcript window on (on by default)
57
Background Grid
Use the Size Function reporting in the Transcript window
• If the mesh is noticeably changing as BGRID_MAX_TREE_DEPTH is increased,
it is a sign that too many background grid cells are hitting the limit.
59
2D Boundary Layers
Boundary layer shape near vertices
E
depends on
vertex type E
60
3D Boundary Layers
Internal continuity
• Allows boundary layers to be
formed without crossover region
61
3D Boundary Layers
• Different 3D BL settings allowed on
adjacent surfaces.
62
Boundary Layers and Cooper Meshing
Both 2-D and 3-D boundary layers can be used with
the Cooper Meshing Scheme:
• If a source face has a 2-D boundary layer attachment on
its edges, (or 3-D imprinted boundary layer), the Cooper
tool will generally create corresponding elements in the
volume.
• 2-D “linked” boundary layers can be used when source
faces are linked (1-to-1 relationship).
Unlinked Linked
63
Boundary Layers and Cooper Meshing
• 3-D boundary layers are advantageous where there is a
significant twist in the geometry in the Cooper direction to
avoid large change in cell size and thickness due the mesh
projection along the Cooper direction.
Undistorted “true”
cells present due to
3-D boundary layer
on side face.
64
Boundary Layers and Cooper Meshing
Curvature size
function is
used to dictate
the face mesh
around curved
boundaries.
66
Enhancements to Examine Mesh Form in
GAMBIT 2.3
A new “Size Change“ quality option has
been added.
• Find large size jumps in the mesh between
neighbouring cells.
67
GAMBIT 2.3: Meshed Size Function from
Boundary Layer Cap
Meshed Size Function
starting from Boundary
Layer cap is now available in
the Mesh Volume form for
tetrahedral meshing (Tgrid
scheme).
• Parameters specified
• Growth rate
• Max size
• Improves size transition
between Boundary layer
and Volume mesh.
• Useful for external
aerodynamics applications.
• Ignores all other size
functions.
68
Example: 3D Wing Profile with 12 boundary layers
69
GAMBIT 2.3: View 3D Boundary Layers
Capability
The new View 3D Boundary Layers allows users to
examine 3D boundary layer mesh prior to volume
meshing.
• Resolve quality issues
• Resolve tet-failure
70
GAMBIT 2.3: Last Aspect Ratio Boundary
Layer Type
The new Last Aspect Ratio
Boundary Layer type allows the
growth of high quality cells
(“square” cells) in the last layer of a
3D boundary layer.
• Specify fixed first height, number of
rows and last aspect ratio.
• Critical for external aerodynamics
applications.
71
Misc. Map Meshing Tools
Auto-match distribution of premeshed
edges on opposite edges
• MESH.MAP.MATCH_PREMESHED_EDGE_GR
ADING = 1
• Auto-match doesn’t propagate
to edges of adjacent faces when
map-meshing volumes
72
Meshing Tips
Surface meshing done on faceted face representation by
default
• MESH.FACE.EXACT_MESH_EVALS = 0
Final exact projection from facets to surface by default
• MESH.FACE.PROJECT_TO_SURFACE = 1
• Turn final projection off and leave mesh on facets if projection
generates skewed or degenerated mesh on bad/corrupt surfaces
PROJECT_TO_SURFACE = 1 PROJECT_TO_SURFACE = 0
73
Meshing Strategies
Meshing Methodology
Selecting a Meshing Strategy
Meshing Strategies
Meshing for Quality
Meshing for Physics
74
Meshing Strategies
A number of different meshing strategies can be
used for dealing with “real-world” geometries:
• Hex dominant mesh using geometry decomposition
• Tet dominant mesh
• HexCore mesh
75
Selecting A Meshing Strategy
The best strategy for dealing with complex
geometry depends on
• Time available
• Faster tet-dominant mesh vs. crafted hex/hybrid mesh
with lower cell count.
• Desired cell count
• Low cell count for resolving overall flow features vs. high
cell count for greater detail
• HexCore mesh vs. tet-dominant mesh.
• Desired mesh quality
• What is the maximum skewness and aspect ratio you
can tolerate?
• Physics
• Flow features, resolving turbulence
76
Hex-Dominant Meshing
The geometry is decomposed into multiple meshable
volumes using Boolean operations and splits.
The following meshing tools are used to create a hex mesh:
• Map
• Submap
• Tet-primitive
• Cooper
77
Mixing Tank
Mixing tank:
• The mixing tank is decomposed and a hex mesh is created
everywhere, with tets in the impeller volume.
78
Other Examples
Heat Recovery Steam Generator (HRSG) bypass duct
1 Hex Cooper
3 Prism Mesh
(Hex/Wedge Cooper)
79
Tet-Dominant mesh
Mostly tetrahedral mesh with
some areas containing pyramid,
prism and hex elements.
• Boundary layer prisms/hexes
are grown from surfaces where
wall effects (boundary layer) are
important.
80
Axial Fan Blade
A curvature size function was used to resolve the blade
geometry.
• Boundary layer attached to the blade to resolve near-wall effects.
A proximity size function was used to resolve the tip clearance
gap.
Fixed size functions were used to grow the surface mesh away
from the blade at the hub and shroud.
Fan Blade
Hub
81
HexCore Mesh
HexCore meshing can dramatically
lower the mesh count and improve
overall quality on volumes with
complexity at the surfaces.
83
Meshing for Physics
Complex physics on complex geometry requires greater care in
estimating the lowest mesh size required to resolve the physics and
grading mesh away from that size.
• Some flow features can be calculated and resolved with appropriate mesh:
jets, wall boundary layers, smallest eddies in LES
• Some flow features are functions of boundary conditions (recirculations,
shocks, vortex lines etc.) and cannot be fully anticipated in size, location
and shape.
84
Summary and Conclusions
GAMBIT provides a comprehensive set of tools for
preprocessing:
• CAD Import
• Geometry creation
• Cleanup tools: virtual operations and semi-automated cleanup
tools.
• Mesh control tools: size functions and boundary layers.
85