You are on page 1of 270

Introduction to Gambit 2.

2
Training Notes
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Introduction to GAMBIT

1-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

What is GAMBIT?
Geometry And Mesh Building Intelligent Toolkit
A single, integrated preprocessor for CFD analysis:
z Geometry construction and import
Using ACIS solid modeling capabilities
Using STEP, Parasolid, IGES, etc. import
Cleanup and modification of imported data
z Mesh generation for all Fluent solvers (including FIDAP and POLYFLOW)
Structured and Unstructured hexahedral, tetrahedral, pyramid, and prisms.
z Mesh quality examination
z Boundary zone assignment

1-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Operation
General sequence of operations
z Initial setup
Solver selection, Mesh size, Defaults, etc.
z Geometry Creation (ACIS, STEP, Parasolid, IGES or Mesh import)
Create full geometry
Decompose into mesh-able sections
z Meshing
Local meshing: Edge, Boundary layers and Size Functions
Global meshing: Face and/or Volume
z Mesh examination
z Zone assignment
Continuum and Boundary attachment
z Mesh export

1-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

GAMBIT Start-up
GAMBIT can be started up using the startup icon (Windows
XP/2000 only). Gambit 2.2.13.lnk

Select working directory


Type in Session ID or
select from previous
stored sessions.
Startup Options

GAMBIT can be also started up from a DOS command prompt or


LINUX/UNIX prompt by typing in gambit Session Id.

1-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Files (1)
GAMBIT directory and files
z When GAMBIT starts up, it creates a directory called GAMBIT.#

# = the process number


It also creates a "lock" file, ident.lok, in the working directory
ident.lok prevents any user from starting up another session using the
same identifier in the same directory. If the code crashes, this file needs to
be manually removed.
z Three files are created inside this directory
ident.dbs = the database. All information will be saved in this
file. This file is NOT retrievable upon a crash
jou = the journal file. This file is directly accessible
from the Run journal form
trn = the transcript file. Output from GAMBIT

1-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Files (2)
GAMBIT directory and files
z GAMBIT permanently saves these files to your working directory as

ident.dbs, ident.jou and ident.trn anytime you issue a "Save"


option (equivalent to any standard word processor)
Upon Save, earlier versions of ident.dbs and ident.trn will be
overwritten, while new commands are appended to the file ident.jou
z Upon successful exit of GAMBIT:
The directory GAMBIT.# is removed
The lock-file ident.lok is deleted

1-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Journal Files
Journal File:
z Executable list of Gambit commands
Created automatically by Gambit from GUI and TUI.
Can be edited or created externally with text editor.
z Journals are small - easy to transfer, e-mail, store
Uses:
z Can be parameterized, comments can be added
z Easy recovery from a crash or power loss
z edit existing commands to create new ones

1-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Running Journal Files


Journal files can be processed in two ways:
z Batch mode (Run)
All commands processed without interruption.
"read pause" command will force interrupt with
resume option appearing.
z Interactive mode (Edit/Run)
Includes text editor for easy modifications
Mark lines in process field
to activate for processing.
Editable text field.
Right click text field
for more options.
Auto or Step through
activated process lines.

1-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

GUI
Main Menu bar Operation toolpad

Command line Description window Global Control


1-9 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Operation Tool Pads

Vertex Boundary Layer Boundary Types Coordinate Systems


Edge Edge Continuum Types Sizing Function
Face Face G/Turbo
Volume Volume Geometry Cleanup
Group Group Plug-In Tools

1-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

File Menu (1)

New, Open, Save, Save As and Exit


z Standard form of database operations
Print Graphics
z Prints graphics to printer or to file
z PostScript, BMP, TIF, etc.
Run Journal / Clean Journal
z Screen editor/command processor for journal files
z Command processing:
Partial or global selection/de-selection
Automatic or stepwise processing
z Ability to load the current journal
z File browser
z Clean Journal removes unnecessary tags, undos, etc.

1-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

File Menu (2)


View File
z View of the current output,ident.trn, the
transcript file
z Ability to view other files as well
Import
z ACIS, Parasolid -
z IGES, STEP, Catia V4 -add on)
z ICEM Input, Vertex Data
z CAD - Pro/E (STEP or DIRECT- add on), Optegra
Visualizer, I-DEAS FTL
z Mesh - mesh and faceted geometry files.
Export
z ACIS, Parasolid
z IGES, STEP
z Mesh - Export your mesh for your Solver.
Export 2D Mesh option guarantees 2D mesh

1-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Edit Menu (1)

Edit Title
z Title will be included on any printed graphics
Edit File
z Ability to launch an editor within GAMBIT
Edit Parameters
z Ability to define, modify and list parameters
parameters: $numeric = 10,
arrays: $array(3,4) = 5
z Parameters and arrays can also be directly defined in
the journal file using an editor (preferred option)

1-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Edit Menu (2)


Edit Defaults
z Modify a large range of defaults that effect:
User Environment
Meshing Characteristics
Geometry
z Ability to load, modify and save a new set of defaults
in $HOME/GAMBIT.ini which is loaded
automatically at startup.
Undo/Redo
z Ten levels of undo/redo (default)
z Reducing number of levels also reduces memory
requirements.

1-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Solver Menu

The Solver selection will have an impact on the


following input forms:
z Available meshing algorithms
z Available element types
z Continuum types
z Boundary types
z Export mesh file

1-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Graphical User Interface


Command:
z Input of (non-GUI) commands, e.g.,
reset: deletes all mesh and geometry in the current model
reset mesh: deletes mesh, keeps geometry
Transcript
z Output from GAMBIT is printed here as well as in ident.trn
z Transcript window can be expanded using arrow button in top right corner
Description
z Gives a short description of all global function buttons and screen areas

1-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Global Control (1)

Scale-to-Fit Pivot anchor for Four split Light source Undo/Redo


view Four view Special Labels
manipulation Annotate
Orient Model Modify (on/off) Wire frame Color coding Examine Mesh
Journal View Label Shade Entity type
Visibility Hidden Line Connectivity
Rendering
Show mesh
Silhouette

1-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Global Control (2)


Scale-to-fit resizes the model to fit the screen
Orient Model - major axes , isometric and:
Reverse
Previous
Journal view
Select Pivot - around which the model rotates, zooms
Body center
Mouse position
Model display attributes
z Turn on/off visibility, label, silhouette, mesh and hidden line on all or
selected geometrical entities
Preset configuration of the graphics window
4-view and 4-split
Options to return to any single view
1-18 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Global Control (3)


The Window Attributes form
z Modify the following attributes (defaults given)
Render Wireframe on ; shaded and hidden off
Mesh Volume - off
Silhouette All on
Label All off
Visibility All on
z Two ways of picking entities
"All" - All entities are picked (Default)
"Pick" - Individual picking including
the use of pick lists

1-19 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Global (4)
Render Model - Wireframe , Shaded , Hidden
Modify Light/Label type
Change light source orientation and properties
Additional information on the entity label
Insert arrows and text for graphic presentations
Color Mode
Color by entity
Color by connectivity
Undo/Redo

Examine Mesh
z Display different element types by quality, plane cuts, etc.

1-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Forms (1)
Form - components
z List box - (picking)
active (yellow) - ready to pick
inactive (white) - click to activate
z Radio buttons
mutually exclusive options
z Option button
Option menu
z Text box
Click-to-focus
z Check box
non-mutually exclusive options
z Command buttons

1-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Forms (2)
Text box

z Field for input of data, expressions, parameters


z The cursor is blinking if active
To activate - left click in the text box (click-to-focus)
z Forms with several text boxes
The order of input is not important
Use "tab" to go to the next text box
Use left click (click-to-focus) to go to any text box

1-22 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Forms (3)
List box
z Highlighted in yellow if active
To activate - left click in the list box
z Tells you the name of the latest picked item
The item is highlighted in red on the screen
All previously picked items are pink
z Individual pick lists for each list box
z Forms with several list boxes:
Depending on the form, the order of picking may be important
Use Shift right-click to go to the next list box
Use left click (in the list box) to go to any list box

1-23 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Forms (4)
Pick Lists
z Open the Pick List by clicking on the arrow

z The "Available" list is sorted in the order of picking


z Pick List functionality:
Pick or Un-pick, Selected or All entities by highlight in
left column and by clicking on the arrows
Highlighted "picked" entities will appear red on the screen
edge.32, edge.33

Non-highlighted picked entities will appear pink


edge.26, edge.28

Right-click in lists area provides additional options


Filter can be used to control which objects are picked.

1-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Mouse Operations (1)


Left Middle Right
Drag x-y rotation Translation Zoom/ z-rotation
Shift + Pick Next Accept/Next picker
Click
Double Previous View Save view to journal
Click
Ctrl Drag zoom Stretch zoom Click points to grid

You can toggle between picking with or without "Shift":


Keep right mouse button down while doing a "left-click"
The cursor now changes to another symbol
Now, Pick/Next/Accept do not need a "Shift"
The Rotation/Translation/Zoom now needs a "Shift"

1-25 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Mouse Operations (2)


The picking philosophy: Left - Middle - Right
z Shift-Left: initial pick
Alternative: click and hold, drag diagonally to pick several items at the same time
"window picking"
Upward diagonal picking will include everything fully included in the box
Lower diagonal picking will include everything partially included in the box

Picking One Face Picking Five Faces


The latest pick is highlighted in red, previously picked items are highlighted in pink

1-26 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Mouse Operations (3)


The picking philosophy: Left - Middle - Right
z Shift-Middle: modify pick
The middle pick will behave differently depending on the mouse location:
Same: Cycle to the next available object within picking tolerance
New: Replace last pick with new pick at new location
Bad: A Shift-Middle pick on "nothing"is equivalent to
"Un-select last pick
z Shift-Right: Apply or go to the next list box

1-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

1-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Creating Geometry in GAMBIT

2-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Preliminaries-1
Objective:
z Create and mesh the fluid region for flow problems and solid
regions for heat transfer (and structural analysis for Fidap Users).
z Typically accomplished by constructing and working with lower
order entity objects and volume primitives.
Terminology:
Lowest order entity z Vertex - a point
z Edge - a curve that is defined by at least 1 vertex (in the case of 1
vertex, the edge forms a loop)
z Face - a surface (not necessarily planar) bounded by at least 1 edge
(except for sphere and torus)
Highest order entity z Volume - a geometric solid (as in a solids model), also can be
thought of as an "air tight" set of bounding faces.

2-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Preliminaries-2
Color Identification
z Vertices and Edges are colored according to the highest
order entity to which they are connected.
z The coloring scheme is:
Vertex (white)
Edge (yellow)
Face (light blue)
Volume (green)

Undo/Redo:
z 10 levels of undo by default.
Undoes geometry, meshing, and zoning commands.
Description window provides command to be undone
when mouse is passed over undo button.
z Left click to execute visible button operation.
z Right click to access options.

2-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Coordinate System

Coordinate system
Cartesian, Cylindrical and Spherical systems
Using Offset/Angle or Vertices for location/orientation
"Active" coordinate system is default in all forms
Grid creation with "snapping" of vertices
-Recommended for simple geometries only
Creation of rulers

2-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Move/Copy


Move/Copy
z Operations:
Translate: Rotate:
(inputs are s) Vector

(x,y,z)

Angle
Reflect: Scale:

Plane normal to Vector


vector

Options:
z Connected geometry can also be Moved
z Mesh and/or Zone types can be copied linked or unlinked
2-5 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Vector Definition Form


Vector Definition form
z is used in:
Rotate and Reflect (in Move/Copy)
Sweep and Revolve (in Face/Volume
Create)
z Methods:
Coordinate system axis
Two existing vertices
An existing Edge
Two points defined by coordinates
Screen View
z Magnitude option allows size of vector
to be defined.

