Introduction to Gambit 2.2 Training Notes
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Introduction to GAMBIT
1-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
z
Mesh generation for all Fluent solvers (including FIDAP and POLYFLOW)
z z
Cleanup and modification of imported data
Structured and Unstructured hexahedral, tetrahedral, pyramid, and prisms.
Mesh quality examination Boundary zone assignment
1-2
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Operation
General sequence of operations z
Initial setup
z
Geometry Creation (ACIS, STEP, Parasolid, IGES or Mesh import)
z
z
Local meshing: Edge, Boundary layers and Size Functions Global meshing: Face and/or Volume
Mesh examination Zone assignment
z
Create full geometry Decompose into mesh-able sections
Meshing
z
Solver selection, Mesh size, Defaults, etc.
Continuum and Boundary attachment
Mesh export
1-3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Files (1)
GAMBIT directory and files z When GAMBIT starts up, it creates a directory called GAMBIT.#
z
# = 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.
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
trn
= the journal file. This file is directly accessible from the Run journal form = the transcript file. Output from GAMBIT
1-5
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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)
z
Upon Save, earlier versions of ident.dbs and ident.trn will be overwritten, while new commands are appended to the file ident.jou
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Journal Files
Journal File: z
Executable list of Gambit commands
z
Created automatically by Gambit from GUI and TUI. Can be edited or created externally with text editor.
Journals are small - easy to transfer, e-mail, store
Uses: z z z
Can be parameterized, comments can be added Easy recovery from a crash or power loss edit existing commands to create new ones
1-7
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Running Journal Files
Journal files can be processed in two ways: z
Batch mode (Run)
z
All commands processed without interruption. "read pause" command will force interrupt with resume option appearing.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
GUI Main Menu bar
Command line
Operation toolpad
Description window 1-9
Global Control © Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Operation Tool Pads
Vertex Edge Face Volume Group
Boundary Layer Edge Face Volume Group
Boundary Types Continuum Types
1-10
Coordinate Systems Sizing Function G/Turbo Geometry Cleanup Plug-In Tools
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
File Menu (1)
New, Open, Save, Save As and Exit z
Print Graphics z z
Standard form of database operations Prints graphics to printer or to file PostScript, BMP, TIF, etc.
Run Journal / Clean Journal z z
Screen editor/command processor for journal files Command processing:
z z z
Partial or global selection/de-selection Automatic or stepwise processing
Ability to load the current journal File browser Clean Journal removes unnecessary tags, undo’s, etc. 1-11
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
File Menu (2)
View File z
z
Import z z z z
z
View of the current output,ident.trn, the transcript file Ability to view other files as well ACIS, Parasolid IGES, STEP, Catia V4 -add on) ICEM Input, Vertex Data CAD - Pro/E (STEP or DIRECT- add on), Optegra Visualizer, I-DEAS FTL Mesh - mesh and faceted geometry files.
Export z z z
ACIS, Parasolid IGES, STEP 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Edit Menu (1)
Edit Title z
Edit File z
Title will be included on any printed graphics Ability to launch an editor within GAMBIT
Edit Parameters z
Ability to define, modify and list parameters
z
parameters: arrays:
$numeric = 10, $array(3,4) = 5
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Edit Menu (2)
Edit Defaults z
Modify a large range of defaults that effect:
z
User Environment Meshing Characteristics Geometry
Ability to load, modify and save a new set of defaults in $HOME/GAMBIT.ini which is loaded automatically at startup.
Undo/Redo z z
Ten levels of undo/redo (default) Reducing number of levels also reduces memory requirements.
1-14
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Solver Menu
The Solver selection will have an impact on the following input forms: z z z z z
Available meshing algorithms Available element types Continuum types Boundary types Export mesh file
1-15
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Global Control (1)
Scale-to-Fit
Orient Model Journal View
Pivot anchor for view manipulation Modify (on/off) Label Visibility Rendering Show mesh Silhouette
Four split Four view Wire frame Shade Hidden Line
1-17
Light source Undo/Redo Special Labels Annotate Color coding Examine Mesh Entity type Connectivity
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Global Control (3)
The Window Attributes form z
Modify the following attributes (defaults given)
z
Render Wireframe on ; shaded and hidden off Mesh Volume - off Silhouette All on Label All off Visibility All on
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Global (4)
Render Model - Wireframe Modify Light/Label type
, Shaded
, Hidden
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Forms (1)
Form - components z
List box - (picking)
z
Radio buttons
z
Click-to-focus
Check box
z
Option menu
Text box
z
mutually exclusive options
Option button
z
active (yellow) - ready to pick inactive (white) - click to activate
non-mutually exclusive options
Command buttons
1-21
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Forms (2)
Text box
z z
Field for input of data, expressions, parameters The cursor is blinking if active
z
To activate - left click in the text box (click-to-focus)
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Forms (3)
List box z
Highlighted in yellow if active
z
Tells you the name of the latest picked item
z z
To activate - left click in the list box The item is highlighted in red on the screen All previously picked items are pink
Individual pick lists for each list box 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Forms (4)
Pick Lists z
z z
Open the Pick List by clicking on the arrow
The "Available" list is sorted in the order of picking 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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Mouse Operations (1) Left
Middle
Right
Drag
x-y rotation
Translation
Zoom/ z-rotation
Shift + Click
Pick
Next
Accept/Next picker
Previous View
Save view to journal
Stretch zoom
Click points to grid
Double Click Ctrl
Drag zoom
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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:
z
Same: New: Bad:
Cycle to the next available object within picking tolerance Replace last pick with new pick at new location A Shift-Middle pick on "nothing"is equivalent to "Un-select last pick”
Shift-Right: Apply or go to the next list box
1-27
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
1-28
Introductory GAMBIT Training GAMBIT 2.2 December 2004
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Creating Geometry in GAMBIT
2-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Preliminaries-1
Objective: z
z
Lowest order entity
Terminology: z z
z
Highest order entity
Create and mesh the fluid region for flow problems and solid regions for heat transfer (and structural analysis for Fidap Users). Typically accomplished by constructing and working with lower order entity objects and volume primitives.
z
Vertex - a point Edge - a curve that is defined by at least 1 vertex (in the case of 1 vertex, the edge forms a loop) Face - a surface (not necessarily planar) bounded by at least 1 edge (except for sphere and torus) 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Preliminaries-2
Color Identification z
z
Vertices and Edges are colored according to the highest order entity to which they are connected. The coloring scheme is:
Vertex (white) Edge (yellow) Face (light blue) Volume (green)
Undo/Redo: z
10 levels of undo by default.
z z
Undoes geometry, meshing, and zoning commands. Description window provides command to be undone when mouse is passed over undo button.
Left click to execute visible button operation. Right click to access options. 2-3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
General Operations: Move/Copy
Move/Copy z
Operations:
Translate: (inputs are ∆s)
Rotate: Vector
(x,y,z) Angle
Reflect:
Plane normal to vector
Scale:
Vector
Options: z z
Connected geometry can also be Moved Mesh and/or Zone types can be copied linked or unlinked 2-5
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
General Operations: Vector Definition Form
Vector Definition form z
is used in:
z
Methods:
z
Rotate and Reflect (in Move/Copy) Sweep and Revolve (in Face/Volume Create) Coordinate system axis Two existing vertices An existing Edge Two points defined by coordinates Screen View
Magnitude option allows size of vector to be defined.
2-6
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
General Operations: Align
Align z
Align is an alternative to Move - translate (+rotate).
z
z
3 +
It uses vertices on the start and final position to move the object
Method of increased alignment with the use of vertex-pairs Connected geometry can be included
1 + + 2
1 + + 2
Translation 3 +
Rotation ++
Plane alignment +
2-7
+
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
General Operations: Connect
Connect (Real) z z
z
z
Vertices, Edges and Faces can be connected The operation eliminates all duplicate entities and reconnects upper topology Only entities within the ACIS tolerance will be connected Existing mesh will be preserved Copy +Translate One Face
Connect Edges Two Edges
2-8
One Edge
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
General Operations: Disconnect
Disconnect (Real) z
z
z
Vertices, Edges and Faces can be disconnected The operation recreates duplicate entities and reconnects upper topology Several options exists
Disconnect
One Edge
Edge + Vertices
2-9
Two Edges
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
General Operations: Delete
Delete z
Select Lower Geometry (default)
z
Deletes Faces Deletes Lower Geometry: Edges and Vertices
Deselect Lower Geometry
Deletes Faces Does NOT delete Lower Geometry: Edges and Vertices
2-10
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Example: Deleting Entities that belong to higher order Entities
Incorrect: Attempt to delete Face (of a Volume)
The selected face can NOT be deleted because it is connected to a volume.
Correct: Delete Volume (deselect Lower Geometry)
Volume is deleted. Faces, Edges and Vertices are not deleted. Any of the six faces can be deleted 2-11
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Geometry Creation
ACIS - geometry engine ("kernel") z
Provides tools for “bottom-up” creation by:
z
Add, Grid Snap, etc. Line, Arc, Ellipse, Fillet, B-spline, etc. Wire Frame, Sweep, Net, etc. Wire Frame, Sweep, Face Stitch, etc.
Provides tools for “top-down” creation by
z
Vertex: Edge: Face: Volume:
Face Primitives: Volume Primitives: Volume/Face Booleans: Volume/Face Decompose:
Rectangle, Circle, Ellipse Brick, Cylinder, Sphere, etc. Unite, Subtract, Intersect Split
Geometry creation typically involves use of all tools.
2-13
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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 npc nc xi yi zi z
is the total number of points is the number of points per curve is the number of curves are real or integer vertex coordinates
Vertex Data
Format is similar, curve information is not needed 2-15
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"Bottom Up": Edge Creation-2
Real Edge creation Elliptical Arc
Created by three vertices
Major Vertex + On Edge Vertex +
Start Angle
+ End Angle
Center Vertex
Conic Arc
Created by three vertices Shoulder Vertex + +
Start Vertex
End Vertex + 2-17
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 real face
co-planar edges 2-20
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
"Bottom Up": Face Creation with Sweep
Real Face Creation: Sweep (with or without mesh) z
Rigid sweep
z
Perpendicular sweep: Draft and Twist option
z
Edge translated along sweep path without being rotated Angle edge makes with sweep path is maintained as edge swept along path
Be careful not to create degenerate faces
Sweep path start tangent vector parallel to edge tangent Rigid
Perpendicular Draft: Angle=0
Perpendicular Draft: Angle = - 30, 0, 30
Perpendicular Twist: Angle = 120
Rigid Edge Path
Path
Edge 2-24
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Face Primitives
Face Primitives z
Dimensions and Plane/Direction must be specified Rectangles Circles Ellipses
2-25
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 extra faces.
ten connected faces
one volume
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 Use edges or vectors for definition of the axis of revolution 2-26
axis of
revolution
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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
one volume
36 connected edges
2-27
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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
face
Twist
path
face
2-28
path
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Boolean Operations: Unite
Real Face/Volume Boolean Unites z z
The order of picking is not important (except for labeling) 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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Boolean Operations: Subtract
Real Face/Volume Boolean Subtract z z
The order of picking is important Retain - keeps copies of entities Subtract Faces
All faces have to be coplanar A
B
A-B Multiple entities can be entered in second list box.
B-A
Subtract Volumes A
A B
B
A-B
2-32
B-A
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Boolean Operations: Intersection
Real Face/Volume Boolean Intersect z z z
The order of picking is not important (except for labeling) Retain - keeps copies of entities. All entities must intersect each other. Intersect Faces
All faces have to be coplanar A
Intersect Volumes
B
A B
2-33
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z z
Split an edge into two or more edges Resulting edges are, by default, connected. 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 www.fluentusers.com
Geometry Splitting- Faces
"Target Object"
Real Face Boolean Split z z
The order of picking is important Faces do not need to be coplanar example: coplanar face splits
Split A with B
Two Faces
Split B with A Three Faces Bidirectional split
Introductory GAMBIT Training GAMBIT 2.2 December 2004
A − ( A ∩ Β) Α ∩ Β connected
"Tool"
B − ( A ∩ Β) Α ∩ Β connected A − ( A ∩ Β) Α ∩ Β B − ( A ∩ Β)
In general, for all splits (edges, faces, volumes): z
z
z
"Tool" entities are, by default, deleted after split is performed Retain option prevents “Tool” entities from being deleted. By default, resulting objects are connected. 2-35
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Geometry Splitting- Volumes Real Volume Boolean Split
z
"Target" Object
The order of picking is important
Volume/Volume splits
A B
Split A with B
"Tool" two volumes
A B
Split B with A two volumes
A B
Volume/Face splits
Bidirectional Split two volumes
three volumes 2-36
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Split vs. Subtract
The appropriate operation to use can depend upon final geometry required. z
Subtract
Cut-away shows one volume results
z
Cannot mesh core region Flow/Heat Transfer in annular region only
Split
Two connected volumes result
z
Start with two disconnected cylinders
Cut-away shows that both annular and core regions can be meshed. Flow/Heat Transfer possible in both regions
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Bidirectional Split vs. Unite
The appropriate operation to use can depend upon the need to create additional surfaces for: z z
defining boundary conditions controlling meshing distribution
Unite
Unite z
BiDirectional Split
z
One volume results Cut-away shows no interior faces
Start with two disconnected cylinders
Bidirectional split z z
z
Three connected volumes result Cut-away shows multiple interior faces which can be used to: z define internal boundaries z help control mesh distribution in volume Total represented volume is the same 2-38
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Plug-in tools
Plug-in tools are extra tools which can be added to GAMBIT. z
z
Download to the “FLUENT.INC/Gambit2.2.x/plugins” directory (Windows) or your home directory (Unix/linux) Load by import plugin file
z
File -> Import -> Plug-in
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 www.fluentusers.com
2-42
Introductory GAMBIT Training GAMBIT 2.2 December 2004
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Edge and Face Meshing
3-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
z
Pre-meshing
z
A uniform mesh is generated unless pre-meshing or sizing functions are used. 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.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Edge Meshing
Edge mesh distribution is controlled through the spacing and grading parameters. Using the Edge meshing form z
Picking
z z
Grading/Spacing Special characteristics
z
Temporary graphics Links, Directions
Apply and Defaults Invert and Reverse
Options
3-3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Picking Edges for Meshing
Picking z
Temporarily meshed edges
z
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
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Soft Links
Picking and soft links z
Pick with links
z
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
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Grading
Controls mesh density distribution along an edge. Grading can produce single-sided or double-sided mesh z
Doubled-sided mesh can be symmetric or asymmetric.
Symmetric schemes produce symmetric mesh about edge center. Asymmetric schemes can produce asymmetric mesh about edge center.
Single-sided grading Symmetric grading Asymmetric grading
Single-sided grading: z
Uses a multiplicative constant, R, to describe the ratio of the length of two adjacent mesh elements, i.e.,
z
z
R = l(i+1) / li
R can be specified explicitly (Successive Ratio) or determined indirectly Gambit also uses edge length and spacing information to determine R. 3-6
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
z
z
z
Successive Ratio, First Length, Last Length, First-Last Ratio, and Last-First Ratio
The mesh is symmetric if R1 and R2 are equal. The mesh is asymmetric if R1 and R2 are not equal. Edge center is determined automatically. 3-7
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Spacing
Spacing z
In all meshing forms, the following spacing functions can be specified:
Interval count - recommended for edge meshing only
% of edge length - recommended for edge meshing only
A value of 5 creates 5 intervals on the edge (6 nodes, including ends) 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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:
z
z
the Type the Spacing
the local Apply button for that option will be turned off This allows you to maintain pre-existing grading and/or spacing settings for each edge. Enforce a change in grading and/or spacing by enabling Apply button. 3-9
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Mesh Options
Apply without meshing z
z
This option is useful in cases where you want to impose a scheme without fixing the number of intervals The higher level meshing scheme will decide (and match) the intervals
Example
Remove Old Mesh z
Specify fixed interval and no grading Specify double sided grading and Apply without Meshing on bottom edges Face meshing will automatically match mesh
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 Pave Wedge
Tri
z
Map Submap Tri-Primitive Pave
Pave
Gambit also has quad-to-tri conversion utility. 3-11
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Face Meshing - Quad Examples
Quad: Map
Quad: Submap
Quad: Tri-Primitive
Quad: Pave
3-12
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Deleting Old Mesh
Existing mesh must be removed before remeshing. z
z
Mesh can be deleted using delete mesh form. 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
z
Remove mesh + lower mesh
Leaves all lower topology 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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Hard Linking
Mesh Links (Hard Links) z
Mesh linked entities have identical mesh
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
z
+
+
+
+
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.
Mesh one face before or after hard link is defined
created for periodic boundary conditions
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Mesh Smoothing
Face and Volume meshes can be smoothed by moving interior nodes to obtain incremental improvement in quality. z z
The mesh at the boundary is not altered. Face and volume meshes are smoothed using a default scheme.
Different schemes can be selected and applied after meshing. z
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. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Vertex Type Characteristics
End (E) z z
z
E
120 < Default Angle < 216 one internal grid line
S
S
S
Corner (C) z z
E
Side (S) z
0 < Default Angle < 120 zero internal grid lines
E
216 < Default Angle < 309 two internal grid lines
C
C
C
Reverse (R) z z
309 < Default Angle < 360 three internal grid lines
R
3-18
R
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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.
z
Can sometimes result in undesirable mesh.
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 Vertex Types can be applied to just Boundary Layers as option.
E
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Example: Using Vertex Types to make a Face Submappable
A face can be made submappable z
By manually changing vertex types
z
E
Consider which vertex should be changed to "Side" In Set Face Vertex Type form, change vertex (default type) to “Side”
R E
E
E
E
E
E R
?
Submap: 4*End + Side + (2*End + Reverse)
E
E
In the Face Mesh form, change the scheme from default to "Submap" and "Apply" (GAMBIT will try to change the vertex types so the scheme is honored) User has less control - resulting mesh may be undesirable
S
E
E
By enforcing the Submap scheme
E
E
E E
E
default
R E E
S E
3-20
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
How to Make a Face Mappable E
By manually changing vertex types z
z
In Set Face Vertex Type form, change vertices (default) to "Side" (example) Open the Face Mesh form and pick the face
E
E
(GAMBIT should automatically select the map scheme)
C
C
E
E
Default E
S
By enforcing the Map scheme z
S
In Face Mesh form, change the scheme from default to "Map"” and "Apply"
E
E E
E
E
E S E
S
Map: 4*End + 4*Side
(GAMBIT will try to change the vertex types so the scheme is honored)
default
S
E
E
E 3-22
Map: 4*End
E © Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Formula for Submap Scheme
Submap Scheme: 4*End + L*Side + M*(End + Corner) + N*(2*End + Reverse) additional terms when interior loops exist
z
E
E
E
E E
E
C C
C
C C
S
E E
E
E
E
C C
E
S
E
E
E
Periodic Submap Scheme: N*Side + M*(End + Corner) where M >2 z
additional terms when interior loops exist
S
+
+S
C
E
C
C
C
E
C
C
3-23
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 z
Manually, change one of the vertex types to "Side" in this example The Tri Primitive scheme can not be enforced E
E
E
E
E
S
E
E
default
3-24
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Meshing Faces with Hybrid Quad/Tri Schemes
Quad/Tri: Tri-Map formula: 2*Triangle z
T
T T
Quad/Tri: Pave z
z z
The face vertex types need to be manually changed to Triangle (T) and the “Tri-Map” scheme must be selected. All vertex types are ignored except Trielement (T) and Notrielement (N) Trielement (T) will enforce a triangle Notrielement (N) will avoid a triangle
E
Quad/Tri: Wedge z z
Used for creating cylindrical/polar type meshes The Vertex marked (T) is where rectangular elements are collapsed into triangles
E
S
N
T E
3-25
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Assessing Mesh Quality
Default measure of quality is based on EquiAngle Skew. Definition of EquiAngle Skew: θ max − θ e θ e − θ min max , θ θe 180 − e
where: z θmax = largest angle in face or cell z θmin = smallest angle in face or cell z θe = angle for equiangular face or cell
θ max θ min
e.g., 60 for triangle, 90 for square
Range of skewness: 0 best
1 worst 3-26
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Examining the Mesh Examine Mesh Form z
Display Type
Plane/Sphere
Range
z
View mesh elements that fall in plane or sphere. 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
Display Mode
Change cell display attributes.
3-27
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Striving for Quality
A poor quality grid will cause inaccurate solutions and/or slow convergence. Minimize EquiAngle Skew: z
Hex and Quad Cells
z
Tri’s
z
Skewness should not exceed 0.9
Minimize local variations in cell size: z
Skewness should not exceed 0.85.
Tet’s
Skewness should not exceed 0.85.
e.g., adjacent cells should not have ‘size ratio’ greater than 20%.
If Examine Mesh shows such violations: z z z
Delete mesh Perform necessary decomposition and/or pre-mesh edges and faces. Remesh
3-28
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Volume Meshing
4-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Approach
To potentially reduce discretization errors, and to reduce cell count, a "high" quality hex mesh is preferred. z
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. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Volume Meshing
Volume Meshing Form: z
Upon picking a Volume
z
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
Available element/scheme type combinations
Hex
Hex/Wedge
Map Submap Tet-Primitive Cooper Stairstep Cooper
Tet/Hybrid
Tgrid Hex-Core 4-3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Hex Meshing - Tet-Primitive
Tet-Primitive scheme z z
All hex elements in a four-sided (tet) volume 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
The projection direction is referred to as the Cooper direction. Faces topologically perpendicular to this direction are called Source faces.
z
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.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Permissible Cooper Geometries source faces
source faces
source faces
source faces
Multiple source faces and multiple interior loops
Volume containing multiple holes Source faces are not parallel to each other 4-10
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
z
Check the source face list and visually check for an intelligent selection If necessary, change the source faces selected by GAMBIT.
If GAMBIT fails to pick a set of source faces z z
Manually select the source faces 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Getting the Cooper Tool to Work (1) A
B
C
Problem: Mesh on Source Faces A and B can not be projected onto mesh on Source Face C
4-12
Work around: Remove Mesh on Face C. As a general rule, do not premesh all of the source faces. © Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Getting the Cooper Tool to Work (2) A1
A
A2
Interior loops
B
Problem: "Close" interior loops on opposing source Faces A and B The Cooper tool fails if the interior loops (when projected onto a single face) intersect or are "close".
4-13
Work around: Split Face A. Neither of the faces A1 and A2 have interior loops.
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Getting the Cooper Tool to Work (3) C C2
B
A1
A
Problem: No logical cylinder exists: If Faces A and B are source faces, then Face C must be either mappable or submapple. Face C has a void and can only be paved.
4-14
Work around: Split the Volume with a Face. Use Face A1 as one source face for Volume 1 and use Face C2 as one source face for Volume 2. © Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
How to Make a Volume Cooperable
Three options to cooper a volume: z
z z
Manually change the vertex types on the side faces so they are mappable and/or submappable Pick the source faces Enforce the map or submap on the side faces
Example: manually change the vertex types S
E
S S
E
E
C
E S
E
E
E
3 Source Faces
4-15
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Tetrahedral/Hybrid Meshing
Tetrahedral/Hybrid Mesh Scheme - TGrid z z
z
Automatic - most volumes can be meshed without decomposition. Use boundary layers to create hybrid grids (prism layers on boundaries to capture important viscous effects). 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
Cannot grow pyramids from high aspect-ratio faces. Prism and pyramid generation may not work properly between surfaces forming very acute angles. prism layer acute angle
low quality pyramid 4-17
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Hex - Core Meshing
Tetrahedral/Hybrid Mesh Scheme – Hex - Core z
z
z
Combines Tet/Hybrid mesh with core Cartesian mesh Fewer cells with full automation and geometric flexibility Non Conformal Meshes Created with:
z
Size Functions Hexcore_Quad_Surface_Split Default (split quads into tri elements)
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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.
HEXCORE_OFFSET_LAYERS=3 (default)
3 cell layers
HEXCORE_OFFSET_LAYERS=5
5 cell layers
4-20
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Assigning Boundary and Continuum Types
The Boundary Type Form z
Enter entities to be grouped into single zone in entity list box.
z
Select boundary type for zone (entity group).
z z
Can also modify and delete zone/boundary.
By default,
Available types depend on Solver
Name zone if desired. Apply defines zone and boundary type.
z
First choose entity type as face or edge.
External faces/edges are walls Internal faces/edges are interior
The Continuum Type Form z z
Similar operation. All continuum zones are by default, fluid.
4-21
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Defaults: Example: Flow over a Heated Obstacle
By default, the 4 remaining external faces have the Name and Type:
By default, the one remaining 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
4-26
Introductory GAMBIT Training GAMBIT 2.2 December 2004
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Volume Decomposition Examples
5-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z z z
Map Submap Tet-primitive 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
First Example (1)
A spherical void inside a brick z
Construction
z
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
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
5-16
Introductory GAMBIT Training GAMBIT 2.2 December 2004
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Meshing Control using Sizing Functions and Boundary Layers
6-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
z
Curvature
z
Scope is defined as a region near highly curved surfaces.
Proximity
z
Scope is defined as a fixed region about a source.
Scope is defined as a region within a specified distance from objects.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Sizing Function Definition
Each Size Function Type requires the specification of: z
Entities
z
Source entity defines shape and location of the "origin" of affected region. Attachment entities host the mesh that will be affected.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fixed Size Function - Source
Source z z z
Can be vertices, edges, faces, or volumes Can be internal or external to attachment entities Source entity defines shape of scope
6-6
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Size Function - Attachments
The attached entities host mesh to be affected.
6-7
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fixed Size Function
Parameters z z
Start size: Size adjacent to the source Growth rate: Ratio of two adjacent meshelement 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
z
Small angle
Growth rate and Size limit: same as for Fixed
6-9
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Proximity Size Function
Specifies number of cells in face gap (3D) and edge gap (2D) Parameters z z
Cells per gap : number of mesh layers in the gap Growth rate and Size limit: same as for fixed
Limitations z z z
Becomes slow on large models Improper use may result in abrupt change in size 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Meshed Size Function
Source and attachment entities are specified similar to the fixed size function. Parameters: z z
No initialization parameter is needed. Growth rate and size limit need to be specified, though.
Limitations z
The source entities have to be pre-meshed.
Premeshed source edges
Premeshed source face
6-11
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Boundary Layers
Boundary layers are layers of elements growing out from a boundary into the domain. z z
Produces high quality cells near boundary. Allows resolution of flow field effects with fewer cells than would be required without them.
In general, boundary layers are attached to: z z
edges for 2D problems 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Specifying a Boundary Layer
Create Boundary Layer Form z z z z z
Algorithms Definition Inputs Settings Transition Pattern Attachment
6-15
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Boundary Layer Algorithms
Boundary Layers can be defined using Uniform or Aspect Ratio based algorithm.
Uniform Boundary Layer
Size is constant for each layer of cells
Aspect Ratio based Boundary Layer
Aspect ratio/layer is constant for each layer of cells 6-16
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Boundary Layer Definition Inputs z
Definition Inputs for Uniform Boundary Layer ( 3 out of 4 inputs are required, the fourth is calculated)
z
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)
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Boundary Layers and Vertex Types
2-D Boundary layers in regions near vertices are defined by the vertex type. End: mesh overlaps
E
E
E
E
R
C
E
Corner: angle divided into thirds Reverse: angle divided into fourths.
S
Side: angle bisected
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
E
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 vertex type change to “End” can cause the 3-D boundary layer to imprint. 0
140 S
Attachment Face
S
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 or eliminate spikes and dips in the boundary layer. Both kinds of smoothing are performed iteratively and are governed by GAMBIT defaults.
6-24
Without normal smoothing
With normal smoothing
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 2D and 3-D geometry. z
z
Boundary Layer Defaults are available in the in the BLAYER and BLAYERTGRID sections under the Mesh Tab in the Edit Defaults Menu. The GAMBIT Command Reference Guide provides more information on defaults. 6-25
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Some Important Boundary Layer Defaults
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.
z
The faceted representation is much faster, especially for complex surfaces, but less accurate.
USE_FACET_EVALS=1
ANGLE_SMOOTH_FACTOR=0 USE_FACET_EVALS=0
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Some Important Boundary Layer Defaults
ADJUST_EDGE_BL_HEIGHT (default = 0, 2-D 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. z
z
ADJUST_EDGE_BL_HEIGHT=0
ADJUST_EDGE_BL_HEIGHT=1
1 = the boundary layer height is projected onto the skewed edge. 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 www.fluentusers.com
6-28
Introductory GAMBIT Training GAMBIT 2.2 December 2004
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
CAD/CAE Data Exchange and Geometry Cleanup (Virtual Geometry)
7-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Introduction
Several translation methods available to enable data exchange with CAD/CAE systems. z
Translation can: z z
return incomplete, corrupt, or disconnected geometry return geometry details unnecessary for CFD analysis
Geometry cleanup refers to processes required to prepare geometry for meshing. z z z
Appropriate approach depends upon source.
Fix incomplete or corrupt geometry and connect disconnected geometry Remove unnecessary details 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
CAD Data Exchange - Direct Options
Direct Translation Options z
ACIS-based CAD programs:
z
Parasolids-based CAD programs:
z
e.g., AutoCad, Cadkey, TurboCad can export ACIS files (.sat or .sab) which can be imported into Gambit. e.g., Unigraphics, SolidWorks, PATRAN, ANSYS can export Parasolid files (.x_t and .xmt_txt) which can be imported into Gambit.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
CAD Data Exchange - Standard Options
Standard Translation Options z
z
Translation uses an intermediate, neutral or standard, file format. Applicable for all CAD/CAE systems that can output:
STEP files
IGES files
z
Pro/E supports STEP export at no additional cost. Other systems support STEP as add-on. Common format supported by most systems.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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.
Some CAD packages export IGES-solids as well as IGES-surfaces.
e.g., faces associated with volume, etc. implies that volumes must be recreated from imported faces (tedious) 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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/E’s geometry engine
z
z
Eliminates geometry translation losses User works in Gambit environment
Need special Gambit and valid Pro/E license Solid models alone are supported
7-6
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Tolerant Modeling
Automatic "real" geometry connect using variable tolerance Available at z z
Application z z z
time of import inside the Heal Face (or Volume) Form All Geometry files Relatively large gaps Real ACIS volumes generated during import
Boolean operations subsequently possible z z z z
Adding/Subtracting additional geometry Volume Extraction Retaining only ½ or ¼ of model Volume Decomposition for better meshing 7-7
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
Remove discontinuities Reduce complexity to simplify NURB representation Face smoothing
7-8
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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.
z
Healing can be done on either faces or volumes Healing can be invoked at time of import
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Virtual Geometry
Three kinds of geometry in GAMBIT: z
Real
z
Virtual
z
Defined by the ACIS library of geometry creation/modification routines. Geometry defined by mathematical formulae. 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).
Faceted geometry Two objects that share the same underlying geometry but different topologies. Treated like virtual geometry.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Virtual Geometry: Uses
Virtual geometry and the operations that create them are used to simplify, clean, and connect existing geometry. z
Simplify/Clean:
z
Connect:
remove details from the model unnecessary for CFD analysis. merge faces/edges to increase mesh quality. decompose geometry into smaller, meshable components. Connect geometry that becomes disconnected during import process.
Virtual geometry provides additional flexibility in operations that affect geometry and mesh. z z
Merges edges to enable non-coplanar face to be created. Modify the mesh by repositioning nodes on virtual face.
7-11
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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:
z z z
by selecting virtual option on a real geometry panel and through dedicated virtual operation panels.
employ any combination of real, virtual, and/or faceted entities. result in the creation or modification of virtual (typical) and real entities. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Characteristics
Virtual entities: z z
When performing a virtual geometry operation: z z
Directly connected lower and upper geometry will become virtual Underlying real geometry (host) will become invisible and inaccessible (or put in the "background")
Deleting virtual geometry: z z
entities are colored differently from real entities. naming convention: v_vertex, v_edge, v_face, v_volume.
Will not delete host geometry. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 these faces
collapse this face
7-15
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Virtual Geometry Operations-3
Convert - converts non-real entities to real z z
Applicable to vertices, edges, faces, and volumes. Edges are sampled and real spline (NURBS) curve generated.
z
z z
sampling controlled by geometry.edge.VIRTUAL_NUM_SAMPLING_POINTS
Face conversions require that a map mesh first be generated on face (no Side vertices allowed). Volume conversions require that all lower topologies can be converted Topology and any existing mesh are preserved.
Face Simplify z
z z
Removes dangling edges and hard points from a face. Result is virtual face The face with dangling edge can also be split using face split (by location) 7-16
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Edge/Face Merge
Virtual Edge/Face Merge options Virtual (Forced)
z
Create one single edge/face from all edges/faces
face merge z
+
+
edge merge
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Boundary Defined Virtual Face Unite (1)
Handles gross overlaps and gaps z z
Arbitrary shapes Tolerance option
Limitations z z z z
Order of picking Points is important Important locations must be picked by user Gaps larger than the mesh size can create trouble during meshing Can not handle large distances between overlapping faces
7-18
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Boundary Defined Virtual Face Unite (2): Example Square face in z = 0 plane Circular face in z = .05 plane Faces can not be Real united
f
e d c
a
b
Select 6 points (a,b,c,d,e,f) c and e lie on square edge
Select 6 points (a,b,c,d,e,f) c and e lie on circular arc 7-19
Straight edge constructed between points c and d (and between d and e) because they lie on different edges.
Arc shape retained between points c and d (and between d and e) because they lie on the same edge © Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Face Splits (Virtual and Faceted)
Split by z z z
Face (Real or Virtual) Edge (Virtual) 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Volume Splits (Virtual and Faceted)
Split by z z
Volume (Real) Face (Real or Virtual)
All edges of the face have to be connected to the volume connected face virtual volume split one volume
z
two virtual volumes
Locations (Virtual)
Pick (at least) two locations
7-21
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Comparison of Face Unite, Merge, and Connect
Unite z
Real
z
Virtual
z
Gaps or overlaps allowed
No unite for edges
Real Unite
Merges z
z
Faces must have matching tangents at edge
Operates on real/non-real geometry virtual Faces must share edge but they need not be tangent
tolerance
Merge
Connect z
z
Operates on real/non-real geometry real or virtual Replaces selected entities with single entity
Connect 7-22
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Edge Connect (Virtual)
Edge Connect z z
Also available in Vertex and Face Virtual (Forced)
z
Pick two or more edges you want to connect
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 On
Option Off
7-24
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Importing IGES Files
File Import IGES z
Summary
z
Options
z
Review important information in the form before importing the file. Validity of information varies. 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
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
z z
a. Merge edges based on length and angle tolerances to eliminate short edges. b. Real/Virtual connect of vertices, edges, and faces, in steps, based on increasing connect tolerance c. Connect with T-Junction Option. d. Use forced connect operation for entities out of tolerance
7-27
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Virtual Geometry Cleanup Strategy-2
6. Create additional geometry, if necessary, and form volume. z
z
z
7. Simplify faces z z
Some of this may need to be done before resorting to virtual geometry commands so that real boolean operations are available. Bridge real and existing virtual geometry together using virtual geometry. In 3D, use face stitch command to create virtual volumes. Merge small edges and faces with neighbors to eliminate Remove sharp angles for better meshing.
Merge example:
8. Decompose volume, if necessary. 9. Mesh
7-28
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Cleanup Tools
8-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean up Imported Geometry
Why is Clean up important? z z
z
Finding the problem areas Suggesting fixes
Virtual Geometry created z
Imported geometry containing large 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
Ensure connectivity: holes and cracks Improve mesh quality: Eliminate short edges, sliver faces, sharp angles, …
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Meshed Geometry: With and Without Cleanup Interval size = 2.5
Without Cleanup- Only theTet/Hybrid Scheme can be used Tet mesh: 202,798 elements
With Cleanup- Cooper Tool can be used Hex mesh: 43,778 elements Number of elements reduced by a factor of 4.6 8-3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
Graphics color coding set to connectivity Graphics window pivot set to mouse
Appropriate tools to fix problems are given Available Cleanup tools: z z z z z
Clean up Short Edges Clean up Holes Clean up Cracks Clean up Sharp Angles Clean up Large Angles
z z z z z
Clean Up Small Faces Clean Up Hard Edges Clean Up Fillets Cleanup Duplicate Geometry Select Clean up Domain
8-4
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Short Edges (1)
Tools to identify and highlight the problem spot z
Cleanup domain
z
Maximum length: upper limit
z
z z
Required when Maximum length is modified
Zoom
z
Default: 10* shortest edge in the Cleanup domain
Items List: candidates for cleanup operation based on Cleanup domain and Maximum length Current length: length of currently picked edge Update: updates the Items list
z
Select whole model or group
In/Out: quick auto zoom in on or from the picked items
Auto: automatically zooms in on selected item 8-5
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
z
z
z
Apply: applies appropriate fix to selected item A/N: (Apply/Next) applies appropriate fix to selected item and automatically picks the next item in the list. The view is changed. Auto: entire list is processes automatically (only works for the Method: Edge merge) Ignore: removes selected item from list and selects next item Restore: the list is restored
8-6
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Short Edges (3)
Methods to fix the problem spot z
Vertex connect (least common)
z
Edge merge
z
Merge with (select edge)
Face merge
Average location Preserve location: first vertex Preserve location: second vertex
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Short Edges (4)
Before Cleanup
After Cleanup by Edge Merge
8-8
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
Create Face from Wireframe Real and Virtual options available
8-9
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Holes (2)
Before Cleanup
After Cleanup
8-10
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Cracks (1)
A Crack is defined as an edge pair that meets the following criteria z
z
z
Each edge in the pair serves as a boundary edge for a separate face. The edges share common endpoint vertices at one or both ends. The edges are separated along their 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Cracks (2)
Tools to identify and highlight the problem spot z z
Options to Apply Cleanup Tool z
Similar to those for Cleanup Short edge
Method to fix the problem spot z
Maximum angle: default is 20 Other tools similar to those for Cleanup Short edge
Connect edges
Tolerance: maximum distance between edges to be connected
8-12
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Cracks (3)
The edges that define the crack share two vertices
The edges that define the crack share one vertex
Before Cleanup
Before Cleanup
After Cleanup 8-13
After Cleanup
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Sharp Angles (1)
A Sharp Angle is defined as an edge pair that meets the following criteria z
z
z
The edge pair shares a common endpoint vertex and serves as part of the boundary for an existing face. 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. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Sharp Angles (2)
Tools to identify and highlight the problem spot z z
Options to Apply Cleanup Tool z
Maximum angle: default is 20 Other tools similar to those for Cleanup Short edge Similar to those for Cleanup Short edge
Methods to fix the problem spot determined by face-face angle z z
If face-face angle > 135: Merge faces If face-face angle < 135: With Options (to truncate)
Distance: length of shortest boundary edge of truncated face
face–face angle: 180 – is the angle between the normals of the two faces (shaded in grey)
Chop Merge Bi-Chop Merge
8-15
© Fluent Inc. 1/19/2005
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Clean Up Sharp Angles without Chop (3) Before Cleanup
Virtual
Virtual
After cleanup: Merge with right face
After cleanup: Merge with left face 8-16
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Sharp Angles with Chop (4) truncated face distance
Chop option face - face angle < 135
merged face Tri-primitive
Merge edges
Mesh: Cooper
1 of 8 Sharp Angles:
8-17
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Large Angles (1)
A Large angle is defined by a pair of faces that meets the following criteria z z
The faces are connected by a common boundary edge. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Large Angles (2)
Tools to identify and highlight the problem spot z z
Options to apply the Cleanup Tool z
Maximum angle: default is 5 degrees Other tools similar to those for Cleanup Short edge 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Large Angles (3)
Before cleanup
After cleanup
8-20
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Small Faces (1)
Tools to identify and highlight the problem spot z
z
z
Options to apply the Cleanup Tool z
Similar to those for Cleanup Short edge
Methods to fix the problem spot: z z
Maximum area: default value is 100 times the area of the smallest face in the Cleanup domain Items in the list contains all faces with areas less the maximum area Other tools similar to those for Cleanup Short edge
Merge face Collapse face
Candidate Faces to merge: all bounding faces with a face-face angle > 135 prepicked
8-21
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Small Faces (2)
After cleanup by Merge Face
Before cleanup
8-22
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Hard Edges (1)
Hard edges are also know as dangling edges. Creation occurs: z
z
Tools to identify and highlight the problem spot and options to apply the cleanup tool z
as a result of a face split when the split tool only partially intersects target face from STL or mesh import
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Hard Edges (2)
Before cleanup
After cleanup
8-24
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Fillets (1)
A fillet is defined as a face that meets the following criteria: z
z
The face lies between and is connected by means of common boundary edges to two or more faces. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Fillets (2)
Tools to identify and highlight the problem spot z
z
Options to apply the Cleanup Tool z
Similar to those for Cleanup Short edge
Methods to fix the problem spot z z
Maximum angle: specifies the maximum deviation from 90o for outward-pointing normals computed at the boundaries of the fillet face. Other tools similar to those for Cleanup Short edge
Merge face Collapse face
Candidate Faces z
z
Faces to merge: all bounding faces with a face-face angle > 135 pre-picked to collapse between: two opposite faces along the longest edges prepicked 8-26
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Clean Up Fillets (3)
Before cleanup
After cleanup by Collapse face
8-27
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Cleanup Duplicate Faces
Clean Up Duplicate Faces z
Two search options
Topology-based
Centroid-based
All lower entities (edges or vertices) to be identical between the two faces. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Select Cleanup Domain
Specifies the domain to which the geometry cleanup operations apply. z z
Whole Model (default) Predefined geometry group
The Cleanup Domain is group2 8-31
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center www.fluentusers.com
Where are the Problem Areas?
Short edge
Fillet
Faces can be merged
Sliver face 8-33
Orange edges: unconnected faces
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Steps to Clean up
Import the .iges file using the default settings (Make tolerant). Change color coding to connectivity. z
z
Try healing the faces (to retain Real Geometry) Delete the problematic face Apply Cleanup Tools (Virtual Geometry Created) z z z z
Blue edges (2 connections) indicate connected geometry. Orange edges (1 connection) indicate unconnected geometry.
Source face
Short Edges Holes Large Angles Fillets
Create a Volume by stitching Mesh using the Cooper Tool 8-34
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Using Parameters in Journal Files and the Dynamic GUI
9-1
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Journal Files
Journal File: z
Executable list of Gambit commands
z
Created automatically by Gambit from GUI and TUI. Can be edited or created externally with text editor.
Journals are small - easy to transfer, e-mail, store
Uses: z z z
Can be parameterized, comments can be added Easy recovery from a crash or power loss edit existing commands to create new ones
9-3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Running Journal Files
Journal files can be processed in two ways: z
Batch mode (Run)
z
All commands processed without interruption. "read pause" command will force interrupt with resume option appearing.
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 begin with $. Parameters are case sensitive.
GAMBIT Commands are not case sensitive
Comment lines
9-5
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Command Interpreter (1)
Commands are not case sensitive Comments begin with / z
Continue statements with \ z
/ This is a comment line 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Parameters
Scalar or Array Numeric or string Defined by: $param = value z z
param = name of parameter value = numeric or string value of parameter
Name of parameter z z
Must start with $ Is not case sensitive ($length same as $LENGTH)
9-7
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 Use Parenthesis $r = 2 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Array (1)
Define arrays by declare $p[{n1}:m1, {n2}:m2, ...]
z
Where p is the name of the parameter n is the starting index ({} indicate this is optional; default is 1) m is the range of the dimension
z
Square brackets [] are necessary
z z
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Fluent User Services Center 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 Number
Height
1
$p[1,1] = .5
$p[1,2] = 3
2
$p[2,1] = 1
$p[2,2] = 3
3
$p[3,1] = 2
$p[3,2] = 4
9-12
Pipe 1, 2, 3
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Special Constants
Available for use in any expression z z z z
PI TWOPI DEG2RAD RAD2DEG
3.141592653590 6.283185307180 0.0174532925199 57.29577951308
Examples z z
4 * $rad * RAD2DEG $arclength = PI * $radius
9-13
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Arithmetic Expressions (2)
Examples: z z z z
$x + 10 -5.0 * $a / $b 3^3.5 + 4 * $y (3^3.5 + 4) * $y
9-16
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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) .NOT. E1 (true if E1 is false)
z
9-17
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Logical Expressions (2)
Examples: z z z z
$x .lt. 5 $y .gt. 10 ($a .eq. 4).and.(($b+$c) .lt. $d) .not. $z
9-18
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
String Expressions
String parameters defined as $name = “GAMBIT” Enclose string constants in double-quotes "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” z
9-19
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 z
ABS(exp) COS(exp)
9-20
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
String Functions
Many string functions available, such as STRLEN and STRCMP STRLEN: number of characters in a string z z
$x= STRLEN("title") $x=5
CSTRCMP: case sensitive string compare z z
$y= CSTRCMP ("ABD","abd") $y=0
9-21
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 / FIDAP users: solver select "FIDAP" /end of the commands /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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
DO Loops (1)
Syntax z
DO PARA "$param" INIT exp1 COND(cond) INCR exp2 commands ENDDO
Where z
z z
z z
PARA - loop parameter $param - must be defined before loop Its value is overwritten by the initialization of the DO Loop INIT - initial value of the loop parameter COND - condition Example: (cond) = ($param .le. 5) INCR - increment 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
IF-THEN-ELSE Blocks (1)
Syntax z
IF COND (exp) true-commands ELSE false-commands ENDIF
Where z
COND - condition
z z z
Example: (exp) = ($param .le. 5)
ELSE and false-commands are optional Can be nested No ELSEIF defined (must use nested IF)
9-29
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Steps to Use Parameters in Journal Files
Build initial model with GUI z z z
Editing the journal file: z z
First use a set of basic numerical values. Mesh model and specify Boundary Types. Save journal file with unique name. Define key parameters at the top of the file and include comments. Replace values with parameters throughout.
Check the journal file: z z
Replay the journal to make sure that parameters were defined and used correctly. 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Dynamic GUI: Application-Specific Templates
Includes capabilities that enable us to create application-focused templates z
Process automation tools
z
z
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
Facilitate the CFD process for both CFD engineers and non-CFD engineers 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 www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Template Example: Catalytic Converter
Fully parameterized
9-35
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Template Example: Furnace
9-36
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
Introductory GAMBIT Training GAMBIT 2.2 December 2004
Template Example: Cyclone
9-37
© Fluent Inc. 1/19/2005
Fluent User Services Center www.fluentusers.com
9-38
Introductory GAMBIT Training GAMBIT 2.2 December 2004
© Fluent Inc. 1/19/2005