2-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Align


Align
z Align is an alternative to
Move - translate (+rotate).
It uses vertices on the start and
final position to move the object
z Method of increased alignment
with the use of vertex-pairs

z Connected geometry can be included

1 1 Translation Rotation Plane alignment


+ +
3 3 +
+ + + + ++
2 +
2

2-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Connect

Connect (Real)
z Vertices, Edges and Faces can be connected
z The operation eliminates all duplicate entities
and reconnects upper topology
z Only entities within the ACIS tolerance
will be connected
z Existing mesh will be preserved

Copy +Translate Connect Edges

Two Edges One Edge


One Face

2-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Disconnect


Disconnect (Real)
z Vertices, Edges and Faces can be
disconnected
z The operation recreates duplicate entities
and reconnects upper topology
z Several options exists

Disconnect

Edge + Vertices
One Edge Two Edges

2-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Delete


Delete

z Select Lower Geometry (default)


Deletes Faces
Deletes Lower Geometry: Edges
and Vertices

z Deselect Lower Geometry


Deletes Faces
Does NOT delete Lower
Geometry: Edges and Vertices

2-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Example: Deleting Entities that belong to


higher order Entities

Incorrect: Attempt to delete The selected face can NOT be deleted


Face (of a Volume) because it is connected to a volume.

Correct: Delete Volume Volume is deleted. Faces, Edges and Vertices are
(deselect Lower Geometry) not deleted. Any of the six faces can be deleted

2-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

General Operations: Misc.


Summarize/Query/Total
Summary of vertex coordinates,lower topology, mesh information,
element/node labels, etc.
Checks for valid ACIS geometry
Query: useful to associate geometrical objects with object names
Get total number of Entities

Modify Color/Label
Modify entity colors
Change entity label

2-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Geometry Creation
ACIS - geometry engine ("kernel")
z Provides tools for bottom-up creation by:
Vertex: Add, Grid Snap, etc.
Edge: Line, Arc, Ellipse, Fillet, B-spline, etc.
Face: Wire Frame, Sweep, Net, etc.
Volume: Wire Frame, Sweep, Face Stitch, etc.

z Provides tools for top-down creation by


Face Primitives: Rectangle, Circle, Ellipse
Volume Primitives: Brick, Cylinder, Sphere, etc.
Volume/Face Booleans: Unite, Subtract, Intersect
Volume/Face Decompose: Split

z Geometry creation typically involves use of all tools.

2-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Vertex Creation-1


Real Vertex creation
By coordinates
Cartesian, cylindrical and spherical coordinate systems
Also available in virtual geometry
On edge
If the intention is to split the edge, the Edge-Split
form should be used instead
On face
Useful to create edges on surface for a virtual split
In volumes
Not frequently used
At edge-edge intersections
Vertex is not connected to either edge
Split edge with vertex for connectivity

2-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Vertex Creation-2


Import point data, File
File format:
z ICEM Input
npc nc
x1 y1 z1
x2 y2 z2
:
xn yn zn

Where: n = npc* nc is the total number of points


npc is the number of points per curve
nc is the number of curves
xi yi zi are real or integer vertex coordinates

z Vertex Data
Format is similar, curve information is not needed

2-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Edge Creation-1


Real Edge creation
Straight line
Multiple edges can be created by selecting
multiple vertices.
Arc, Circle
Counterparts for face creation are also
available
Creation Methods
Three vertices on the edge
Using Center and End-points
Using Radius and Start/End Angles (Arc
Only)

2-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Edge Creation-2


Real Edge creation
Elliptical Arc
Created by three vertices

Start Angle
Major Vertex + +
End Angle
Center Vertex
On Edge Vertex +

Conic Arc
Created by three vertices

Shoulder Vertex +

Start Vertex
+
End Vertex +

2-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Edge Creation-3


Real Edge creation
Fillet Arc
Creates a fillet out of a corner
+
Edge 1 Radius
+ +

Edge 2

NURBS
Third-order by default
Use tolerance for the approximate option

2-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Edge Creation-4


Real Edge creation
Revolve Vertex
Select one or more vertices to rotate
Specify Angle
Axis is defined using Vector Definition Panel
Input Height for Spiral creation

Project Edge on Surface


Limited to single edge
and face
Direction defined in
Vector Definition
Panel

2-19 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Face Creation-1


Real Face creation
Wire Frame
Creates real and virtual faces
All edges have to be connected into one loop
Number of edges and order of picking are not important
If all edges are co-planar creation is always successful. +
For non-coplanar edges:
A real face will always be created if the number of edges is 3 or 4 and
the tangents are not the same at connecting vertices.
A planar tolerant face can also be created if the edges are close to
being coplanar and within a specified tolerance.

create real face

by wire frame

co-planar edges real face

2-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Face Creation-2

Real face creation from convex non-coplanar edges

Tolerant real face creation from non-coplanar edges


(Tolerance is calculated automatically and printed in
the transcript window)
2-21 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Face Creation-3


Real Face creation + +
Parallelogram + +
+ +
defined by three vertices
Polygon
++ ++
Selection order is important.
+++

+++
5 or more vertices must be coplanar.
Vertex rows
+++ + +++ +
Tolerance input
+++ +

+++ +
Skin
Topologically parallel edges
Edges have to be picked in order
Both ends of all edges can coincide

Net
Topologically intersecting edges
2-22 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Face Creation with Revolve


Real Face creation
Revolve (With or without mesh)
Using an edge, an angle and a
revolving vector
Use vectors for definition of the axis
of revolution
Basic edge can coincide with axis

axis of revolution

2-23 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Face Creation with Sweep


Real Face Creation: Sweep (with or without mesh)
z Rigid sweep
Edge translated along sweep path without being rotated
z Perpendicular sweep: Draft and Twist option
Angle edge makes with sweep path is maintained as edge
swept along path
z Be careful not to create degenerate faces
Sweep path start tangent vector parallel to edge tangent
Perpendicular Perpendicular Draft: Perpendicular Twist:
Rigid Angle = - 30, 0, 30
Draft: Angle=0 Angle = 120

Rigid

Edge

Path Path
Edge
2-24 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Face Primitives
Face Primitives
z Dimensions and Plane/Direction must be specified
Rectangles

Circles

Ellipses

2-25 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Volume Creation-1


Real Volume creation
Stitch
Create single or multiple volumes out of
connected faces
If a few faces are missing, GAMBIT
automatically finds the missing faces.
For multiple volumes, it discards any one volume
ten connected faces
extra faces.
Available in virtual geometry
Order of picking not essential
Can handle voids and dangling faces.

Revolve (With or without mesh)


Using a face, a revolving vector and an
angle
axis of revolution
Use edges or vectors for definition of the
axis of revolution
2-26 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Volume Creation-2


Real Volume creation
Wire Frame
Create volumes from connected curves
Number of edges and order of picking is not important
Voids and seamless volumes and faces cannot be created
Same limitation as face wire frame creation, for each face

36 connected edges one volume

2-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

"Bottom Up": Volume Creation with Sweep


Real Volume creation
Sweep (With or without mesh)
Rigid option
The driving edge/vector can be anywhere
in the domain

face
path

Perpendicular option
The driving edge/vector has to start in the
"plane" of the curve or face

Draft Twist
face
path face path

2-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Primitives-1
Real Volume Primitives
Brick
Width (X), Depth (Y) and Height (Z)
The Width (X) value is used for Y and Z if
no other input is given.
10 different preset positions (each octant plus
center)
Cylinder and Frustum
Height and two cross-sectional radii (3rd
radius for frustum)
The Radius 1 value is used for remaining
radii if no other radius input is given.
9 different preset directions (three in each
axis)

2-29 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Primitives-2
Real Volume Primitives
Prism and Pyramid
Corresponding to input of cylinder and
frustum
Number of sides
9 different preset directions (three in each
axis)

Sphere - only one radius

Torus
Major and cross-sectional radii
Three axis locations

2-30 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boolean Operations: Unite


Real Face/Volume Boolean Unites
z The order of picking is not important (except for labeling)
z Retain - keeps copies of the entities
Unite Faces
All faces must be coplanar or have
matching tangents.
A
B A+B

Unite Volumes
A
B A+B

2-31 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boolean Operations: Subtract


Real Face/Volume Boolean Subtract
z The order of picking is important
z Retain - keeps copies of entities
Subtract Faces
All faces have to be coplanar
A
B A-B

B-A Multiple entities can be entered


in second list box.
Subtract Volumes

A A
B A-B B B-A

2-32 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boolean Operations: Intersection


Real Face/Volume Boolean Intersect
z The order of picking is not important (except for labeling)
z Retain - keeps copies of entities.
z All entities must intersect each other.
Intersect Faces
All faces have to be coplanar
A
B

Intersect Volumes
A
B

2-33 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Geometry Splitting- Edges


The Split Operation: Employs the intersection of two geometric entities
to divide one or both objects into two or more pieces.
z Useful for decomposing complicated geometries into smaller, simpler ones.
Edge Split
z Split an edge into two or more edges
z Resulting edges are, by default, connected.
z Edges can be split with:
Point - specify U Value between 0 and 1
where edge will be split.
Use 0.5 to split edge in half.
Vertex - must already be created.
Edge
Must already be created
Bi-directional option results in both edges
being split at point(s) of intersection.

2-34 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Geometry Splitting- Faces "Target Object"

Real Face Boolean Split


z The order of picking is important
z Faces do not need to be coplanar
example: coplanar face splits
A ( A )
Split A
"Tool"
with B connected
Two Faces
Split B B ( A )

with A
connected
Three Faces
A ( A )
Bidirectional

split B ( A )

In general, for all splits (edges, faces, volumes):
z "Tool" entities are, by default, deleted after split is
performed
z Retain option prevents Tool entities from being
deleted.
z By default, resulting objects are connected.

2-35 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Geometry Splitting- Volumes


Real Volume Boolean Split "Target" Object
z The order of picking is important
Volume/Volume splits
A
B
Split A
with B "Tool"

A two volumes

B
Split B
with A
two volumes Volume/Face splits
A
B Bidirectional
Split
two volumes
three volumes
2-36 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Split vs. Subtract


The appropriate operation to use can
Start with two
depend upon final geometry required.
disconnected
z Subtract cylinders
Cut-away shows one volume results
Cannot mesh core region
Flow/Heat Transfer in annular region only
z Split
Two connected volumes result
Cut-away shows that both annular and core
regions can be meshed.
Flow/Heat Transfer possible in both regions
z Subtract + Retain "Tool" (inner cylinder)
Two disconnected volumes result, appears same as split
Duplicate faces appear at interface
Non-conformal mesh can result
Useful for multiple reference frame problem (Fluent)

2-37 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Bidirectional Split vs. Unite


The appropriate operation to use can
depend upon the need to create
additional surfaces for:
z defining boundary conditions
z controlling meshing distribution
Unite
Unite
z One volume results
BiDirectional z Cut-away shows no
Split interior faces
Start
with two
disconnected cylinders
Bidirectional split
z Three connected volumes result
z Cut-away shows multiple interior faces which can be used to:
z define internal boundaries

z help control mesh distribution in volume

z Total represented volume is the same


2-38 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boolean Characteristics: Imprinting


Uniting Connected Volumes Results in Imprinting
Volume.1

A B C

Unite A
with B Volume.2: face contains an
imprint of the cylinder

A and C are connected cubes, B


is a cylinder inside both

2-39 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Blends
Real Volume Blends
Blend - create fillet/rounded edges
Pick a volume
Pick the edges that need a blend and
specify radius
Pick vertex (if needed) and specify radius
using the Setback option
Bulge option is not recommended for
hexahedral meshing
Bulge option

Setback option

2-40 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Plug-in tools
Plug-in tools are extra tools which can be added to GAMBIT.
z Download to the FLUENT.INC/Gambit2.2.x/plugins directory
(Windows) or your home directory (Unix/linux)
z Load by import plugin file
File -> Import -> Plug-in
z Access through the new Tools - Plug-in button

Currently developed Plug-ins:


z Create a Brick based on the bounding box for the current geometry

z Multiple splitting of edges based on equal spacing or actual length

z Calculate distances between two vertices

z Convex or concave pipe fittings

2-41 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

2-42 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Edge and Face Meshing

3-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Meshing - General
To reduce overall mesh size, confine small cells to areas where they are
needed (e.g., where high gradients are expected).

Controlling cell size distribution


z Edges, Faces and Volumes can be directly meshed
A uniform mesh is generated unless pre-meshing or sizing functions are used.
z Pre-meshing
Edge meshes can be graded (varying interval size on edge)
Graded edge mesh can be used to control distribution of cell size in face
mesh.
Controlling distribution of cell size in face mesh also controls distribution of
cell size in volume mesh.
z Sizing Functions
Allow direct control of cell size distribution in edges, faces and volumes
directly for automatic meshing.

3-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Edge Meshing
Edge mesh distribution is controlled through
the spacing and grading parameters.
Using the Edge meshing form
z Picking
Temporary graphics
Links, Directions
z Grading/Spacing
z Special characteristics
Apply and Defaults
Invert and Reverse
z Options

3-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Picking Edges for Meshing


Picking
z Temporarily meshed edges
When you pick an edge, the edge is
temporarily meshed using white nodes
Displayed edge mesh is based on current grading and spacing parameters
If you modify the scheme or spacing, the temporary mesh will be
immediately updated
When you Apply, the mesh nodes will turn blue
z Sense
Sense is used to show direction of grading
Every picked edge will show its sense direction using an arrow
The sense can be reversed by a shift-middle click on the last edge picked
(this is in addition to the next functionality) or by clicking on the
Reverse button

3-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Soft Links
Picking and soft links
z Pick with links
By enabling this option, Soft-linked edges can be selected in a single pick
Linked edges share the same information and can be picked in a single
pick
z Modifying soft links
You can anytime:
Form links
Break links
Maintain links
By default, GAMBIT will form links between unmeshed edges that are
picked together
By default, GAMBIT will maintain links between meshed edges that are
picked together

3-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Grading
Controls mesh density distribution along an edge.
Grading can produce single-sided or double-sided Single-sided grading
mesh
z Doubled-sided mesh can be symmetric or asymmetric. Symmetric grading
Symmetric schemes produce symmetric mesh about
edge center.
Asymmetric schemes can produce asymmetric mesh Asymmetric grading
about edge center.
Single-sided grading:
z Uses a multiplicative constant, R, to describe the ratio of
the length of two adjacent mesh elements, i.e.,
R = l(i+1) / li
z R can be specified explicitly (Successive Ratio) or
determined indirectly
z Gambit also uses edge length and spacing information to
determine R.

3-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Double Sided Grading


Symmetric grading schemes implicitly
generate double sided grading that is
symmetric.
Asymmetric schemes are accessible when
Double-Sided Option is used with:
z Successive Ratio, First Length, Last Length,
First-Last Ratio, and Last-First Ratio
z The mesh is symmetric if R1 and R2 are
equal.

z The mesh is asymmetric if R1 and R2 are not


equal.

z Edge center is determined automatically.

3-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Spacing
Spacing
z In all meshing forms, the following spacing functions can be specified:
Interval count - recommended for edge meshing only
A value of 5 creates 5 intervals on the edge (6 nodes, including ends)
% of edge length - recommended for edge meshing only
An edge length of 10 and a value of 20 creates 5 intervals on the edge
Interval size - the default setting
Identifies the interval size relative to overall dimensions of geometry
Identifies average interval size if used with grading
An edge-length of 10 and a value of 2 creates 5 intervals on the edge
Average size of elements/grid is 2

3-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

First Edge Settings


Use first edge settings enabled
z First edge selected in pick list updates form

z Useful to copy settings from one meshed


edge to other edges.
Use first edge settings disabled
z Any time you pick two or more meshed edges
where there is a difference in:
the Type
the Spacing
the local Apply button for that option will
be turned off
z This allows you to maintain pre-existing grading and/or spacing settings for
each edge.
z Enforce a change in grading and/or spacing by enabling Apply button.

3-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Mesh Options
Apply without meshing
z This option is useful in cases where you
want to impose a scheme without fixing
the number of intervals
z The higher level meshing scheme will decide
(and match) the intervals
Example
Specify fixed interval and no grading
Specify double sided grading and
Apply without Meshing on bottom edges
Face meshing will automatically match mesh
Remove Old Mesh
z Deletes old mesh
Ignore Sizing Function
z Sizing function has precedence on meshing
unless this option is enabled.

3-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Face Meshing
Face Meshing form
z Upon picking a face
GAMBIT automatically chooses Quad elements
GAMBIT chooses the Type based on the
Solver/face vertex types
z Available element/scheme type combinations
Quad Quad/Tri
Map Map
Submap Pave
Tri-Primitive Wedge
Pave
Tri
Pave

z Gambit also has quad-to-tri conversion utility.

3-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Face Meshing - Quad Examples

Quad: Map

Quad: Submap

Quad: Tri-Primitive

Quad: Pave

3-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Face Meshing - Quad/Tri and Tri Examples

Quad/Tri: Map

Quad/Tri: Pave

Quad/Tri: Wedge

Tri: Pave

3-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Deleting Old Mesh


Existing mesh must be removed before remeshing.
z Mesh can be deleted using
delete mesh form.

z Lower topology mesh can also be deleted (default)

Existing mesh can also be removed in all Create


mesh forms without the need for Delete mesh
z Remove mesh
Leaves all lower topology mesh
z Remove mesh + lower mesh
Removes all lower mesh that is not shared
with another entity
Undo after meshing operation also works!

3-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hard Linking
Mesh Links (Hard Links)
z Mesh linked entities have identical mesh
created for periodic boundary conditions
z Applicable to Edge, Face, and Volume entities
Best to use soft links for edge meshing
To link volume meshes, all faces must be hard
linked first.
Setting up Hard Links for Faces
z Select faces and reference vertices + + + +
Edge sense will appear
Reverse orientation on by default for sense
Periodic option should be used for periodic
boundary conditions, which creates a matched
mesh even if the edges are split differently.
z Mesh one face before or after hard link is defined
mesh on second face generated automatically
Multiple pairs of hard links can be created.
3-15 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Mesh Smoothing
Face and Volume meshes can be smoothed by moving interior nodes to obtain
incremental improvement in quality.
z The mesh at the boundary is not altered.
z Face and volume meshes are smoothed using a default scheme.

Different schemes can be selected and applied after meshing.


z Face mesh smoothing
Length-weighted Laplacian: Uses the average edge length of

the elements surrounding each node to adjust the nodes.


Centroid Area: Adjust node locations to equalize areas

of adjacent elements.
Winslow(for quad meshes only) : Optimizes element shapes

with respect to perpendicularity.

z Volume mesh smoothing


Length-weighted Laplacian: same as for face mesh smoothing

Equipotential: Adjusts node locations to equalize the volumes

of the mesh elements surrounding each node.


3-16 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Face Vertex Types


All vertices that are connected to a face are
assigned initial face vertex types based on
default angle criteria between the edges
connected to the vertex.
Combination of vertex types describes the
face shape or topology.
Face vertex types are used automatically to determine
all quad face meshing schemes except the quad-pave scheme.
z The tri meshing scheme also does not use face vertex types.
Changing vertex types can help you create a structured mesh or
help facilitate generating a hex mesh.
z For the Cooper to work, the side faces must be either mappable or
submapple and changing the vertex types may be required.

3-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Vertex Type Characteristics


End (E) E
z 0 < Default Angle < 120
E E
z zero internal grid lines
Side (S)
z 120 < Default Angle < 216 S
S S
z one internal grid line
Corner (C)
z 216 < Default Angle < 309
C C
z two internal grid lines C
Reverse (R)
z 309 < Default Angle < 360
z three internal grid lines R R

3-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Modifying Face Vertex Types


Face Vertex Types can be changed from
default setting:
z Automatically, by enforcing certain meshing
schemes in face and volume meshing.
Can sometimes result in undesirable mesh.
z Manually, by direct modification in
the Face Vertex Type form.
Select Face
symbols appear in graphics window
Select New Vertex Type
S
Select Vertices to be affected E
Vertex Types can be applied to just Boundary Layers as option.
A vertex can have multiple Types; one per each associated face.
For a given set of face vertex types, Gambit will choose which meshing
scheme to use based on predefined "formulas".

3-19 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Example: Using Vertex Types to make a


Face Submappable
A face can be made submappable E
z By manually changing vertex types E S
Consider which vertex should be R
changed to "Side" E
In Set Face Vertex Type form, E E
change vertex (default type) to E
Side E
E E
R Submap: 4*End + Side
E ? + (2*End + Reverse)
z By enforcing the Submap scheme
E E
In the Face Mesh form, change E
the scheme from default to E
E E
"Submap" and "Apply"
default R
(GAMBIT will try to change the E
vertex types so the scheme is
honored) E S

User has less control - resulting E


mesh may be undesirable
3-20 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Formula for Map Scheme


Map Scheme: 4*End + N*Side
S
E + E

E E
E E
E E

Periodic Map Scheme: N*Side


z Project intervals can be specified for
more mesh control.

3-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

How to Make a Face Mappable


E E
By manually changing vertex types
z In Set Face Vertex Type form, change Default
C C
vertices (default) to "Side" (example)
z Open the Face Mesh form and pick the face E E E E

(GAMBIT should automatically select the S S


map scheme)
By enforcing the Map scheme S S
z In Face Mesh form, change the scheme
E E E E
from default to "Map" and "Apply"
Map: 4*End + 4*Side
(GAMBIT will try to change the vertex
types so the scheme is honored)

E E
S E
default Map: 4*End

E E E E

3-22 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Formula for Submap Scheme


Submap Scheme: 4*End + L*Side + M*(End + Corner) + N*(2*End +
Reverse)
z additional terms when interior loops exist
E E
E E E S
E
C C
E C C C
C C
E S
E E E E E E
E

Periodic Submap Scheme: N*Side + M*(End + Corner) where M >2


z additional terms when interior loops exist

C E C C
S + +S
C E C C

3-23 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Tri-Primitive Scheme
Tri-Primitive Scheme: 3*End + N*Side
E
S

E E

To mesh a face with the tri-primitive scheme:


z Manually, change one of the vertex types to "Side" in this example
z The Tri Primitive scheme can not be enforced
E E E S

E E
E E
default

3-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Meshing Faces with Hybrid Quad/Tri Schemes


Quad/Tri: Tri-Map formula: 2*Triangle
T T
z The face vertex types need to be manually
changed to Triangle (T) and the Tri-Map
scheme must be selected.
T
Quad/Tri: Pave
z All vertex types are ignored except Trielement
(T) and Notrielement (N)
E S
z Trielement (T) will enforce a triangle
z Notrielement (N) will avoid a triangle
Quad/Tri: Wedge
E N
z Used for creating cylindrical/polar type meshes
z The Vertex marked (T) is where rectangular
T
elements are collapsed into triangles

E
3-25 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Assessing Mesh Quality


Default measure of quality is based on EquiAngle Skew.
Definition of EquiAngle Skew:

max e e min
max ,
180 e e

where:
z max = largest angle in face or cell

z min = smallest angle in face or cell max


z e = angle for equiangular face or cell min
e.g., 60 for triangle, 90 for square
Range of skewness:
0 1
best worst

3-26 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Examining the Mesh


Examine Mesh Form
z Display Type
Plane/Sphere
View mesh elements that fall in plane or sphere.
Range
View mesh elements within quality range.
Histogram shows quality distribution.
Show worst element automatically zooms into
worst element
Select 2D/3D and Element Type
Select Quality Type
z Display Mode
Change cell display attributes.

3-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Striving for Quality


A poor quality grid will cause inaccurate solutions and/or slow convergence.
Minimize EquiAngle Skew:
z Hex and Quad Cells
Skewness should not exceed 0.85.
z Tris
Skewness should not exceed 0.85.
z Tets
Skewness should not exceed 0.9
Minimize local variations in cell size:
z e.g., adjacent cells should not have size ratio greater than 20%.
If Examine Mesh shows such violations:
z Delete mesh
z Perform necessary decomposition and/or pre-mesh edges and faces.
z Remesh

3-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Meshing

4-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Approach

To potentially reduce discretization errors, and to reduce cell


count, a "high" quality hex mesh is preferred.
z For a hex mesh, complicated geometries (volumes) typically need to
be decomposed into simpler ones so that one of the hex meshing
schemes can be used.
z In some instances, some geometries may be too complex and
decomposition for hex meshing is impractical or impossible. In these
instances use a tet/hybrid mesh.

4-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Meshing
Volume Meshing Form:
z Upon picking a Volume
GAMBIT will automatically choose a Type based on the solver selected and
the combination of the face Types of the volume.
In ambiguous cases, GAMBIT chooses the Tet/Hybrid: TGrid combination
z Available element/scheme type combinations
Hex
Map
Submap
Tet-Primitive
Cooper
Stairstep
Hex/Wedge
Cooper
Tet/Hybrid
Tgrid
Hex-Core

4-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Meshes - Hex Examples


Hex: Map Hex: Cooper

Hex: Submap Hex: Stairstep

Hex: Tet-Primitive

4-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex/Wedge and Tet/Hybrid Examples


Hex/Wedge: Cooper

Tet/Hybrid: Tgrid

Tet/Hybrid: Hex-Core

4-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex Meshing - Map


Map Scheme
z Volumes that are mappable by default:
A logical cube
All faces map-able (or Submap-able) and mesh is matching

mesh

mesh

4-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex Meshing - Submap


Submap Scheme
z Volumes that are Submap-able by default:
All faces map-able or submap-able
Topological matching of opposite faces

mesh

mesh

4-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex Meshing - Tet-Primitive


Tet-Primitive scheme
z All hex elements in a four-sided (tet) volume
z Volumes directly meshable using Tet-Primitive scheme

Mesh

Tet Primitive

z How the Tet Primitive Scheme works


Connect center points on edges, faces and the volume
Map the four sub-volumes

4-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex Meshing - Cooper


The Cooper Scheme, in essence, projects or extrudes a face mesh (or a set
of face meshes) from one end of a volume to the other and then divides up
the extruded mesh to form the volume mesh.
z The projection direction is referred to as the Cooper direction.
z Faces topologically perpendicular to this direction are called Source faces.
Source faces do not have to be premeshed.
In practice, at least one source face must not be meshed and must span across
the entire cross section.
z Faces that intersect the source faces are referred to as Side faces.
Side faces must be Mappable or Submappable.
Source Faces Side Faces

Cooper direction

4-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Permissible Cooper Geometries


source faces
source faces

source faces source faces

Multiple source faces and


Volume containing multiple interior loops
multiple holes

Source faces are not


parallel to each other

4-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Steps to Use the Cooper Tool

When the Cooper scheme is selected, a source


face list box appears in the panel.
If GAMBIT chooses the sources faces
z Check the source face list and visually check for
an intelligent selection
z If necessary, change the source faces selected by
GAMBIT.
If GAMBIT fails to pick a set of source faces
z Manually select the source faces
z If necessary, manually change the vertex types
(discussed in lecture 3) on some of the side faces

4-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Getting the Cooper Tool to Work (1)


A

Problem: Mesh on Source Work around: Remove Mesh on


Faces A and B can not be Face C.
projected onto mesh on Source As a general rule, do not
Face C premesh all of the source faces.
4-12 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Getting the Cooper Tool to Work (2)

A A1 A2

Interior
loops

Problem: "Close" interior loops on Work around: Split Face A.


opposing source Faces A and B Neither of the faces A1 and A2
The Cooper tool fails if the interior have interior loops.
loops (when projected onto a
single face) intersect or are "close".
4-13 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Getting the Cooper Tool to Work (3)

C
C2

B
A A1

Problem: No logical cylinder Work around: Split the Volume with


exists: If Faces A and B are source a Face. Use Face A1 as one source
faces, then Face C must be either
mappable or submapple. Face C face for Volume 1 and use Face C2 as
has a void and can only be paved. one source face for Volume 2.

4-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

How to Make a Volume Cooperable


Three options to cooper a volume:
z Manually change the vertex types on the side faces so they are mappable
and/or submappable
z Pick the source faces
z Enforce the map or submap on the side faces

Example: manually change the vertex types

S E E
S

S E
E C E
S E
E
3 Source Faces

4-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Tetrahedral/Hybrid Meshing
Tetrahedral/Hybrid Mesh Scheme - TGrid
z Automatic - most volumes can be meshed without decomposition.
z Use boundary layers to create hybrid grids (prism layers on boundaries to
capture important viscous effects).
z Use on volumes that are adjacent to volumes that have been meshed with
hex elements will automatically result in a transitional layer of pyramids.

Tet mesh second

Hex mesh first

4-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Tet/Hybrid Meshing: Troubleshooting


Quality of the tetrahedral mesh is highly dependent on the quality of
the triangular mesh on the boundaries.
z Initialization process may fail or highly skewed tetrahedral cells may
result if there exists:
highly skewed triangles on the boundaries.
large cell size variation between adjacent boundary triangles.
small gaps that are not properly resolved with appropriate sized
triangular mesh.
Difficulties may arise in generation of hybrid mesh.
z Cannot grow pyramids from high aspect-ratio faces.
z Prism and pyramid generation may not work properly between surfaces
forming very acute angles.

prism layer
low quality pyramid acute angle

4-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex - Core Meshing


Tetrahedral/Hybrid Mesh Scheme
Hex - Core
z Combines Tet/Hybrid mesh with
core Cartesian mesh
z Fewer cells with full automation
and geometric flexibility
z Non Conformal Meshes Created
with:
Size Functions
Hexcore_Quad_Surface_Split
Default (split quads into tri
elements)
z The number of offset layers (cell
layers between wall and hexahedral
core is controlled by the GAMBIT
Hexcore_Offset_Layers.

4-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex Core Meshing : Surface Split


Geometry: Cylinder
Edit Default: Hexcore_Quad_Surface_Split = 1 (default) or 0

Hex Core Tets Pyramids


1 (default)
z Split boundary quad into 2

triangles
zhanging edges created

(NOT allowed in FIDAP)


z Smooth boundary hexes

with larger hexcore


0

z Boundary quads are NOT

split
z Pyramid (transition)

elements created
z Boundary hexes not

smoothed
4-19 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Hex Core Meshing: Setting Offset Layers


The number of layers of cells between the boundaries of the domain and the
hexcore is controlled by the GAMBIT default HEXCORE_OFFSET_LAYERS.
z HEXCORE_OFFSET_LAYERS is set to 3 by default.
Increasing HEXCORE_OFFSET_LAYERS provides flexibility in meshing with
sizing functions, boundary layers and complex boundaries.

3 cell layers
HEXCORE_OFFSET_LAYERS=3
(default)

5 cell layers
HEXCORE_OFFSET_LAYERS=5

4-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Assigning Boundary and Continuum Types


The Boundary Type Form
z Enter entities to be grouped into single zone in entity
list box.
First choose entity type as face or edge.
z Select boundary type for zone (entity group).
Available types depend on Solver
z Name zone if desired.
z Apply defines zone and boundary type.
Can also modify and delete zone/boundary.
z By default,
External faces/edges are walls
Internal faces/edges are interior
The Continuum Type Form
z Similar operation.
z All continuum zones are by default, fluid.

4-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

FLUENT 5/6 Example: Flow over a Heated Obstacle

Boundary: Name = inlet Boundary: Name = outlet Continuum: Name = step


Type = VELOCITY_INLET Type = PRESSURE_OUTLET Type = SOLID
4-22 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

FIDAP 8: Example: Flow over a Heated Obstacle

Boundary: Name = inlet Boundary: Name = outlet Continuum: Name = step


Type = PLOT Type = PLOT Type = SOLID
4-23 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Defaults: Example: Flow over a Heated Obstacle

By default, the 4 remaining external By default, the one remaining


faces have the Name and Type: volume has the Name and Type

Boundary: Name = wall Continuum: Name = fluid

Type = WALL Type = FLUID

4-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Linear/Quadratic Elements
(FIDAP/POLYFLOW USERS ONLY)
General tools
z Higher-order elements
For FEM codes (FIDAP and POLYFLOW), the element order can
be changed at all three meshing levels
Only linear and quadratic elements are directly available
A change to quadratic element type at one level will
automatically change the element type in other levels
The following table presents the most commonly used and
recommended quadratic element types for FEM - solvers
POLYFLOW FIDAP
edge 3-node 3-node
face 8-node quad 9-node quad
volume 21-node brick 27-node brick

4-25 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

4-26 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Decomposition Examples

5-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Decomposition

Suggestions of how to decompose single volumes into multiple mesh-able


volumes are shown in these examples.
The following meshing tools are used:
z Map
z Submap
z Tet-primitive
z Cooper
Volume decomposition is not needed for the Stairstep, Hex/Core or TGrid
Tet/Hybrid meshing schemes.

5-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

First Example (1)


A spherical void inside a brick
z Construction
Create a sphere, a brick and a cylinder using volume primitives. The cylinder diameter
should be smaller than the sphere and its length extending outside the brick
Subtract the sphere from the brick
z Decomposition
Split the brick using the cylinder
Create edges going diagonally over the top and bottom face of the brick and use the
edges to create a diagonal face
Split the brick-like volume using this face
Last two steps are not necessary but create higher quality mesh.

5-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

First Example (2)


z A spherical void inside a brick
Three of the four Cooper-able volumes

source faces

source faces

5-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Second Example (1)


z A handle
Construction:
Create a torus and a brick using volume primitives
Split the torus using the brick Face as a tool
Delete the left part of the torus
Decomposition:
Make a Bidirectional split of the remaining volumes

5-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Second Example (2)


z A handle
Alternative Construction/Decomposition:
Create a torus and a brick using volume primitives
Perform a bi-directional split using the two volumes
Delete the part of the torus that is outside the back of the brick
Unite back the block and the pipe section inside the block again

5-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Second Example (3)


z A handle
The two volumes meshed by the Cooper - tool

source face

source faces

5-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Third Example (1)


z A box with rounded corners
Construction
Create a brick using volume primitives
Use the blend option to round off one corner and three edges using the same
radius (Setback option)
Decomposition:
Create a second brick of the same size as the radius of the blend and move it
such that its corner coincides with the center point of the blended corner.
Split off the the rounded corner
Sweep out the three triangular faces created by the split to the opposite ends
of the brick
Split off the three prismatic volumes from the main volume

5-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Third Example (2)


z A box with rounded corners
The volume can be meshed using the submap (1), the tet-primitive (not
shown) and the Cooper (3) schemes.

source
face
source faces

5-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fourth Example (1)


z Pipe-pipe intersection (different radii)
Construction:
Create the pipes using volume primitives
Create a stretched brick with a rectangular cross-section, where the side
length should be between the two pipe diameters.
Decomposition
Split the main pipe using the brick
Unite the brick cut-out with the small cylinder

5-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fourth Example (2)


z Pipe-pipe intersection (different radii)
The three volumes meshed using the Cooper tool source faces

source faces

source faces

5-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fifth Example (1)

z A sphere in three volumes


Construction
Create a sphere using volume primitives
Decomposition:
Create a cylinder and split the sphere using the cylinder
Create a brick and move it such that one side of the brick is along the center of
the cylinder
Split the annular remainder of the sphere into two volumes
All three volumes are basic Cooper-able volumes

5-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fifth Example (2)


z A sphere
The final mesh for two of the volumes

source faces

source faces

5-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fifth Example (3)


z A sphere in eight volumes
Alternative Construction/decomposition
Create a sphere and a brick using volume primitives
Intersect the two volumes to create a sphere octant
Make a second copy by the use of Copy/Reflect and the z-plane
Make six octants more using Copy/Rotate and 90 degree angle, twice
Connect all faces using Real Connect
The same geometry could also have been created by splitting a sphere in all
three major planes
This decomposition will create a better mesh quality

5-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fifth Example (4)


z A sphere
The final mesh for seven out of the eight octants, all meshed using
Tet Primitive

5-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

5-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Meshing Control using Sizing Functions and


Boundary Layers

6-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Sizing Functions and Boundary Layers


Sizing Functions and Boundary Layers are meshing control tools available in
GAMBIT.

Sizing functions can be used to smoothly control the growth in mesh size over
any particular region of the geometry or the entire geometry, starting from a
source or origin.
z Sizing functions are used to smoothly transition from fine mesh needed to resolve
flow physics, curved geometry and model flow in thin gaps.

Boundary layers are used to grow layers of cells of desired height from specified
boundaries of 2-D/3-D geometry and are typically used to capture near wall
phenomena such as turbulence and heat transfer.

Multiple Sizing Functions and Boundary Layers can be used to control mesh size
distribution.

6-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Size Functions
Size Functions control the mesh distribution in a region of space,
including edges, faces, and volumes similar to the way grading
controls mesh distribution on edges.
Size Functions are accessed through the Tools menu:
Size Functions are designed to grade meshes with Tets even
though they can be used with a hex mesh.

Multiple Size Functions: Curvature and Proximity


6-3 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Size Function Types


Size Function requires the specification of
Type, Entities, and Parameters.
Size Function "Type" controls method by
which scope of sizing function is obeyed.
z Fixed
Scope is defined as a fixed region about a
source.
z Curvature
Scope is defined as a region near highly
curved surfaces.
z Proximity
Scope is defined as a region within a
specified distance from objects.
z Meshed size Function
Ensures that a mesh is radiated in a controlled
manner from pre-meshed boundaries of the
domain.

6-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Sizing Function Definition


Each Size Function Type requires the specification
of:
z Entities
Source entity defines shape and location of the
"origin" of affected region.
Attachment entities host the mesh that will be
affected.
z Parameters
Three parameters define the characteristics of the
size function, except the meshed size function.
The two parameters common to all four size
function types are the Growth rate and Size limit.
The third (initialization) parameter is different for
each of the first three size function types.
The meshed size function does not use a
initialization parameter.

6-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fixed Size Function - Source


Source
z Can be vertices, edges, faces, or volumes
z Can be internal or external to attachment entities
z Source entity defines shape of scope

6-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Size Function - Attachments


The attached entities host mesh to be affected.

6-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Fixed Size Function


Parameters
z Start size: Size adjacent to the source
z Growth rate: Ratio of two adjacent mesh-
element edge size

Small growth rate Large growth rate


Size limit: Maximum allowable size for
attachment entity

6-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Curvature Size Function


Source Entities can only be Faces
Parameters
z Angle: Specifies the maximum allowable angle
between outward pointing normals for any two
adjacent mesh elements.

Large angle Small angle

z Growth rate and Size limit: same as for Fixed

6-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Proximity Size Function


Specifies number of cells in face gap (3D) and
edge gap (2D)
Parameters
z Cells per gap : number of mesh layers in the gap
z Growth rate and Size limit: same as for fixed
Limitations
z Becomes slow on large models
z Improper use may result in abrupt change in size
z Solutions
Use multiple size functions
Increase resolution by changing the defaults for
background grids

Cells/gap = 2
6-10 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Meshed Size Function


Source and attachment entities are specified
similar to the fixed size function.
Parameters:
z No initialization parameter is needed.
z Growth rate and size limit need to be specified,
though.
Limitations
z The source entities have to be pre-meshed.

Premeshed source face


Premeshed
source edges

6-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Background Grid Generation


Size functions work by generating a discrete map of mesh size on a background
Cartesian grid that overlays the attachment geometry, which is used by the meshing
algorithms in growing mesh with a size distribution.

A set of Cartesian boxes forming a grid that bounds the attachment geometry are
generated and successively refined i.e. split into smaller boxes, 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 percentage tolerance limit.
z The GAMBIT Transcript window contains details of background grid generation for each size
function.

The maximum allowable tree depth and the tolerance limits are set by GAMBIT
Defaults, BGRID_MAX_TREE_DEPTH (=16 by default) and
NONLINEAR_ERR_PERCENT (=25% deviation from linear variation, by default).

It may be necessary to increase BGRID_MAX_TREE_DEPTH to smoothly resolve size


functions, and hence the mesh, on complex or large geometry.

6-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Increasing Background Tree Depth


Background grid level
reached maximum
value specified
Size Function not
sufficiently resolved

Ideal background grid

Under-resolved Background Grid Resolved Background Grid

6-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Layers
Boundary layers are layers of elements growing out from a boundary
into the domain.
z Produces high quality cells near boundary.
z Allows resolution of flow field effects with fewer cells than would be
required without them.
In general, boundary layers are attached to:
z edges for 2D problems
z faces for 3D problems
complicated 3D shapes may require boundary layer attachments to edges.

6-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Specifying a Boundary Layer


Create Boundary Layer Form
z Algorithms
z Definition Inputs
z Settings
z Transition Pattern
z Attachment

6-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Layer Algorithms


Boundary Layers can be defined using Uniform or Aspect Ratio based
algorithm.

Uniform Boundary Layer Aspect Ratio based Boundary Layer

Size is constant for each Aspect ratio/layer is


layer of cells constant for each layer of
cells

6-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Layer Definition Inputs

z Definition Inputs for Uniform Boundary Layer ( 3 out


of 4 inputs are required, the fourth is calculated)
First row: height of first row of elements (a)
Growth factor: factor for geometric series (b/a)
Rows: total number of element rows
Depth: total height of boundary layer (D)

z Definition Inputs for Aspect Ratio Based Boundary


Layers are similar:
First percent: starting aspect ratio
Growth factor factor for geometric series (b/a)
Number of rows

6-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Wedge Corner Shape


The Wedge corner shape option is used at corner or reversal vertices to
create a rounded wedge of elements.

ON (Wedge Shape) OFF (Block Shape)

6-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Internal Continuity
The Internal Continuity toggle allows boundary layers to be formed
with no crossover or overlap regions.

Internal Continuity OFF Internal Continuity "ON"

6-19 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Layer Attachments


Boundary layers attach to edges for 2D boundary layers and faces for 3D
boundary layers.

A boundary layer is initially displayed in orange to


indicate that it is temporary, and updates immediately
with any changes.

An arrow points from the attachment edges towards


the centroid of the corresponding face (for 2D boundary layers)
or volume (for 3D boundary layers).
z This can be misleading in some cases, e.g. in 3D case when the volume forms
an annulus.

The boundary becomes white (permanent) upon clicking on Apply.

6-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Layers and Vertex Types


2-D Boundary layers in regions near
vertices are defined by the vertex type. E
E

End: mesh overlaps E


R E
C
Corner: angle divided into thirds E

Reverse: angle divided into fourths.


E
Side: angle bisected S E

The vertex type for Boundary Layers can


be changed in the Set Face Vertex Form
in the Face meshing menu with the
Boundary layer only option turned on.

Vertex types are also important for


imprinting 3-D boundary layers on
adjacent faces.

6-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Imprinting Adjacent Faces with 3-D Boundary


Layers
A 3-D boundary layer attached to a face may "imprint" the adjoining faces,
depending on the vertex type of the vertices at the intersection of the
boundary layer attachment face and adjoining faces.
z If the vertex is an End type vertex, an imprint is created and displayed.
If 3-D boundary layers are also attached to the adjoining faces, then the
Internal Continuity toggle will determine the crossover region and imprint.

Imprint of 3-D boundary layer on adjacent faces


with 3-D boundary layer attached to bottom face
6-22 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Imprinting 3-D Boundary Layers by


Modifying Vertex Types
When the angle between adjacent and attachment faces in greater than 120 , a 0

vertex type change to End can cause the 3-D boundary layer to imprint.

140
S S
Attachment Face S
No imprinting of 3-D Boundary Layer
and gaps due to Side Type vertices at the
intersection of the faces

E E
E
Vertex Types changed to End closes the
gap and imprints 3-D boundary layer
6-23 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Normal and Offset Smoothing


Normal smoothing of boundary
layers is used to ensure a gradual
change in growth direction of
boundary layers wrapped around
corners.
Offset smoothing is used to reduce Without normal With normal smoothing
or eliminate spikes and dips in the smoothing
boundary layer.
Both kinds of smoothing are
performed iteratively and are
governed by GAMBIT defaults.

6-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Layer Defaults


GAMBIT defaults set values for the
critical parameters for growing
boundary layers.

A knowledge of the important defaults


will help control mesh on complex 2-
D and 3-D geometry.
z Boundary Layer Defaults are
available in the in the BLAYER and
BLAYERTGRID sections under the
Mesh Tab in the Edit Defaults Menu.

z The GAMBIT Command Reference


Guide provides more information on
defaults.

6-25 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Some Important Boundary Layer Defaults


USE_FACET_EVALS=1
USE_FACET_EVALS (default = 1, 2-D and 3-D Boundary
Layers)
z 1 = Surface boundary layers will use a faceted
representation of the surface to calculate the growth
direction.
ANGLE_SMOOTH_FACTOR=0
The faceted representation is much faster, especially for
complex surfaces, but less accurate. USE_FACET_EVALS=0

z 0 = Surface boundary layers will use the exact


representation of the surface (1e-6 tolerance) to calculate
the growth direction for the boundary layer.
ANGLE_SMOOTH_FACTOR=0

ANGLE_SMOOTH_FACTOR (default value=0, Maximum


allowable value = 1, 2-D and 3-D boundary layers)
z Nodes are projected perpendicular for a value of 0.

z Generates equidistant outer nodes for a value of 1.

z Intermediate values between 0 and 1 are allowable.


ANGLE_SMOOTH_FACTOR=1

6-26 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Some Important Boundary Layer Defaults


ADJUST_EDGE_BL_HEIGHT (default = 0, 2-D ADJUST_EDGE_BL_HEIGHT=0
boundary layers only)
z 0 = the boundary layer height at the edge is the
distance grown from the vertex. If the adjacent
edge is skewed, then the boundary layer height
will be less than the perpendicular height. ADJUST_EDGE_BL_HEIGHT=1

z 1 = the boundary layer height is projected onto


the skewed edge.

z Other Important Defaults (Details in GAMBIT


Command Reference Manual) :
QUICK_N_DIRTY
HEIGHT_TRANSIT_RATIO
SMOOTH_CONTINUOUS_SIDES
Defaults for Normal and Offset
Smoothing

6-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

6-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

CAD/CAE Data Exchange


and Geometry Cleanup
(Virtual Geometry)

7-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Introduction
Several translation methods available to enable data exchange with
CAD/CAE systems.
z Appropriate approach depends upon source.
Translation can:
z return incomplete, corrupt, or disconnected geometry
z return geometry details unnecessary for CFD analysis
Geometry cleanup refers to processes required to prepare geometry for
meshing.
z Fix incomplete or corrupt geometry and connect disconnected geometry
z Remove unnecessary details
z Decompose geometry into meshable sections
Gambit's Virtual Geometry operations can help with the cleanup
process.

7-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

CAD Data Exchange - Direct Options


Direct Translation Options
z ACIS-based CAD programs:
e.g., AutoCad, Cadkey, TurboCad
can export ACIS files (.sat or .sab)
which can be imported into Gambit.
z Parasolids-based CAD programs:
e.g., Unigraphics, SolidWorks, PATRAN, ANSYS
can export Parasolid files (.x_t and .xmt_txt) which
can be imported into Gambit.
z CAD programs using proprietary geometry kernel
Catia V4 and Catia V5 (saved in Catia V4 format)
Direct (single-stage) Catia V4.model file to ACIS
translator
ADD-on (specific license key needed)
Contact your account manager at Fluent for price
information

7-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

CAD Data Exchange - Standard Options


Standard Translation Options
z Translation uses an intermediate, neutral
or standard, file format.
z Applicable for all CAD/CAE systems
that can output:
STEP files
Pro/E supports STEP export at no additional cost.
Other systems support STEP as add-on.
IGES files
Common format supported by most systems.
z STEP (Standard for Exchange of Product model data)
International standard defining format for geometry
and model information.
Gambit supports AP203 and AP214
Preferred over IGES import

7-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

CAD Data Exchange - Standard Options (2)


Standard Translation Options (continued)
z IGES (Initial Graphics Exchange Specification)
Topology/connectivity information is lost when CAD programs export IGES
surface data only.
e.g., faces associated with volume, etc.
implies that volumes must be recreated from imported faces (tedious)
Some CAD packages export IGES-solids as well as IGES-surfaces.
I-DEAS and CADDS
Topology/connectivity information maintained.
Gambit provides two options for IGES import
Spatial (Recommended)
All imported geometry comes in as real, supports solids
Native (Fluent)
Original IGES translator, does not support solids
Trimmed surfaces come in as virtual geometry

7-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Import Mesh and Import CAD


Import Mesh and some Import CAD options result in faceted geometry.
z Least preferred approach
Import/CAD Pro/E (Direct)
z Gambit directly accesses
Pro/Es geometry engine
Eliminates geometry
translation losses
User works in
Gambit environment
z Need special Gambit and
valid Pro/E license
z Solid models alone are supported

7-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Tolerant Modeling
Automatic "real" geometry connect using
variable tolerance
Available at
z time of import
z inside the Heal Face (or Volume) Form
Application
z All Geometry files
z Relatively large gaps
z Real ACIS volumes generated during
import
Boolean operations subsequently possible
z Adding/Subtracting additional geometry
z Volume Extraction
z Retaining only or of model
z Volume Decomposition for better meshing

7-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Smoothing Real Geometry


Smoothing can be used to remove discontinuities
in geometry and simplify spline representations.
Smoothing can aid in subsequent Boolean
operations.
There are two smoothing options:
z Remove discontinuities
z Reduce complexity to simplify NURB
representation

Face
smoothing

7-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Heal Real Geometry


Geometry imported from other CAD systems can lack the required accuracy
and precision to render valid or connected ACIS geometry.
z This results from numerical limitations in original CAD system, neutral file
formats, or differences in tolerances between CAD systems and ACIS.

If Boolean operation fails on imported tolerant geometry


z Problems are usually resolved by smoothing or healing the geometry.
Healing can be done on either faces or volumes
Healing can be invoked at time of import
z If smoothing/healing fails to resolve the problem,
Re-import the geometry without tolerant modeling or healing
Use the check command to verify integrity of geometry/topology.
Replace the corrupted faces using real options
Use Tolerant modeling and Healing to re-connect the new face with the rest of
the model.

7-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry
Three kinds of geometry in GAMBIT:
z Real
Defined by the ACIS library of geometry creation/modification routines.
Geometry defined by mathematical formulae.
z Virtual
A Fluent Inc. library of routines providing additional functionality by redefining
topology.
Derive their geometrical descriptions by references to one or more real entities
(called the Hosts).

z Faceted geometry
Treated
Two like
objects that virtual
share geometry.
the same underlying geometry but different topologies.
Derived from importing a mesh or faceted geometry into GAMBIT, split mesh
operations, or stairstep meshing scheme.

7-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry: Uses


Virtual geometry and the operations that create them are used to
simplify, clean, and connect existing geometry.
z Simplify/Clean:
remove details from the model unnecessary for CFD analysis.
merge faces/edges to increase mesh quality.
decompose geometry into smaller, meshable components.
z Connect:
Connect geometry that becomes disconnected during import process.
Virtual geometry provides additional flexibility in operations that
affect geometry and mesh.
z Merges edges to enable non-coplanar face to be created.
z Modify the mesh by repositioning nodes on virtual face.

7-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Creating Virtual Geometry


In general, virtual geometry is created as a result of a virtual geometry
operation on a real entity.
z Can also be created from a "native" IGES import operation.
Virtual geometry operations:
z are accessed:
by selecting virtual option on a real geometry panel and
through dedicated virtual operation panels.
z employ any combination of real, virtual, and/or faceted entities.
z result in the creation or modification of virtual (typical) and real entities.
z Some real geometry operations will not work with virtual geometry.
e.g., boolean operations and some split operations will not work with
virtual geometry
Take care when planning to use virtual geometry operations.

7-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Characteristics
Virtual entities:
z entities are colored differently from real entities.
z naming convention: v_vertex, v_edge, v_face, v_volume.
When performing a virtual geometry operation:
z Directly connected lower and upper geometry will become virtual
z Underlying real geometry (host) will become invisible and inaccessible (or
put in the "background")
Deleting virtual geometry:
z Will not delete host geometry.
z Typically, lower order entities (virtual) remain undeleted.
Meshing and Boundary Assignments:
z Meshing and boundary assignment operations are unaffected by virtual
geometry.

7-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry Operations-1


Merge - replaces two connected entities with a single virtual entity
Example:
+ +

Split - partitions an individual entity into two separate, connected virtual


entities
Example:
+
+

Connect - combines two individual, unconnected entities such that the


lower geometry is shared at common interfaces (unrestricted by ACIS
tolerances)
Example:

7-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry Operations-2


Create - creates independent virtual entities
z Use host entities for shape definition + + + +

Collapse - splits a face and merges the resulting pieces with two or
more neighboring faces
between
collapse these faces
this face

7-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry Operations-3


Convert - converts non-real entities to real
z Applicable to vertices, edges, faces, and volumes.
z Edges are sampled and real spline (NURBS) curve generated.
sampling controlled by geometry.edge.VIRTUAL_NUM_SAMPLING_POINTS
z Face conversions require that a map mesh first be generated on face (no Side vertices
allowed).
z Volume conversions require that all lower topologies can be converted
z Topology and any existing mesh are preserved.

Face Simplify
z Removes dangling edges
and hard points from a face.
z Result is virtual face
z The face with dangling edge
can also be split using
face split (by location)

7-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Edge/Face Merge
Virtual Edge/Face Merge options
z Virtual (Forced)
Create one single edge/face from all edges/faces

face edge
+ +
merge merge

z Virtual (Tolerance)
Merge all entities shorter than Max. Edge/Face Length
Merge all entities of higher entity angle than Min. Angle
No input will merge all vertices connected to two edges only

+ max. edge = +
+ +
+ min. angle = 135

7-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Defined Virtual Face Unite (1)


Handles gross overlaps and gaps
z Arbitrary shapes
z Tolerance option
Limitations
z Order of picking Points is important
z Important locations must be picked by user
z Gaps larger than the mesh size can create trouble during meshing
z Can not handle large distances between overlapping faces

7-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Boundary Defined Virtual Face Unite (2): Example

Square face in z = 0 plane e


Circular face in z = .05 plane f
d
Faces can not be Real united

c
a b
Straight edge constructed between
Select 6 points (a,b,c,d,e,f) points c and d (and between d and e)
c and e lie on square edge because they lie on different edges.

Select 6 points (a,b,c,d,e,f) Arc shape retained between points c


c and e lie on circular arc and d (and between d and e) because
they lie on the same edge
7-19 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Face Splits (Virtual and Faceted)


Split by
z Face (Real or Virtual)
z Edge (Virtual)
z Vertices (Virtual)
Example using 2 vertices

+
+

z Location (Virtual)
Vertex locations can be adjusted after the split
Limitations (for both Face and Volume Split)
Split through voids, protrusions and dangling faces will create
incorrect geometry
Order of picking is important
If you do not Zoom in close to the object, the split might fail
First and last location on a face must be on its boundary

7-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Volume Splits (Virtual and Faceted)


Split by
z Volume (Real)
z Face (Real or Virtual)
All edges of the face have to be
connected to the volume
connected face

virtual volume
split

one volume two virtual volumes


z Locations (Virtual)

Pick (at least) two locations

7-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Comparison of Face Unite, Merge, and Connect


Unite
z Real
Faces must have matching
tangents at edge
z Virtual
Gaps or overlaps allowed
z No unite for edges Real
Merges Unite
z Operates on real/non-real
geometry virtual
z Faces must share edge but they tolerance
need not be tangent
Merge
Connect
z Operates on real/non-real
geometry real or virtual
z Replaces selected entities with
single entity

Connect
7-22 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Edge Connect (Virtual)


Edge Connect
z Also available in Vertex and Face
z Virtual (Forced)
Pick two or more edges you want to connect
z Virtual (Tolerance)
Every picked edge within the tolerance
will be connected
10 % of shortest edge is recommended (default)
The shortest edge is shown by clicking the
Highlight shortest edge button
The shape of the connected edge is an
interpolated average of the picked edges.
Use Preserve first edge shape to force result to
assume shape of first edge in pick list.
Preserve first vertex location is available
for vertex connects.

7-23 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

T-Junctions Option
T-Junctions - splits edges by vertices that exist within a specified tolerance of
the edges and then connects the split entities.
unconnected real edges/faces connected virtual edges/faces Invoking too early may result
in very small edges

Edge Splits

Use Preserve split-edge shape option to get following result:

Original Option Off Option On

7-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Face Connect with T-Junctions


Virtual (Tolerance) Face Connect includes a T-Junctions
option.
This helps overcome common geometry problems in
imported models such as gaps, mismatches and overlaps.
z Utilizes projections, splits, and connects to overcome
problems.
Available for both real and virtual geometry
z The resulting geometry is always virtual.

Virtual (Tolerance)
Face connect using
T-Junctions

7-25 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Importing IGES Files


File Import IGES
z Summary
Review important information in the form
before importing the file.
Validity of information varies.
z Options
Native or Spatial Translator
Ability to scale the IGES file at import (Scale
model between the dimensions of 1e-6 and
1e+4, preferably around 1)
Remove stand alone entities
z Virtual Cleanup
Enables automated cleanup sequence using:
connect tolerance
edge merge tolerance
angle merge tolerance
geometry.edge.VIRTUAL_MERGE_MIN_ANGLE

7-26 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry Cleanup Strategy-1


1. Delete all unnecessary geometry
2. Check validity of imported geometry
3. Correct invalid geometry (Heal and/or reconstruction)
4. Check connectivity by color coding
z Helps distinguish between connected and unconnected entities.
White - Stand-alone entities
Orange - Unconnected faces (Edge connected to one Face)
Dark Blue - Connected faces (Edge connected to two Faces)
Light Blue - Multiple connections (internal Face)
5. Connect Geometry (can be automated using Virtual Cleanup option)
z a. Merge edges based on length and angle tolerances to eliminate short edges.
z b. Real/Virtual connect of vertices, edges, and faces, in steps, based on increasing connect
tolerance
z c. Connect with T-Junction Option.
z d. Use forced connect operation for entities out of tolerance

7-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Virtual Geometry Cleanup Strategy-2


6. Create additional geometry, if necessary, and form volume.
z Some of this may need to be done before resorting to virtual geometry
commands so that real boolean operations are available.
z Bridge real and existing virtual geometry together using virtual
geometry.
z In 3D, use face stitch command to create virtual volumes.
7. Simplify faces
z Merge small edges and faces with neighbors to eliminate Merge example:
z Remove sharp angles for better meshing.
8. Decompose volume, if necessary.
9. Mesh

7-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Cleanup Tools

8-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean up Imported Geometry


Why is Clean up important?
z Ensure connectivity: holes and cracks
Imported geometry containing large
z Improve mesh quality: Eliminate short
edges, sliver faces, sharp angles, number of faces
Clean up on models containing a large
number of faces can be tedious without
use of the cleanup tools
Cleanup Tools can semi-automate this
process
z Finding the problem areas
z Suggesting fixes
Virtual Geometry created
z Choose "Real" path to clean up if
Boolean operations needed
Refer to Chapter 5.4 in the GAMBIT
Modeling Guide for more information

8-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Meshed Geometry: With and Without Cleanup


Interval size = 2.5

Without Cleanup- Only With Cleanup- Cooper Tool can be used


theTet/Hybrid Scheme can be used
Hex mesh: 43,778 elements
Tet mesh: 202,798 elements
Number of elements reduced by a factor of 4.6
8-3 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Cleanup Tools
Sequential, Semi-automatic Geometry
Cleanup Tool resulting in connected
geometry and a better mesh
Quickly identify, zoom-in, highlight areas
that cause connectivity and mesh quality
problems
z Graphics color coding set to connectivity
z Graphics window pivot set to mouse

Appropriate tools to fix problems are given


Available Cleanup tools:
z Clean up Short Edges z Clean Up Small Faces
z Clean up Holes z Clean Up Hard Edges
z Clean up Cracks z Clean Up Fillets
z Clean up Sharp Angles z Cleanup Duplicate Geometry
z Clean up Large Angles z Select Clean up Domain

8-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Short Edges (1)


Tools to identify and highlight the problem spot
z Cleanup domain
Select whole model or group
z Maximum length: upper limit
Default: 10* shortest edge in the Cleanup domain
z Items List: candidates for cleanup operation based on
Cleanup domain and Maximum length
z Current length: length of currently picked edge
z Update: updates the Items list
Required when Maximum length is modified

z Zoom
In/Out: quick auto zoom in on or from the picked
items
z Auto: automatically zooms in on selected item

8-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Short Edges (2)

Tools to identify and highlight the problem spot


z Local: current item + all faces connected to it
Visible: make everything else invisible

Shade: shade the local objects

Options to Apply Cleanup Tool


z Apply: applies appropriate fix to selected item
z A/N: (Apply/Next) applies appropriate fix to
selected item and automatically picks the next
item in the list. The view is changed.
z Auto: entire list is processes automatically (only
works for the Method: Edge merge)
z Ignore: removes selected item from list and
selects next item
z Restore: the list is restored

8-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Short Edges (3)


Methods to fix the problem spot
z Vertex connect (least common)
Average location
Preserve location: first vertex
Preserve location: second vertex
z Edge merge
Merge with (select edge)
z Face merge
Faces to merge (select faces)
Edge merge pre-selected when at least
one vertex has only one other connected
edge.
Appropriate methods and applicable
entities are often pre-selected, however
users may edit them.
8-7 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Short Edges (4)

Before Cleanup After Cleanup by Edge


Merge

8-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Holes (1)


Holes in the model are internal edge
loops that do not constitute external
boundaries of a face (or faces)
Tools to identify and highlight the
problem spot and Options to Apply
Cleanup Tool
z Similar to those for Cleanup Short edge
Method to fix the problem spot
z Create Face from Wireframe
z Real and Virtual options available

8-9 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Holes (2)

Before Cleanup After Cleanup

8-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Cracks (1)

A Crack is defined as an edge pair that


meets the following criteria
z Each edge in the pair serves as a
boundary edge for a separate face.
z The edges share common endpoint
vertices at one or both ends.
z The edges are separated along their
length by a small gap.
Defining angle: the angle at the
endpoint vertex shared by the two
edges.
z If edges share common endpoint
vertices at both ends, the minimum
angle is used

8-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Cracks (2)


Tools to identify and highlight the
problem spot
z Maximum angle: default is 20
z Other tools similar to those for Cleanup
Short edge
Options to Apply Cleanup Tool
z Similar to those for Cleanup Short edge
Method to fix the problem spot
z Connect edges
Tolerance: maximum distance between
edges to be connected

8-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Cracks (3)

The edges that define the crack share The edges that define the crack share
one vertex two vertices

Before Cleanup After Cleanup Before Cleanup After Cleanup

8-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Sharp Angles (1)


A Sharp Angle is defined as an edge pair that meets the following criteria
z The edge pair shares a common endpoint vertex and serves as part of the
boundary for an existing face.
z At least one of the edges in the sharp-angle edge pair serves as a common
boundary edge between its bounded face and an adjacent face.
z The angle between the edges in the pair (computed at their common endpoint
vertex) is less than a specified angle.

8-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Sharp Angles (2)


Tools to identify and highlight the problem
spot

z Maximum angle: default is 20
z Other tools similar to those for Cleanup
Short edge
Options to Apply Cleanup Tool
z Similar to those for Cleanup Short edge
Methods to fix the problem spot determined
by face-face angle faceface angle: 180
z If face-face angle > 135: Merge faces
z If face-face angle < 135: With Options (to is the angle between
truncate)
the normals of the two
Distance: length of shortest boundary edge
faces (shaded in grey)
of truncated face
Chop Merge
Bi-Chop Merge

8-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Sharp Angles without Chop (3)


Before Cleanup

Virtual Virtual

After cleanup: Merge


After cleanup:
with right face
Merge with left face

8-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Sharp Angles with Chop (4)

truncated
face

distance

Chop
merged face
option
face - face Merge edges Tri-primitive
angle < 135

1 of 8 Sharp Angles: Mesh: Cooper

8-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Large Angles (1)


A Large angle is defined by a pair of faces that meets the following
criteria
z The faces are connected by a common boundary edge.
z The angle between the outward-pointing normals for the faces (the average of
three different points along their common boundary edge) is less than a
specified angle.

8-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Large Angles (2)

Tools to identify and highlight the


problem spot
z Maximum angle: default is 5 degrees
z Other tools similar to those for Cleanup
Short edge
Options to apply the Cleanup Tool
z Similar to those for Cleanup Short edge
Method to fix the problem spot
z Merge faces

8-19 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Large Angles (3)

Before cleanup

After cleanup

8-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Small Faces (1)


Tools to identify and highlight the problem
spot
z Maximum area: default value is 100 times
the area of the smallest face in the Cleanup
domain
z Items in the list contains all faces with areas
less the maximum area
z Other tools similar to those for Cleanup
Short edge
Options to apply the Cleanup Tool
z Similar to those for Cleanup Short edge
Methods to fix the problem spot:
z Merge face
z Collapse face
Candidate Faces to merge: all bounding
faces with a face-face angle > 135 pre-
picked

8-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Small Faces (2)

Before cleanup After cleanup by


Merge Face

8-22 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Hard Edges (1)


Hard edges are also know as dangling
edges.
Creation occurs:
z as a result of a face split when the split
tool only partially intersects target face
z from STL or mesh import
Tools to identify and highlight the
problem spot and options to apply the
cleanup tool
z similar to those for Cleanup Short edge
Method to fix the problem spot
z Remove all hard edge

8-23 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Hard Edges (2)

Before cleanup After cleanup

8-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Fillets (1)


A fillet is defined as a face that meets the following criteria:
z The face lies between and is connected by means of common boundary
edges to two or more faces.
z The faces to which the fillet face is connected are oriented at an angle with
respect to each other.

8-25 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Fillets (2)


Tools to identify and highlight the problem
spot
z Maximum angle: specifies the maximum
deviation from 90o for outward-pointing
normals computed at the boundaries of the
fillet face.
z Other tools similar to those for Cleanup
Short edge
Options to apply the Cleanup Tool
z Similar to those for Cleanup Short edge
Methods to fix the problem spot
z Merge face
z Collapse face
Candidate Faces
z Faces to merge: all bounding faces with a
face-face angle > 135 pre-picked
z to collapse between: two opposite faces
along the longest edges prepicked
8-26 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Clean Up Fillets (3)

Before cleanup After cleanup by Collapse face

8-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Cleanup Duplicate Edges


Clean Up Duplicate Edges
z Includes edges which are coincident in part (T-junction
connect)

8-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Cleanup Duplicate Faces


Clean Up Duplicate Faces
z Two search options
Topology-based
All lower entities (edges or vertices) to be
identical between the two faces.
Centroid-based
The centroids of the two faces should be within
tolerance.
Less accurate, but helpful in detecting duplicate
faces with different lower topology.
Method: Connect or delete faces

8-29 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Cleanup Duplicate Volumes


Clean Up Duplicate Volumes
Method: Connects or deletes duplicate volumes
Duplicate entities due to modeling errors or
problematic import

8-30 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Select Cleanup Domain


Specifies the domain to which the geometry cleanup operations
apply.
z Whole Model (default)
z Predefined geometry group

The Cleanup
Domain is group2

8-31 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Demo
Import a Non-ACIS File (demo.igs)
Apply Cleanup Tools
z There are many different approaches.
Mesh the Model using the Cooper Tool (Hexes).

8-32 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Where are the Problem Areas?

Short edge Orange edges:


Fillet unconnected faces
Faces can
be merged
Sliver face

8-33 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Steps to Clean up
Import the .iges file using the default settings
(Make tolerant).
Change color coding to connectivity.
z Blue edges (2 connections) indicate connected
geometry.
z Orange edges (1 connection) indicate
unconnected geometry.
Try healing the faces (to retain Real Geometry)
Delete the problematic face
Source face
Apply Cleanup Tools (Virtual Geometry
Created)
z Short Edges
z Holes
z Large Angles
z Fillets
Create a Volume by stitching
Mesh using the Cooper Tool

8-34 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Using Parameters in Journal Files and the


Dynamic GUI

9-1 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Outline
Basis of Journal Files
Parameters: Scalars and Arrays
Special Constants
Expressions: Arithmetic, Logical and String
Functions: String and Arithmetic
Examples
DO and IF-THEN-ELSE Commands
Summary of Journal File Uses
Dynamic GUI and Examples

9-2 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Journal Files
Journal File:
z Executable list of Gambit commands
Created automatically by Gambit from GUI and TUI.
Can be edited or created externally with text editor.
z Journals are small - easy to transfer, e-mail, store
Uses:
z Can be parameterized, comments can be added
z Easy recovery from a crash or power loss
z edit existing commands to create new ones

9-3 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Running Journal Files


Journal files can be processed in two ways:
z Batch mode (Run)
All commands processed without interruption.
"read pause" command will force interrupt with
resume option appearing.
z Interactive mode (Edit/Run)
Includes text editor for easy modifications
Mark lines in process field
to activate for processing.
Editable text field.
Right click text field
for more options.
Auto or Step through
activated process lines.

9-4 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Journal File: Parametric Modeling


Parameters (including arrays), control-blocks, do-loops, arithmetic
functions, etc., can be used in the Journal File for simplifying parametric
studies.

Parameter names GAMBIT Commands are


begin with $. not case sensitive
Parameters are
case sensitive.

Comment lines

9-5 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Command Interpreter (1)


Commands are not case sensitive
Comments begin with /
z / This is a comment line
Continue statements with \
z vertex create coordinates \
0.0 1.0 2.0
All commands and arguments are documented in GAMBIT Command
Reference Guide
DO Loops, IF-THEN-ELSE blocks, constants, functions, expressions,
etc. are documented in appendices of GAMBIT Users Guide (available
in online help)

9-6 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Parameters
Scalar or Array
Numeric or string
Defined by: $param = value
z param = name of parameter
z value = numeric or string value of parameter
Name of parameter
z Must start with $
z Is not case sensitive ($length same as $LENGTH)

9-7 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Scalar (1): Pipe (centered)

Cylinder: Height = 10, Radius = 2


Axis Location: Centered Z
Center of the cylinder is at the origin of the
active coordinate system

/original journal file


volume create height 10 radius1 2 radius3 2 zaxis frustum

/modified journal file with parameters for height ($h) and radius ($r)
$h = 10
$r = 2
volume create height $10 radius1 $r radius3 $r zaxis frustum

9-8 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Scalar (2): Pipe (not centered)


Cylinder: Height = 10, Radius = 2
Axis Location: Positive Z
Center of the cylinder is offset (Height / 2) in the
+ z direction from the origin of the active
coordinate system
offsets in the x, y and z directions

/original journal file


volume create height 10 radius1 2 radius3 2 offset 0 0 5 zaxis frustum

/modified journal file with parameters for height ($h) and radius ($r)
$h = 10
$r = 2 Use Parenthesis
volume create height $h radius1 $r radius3 $r offset 0 0 ($h/2) \
zaxis frustum
9-9 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Array (1)
Define arrays by declare $p[{n1}:m1, {n2}:m2, ...]
z Where p is the name of the parameter
z n is the starting index ({} indicate this is optional; default is 1)
z m is the range of the dimension
z Square brackets [] are necessary
Elements in the array still need to have values assigned to them
z $p[1,2]= 6.5

9-10 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Array (2): Examples


declare $sides[4] Creates
$sides[1], $sides[2], $sides[3], $sides[4]

declare $tri[2:3] Creates


$tri[2], $tri[3], $tri[4]

declare $sqr[3, 2] Creates


$sqr[1,1], $sqr[1,2], $sqr[2,1] $sqr[2,2], $sqr[3,1],
$sqr[3,2]

declare $matrix[0:3, 5:2] Creates


$matrix[0,5], $matrix[0,6], $matrix[1,5],
$matrix[1,6], $matrix[2,5], $matrix[2,6]

9-11 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Array (3): Multiple Pipes

declare $p[3,2]
1st dimension is the pipe number (1, 2 or 3)
2nd dimension is the radius (1) or height (2)

Pipe Radius Height


Number

1 $p[1,1] = .5 $p[1,2] = 3

Pipe 1, 2, 3
2 $p[2,1] = 1 $p[2,2] = 3

3 $p[3,1] = 2 $p[3,2] = 4

9-12 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Special Constants
Available for use in any expression
z PI 3.141592653590
z TWOPI 6.283185307180
z DEG2RAD 0.0174532925199
z RAD2DEG 57.29577951308
Examples
z 4 * $rad * RAD2DEG
z $arclength = PI * $radius

9-13 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Expressions
Arithmetic, logical, or string
Enclose in parentheses when used as arguments to commands, IF statements,
or DO conditions
volume create height $h radius1 $r radius3 $r offset 0 0 ($h/2) \
zaxis frustum

9-14 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Arithmetic Expressions (1)


Evaluate to numeric results
FORTRAN-like syntax
z E1 op E2
where E1 and E2 can also be expressions, and op* is
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
^ (exponentiation, note difference from FORTRAN)
z Order of operations is ^ * / + -
z Use parentheses to override

*op refers to operations

9-15 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Arithmetic Expressions (2)


Examples:
z $x + 10
z -5.0 * $a / $b
z 3^3.5 + 4 * $y
z (3^3.5 + 4) * $y

9-16 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Logical Expressions (1)


Evaluate to "true" or "false"
FORTRAN syntax
z E1 .op. E2
where E1 and E2 are expressions, and .op. is
.GT. (greater than)
.LT. (less than)

.GE. (greater than or equal to)

.LE. (less than or equal to)

.EQ. (equal to)

.NE. (not equal to)

.AND. (true if both E1 and E2 are true)

.OR. (true if E1 is true or E2 is true, or both are true)

z .NOT. E1 (true if E1 is false)

9-17 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Logical Expressions (2)


Examples:
z $x .lt. 5
z $y .gt. 10
z ($a .eq. 4).and.(($b+$c) .lt. $d)
z .not. $z

9-18 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

String Expressions
String parameters defined as $name = GAMBIT
Enclose string constants in double-quotes
z "volume.1"
z "fluid"

Concatenation: str1 + str2


z $base = volume

z $extension = .one

z $label = $base + $extension yields volume.one

z "/usr/" + "gambit" = "/usr/gambit

9-19 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Functions
Can be used in any expression
Return a single numerical, logical, or string value
Not case sensitive
Arguments are constants or expressions enclosed in parentheses
z ABS(exp)
z COS(exp)

9-20 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

String Functions
Many string functions available, such as STRLEN and STRCMP
STRLEN: number of characters in a string
z $x= STRLEN("title")
z $x=5
CSTRCMP: case sensitive string compare
z $y= CSTRCMP ("ABD","abd")
z $y=0

9-21 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Arithmetic Functions (1) : Trigonometric


ACOS(exp) arc-cosine
ASIN(exp) arc-sine
ATAN(exp) arc-tangent
COS(exp) cosine
COSH(exp) hyperbolic cosine
SIN(exp) sine
SINH(exp) hyperbolic sine
TAN(exp) tangent
TANH(exp) hyperbolic tangent

9-22 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Arithmetic Functions (2) : Miscellaneous


ABS(exp) absolute value
DIGSUM(exp) sum of digits of integer portion, i.e., DIGSUM(123)= 6
EXP(exp) exponential
INT(exp) integer truncation
LOG(exp) natural logarithm
LOG10(exp) base 10 logarithm
MAX(exp1,exp2) maximum of exp1 and exp2
MIN(exp1,exp2) minimum of exp1 and exp2
MOD(exp1,exp2) modulo (remainder) of exp1/exp2
POW(exp1,exp2) same as exp1^exp2
SIGN(exp) -1.0 if exp < 0, else 1.0
SQRT(exp) square root

9-23 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Important String & Database Functions


NTOS(exp) Converts a Number TO a String
Example: If $i = 1:
"wall."+ NTOS ($i) = "wall.1"

LASTID(tag) ID of last-created entity, tag =


ve_id or 1 (vertex)
ed_id or 2 (edge)
fa_id or 3 (face)
vo_id or 4 (volume)
gr_id or 5 (group)
cs_id or 6 (coordinate system)
bl_id or 7 (boundary layer)

Example: If five vertices has been created:


LASTID(ve_id) or LASTID(1) = 5

9-24 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Example: Using Strings to Include Parameter


value in the name of the exported .msh file
/journal file for creation of a pipe of varying height
/parameter definition
/$h is the height of the pipe
$h= 6.4
/commands for the creation of the pipe, meshing and definition
/of boundary zones
/
/end of the commands FIDAP users: solver select "FIDAP"
/commands to export the mesh $end = ".FDNEUT"
solver select "FLUENT 5/6" export fidap $id
$title = "pipe-"
Exported file: pipe-6.4.FDNEUT
$end = ".msh"
$id = $title + NTOS ($h) + $end
export fluent5 $id
/This journal file will export a file named: pipe-6.4.msh
9-25 Fluent Inc. 1/19/2005
Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

DO Loops (1)
Syntax
z DO PARA "$param" INIT exp1 COND(cond) INCR exp2
commands
ENDDO
Where
z PARA - loop parameter
$param - must be defined before loop

Its value is overwritten by the initialization of the DO Loop

z INIT - initial value of the loop parameter


z COND - condition
Example: (cond) = ($param .le. 5)

z INCR - increment
z INIT and INCR are optional; if one of them is not defined, its value
is set to 1 (i.e. $param is initialized to be 1 or is incremented by 1)

9-26 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

DO Loops (2): Example


The following GAMBIT journal creates 36 vertices at every integer
position in the x-y plane, where 0 x,y 5

$i = 0
$j = 0

$imax = 5
$jmax = 5
/
do para "$i" init 0 cond ($i .le. $imax)
do para "$j" init 0 cond ($j .le. $jmax)
vertex create coordinates $i $j 0
enddo
enddo

9-27 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

DO Loops (3): Example


The following GAMBIT journal creates a set of grid points (9 x 9) which are used
to approximate a surface which is defined by
z = .15 sin( x ) cos( y / 2)
$i = 0
$imax = 2
$j = 0
$jmax = 2
$inc = .25
$fact = .15
do para "$i" init 0 cond ($i.le.$imax) incr $inc
do para "$j" init 0 cond ($j.le.$jmax) incr $inc
vertex create coordinate $i $j ($fact*sin(RAD2DEG*PI*$i)\
*cos(RAD2DEG*PI*$j/2))
enddo
enddo
face create vertices "vertex.1" "vertex.2" "vertex.81" rowdimension 9

9-28 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

IF-THEN-ELSE Blocks (1)


Syntax
z IF COND (exp)
true-commands
ELSE
false-commands
ENDIF
Where
z COND - condition
Example: (exp) = ($param .le. 5)
z ELSE and false-commands are optional
z Can be nested
z No ELSEIF defined (must use nested IF)

9-29 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

IF-THEN-ELSE Blocks (2): Example

In the following Gambit journal the condition is false and a coarse grid is
created

/coarse grid: a = - 1
/fine grid: a = 1
$a= -1
if cond ($a .gt. 0)
volume mesh "volume.1" cooper source "face.1" "face.3" size 1
else
volume mesh "volume.1" cooper source "face.1" "face.3" size 10
endif

9-30 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Current Limitations
Parameter definition in the Edit - Parameters form does not
produce journal commands
Parameters and expressions can NOT be used within the GUI
Journals produced by GAMBIT contain the values of parameters
and expressions, not the parameters/expressions themselves

9-31 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Steps to Use Parameters in Journal Files


Build initial model with GUI
z First use a set of basic numerical values.
z Mesh model and specify Boundary Types.
z Save journal file with unique name.
Editing the journal file:
z Define key parameters at the top of the file and include comments.
z Replace values with parameters throughout.
Check the journal file:
z Replay the journal to make sure that parameters were defined and used correctly.
z List of all parameters and their current values can be checked:
The parameter list - command
The Parameter form

9-32 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Summary of Journal File Uses


Parameterized journals can save large amounts of time for parametric
studies
DO loops and IF-ELSE blocks can be used control events in the
journal file
Time spent up-front thinking about how to best parameterize your
journals can save time later in the process
GAMBIT journal files can be combined with FIDAP journal files.
z allows parameters to be defined only once if any of the boundary
conditions depend on the parameterized geometry.

9-33 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Dynamic GUI: Application-Specific Templates


Includes capabilities that enable us to create application-focused
templates
z Process automation tools
Easy-to-use, customized GUIs
Address specific applications, customized and fine-tuned for your specific
processes
Automated geometry creation, meshing, solution, post-processing, and/or
reporting
z Facilitate the CFD process for both CFD engineers and non-CFD
engineers
z Does not replace roles of expert analyst in defining processes, exploring
limits, and investigating problems
Contact Fluent's Consulting organization or your Technical Support
Engineer

9-34 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Template Example: Catalytic Converter


Fully parameterized

9-35 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Template Example: Furnace

9-36 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

Template Example: Cyclone

9-37 Fluent Inc. 1/19/2005


Fluent User Services Center Introductory GAMBIT Training
GAMBIT 2.2 December 2004
www.fluentusers.com

9-38 Fluent Inc. 1/19/2005

You might also like