introduction to gambit 2 - freevincent.chapin.free.fr/cours cfd/doc/gambit-2.2-training.pdf ·...
TRANSCRIPT
Introduction to Gambit 2.2 Training Notes
© Fluent Inc. 1/19/20051-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Introduction to GAMBIT
© Fluent Inc. 1/19/20051-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
What is GAMBIT?Geometry And Mesh Building Intelligent Toolkit
A single, integrated preprocessor for CFD analysis:Geometry construction and import
Using ACIS solid modeling capabilitiesUsing STEP, Parasolid, IGES, etc. import
Cleanup and modification of imported dataMesh generation for all Fluent solvers (including FIDAP and POLYFLOW)
Structured and Unstructured hexahedral, tetrahedral, pyramid, and prisms.Mesh quality examinationBoundary zone assignment
© Fluent Inc. 1/19/20051-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
OperationGeneral sequence of operations
Initial setupSolver selection, Mesh size, Defaults, etc.
Geometry Creation (ACIS, STEP, Parasolid, IGES or Mesh import)Create full geometryDecompose into mesh-able sections
MeshingLocal meshing: Edge, Boundary layers and Size FunctionsGlobal meshing: Face and/or Volume
Mesh examinationZone assignment
Continuum and Boundary attachmentMesh export
© Fluent Inc. 1/19/20051-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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”.
© Fluent Inc. 1/19/20051-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Files (1) GAMBIT directory and files
When GAMBIT starts up, it creates a directory called GAMBIT.## = the process numberIt also creates a "lock" file, ident.lok, in the working directoryident.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 directoryident.dbs =
jou =
trn =
the database. All information will be saved in this file. This file is NOT retrievable upon a crash
the journal file. This file is directly accessible from the Run journal form
the transcript file. Output from GAMBIT
© Fluent Inc. 1/19/20051-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Files (2) GAMBIT directory and files
GAMBIT permanently saves these files to your working directory as ident.dbs, ident.jou and ident.trn anytime you issue a "Save" option (equivalent to any standard word processor)
Upon Save, earlier versions of ident.dbs and ident.trn will be overwritten, while new commands are appended to the file ident.jou
Upon successful exit of GAMBIT:The directory GAMBIT.# is removedThe lock-file ident.lok is deleted
© Fluent Inc. 1/19/20051-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Journal Files
Journal File:Executable list of Gambit commands
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:
Can be parameterized, comments can be addedEasy recovery from a crash or power lossedit existing commands to create new ones
© Fluent Inc. 1/19/20051-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Running Journal FilesJournal files can be processed in two ways:
Batch mode (Run)All commands processed without interruption."read pause" command will force interrupt with
resume option appearing.Interactive mode (Edit/Run)
Includes text editor for easy modificationsMark lines in process field to activate for processing.Editable text field.Right click text fieldfor more options.Auto or Step throughactivated process lines.
© Fluent Inc. 1/19/20051-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
GUIMain Menu bar
Global Control
Operation toolpad
Command line Description window
© Fluent Inc. 1/19/20051-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Operation Tool Pads
VertexEdgeFace VolumeGroup
Boundary LayerEdgeFace VolumeGroup
Boundary TypesContinuum Types
Coordinate SystemsSizing FunctionG/TurboGeometry CleanupPlug-In Tools
© Fluent Inc. 1/19/20051-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
File Menu (1)
New, Open, Save, Save As and ExitStandard form of database operations
Print GraphicsPrints graphics to printer or to filePostScript, BMP, TIF, etc.
Run Journal / Clean JournalScreen editor/command processor for journal filesCommand processing:
Partial or global selection/de-selectionAutomatic or stepwise processing
Ability to load the current journalFile browserClean Journal removes unnecessary tags, undo’s, etc.
© Fluent Inc. 1/19/20051-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
File Menu (2)View File
View of the current output,ident.trn, the transcript fileAbility to view other files as well
ImportACIS, Parasolid -IGES, STEP, Catia V4 -add on)ICEM Input, Vertex DataCAD - Pro/E (STEP or DIRECT- add on), OptegraVisualizer, I-DEAS FTL Mesh - mesh and faceted geometry files.
ExportACIS, ParasolidIGES, STEPMesh - Export your mesh for your Solver.
Export 2D Mesh option guarantees 2D mesh
© Fluent Inc. 1/19/20051-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Edit Menu (1)
Edit TitleTitle will be included on any printed graphics
Edit FileAbility to launch an editor within GAMBIT
Edit ParametersAbility to define, modify and list parameters
parameters: $numeric = 10, arrays: $array(3,4) = 5
Parameters and arrays can also be directly defined in the journal file using an editor (preferred option)
© Fluent Inc. 1/19/20051-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Edit Menu (2)Edit Defaults
Modify a large range of defaults that effect: User EnvironmentMeshing CharacteristicsGeometry
Ability to load, modify and save a new set of defaults in $HOME/GAMBIT.ini which is loaded automatically at startup.
Undo/RedoTen levels of undo/redo (default)Reducing number of levels also reduces memory requirements.
© Fluent Inc. 1/19/20051-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Solver Menu
The Solver selection will have an impact on the following input forms:
Available meshing algorithmsAvailable element types Continuum typesBoundary typesExport mesh file
© Fluent Inc. 1/19/20051-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Graphical User InterfaceCommand:
Input of (non-GUI) commands, e.g.,reset: deletes all mesh and geometry in the current modelreset mesh: deletes mesh, keeps geometry
Transcript Output from GAMBIT is printed here as well as in ident.trnTranscript window can be expanded using arrow button in top right corner
DescriptionGives a short description of all global function buttons and screen areas
© Fluent Inc. 1/19/20051-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Global Control (1)
Scale-to-Fit Pivot anchor forviewmanipulation
Four splitFour view
Light sourceSpecial LabelsAnnotate
Undo/Redo
Orient ModelJournal View
Modify (on/off) Label Visibility Rendering Show mesh Silhouette
Wire frameShadeHidden Line
Color coding Entity type Connectivity
Examine Mesh
© Fluent Inc. 1/19/20051-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Global Control (2)Scale-to-fit resizes the model to fit the screenOrient Model - major axes , isometric and:
ReversePreviousJournal view
Select Pivot - around which the model rotates, zooms Body centerMouse position
Model display attributesTurn on/off visibility, label, silhouette, mesh and hidden line on all or selected geometrical entities
Preset configuration of the graphics window4-view and 4-splitOptions to return to any single view
© Fluent Inc. 1/19/20051-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Global Control (3)The Window Attributes form
Modify the following attributes (defaults given)Render Wireframe on ; shaded and hidden offMesh Volume - offSilhouette All onLabel All off Visibility All on
Two ways of picking entities"All" - All entities are picked (Default)"Pick" - Individual picking includingthe use of pick lists
© Fluent Inc. 1/19/20051-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Global (4)
Render Model - Wireframe , Shaded , HiddenModify Light/Label type
Change light source orientation and propertiesAdditional information on the entity labelInsert arrows and text for graphic presentations
Color ModeColor by entityColor by connectivity
Undo/Redo
Examine MeshDisplay different element types by quality, plane cuts, etc.
© Fluent Inc. 1/19/20051-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Forms (1)Form - components
List box - (picking)active (yellow) - ready to pickinactive (white) - click to activate
Radio buttonsmutually exclusive options
Option buttonOption menu
Text boxClick-to-focus
Check boxnon-mutually exclusive options
Command buttons
© Fluent Inc. 1/19/20051-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Forms (2)
Text box
Field for input of data, expressions, parametersThe cursor is blinking if active
To activate - left click in the text box (click-to-focus)Forms with several text boxes
The order of input is not importantUse "tab" to go to the next text box Use left click (click-to-focus) to go to any text box
© Fluent Inc. 1/19/20051-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Forms (3)List box
Highlighted in yellow if activeTo activate - left click in the list box
Tells you the name of the latest picked itemThe item is highlighted in red on the screenAll previously picked items are pink
Individual pick lists for each list boxForms with several list boxes:
Depending on the form, the order of picking may be importantUse Shift right-click to go to the next list box Use left click (in the list box) to go to any list box
© Fluent Inc. 1/19/20051-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Forms (4)Pick Lists
Open the Pick List by clicking on the arrow
The "Available" list is sorted in the order of pickingPick List functionality:
Pick or Un-pick, Selected or All entities by highlight in left column and by clicking on the arrowsHighlighted "picked" entities will appear red on the screen
edge.32, edge.33Non-highlighted “picked” entities will appear pink
edge.26, edge.28Right-click in lists area provides additional optionsFilter can be used to control which objects are picked.
© Fluent Inc. 1/19/20051-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Mouse Operations (1) Left Middle Right
Drag x-y rotation Translation Zoom/ z-rotation
Shift + Click
Pick Next Accept/Next picker
Double Click
Previous View Save view to journal
Ctrl Drag zoom Stretch zoom Click points to grid
You can toggle between picking with or without "Shift":
Keep right mouse button down while doing a "left-click"The cursor now changes to another symbolNow, Pick/Next/Accept do not need a "Shift"The Rotation/Translation/Zoom now needs a "Shift"”
© Fluent Inc. 1/19/20051-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Mouse Operations (2)The picking philosophy: Left - Middle - Right
Shift-Left: initial pickAlternative: 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 boxLower diagonal picking will include everything partially included in the box
The latest pick is highlighted in red, previously picked items are highlighted in pink
Picking Five FacesPicking One Face
© Fluent Inc. 1/19/20051-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Mouse Operations (3)The picking philosophy: Left - Middle - Right
Shift-Middle: modify pickThe middle pick will behave differently depending on the mouse location:
Same: Cycle to the next available object within picking toleranceNew: Replace last pick with new pick at new locationBad: A Shift-Middle pick on "nothing"is equivalent to
"Un-select last pick”Shift-Right: Apply or go to the next list box
© Fluent Inc. 1/19/20051-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
© Fluent Inc. 1/19/20052-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Creating Geometry in GAMBIT
© Fluent Inc. 1/19/20052-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Preliminaries-1Objective:
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.
Terminology:Vertex - a pointEdge - 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.
Lowest order entity
Highest order entity
© Fluent Inc. 1/19/20052-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Preliminaries-2Color Identification
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:10 levels of undo by default.
Undoes geometry, meshing, and zoning commands.Description window provides command to be undone when mouse is passed over undo button.
Left click to execute visible button operation.Right click to access options.
© Fluent Inc. 1/19/20052-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: Coordinate System
Coordinate systemCartesian, Cylindrical and Spherical systems
Using Offset/Angle or Vertices for location/orientation"Active" coordinate system is default in all formsGrid creation with "snapping" of vertices
-Recommended for simple geometries onlyCreation of rulers
© Fluent Inc. 1/19/20052-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: Move/CopyMove/Copy
Operations:Translate: (inputs are ∆s)
Reflect:
Plane normal to vector
(x,y,z)
Angle
Vector
Vector
Rotate:
Scale:
Options:Connected geometry can also be MovedMesh and/or Zone types can be copied linked or unlinked
© Fluent Inc. 1/19/20052-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: Vector Definition Form Vector Definition form
is used in: Rotate and Reflect (in Move/Copy)Sweep and Revolve (in Face/Volume Create)
Methods:Coordinate system axisTwo existing vertices An existing Edge Two points defined by coordinatesScreen View
Magnitude option allows size of vector to be defined.
© Fluent Inc. 1/19/20052-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: Align
AlignAlign is an alternative to Move - translate (+rotate).
It uses vertices on the start and final position to move the object
Method of increased alignmentwith the use of vertex-pairs
Connected geometry can be included
Rotation Plane alignmentTranslation++
++ ++++ + +
3 31 1
2 2
© Fluent Inc. 1/19/20052-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: Connect
Connect (Real)Vertices, Edges and Faces can be connectedThe operation eliminates all duplicate entities and reconnects upper topology Only entities within the ACIS tolerance will be connectedExisting mesh will be preserved
Connect EdgesCopy +Translate
Two Edges One EdgeOne Face
© Fluent Inc. 1/19/20052-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: Disconnect
Disconnect (Real)Vertices, Edges and Faces can be disconnectedThe operation recreates duplicate entities and reconnects upper topology Several options exists
Disconnect
Two EdgesOne EdgeEdge + Vertices
© Fluent Inc. 1/19/20052-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
General Operations: DeleteDelete
Select Lower Geometry (default)Deletes FacesDeletes Lower Geometry: Edges and Vertices
Deselect Lower GeometryDeletes Faces Does NOT delete Lower Geometry: Edges and Vertices
© Fluent Inc. 1/19/20052-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Example: Deleting Entities that belong to higher order Entities
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
Incorrect: Attempt to delete Face (of a Volume)
© Fluent Inc. 1/19/20052-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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 geometryQuery: useful to associate geometrical objects with object namesGet total number of Entities
Modify Color/LabelModify entity colorsChange entity label
© Fluent Inc. 1/19/20052-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Geometry Creation ACIS - geometry engine ("kernel")
Provides tools for “bottom-up” creation by:Vertex: Add, Grid Snap, etc.Edge: Line, Arc, Ellipse, Fillet, B-spline, etc.Face: Wire Frame, Sweep, Net, etc.Volume: Wire Frame, Sweep, Face Stitch, etc.
Provides tools for “top-down” creation byFace Primitives: Rectangle, Circle, EllipseVolume Primitives: Brick, Cylinder, Sphere, etc.Volume/Face Booleans: Unite, Subtract, IntersectVolume/Face Decompose: Split
Geometry creation typically involves use of all tools.
© Fluent Inc. 1/19/20052-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Vertex Creation-1Real Vertex creation
By coordinates Cartesian, cylindrical and spherical coordinate systemsAlso available in virtual geometry
On edgeIf the intention is to split the edge, the Edge-Split form should be used instead
On faceUseful to create edges on surface for a virtual split
In volumesNot frequently used
At edge-edge intersectionsVertex is not connected to either edgeSplit edge with vertex for connectivity
© Fluent Inc. 1/19/20052-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Vertex Creation-2
Import point data, FileFile format:
ICEM Input
Vertex DataFormat is similar, curve information is not needed
npc nc
x1 y1 z1
x2 y2 z2
:xn yn zn
Where: n = npc* nc is the total number of pointsnpc is the number of points per curvenc is the number of curvesxi yi zi are real or integer vertex coordinates
© Fluent Inc. 1/19/20052-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Edge Creation-1Real Edge creation
Straight lineMultiple edges can be created by selecting multiple vertices.
Arc, CircleCounterparts for face creation are also availableCreation Methods
Three vertices on the edgeUsing Center and End-pointsUsing Radius and Start/End Angles (Arc Only)
© Fluent Inc. 1/19/20052-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Edge Creation-2Real Edge creation
Elliptical ArcCreated by three vertices
Conic ArcCreated by three vertices
+
+
+Major Vertex
On Edge VertexCenter VertexEnd Angle
Start Angle
+
+
+Shoulder Vertex
End Vertex
Start Vertex
© Fluent Inc. 1/19/20052-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Edge Creation-3Real Edge creation
Fillet ArcCreates a fillet out of a corner
NURBSThird-order by defaultUse tolerance for the approximate option
+
++Edge 1
Edge 2
Radius
© Fluent Inc. 1/19/20052-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Edge Creation-4
Real Edge creationRevolve Vertex
Select one or more vertices to rotateSpecify AngleAxis is defined using Vector Definition PanelInput Height for Spiral creation
Project Edge on SurfaceLimited to single edgeand faceDirection defined inVector DefinitionPanel
© Fluent Inc. 1/19/20052-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Face Creation-1Real Face creation
Wire Frame Creates real and virtual facesAll edges have to be connected into one loopNumber of edges and order of picking are not importantIf all edges are co-planar — creation is always successful.For non-coplanar edges:
A real face will always be created if the number of edges is 3 or 4 and the tangents are not the same at connecting vertices.A planar tolerant face can also be created if the edges are close to being coplanar and within a specified tolerance.
create real face
by wire frame
co-planar edges real face
+
© Fluent Inc. 1/19/20052-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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)
© Fluent Inc. 1/19/20052-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Face Creation-3Real Face creation
Parallelogram defined by three vertices
PolygonSelection order is important.5 or more vertices must be coplanar.
Vertex rows Tolerance input
SkinTopologically parallel edgesEdges have to be picked in orderBoth ends of all edges can coincide
NetTopologically intersecting edges
++
+
++
+
++
++
++
++
++
+++
+
+ +++
+
+
++
+++
+
© Fluent Inc. 1/19/20052-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Face Creation with RevolveReal Face creation
Revolve (With or without mesh)Using an edge, an angle and a revolving vectorUse vectors for definition of the axis of revolutionBasic edge can coincide with axis
axis of revolution
© Fluent Inc. 1/19/20052-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Face Creation with Sweep
Path
Perpendicular Twist: Angle = 120
Perpendicular Draft: Angle = - 30, 0, 30
Rigid
PathEdge
Real Face Creation: Sweep (with or without mesh)Rigid sweep
Edge translated along sweep path without being rotatedPerpendicular sweep: Draft and Twist option
Angle edge makes with sweep path is maintained as edge swept along path
Be careful not to create degenerate facesSweep path start tangent vector parallel to edge tangent
Edge
RigidPerpendicular Draft: Angle=0
© Fluent Inc. 1/19/20052-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Face PrimitivesFace Primitives
Dimensions and Plane/Direction must be specifiedRectangles
Circles
Ellipses
© Fluent Inc. 1/19/20052-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Volume Creation-1Real 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.
Available in virtual geometryOrder of picking not essentialCan handle voids and dangling faces.
Revolve (With or without mesh) Using a face, a revolving vector and an angleUse edges or vectors for definition of the axis of revolution
ten connected faces one volume
axis of revolution
© Fluent Inc. 1/19/20052-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Volume Creation-2Real Volume creation
Wire Frame Create volumes from connected curvesNumber of edges and order of picking is not importantVoids and seamless volumes and faces cannot be createdSame limitation as face wire frame creation, for each face
36 connected edges one volume
© Fluent Inc. 1/19/20052-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
"Bottom Up": Volume Creation with SweepReal Volume creation
Sweep (With or without mesh)Rigid option
The driving edge/vector can be anywhere in the domain
Perpendicular optionThe driving edge/vector has to start in the "plane" of the curve or face
facepath
Draft Twist
face path face path
© Fluent Inc. 1/19/20052-29
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume Primitives-1Real Volume Primitives
BrickWidth (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 FrustumHeight 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)
© Fluent Inc. 1/19/20052-30
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume Primitives-2Real Volume Primitives
Prism and PyramidCorresponding to input of cylinder and frustumNumber of sides 9 different preset directions (three in each axis)
Sphere - only one radius
TorusMajor and cross-sectional radii Three axis locations
© Fluent Inc. 1/19/20052-31
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boolean Operations: UniteReal Face/Volume Boolean Unites
The order of picking is not important (except for labeling)Retain - keeps copies of the entitiesUnite Faces
All faces must be coplanar or havematching tangents.
Unite Volumes
AB A + B
AB A + B
© Fluent Inc. 1/19/20052-32
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boolean Operations: SubtractReal Face/Volume Boolean Subtract
The order of picking is importantRetain - keeps copies of entitiesSubtract Faces
All faces have to be coplanar
Subtract Volumes
A B A - B
B - A
A - B B - AA
BA
B
Multiple entities can be enteredin second list box.
© Fluent Inc. 1/19/20052-33
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boolean Operations: Intersection
Real Face/Volume Boolean IntersectThe 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
Intersect Volumes
BA
BA
© Fluent Inc. 1/19/20052-34
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
The Split Operation: Employs the intersection of two geometric entities to divide one or both objects into two or more pieces.
Useful for decomposing complicated geometries into smaller, simpler ones.Edge Split
Split an edge into two or more edgesResulting 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 createdBi-directional option results in both edges being split at point(s) of intersection.
Geometry Splitting- Edges
© Fluent Inc. 1/19/20052-35
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Geometry Splitting- FacesReal Face Boolean Split
The order of picking is importantFaces do not need to be coplanarexample: coplanar face splits
In general, for all splits (edges, faces, volumes):"Tool" entities are, by default, deleted after split is performedRetain option prevents “Tool” entities from being deleted.By default, resulting objects are connected.
Split A with B
Split B with A
Two Faces
"Target Object"
"Tool"
Bidirectional split
Three Faces
connected
AA
Β∩Α)Β∩− (
connected
AB
Β∩Α)Β∩− (
)Β∩−Β∩Α
)Β∩−
AB
AA
(
(
© Fluent Inc. 1/19/20052-36
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Geometry Splitting- VolumesReal Volume Boolean Split
The order of picking is importantVolume/Volume splits
two volumes
BidirectionalSplit
three volumes
Split A with B
B
A
two volumes
Split B with A
two volumes Volume/Face splits
"Target" Object
"Tool"
B
A
B
A
© Fluent Inc. 1/19/20052-37
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
The appropriate operation to use can depend upon final geometry required.
SubtractCut-away shows one volume results
Cannot mesh core regionFlow/Heat Transfer in annular region only
SplitTwo connected volumes result
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 splitDuplicate faces appear at interface
Non-conformal mesh can resultUseful for multiple reference frame problem (Fluent)
Split vs. Subtract
Start with two disconnected
cylinders
© Fluent Inc. 1/19/20052-38
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
The appropriate operation to use can depend upon the need to create additional surfaces for:
defining boundary conditionscontrolling meshing distribution
Bidirectional Split vs. Unite
UniteUnite
One volume resultsCut-away shows no interior faces
BiDirectionalSplit
Bidirectional splitThree connected volumes resultCut-away shows multiple interior faces which can be used to:
define internal boundarieshelp control mesh distribution in volume
Total represented volume is the same
Start with two
disconnected cylinders
© Fluent Inc. 1/19/20052-39
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boolean Characteristics: ImprintingUniting Connected Volumes Results in Imprinting
Unite A with B
A and C are connected cubes, B is a cylinder inside both
A C
Volume.1
Volume.2: face contains an imprint of the cylinder
B
© Fluent Inc. 1/19/20052-40
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume BlendsReal Volume Blends
Blend - create fillet/rounded edgesPick a volumePick the edges that need a blend and specify radius Pick vertex (if needed) and specify radius using the Setback optionBulge option is not recommended for hexahedral meshing
Bulge option
Setback option
© Fluent Inc. 1/19/20052-41
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Plug-in toolsPlug-in tools are extra tools which can be added to GAMBIT.
Download to the “FLUENT.INC/Gambit2.2.x/plugins” directory (Windows) or your home directory (Unix/linux)Load by import plugin file
File -> Import -> Plug-inAccess through the new Tools - Plug-in button
Currently developed Plug-ins:Create a Brick based on the bounding box for the current geometry Multiple splitting of edges based on equal spacing or actual lengthCalculate distances between two verticesConvex or concave pipe fittings
© Fluent Inc. 1/19/20052-42
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
© Fluent Inc. 1/19/20053-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Edge and Face Meshing
© Fluent Inc. 1/19/20053-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Meshing - GeneralTo reduce overall mesh size, confine small cells to areas where they are needed (e.g., where high gradients are expected).
Controlling cell size distributionEdges, Faces and Volumes can be directly meshed
A uniform mesh is generated unless pre-meshing or sizing functions are used.Pre-meshing
Edge meshes can be graded (varying interval size on edge)Graded edge mesh can be used to control distribution of cell size in face mesh.Controlling distribution of cell size in face mesh also controls distribution of cell size in volume mesh.
Sizing FunctionsAllow direct control of cell size distribution in edges, faces and volumes directly for automatic meshing.
© Fluent Inc. 1/19/20053-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Edge MeshingEdge mesh distribution is controlled through the spacing and grading parameters.Using the Edge meshing form
PickingTemporary graphicsLinks, Directions
Grading/SpacingSpecial characteristics
Apply and DefaultsInvert and Reverse
Options
© Fluent Inc. 1/19/20053-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Picking Edges for Meshing
PickingTemporarily meshed edges
When you pick an edge, the edge is temporarily meshed using white nodesDisplayed edge mesh is based on current grading and spacing parametersIf you modify the scheme or spacing, the temporary mesh will be immediately updatedWhen you Apply, the mesh nodes will turn blue
SenseSense is used to show direction of gradingEvery 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
© Fluent Inc. 1/19/20053-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Soft LinksPicking and soft links
Pick with linksBy enabling this option, Soft-linked edges can be selected in a single pickLinked edges share the same information and can be picked in a single pick
Modifying soft linksYou can anytime:
Form linksBreak linksMaintain links
By default, GAMBIT will form links between unmeshed edges that are picked togetherBy default, GAMBIT will maintain links between meshed edges that are picked together
© Fluent Inc. 1/19/20053-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
GradingControls mesh density distribution along an edge.Grading can produce single-sided or double-sided mesh
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:Uses a multiplicative constant, R, to describe the ratio of the length of two adjacent mesh elements, i.e.,
R = l(i+1) / li
R can be specified explicitly (Successive Ratio) or determined indirectlyGambit also uses edge length and spacing information to determine R.
Single-sided grading
Symmetric grading
Asymmetric grading
© Fluent Inc. 1/19/20053-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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:
Successive Ratio, First Length, Last Length, First-Last Ratio, and Last-First RatioThe 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.
© Fluent Inc. 1/19/20053-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Spacing
SpacingIn all meshing forms, the following spacing functions can be specified:
Interval count - recommended for edge meshing onlyA value of 5 creates 5 intervals on the edge (6 nodes, including ends)
% of edge length - recommended for edge meshing onlyAn edge length of 10 and a value of 20 creates 5 intervals on the edge
Interval size - the default settingIdentifies the interval size relative to overall dimensions of geometry
– Identifies “average” interval size if used with gradingAn edge-length of 10 and a value of 2 creates 5 intervals on the edgeAverage size of elements/grid is 2
© Fluent Inc. 1/19/20053-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
First Edge Settings
Use first edge settings enabledFirst edge selected in pick list updates formUseful to copy settings from one meshededge to other edges.
Use first edge settings disabledAny time you pick two or more meshed edges where there is a difference in:
the Typethe Spacing
the local Apply button for that option will be turned offThis 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.
© Fluent Inc. 1/19/20053-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Mesh OptionsApply without meshing
This option is useful in cases where you want to impose a scheme without fixing the number of intervalsThe higher level meshing scheme will decide (and match) the intervals
ExampleSpecify fixed interval and no gradingSpecify double sided grading andApply without Meshing on bottom edgesFace meshing will automatically match mesh
Remove Old MeshDeletes old mesh
Ignore Sizing FunctionSizing function has precedence on meshingunless this option is enabled.
© Fluent Inc. 1/19/20053-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Face MeshingFace Meshing form
Upon picking a faceGAMBIT automatically chooses Quad elementsGAMBIT chooses the Type based on the Solver/face vertex types
Available element/scheme type combinationsQuad
MapSubmapTri-PrimitivePave
TriPave
Gambit also has quad-to-tri conversion utility.
Quad/TriMapPaveWedge
© Fluent Inc. 1/19/20053-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Face Meshing - Quad Examples
Quad: Map
Quad: Submap
Quad: Tri-Primitive
Quad: Pave
© Fluent Inc. 1/19/20053-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Face Meshing - Quad/Tri and Tri Examples
Quad/Tri: Map
Quad/Tri: Pave
Quad/Tri: Wedge
Tri: Pave
© Fluent Inc. 1/19/20053-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Deleting Old MeshExisting mesh must be removed before remeshing.
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
Remove meshLeaves all lower topology mesh
Remove mesh + lower meshRemoves all lower mesh that is not shared with another entity
Undo after meshing operation also works!
© Fluent Inc. 1/19/20053-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hard LinkingMesh Links (Hard Links)
Mesh linked entities have identical meshcreated for periodic boundary conditions
Applicable to Edge, Face, and Volume entitiesBest to use soft links for edge meshingTo link volume meshes, all faces must be hard linked first.
Setting up Hard Links for FacesSelect faces and reference vertices
Edge ‘sense’ will appearReverse orientation on by default for sensePeriodic 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 definedmesh on second face generated automatically
Multiple pairs of hard links can be created.
+ + + +
© Fluent Inc. 1/19/20053-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Mesh SmoothingFace and Volume meshes can be smoothed by moving interior nodes to obtain incremental improvement in quality.
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.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 smoothingLength-weighted Laplacian: same as for face mesh smoothingEquipotential: Adjusts node locations to equalize the volumesof the mesh elements surrounding each node.
© Fluent Inc. 1/19/20053-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Face Vertex TypesAll 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.
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.
For the Cooper to work, the side faces must be either mappable or submapple and changing the vertex types may be required.
© Fluent Inc. 1/19/20053-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Vertex Type CharacteristicsEnd (E)
0 < Default Angle < 120 zero internal grid lines
Side (S)120 < Default Angle < 216one internal grid line
Corner (C)216 < Default Angle < 309two internal grid lines
Reverse (R)309 < Default Angle < 360three internal grid lines
E
E E
S S S
CC C
R R
© Fluent Inc. 1/19/20053-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Modifying Face Vertex TypesFace Vertex Types can be changed from default setting:
Automatically, by enforcing certain meshing schemes in face and volume meshing.
Can sometimes result in undesirable mesh.Manually, by direct modification in the Face Vertex Type form.
Select Facesymbols appear in graphics window
Select New Vertex TypeSelect Vertices to be affectedVertex Types can be applied to just Boundary Layers as option.
A vertex can have multiple Types; one per each associated face.For a given set of face vertex types, Gambit will choose which meshing scheme to use based on predefined "formulas".
S E
© Fluent Inc. 1/19/20053-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Example: Using Vertex Types to make a Face Submappable
A face can be made submappableBy manually changing vertex types
Consider which vertex should be changed to "Side"In Set Face Vertex Type form, change vertex (default type) to “Side”
By enforcing the Submap schemeIn 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
R
E
E
EE
E
E
E
default
Submap: 4*End + Side + (2*End + Reverse)
R
E
E
SE
E
E
E
R
E
E S
E
E
E
E
?
© Fluent Inc. 1/19/20053-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Formula for Map SchemeMap Scheme: 4*End + N*Side
Periodic Map Scheme: N*SideProject intervals can be specified for more mesh control.
E
E
E
ES+
E EEE
© Fluent Inc. 1/19/20053-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
By manually changing vertex types In Set Face Vertex Type form, change vertices (default) to "Side" (example)Open the Face Mesh form and pick the face
(GAMBIT should automatically select the map scheme)
By enforcing the Map schemeIn Face Mesh form, change the scheme from default to "Map"” and "Apply"
(GAMBIT will try to change the vertex types so the scheme is honored)
How to Make a Face Mappable
E
SS
E
S
EE
S
Map: 4*End + 4*Side
E
EE
E
C
EE
CDefault
E
E
E
Sdefault Map: 4*End
E
E E
E
© Fluent Inc. 1/19/20053-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Formula for Submap SchemeSubmap Scheme: 4*End + L*Side + M*(End + Corner) + N*(2*End + Reverse)
additional terms when interior loops exist
Periodic Submap Scheme: N*Side + M*(End + Corner) where M >2additional terms when interior loops exist
E
EE
E
C
EE
CS
C
S
E
EE
E
E
C
C
C
CC
C E
E
E
C
E
E
CC
E
C
S S+ +
© Fluent Inc. 1/19/20053-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Tri-Primitive Scheme
Tri-Primitive Scheme: 3*End + N*Side
To mesh a face with the tri-primitive scheme:Manually, change one of the vertex types to "Side" in this exampleThe Tri Primitive scheme can not be enforced
E
S
E
E
E
E
E
E
E
E
E
S
default
© Fluent Inc. 1/19/20053-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Meshing Faces with Hybrid Quad/Tri SchemesQuad/Tri: Tri-Map formula: 2*Triangle
The face vertex types need to be manually changed to Triangle (T) and the “Tri-Map”scheme must be selected.
Quad/Tri: PaveAll vertex types are ignored except Trielement(T) and Notrielement (N)Trielement (T) will enforce a triangleNotrielement (N) will avoid a triangle
Quad/Tri: WedgeUsed for creating cylindrical/polar type meshesThe Vertex marked (T) is where rectangular elements are collapsed into triangles
T T
E
N
T
S
T
E
E
© Fluent Inc. 1/19/20053-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Assessing Mesh QualityDefault measure of quality is based on EquiAngle Skew.Definition of EquiAngle Skew:
where:θmax = largest angle in face or cellθmin = smallest angle in face or cellθe = angle for equiangular face or cell
e.g., 60 for triangle, 90 for square
Range of skewness:
−
−−
e
mine
e
emax ,180
maxθθθ
θθθ
θ min
θ max
0 1best worst
© Fluent Inc. 1/19/20053-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Examining the MeshExamine Mesh Form
Display TypePlane/Sphere
View mesh elements that fall in plane or sphere.Range
View mesh elements within quality range.Histogram shows quality distribution.Show worst element – automatically zooms into worst element
Select 2D/3D and Element TypeSelect Quality Type
Display ModeChange cell display attributes.
© Fluent Inc. 1/19/20053-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Striving for QualityA poor quality grid will cause inaccurate solutions and/or slow convergence.Minimize EquiAngle Skew:
Hex and Quad CellsSkewness should not exceed 0.85.
Tri’sSkewness should not exceed 0.85.
Tet’sSkewness should not exceed 0.9
Minimize local variations in cell size:e.g., adjacent cells should not have ‘size ratio’ greater than 20%.
If Examine Mesh shows such violations:Delete meshPerform necessary decomposition and/or pre-mesh edges and faces.Remesh
© Fluent Inc. 1/19/20054-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume Meshing
© Fluent Inc. 1/19/20054-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Approach
To potentially reduce discretization errors, and to reduce cell count, a "high" quality hex mesh is preferred.
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.
© Fluent Inc. 1/19/20054-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume MeshingVolume Meshing Form:
Upon picking a VolumeGAMBIT 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 combinationsHex
MapSubmapTet-PrimitiveCooperStairstep
Hex/WedgeCooper
Tet/HybridTgridHex-Core
© Fluent Inc. 1/19/20054-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume Meshes - Hex ExamplesHex: Map
Hex: Submap
Hex: Tet-Primitive
Hex: Cooper
Hex: Stairstep
© Fluent Inc. 1/19/20054-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex/Wedge and Tet/Hybrid ExamplesHex/Wedge: Cooper
Tet/Hybrid: Tgrid
Tet/Hybrid: Hex-Core
© Fluent Inc. 1/19/20054-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex Meshing - Map
Volumes that are mappable by default: A logical cube All faces map-able (or Submap-able) and mesh is matching
Map Scheme
mesh
mesh
© Fluent Inc. 1/19/20054-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex Meshing - SubmapVolumes that are Submap-able by default:
All faces map-able or submap-able Topological matching of opposite faces
Submap Scheme
mesh
mesh
© Fluent Inc. 1/19/20054-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex Meshing - Tet-Primitive
All hex elements in a four-sided (tet) volumeVolumes directly meshable using Tet-Primitive scheme
How the Tet Primitive Scheme worksConnect center points on edges, faces and the volumeMap the four sub-volumes
Tet-Primitive scheme
Tet Primitive
Mesh
© Fluent Inc. 1/19/20054-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex Meshing - CooperThe 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.
The projection direction is referred to as the Cooper direction.Faces topologically perpendicular to this direction are called Source faces.
Source faces do not have to be premeshed.In practice, at least one source face must not be meshed and must span across the entire cross section.
Faces that intersect the source faces are referred to as Side faces.Side faces must be Mappable or Submappable.
Cooper direction
Source Faces Side Faces
© Fluent Inc. 1/19/20054-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Permissible Cooper Geometries
source faces
source faces
Volume containing multiple holes
Multiple source faces and multiple interior loops
Source faces are not parallel to each other
source faces
source faces
© Fluent Inc. 1/19/20054-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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
Check the source face list and visually check for an intelligent selectionIf necessary, change the source faces selected by GAMBIT.
If GAMBIT fails to pick a set of source faces Manually select the source facesIf necessary, manually change the vertex types (discussed in lecture 3) on some of the side faces
© Fluent Inc. 1/19/20054-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Getting the Cooper Tool to Work (1)
Problem: Mesh on Source Faces A and B can not be projected onto mesh on Source Face C
Work around: Remove Mesh on Face C. As a general rule, do not premesh all of the source faces.
A
B
C
© Fluent Inc. 1/19/20054-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Getting the Cooper Tool to Work (2)
Problem: "Close" interior loops on opposing source Faces A and BThe Cooper tool fails if the interior loops (when projected onto a single face) intersect or are "close".
Work around: Split Face A. Neither of the faces A1 and A2 have interior loops.
A
B
Interior loops
A1 A2
© Fluent Inc. 1/19/20054-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Getting the Cooper Tool to Work (3)
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.
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.
AB
C
A1
C2
© Fluent Inc. 1/19/20054-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
How to Make a Volume CooperableThree options to cooper a volume:
Manually change the vertex types on the side faces so they are mappableand/or submappablePick the source facesEnforce the map or submap on the side faces
EE
S
SS
S
EE
E
E E
C
Example: manually change the vertex types
3 Source Faces
© Fluent Inc. 1/19/20054-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Tetrahedral/Hybrid MeshingTetrahedral/Hybrid Mesh Scheme - TGrid
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.
Hex mesh first
Tet mesh second
© Fluent Inc. 1/19/20054-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Tet/Hybrid Meshing: TroubleshootingQuality of the tetrahedral mesh is highly dependent on the quality of the triangular mesh on the boundaries.
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 sizedtriangular mesh.
Difficulties may arise in generation of hybrid mesh.Cannot grow pyramids from high aspect-ratio faces.Prism and pyramid generation may not work properly between surfaces forming very acute angles.
low quality pyramid
prism layer
acute angle
© Fluent Inc. 1/19/20054-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex - Core MeshingTetrahedral/Hybrid Mesh Scheme –Hex - Core
Combines Tet/Hybrid mesh with core Cartesian meshFewer cells with full automation and geometric flexibilityNon Conformal Meshes Created with:
Size FunctionsHexcore_Quad_Surface_SplitDefault (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.
© Fluent Inc. 1/19/20054-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex – Core Meshing : Surface Split
1 (default)Split boundary quad into 2
triangleshanging edges created
(NOT allowed in FIDAP)Smooth boundary hexes
with larger hexcore0
Boundary quads are NOT split
Pyramid (transition) elements created
Boundary hexes not smoothed
Geometry: CylinderEdit Default: Hexcore_Quad_Surface_Split = 1 (default) or 0
Hex Core Tets Pyramids
© Fluent Inc. 1/19/20054-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Hex Core Meshing: Setting Offset LayersThe number of layers of cells between the boundaries of the domain and the hexcore is controlled by the GAMBIT default HEXCORE_OFFSET_LAYERS.
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)
HEXCORE_OFFSET_LAYERS=5
3 cell layers
5 cell layers
© Fluent Inc. 1/19/20054-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Assigning Boundary and Continuum Types The Boundary Type Form
Enter entities to be grouped into single zone in entity list box.
First choose entity type as face or edge.Select boundary type for zone (entity group).
Available types depend on SolverName zone if desired.Apply defines zone and boundary type.
Can also modify and delete zone/boundary.By default,
External faces/edges are wallsInternal faces/edges are interior
The Continuum Type FormSimilar operation.All continuum zones are by default, fluid.
© Fluent Inc. 1/19/20054-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
FLUENT 5/6 Example: Flow over a Heated Obstacle
Boundary: Name = inlet
Type = VELOCITY_INLET
Boundary: Name = outlet
Type = PRESSURE_OUTLET
Continuum: Name = step
Type = SOLID
© Fluent Inc. 1/19/20054-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
FIDAP 8: Example: Flow over a Heated Obstacle
Boundary: Name = inlet
Type = PLOT
Boundary: Name = outlet
Type = PLOT
Continuum: Name = step
Type = SOLID
© Fluent Inc. 1/19/20054-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Defaults: Example: Flow over a Heated Obstacle
By default, the 4 remaining external faces have the Name and Type:
Boundary: Name = wall
Type = WALL
By default, the one remaining volume has the Name and Type
Continuum: Name = fluid
Type = FLUID
© Fluent Inc. 1/19/20054-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Linear/Quadratic Elements (FIDAP/POLYFLOW USERS ONLY)
General toolsHigher-order elements
For FEM codes (FIDAP and POLYFLOW), the element order can be changed at all three meshing levelsOnly linear and quadratic elements are directly availableA 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 FIDAPedge 3-node 3-nodeface 8-node quad 9-node quadvolume 21-node brick 27-node brick
© Fluent Inc. 1/19/20054-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
© Fluent Inc. 1/19/20055-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume Decomposition Examples
© Fluent Inc. 1/19/20055-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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:
MapSubmapTet-primitiveCooper
Volume decomposition is not needed for the Stairstep, Hex/Core or TGridTet/Hybrid meshing schemes.
© Fluent Inc. 1/19/20055-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
First Example (1)A spherical void inside a brick
ConstructionCreate 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 brickSubtract the sphere from the brick
DecompositionSplit the brick using the cylinderCreate edges going diagonally over the top and bottom face of the brick and use the edges to create a diagonal faceSplit the brick-like volume using this face
Last two steps are not necessary but create higher quality mesh.
© Fluent Inc. 1/19/20055-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
First Example (2)A spherical void inside a brick
Three of the four Cooper-able volumes
source faces
source faces
© Fluent Inc. 1/19/20055-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Second Example (1)A handle
Construction:Create a torus and a brick using volume primitivesSplit 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
© Fluent Inc. 1/19/20055-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Second Example (2)A handle
Alternative Construction/Decomposition:Create a torus and a brick using volume primitivesPerform a bi-directional split using the two volumesDelete the part of the torus that is outside the back of the brickUnite back the block and the pipe section inside the block again
© Fluent Inc. 1/19/20055-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Second Example (3)A handle
The two volumes meshed by the Cooper - tool
source faces
source face
© Fluent Inc. 1/19/20055-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Third Example (1)A box with rounded corners
ConstructionCreate a brick using volume primitivesUse 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 cornerSweep out the three triangular faces created by the split to the opposite ends of the brickSplit off the three prismatic volumes from the main volume
© Fluent Inc. 1/19/20055-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Third Example (2)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 faces
source face
© Fluent Inc. 1/19/20055-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fourth Example (1)Pipe-pipe intersection (different radii)
Construction:Create the pipes using volume primitivesCreate a stretched brick with a rectangular cross-section, where the side length should be between the two pipe diameters.
DecompositionSplit the main pipe using the brick Unite the brick cut-out with the small cylinder
© Fluent Inc. 1/19/20055-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fourth Example (2)Pipe-pipe intersection (different radii)
The three volumes meshed using the Cooper tool
source faces
source faces
source faces
© Fluent Inc. 1/19/20055-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fifth Example (1)
A sphere in three volumesConstruction
Create a sphere using volume primitivesDecomposition:
Create a cylinder and split the sphere using the cylinderCreate a brick and move it such that one side of the brick is along the center of the cylinderSplit the annular remainder of the sphere into two volumesAll three volumes are basic Cooper-able volumes
© Fluent Inc. 1/19/20055-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fifth Example (2)A sphere
The final mesh for two of the volumes
source faces
source faces
© Fluent Inc. 1/19/20055-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fifth Example (3)A sphere in eight volumes
Alternative Construction/decompositionCreate a sphere and a brick using volume primitivesIntersect the two volumes to create a sphere octantMake a second copy by the use of Copy/Reflect and the z-planeMake six octants more using Copy/Rotate and 90 degree angle, twiceConnect 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
© Fluent Inc. 1/19/20055-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fifth Example (4)A sphere
The final mesh for seven out of the eight octants, all meshed using Tet Primitive
© Fluent Inc. 1/19/20055-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
© Fluent Inc. 1/19/20056-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Meshing Control using Sizing Functions and Boundary Layers
© Fluent Inc. 1/19/20056-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
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.
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.
Sizing Functions and Boundary Layers
© Fluent Inc. 1/19/20056-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Size FunctionsSize Functions control the mesh distribution in a region of space, including edges, faces, and volumes similar to the way gradingcontrols 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
© Fluent Inc. 1/19/20056-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Size Function TypesSize Function requires the specification of Type, Entities, and Parameters.Size Function "Type" controls method by which scope of sizing function is obeyed.
FixedScope is defined as a fixed region about a source.
CurvatureScope is defined as a region near highly curved surfaces.
ProximityScope is defined as a region within a specified distance from objects.
Meshed size FunctionEnsures that a mesh is radiated in a controlled manner from pre-meshed boundaries of the domain.
© Fluent Inc. 1/19/20056-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Sizing Function DefinitionEach Size Function Type requires the specification of:
EntitiesSource entity defines shape and location of the "origin" of affected region.Attachment entities host the mesh that will be affected.
ParametersThree 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.
© Fluent Inc. 1/19/20056-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fixed Size Function - SourceSource
Can be vertices, edges, faces, or volumesCan be internal or external to attachment entitiesSource entity defines shape of scope
© Fluent Inc. 1/19/20056-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Size Function - AttachmentsThe attached entities host mesh to be affected.
© Fluent Inc. 1/19/20056-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Fixed Size Function
ParametersStart size: Size adjacent to the sourceGrowth rate: Ratio of two adjacent mesh-element edge size
Size limit: Maximum allowable size for attachment entity
Small growth rate Large growth rate
© Fluent Inc. 1/19/20056-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Curvature Size Function
Source Entities can only be FacesParameters
Angle: Specifies the maximum allowable angle between outward pointing normals for any two adjacent mesh elements.
Growth rate and Size limit: same as for Fixed
Large angle Small angle
© Fluent Inc. 1/19/20056-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Proximity Size FunctionSpecifies number of cells in face gap (3D) and edge gap (2D)Parameters
Cells per gap : number of mesh layers in the gapGrowth rate and Size limit: same as for fixed
LimitationsBecomes slow on large modelsImproper use may result in abrupt change in sizeSolutions
Use multiple size functionsIncrease resolution by changing the defaults for background grids
Cells/gap = 2
© Fluent Inc. 1/19/20056-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Meshed Size FunctionSource and attachment entities are specified similar to the fixed size function.Parameters:
No initialization parameter is needed.Growth rate and size limit need to be specified, though.
LimitationsThe source entities have to be pre-meshed.
Premeshedsource edges
Premeshed source face
© Fluent Inc. 1/19/20056-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Background Grid GenerationSize 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.
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.
© Fluent Inc. 1/19/20056-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Increasing Background Tree Depth
Ideal background grid
Background grid level reached maximum value specified
Size Function not sufficiently resolved
Under-resolved Background Grid Resolved Background Grid
© Fluent Inc. 1/19/20056-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary LayersBoundary layers are layers of elements growing out from a boundary into the domain.
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:edges for 2D problemsfaces for 3D problems
complicated 3D shapes may require boundary layer attachments to edges.
© Fluent Inc. 1/19/20056-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Specifying a Boundary LayerCreate Boundary Layer Form
AlgorithmsDefinition Inputs SettingsTransition PatternAttachment
© Fluent Inc. 1/19/20056-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Layer Algorithms
Boundary Layers can be defined using Uniform or Aspect Ratio based algorithm.
Uniform Boundary Layer Aspect Ratio based Boundary Layer
Size is constant for each layer of cells
Aspect ratio/layer is constant for each layer of cells
© Fluent Inc. 1/19/20056-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Layer Definition Inputs
Definition Inputs for Uniform Boundary Layer ( 3 out of 4 inputs are required, the fourth is calculated)
First row: height of first row of elements (a)Growth factor: factor for geometric series (b/a)Rows: total number of element rowsDepth: total height of boundary layer (D)
Definition Inputs for Aspect Ratio Based Boundary Layers are similar:
First percent: starting aspect ratioGrowth factor factor for geometric series (b/a)Number of rows
© Fluent Inc. 1/19/20056-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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)
© Fluent Inc. 1/19/20056-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Internal ContinuityThe Internal Continuity toggle allows boundary layers to be formed with no crossover or overlap regions.
Internal Continuity "ON"Internal Continuity “OFF”
© Fluent Inc. 1/19/20056-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Layer AttachmentsBoundary 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).
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.
© Fluent Inc. 1/19/20056-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Layers and Vertex Types2-D Boundary layers in regions near vertices are defined by the vertex type.
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.
E
E
ES
CE
E
E
R
E
End: mesh overlaps
Corner: angle divided into thirds
Reverse: angle divided into fourths.
Side: angle bisected
© Fluent Inc. 1/19/20056-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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.
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
© Fluent Inc. 1/19/20056-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Imprinting 3-D Boundary Layers by Modifying Vertex Types
When the angle between adjacent and attachment faces in greater than 1200, a vertex type change to “End” can cause the 3-D boundary layer to imprint.
140
No imprinting of 3-D Boundary Layerand gaps due to Side Type vertices at the
intersection of the faces
Attachment Face
Vertex Types changed to ‘End’ closes the gap and imprints 3-D boundary layer
SS
EE
S
E
© Fluent Inc. 1/19/20056-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
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.
Without normal smoothing
With normal smoothing
© Fluent Inc. 1/19/20056-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Layer DefaultsGAMBIT defaults set values for the critical parameters for growing boundary layers.
A knowledge of the important defaults will help control mesh on complex 2-D and 3-D geometry.
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.
© Fluent Inc. 1/19/20056-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Some Important Boundary Layer DefaultsUSE_FACET_EVALS (default = 1, 2-D and 3-D Boundary Layers)
1 = Surface boundary layers will use a faceted representation of the surface to calculate the growth direction.
The faceted representation is much faster, especially for complex surfaces, but less accurate.
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 (default value=0, Maximum allowable value = 1, 2-D and 3-D boundary layers)
Nodes are projected perpendicular for a value of 0. Generates equidistant outer nodes for a value of 1. Intermediate values between 0 and 1 are allowable.
USE_FACET_EVALS=1
ANGLE_SMOOTH_FACTOR=0
USE_FACET_EVALS=0
ANGLE_SMOOTH_FACTOR=0
ANGLE_SMOOTH_FACTOR=1
© Fluent Inc. 1/19/20056-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Some Important Boundary Layer DefaultsADJUST_EDGE_BL_HEIGHT (default = 0, 2-D boundary layers only)
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.
1 = the boundary layer height is projected onto the skewed edge.
Other Important Defaults (Details in GAMBIT Command Reference Manual) :
QUICK_N_DIRTYHEIGHT_TRANSIT_RATIOSMOOTH_CONTINUOUS_SIDESDefaults for Normal and Offset Smoothing
ADJUST_EDGE_BL_HEIGHT=0
ADJUST_EDGE_BL_HEIGHT=1
© Fluent Inc. 1/19/20056-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
© Fluent Inc. 1/19/20057-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
CAD/CAE Data Exchangeand Geometry Cleanup
(Virtual Geometry)
© Fluent Inc. 1/19/20057-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
IntroductionSeveral translation methods available to enable data exchange with CAD/CAE systems.
Appropriate approach depends upon source.Translation can:
return incomplete, corrupt, or disconnected geometryreturn geometry details unnecessary for CFD analysis
Geometry cleanup refers to processes required to prepare geometry for meshing.
Fix incomplete or corrupt geometry and connect disconnected geometryRemove unnecessary detailsDecompose geometry into meshable sections
Gambit's Virtual Geometry operations can help with the cleanup process.
© Fluent Inc. 1/19/20057-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
CAD Data Exchange - Direct Options
Direct Translation OptionsACIS-based CAD programs:
e.g., AutoCad, Cadkey, TurboCadcan export ACIS files (.sat or .sab) which can be imported into Gambit.
Parasolids-based CAD programs:e.g., Unigraphics, SolidWorks, PATRAN, ANSYScan export Parasolid files (.x_t and .xmt_txt) which can be imported into Gambit.
CAD programs using proprietary geometry kernelCatia 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
© Fluent Inc. 1/19/20057-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
CAD Data Exchange - Standard OptionsStandard Translation Options
Translation uses an intermediate, neutral or standard, file format.Applicable for all CAD/CAE systemsthat can output:
STEP filesPro/E supports STEP export at no additional cost.Other systems support STEP as add-on.
IGES filesCommon 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 AP214Preferred over IGES import
© Fluent Inc. 1/19/20057-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
CAD Data Exchange - Standard Options (2)Standard Translation Options (continued)
IGES (Initial Graphics Exchange Specification)Topology/connectivity information is lost when CAD programs export IGES surface data only.
e.g., faces associated with volume, etc.implies that volumes must be recreated from imported faces (tedious)
Some CAD packages export IGES-solids as well as IGES-surfaces.I-DEAS and CADDSTopology/connectivity information maintained.
Gambit provides two options for IGES importSpatial (Recommended)
– All imported geometry comes in as real, supports solidsNative (Fluent)
– Original IGES translator, does not support solids– Trimmed surfaces come in as virtual geometry
© Fluent Inc. 1/19/20057-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Import Mesh and Import CADImport Mesh and some Import CAD options result in faceted geometry.
Least preferred approachImport/CAD Pro/E (Direct)
Gambit directly accesses Pro/E’s geometry engine
Eliminates geometry translation lossesUser works in Gambit environment
Need special Gambit and valid Pro/E licenseSolid models alone are supported
© Fluent Inc. 1/19/20057-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Tolerant ModelingAutomatic "real" geometry connect using variable toleranceAvailable at
time of importinside the Heal Face (or Volume) Form
ApplicationAll Geometry filesRelatively large gapsReal ACIS volumes generated during import
Boolean operations subsequently possibleAdding/Subtracting additional geometryVolume ExtractionRetaining only ½ or ¼ of modelVolume Decomposition for better meshing
© Fluent Inc. 1/19/20057-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Smoothing Real GeometrySmoothing can be used to remove discontinuities in geometry and simplify spline representations.Smoothing can aid in subsequent Boolean operations.There are two smoothing options:
Remove discontinuitiesReduce complexity to simplify NURB representation
Face smoothing
© Fluent Inc. 1/19/20057-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Geometry imported from other CAD systems can lack the required accuracy and precision to render valid or connected ACIS geometry.
This results from numerical limitations in original CAD system, neutral file formats, or differences in tolerances between CAD systems and ACIS.
If Boolean operation fails on imported tolerant geometryProblems are usually resolved by smoothing or healing the geometry.
Healing can be done on either faces or volumesHealing can be invoked at time of import
If smoothing/healing fails to resolve the problem, Re-import the geometry without tolerant modeling or healingUse the check command to verify integrity of geometry/topology.Replace the corrupted faces using real optionsUse Tolerant modeling and Healing to re-connect the new face with the rest of the model.
Heal Real Geometry
© Fluent Inc. 1/19/20057-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Virtual GeometryThree kinds of geometry in GAMBIT:
RealDefined by the ACIS library of geometry creation/modification routines.Geometry defined by mathematical formulae.
VirtualA 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 geometryTreated like virtual geometry.Derived from importing a mesh or faceted geometry into GAMBIT, split mesh operations, or stairstep meshing scheme.
Two objects that share the same underlying geometry but different topologies.
© Fluent Inc. 1/19/20057-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Virtual Geometry: Uses
Virtual geometry and the operations that create them are used tosimplify, clean, and connect existing geometry.
Simplify/Clean:remove details from the model unnecessary for CFD analysis.merge faces/edges to increase mesh quality.decompose geometry into smaller, meshable components.
Connect:Connect geometry that becomes disconnected during import process.
Virtual geometry provides additional flexibility in operations that affect geometry and mesh.
Merges edges to enable non-coplanar face to be created.Modify the mesh by repositioning nodes on virtual face.
© Fluent Inc. 1/19/20057-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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.
Can also be created from a "native" IGES import operation.Virtual geometry operations:
are accessed:by selecting virtual option on a real geometry panel andthrough 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.
© Fluent Inc. 1/19/20057-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Characteristics
Virtual entities:entities are colored differently from real entities.naming convention: v_vertex, v_edge, v_face, v_volume.
When performing a virtual geometry operation:Directly connected lower and upper geometry will become virtualUnderlying real geometry (host) will become invisible and inaccessible (or put in the "background")
Deleting virtual geometry:Will not delete host geometry.Typically, lower order entities (virtual) remain undeleted.
Meshing and Boundary Assignments:Meshing and boundary assignment operations are unaffected by virtual geometry.
© Fluent Inc. 1/19/20057-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Virtual Geometry Operations-1
Merge - replaces two connected entities with a single virtual entity
Split - partitions an individual entity into two separate, connected virtual entities
Connect - combines two individual, unconnected entities such that the lower geometry is shared at common interfaces (unrestricted by ACIS tolerances)
++
++
Example:
Example:
Example:
© Fluent Inc. 1/19/20057-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Create - creates independent virtual entitiesUse host entities for shape definition
Collapse - splits a face and merges the resulting pieces with two or more neighboring faces
Virtual Geometry Operations-2
+ + + +
collapsethis face
betweenthese faces
© Fluent Inc. 1/19/20057-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Convert - converts non-real entities to realApplicable to vertices, edges, faces, and volumes.Edges are sampled and real spline (NURBS) curve generated.
sampling controlled by geometry.edge.VIRTUAL_NUM_SAMPLING_POINTSFace conversions require that a map mesh first be generated on face (no Side vertices allowed).Volume conversions require that all lower topologies can be convertedTopology and any existing mesh are preserved.
Face SimplifyRemoves dangling edges and hard points from a face.Result is virtual faceThe face with dangling edge can also be split using face split (by location)
Virtual Geometry Operations-3
© Fluent Inc. 1/19/20057-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Edge/Face MergeVirtual Edge/Face Merge options
Virtual (Forced) Create one single edge/face from all edges/faces
++
max. edge =
min. angle = 135
+ +
++
+
face merge
edge merge
Virtual (Tolerance)Merge all entities shorter than Max. Edge/Face Length Merge all entities of higher entity angle than Min. AngleNo input will merge all vertices connected to two edges only
© Fluent Inc. 1/19/20057-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Defined Virtual Face Unite (1)Handles gross overlaps and gaps
Arbitrary shapesTolerance option
LimitationsOrder of picking Points is importantImportant locations must be picked by userGaps larger than the mesh size can create trouble during meshingCan not handle large distances between overlapping faces
© Fluent Inc. 1/19/20057-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Boundary Defined Virtual Face Unite (2): Example
Select 6 points (a,b,c,d,e,f)c and e lie on square edge
Square face in z = 0 planeCircular face in z = .05 planeFaces can not be Real united
a b
fe
c
d
Straight edge constructed between points c and d (and between d and e) because they lie on different edges.
Select 6 points (a,b,c,d,e,f)c and e lie on circular arc
Arc shape retained between points c and d (and between d and e) because they lie on the same edge
© Fluent Inc. 1/19/20057-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Face Splits (Virtual and Faceted)Split by
Face (Real or Virtual)Edge (Virtual)Vertices (Virtual)
Example using 2 vertices
Location (Virtual)Vertex locations can be adjusted after the splitLimitations (for both Face and Volume Split)
Split through voids, protrusions and dangling faces will create incorrect geometryOrder of picking is importantIf 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
++
© Fluent Inc. 1/19/20057-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Volume Splits (Virtual and Faceted)Split by
Volume (Real)Face (Real or Virtual)
All edges of the face have to be connected to the volume
Locations (Virtual)
one volume two virtual volumes
connected face
virtual volume split
Pick (at least) two locations
© Fluent Inc. 1/19/20057-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Comparison of Face Unite, Merge, and ConnectUnite
RealFaces must have matching tangents at edge
VirtualGaps or overlaps allowed
No unite for edgesMerges
Operates on real/non-real geometry virtualFaces must share edge but they need not be tangent
ConnectOperates on real/non-real geometry real or virtualReplaces selected entities with single entity
Merge
Real Unite
Connect
tolerance
© Fluent Inc. 1/19/20057-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Edge Connect (Virtual)Edge Connect
Also available in Vertex and FaceVirtual (Forced)
Pick two or more edges you want to connectVirtual (Tolerance)
Every picked edge within the tolerance will be connected10 % of shortest edge is recommended (default)The shortest edge is shown by clicking the “Highlight shortest edge” buttonThe shape of the connected edge is aninterpolated ‘average’ of the picked edges.
Use Preserve first edge shape to force result toassume shape of first edge in pick list.
– Preserve first vertex location is available for vertex connects.
© Fluent Inc. 1/19/20057-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
T-Junctions OptionT-Junctions - splits edges by vertices that exist within a specified tolerance of the edges and then connects the split entities.
Use Preserve split-edge shape option to get following result:
connected virtual edges/facesunconnected real edges/faces
Edge Splits
Invoking too early may result in very small edges
Original Option Off Option On
© Fluent Inc. 1/19/20057-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Virtual Face Connect with T-JunctionsVirtual (Tolerance) Face Connect includes a T-Junctions option.This helps overcome common geometry problems in imported models such as gaps, mismatches and overlaps.
Utilizes projections, splits, and connects to overcome problems.
Available for both real and virtual geometryThe resulting geometry is always virtual.
Virtual (Tolerance) Face connect using T-Junctions
© Fluent Inc. 1/19/20057-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Importing IGES FilesFile Import IGES
SummaryReview important information in the form before importing the file.Validity of information varies.
OptionsNative or Spatial TranslatorAbility 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 CleanupEnables automated cleanup sequence using:
connect toleranceedge merge toleranceangle merge tolerance
– geometry.edge.VIRTUAL_MERGE_MIN_ANGLE
© Fluent Inc. 1/19/20057-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Virtual Geometry Cleanup Strategy-11. Delete all unnecessary geometry2. Check validity of imported geometry3. Correct invalid geometry (Heal and/or reconstruction)4. Check connectivity by color coding
Helps distinguish between connected and unconnected entities.White - Stand-alone entitiesOrange - 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)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 tolerancec. Connect with T-Junction Option.d. Use forced connect operation for entities out of tolerance
© Fluent Inc. 1/19/20057-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Virtual Geometry Cleanup Strategy-26. Create additional geometry, if necessary, and form volume.
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 virtualgeometry.In 3D, use face stitch command to create virtual volumes.
7. Simplify facesMerge small edges and faces with neighbors to eliminateRemove sharp angles for better meshing.
8. Decompose volume, if necessary.9. Mesh
Merge example:
© Fluent Inc. 1/19/20058-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Cleanup Tools
© Fluent Inc. 1/19/20058-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean up Imported Geometry
Imported geometry containing large number of faces
Why is Clean up important?Ensure connectivity: holes and cracksImprove mesh quality: Eliminate short edges, sliver faces, sharp angles, …
Clean up on models containing a large number of faces can be tedious without use of the cleanup toolsCleanup Tools can semi-automate this process
Finding the problem areasSuggesting fixes
Virtual Geometry createdChoose "Real" path to clean up if Boolean operations needed
Refer to Chapter 5.4 in the GAMBIT Modeling Guide for more information
© Fluent Inc. 1/19/20058-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Meshed Geometry: With and Without CleanupInterval 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
© Fluent Inc. 1/19/20058-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Cleanup ToolsSequential, Semi-automatic Geometry Cleanup Tool resulting in connected geometry and a better meshQuickly identify, zoom-in, highlight areas that cause connectivity and mesh quality problems
Graphics color coding set to connectivityGraphics window pivot set to mouse
Appropriate tools to fix problems are givenAvailable Cleanup tools:
Clean up Short EdgesClean up HolesClean up CracksClean up Sharp AnglesClean up Large Angles
Clean Up Small FacesClean Up Hard EdgesClean Up FilletsCleanup Duplicate GeometrySelect Clean up Domain
© Fluent Inc. 1/19/20058-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Short Edges (1)
Tools to identify and highlight the problem spotCleanup domain
Select whole model or groupMaximum length: upper limit
Default: 10* shortest edge in the Cleanup domainItems List: candidates for cleanup operation based on Cleanup domain and Maximum lengthCurrent length: length of currently picked edgeUpdate: updates the Items list
Required when Maximum length is modified
ZoomIn/Out: quick auto zoom in on or from the picked items
Auto: automatically zooms in on selected item
© Fluent Inc. 1/19/20058-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Short Edges (2)
Tools to identify and highlight the problem spotLocal: current item + all faces connected to it
Visible: make everything else invisibleShade: shade the local objects
Options to Apply Cleanup ToolApply: applies appropriate fix to selected itemA/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 itemRestore: the list is restored
© Fluent Inc. 1/19/20058-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Short Edges (3)Methods to fix the problem spot
Vertex connect (least common)Average locationPreserve location: first vertexPreserve location: second vertex
Edge mergeMerge with (select edge)
Face mergeFaces 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.
© Fluent Inc. 1/19/20058-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Short Edges (4)
Before Cleanup After Cleanup by Edge Merge
© Fluent Inc. 1/19/20058-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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
Similar to those for Cleanup Short edgeMethod to fix the problem spot
Create Face from Wireframe Real and Virtual options available
© Fluent Inc. 1/19/20058-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Holes (2)
Before Cleanup After Cleanup
© Fluent Inc. 1/19/20058-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Cracks (1)
A Crack is defined as an edge pair that meets the following criteria
Each edge in the pair serves as a boundary edge for a separate face.The edges share common endpoint vertices at one or both ends.The edges are separated along their length by a small gap.
Defining angle: the angle at the endpoint vertex shared by the two edges.
If edges share common endpoint vertices at both ends, the minimum angle is used
© Fluent Inc. 1/19/20058-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Cracks (2)
Tools to identify and highlight the problem spot
Maximum angle: default is 20Other tools similar to those for Cleanup Short edge
Options to Apply Cleanup ToolSimilar to those for Cleanup Short edge
Method to fix the problem spotConnect edges
Tolerance: maximum distance between edges to be connected
© Fluent Inc. 1/19/20058-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Cracks (3)
The edges that define the crack share one vertex
The edges that define the crack share two vertices
Before Cleanup After Cleanup Before Cleanup After Cleanup
© Fluent Inc. 1/19/20058-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Sharp Angles (1)
A Sharp Angle is defined as an edge pair that meets the following criteriaThe 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.
© Fluent Inc. 1/19/20058-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Sharp Angles (2)Tools to identify and highlight the problem spot
Maximum angle: default is 20Other tools similar to those for Cleanup Short edge
Options to Apply Cleanup ToolSimilar to those for Cleanup Short edge
Methods to fix the problem spot determined by face-face angle
If face-face angle > 135: Merge facesIf face-face angle < 135: With Options (to truncate)
Distance: length of shortest boundary edge of truncated face
Chop MergeBi-Chop Merge
face–face angle: 180 –
is the angle between the normals of the two faces (shaded in grey)
© Fluent Inc. 1/19/20058-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Sharp Angles without Chop (3)Before Cleanup
After cleanup: Merge with left face
After cleanup: Merge with right face
Virtual Virtual
© Fluent Inc. 1/19/20058-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Sharp Angles with Chop (4)
1 of 8 Sharp Angles:
Chop optionface - face angle < 135
truncated face
distance
Merge edges
merged face
Mesh: Cooper
Tri-primitive
© Fluent Inc. 1/19/20058-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Large Angles (1)
A Large angle is defined by a pair of faces that meets the following criteria
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.
© Fluent Inc. 1/19/20058-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Large Angles (2)
Tools to identify and highlight the problem spot
Maximum angle: default is 5 degreesOther tools similar to those for Cleanup Short edge
Options to apply the Cleanup ToolSimilar to those for Cleanup Short edge
Method to fix the problem spotMerge faces
© Fluent Inc. 1/19/20058-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Large Angles (3)
Before cleanup
After cleanup
© Fluent Inc. 1/19/20058-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Small Faces (1)Tools to identify and highlight the problem spot
Maximum area: default value is 100 times the area of the smallest face in the Cleanup domainItems in the list contains all faces with areas less the maximum areaOther tools similar to those for Cleanup Short edge
Options to apply the Cleanup ToolSimilar to those for Cleanup Short edge
Methods to fix the problem spot: Merge faceCollapse face
Candidate Faces to merge: all bounding faces with a face-face angle > 135 pre-picked
© Fluent Inc. 1/19/20058-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Small Faces (2)
After cleanup by Merge Face
Before cleanup
© Fluent Inc. 1/19/20058-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Hard Edges (1)
Hard edges are also know as dangling edges.Creation occurs:
as a result of a face split when the split tool only partially intersects target facefrom STL or mesh import
Tools to identify and highlight the problem spot and options to apply the cleanup tool
similar to those for Cleanup Short edgeMethod to fix the problem spot
Remove all hard edge
© Fluent Inc. 1/19/20058-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Hard Edges (2)
Before cleanup After cleanup
© Fluent Inc. 1/19/20058-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Fillets (1)A fillet is defined as a face that meets the following criteria:
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.
© Fluent Inc. 1/19/20058-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Fillets (2)
Tools to identify and highlight the problem spot
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
Options to apply the Cleanup ToolSimilar to those for Cleanup Short edge
Methods to fix the problem spotMerge faceCollapse face
Candidate Faces Faces to merge: all bounding faces with a face-face angle > 135 pre-pickedto collapse between: two opposite faces along the longest edges prepicked
© Fluent Inc. 1/19/20058-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Clean Up Fillets (3)
Before cleanup After cleanup by Collapse face
© Fluent Inc. 1/19/20058-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Cleanup Duplicate Edges Clean Up Duplicate Edges
Includes edges which are coincident in part (T-junction connect)
© Fluent Inc. 1/19/20058-29
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Cleanup Duplicate FacesClean Up Duplicate Faces
Two search optionsTopology-based
All lower entities (edges or vertices) to be identical between the two faces.
Centroid-based The centroids of the two faces should be within tolerance.Less accurate, but helpful in detecting duplicate faces with different lower topology.
Method: Connect or delete faces
© Fluent Inc. 1/19/20058-30
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Cleanup Duplicate VolumesClean Up Duplicate Volumes Method: Connects or deletes duplicate volumes
Duplicate entities due to modeling errors or problematic import
© Fluent Inc. 1/19/20058-31
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Select Cleanup Domain
Specifies the domain to which the geometry cleanup operations apply.
Whole Model (default)Predefined geometry group
The Cleanup Domain is group2
© Fluent Inc. 1/19/20058-32
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Demo
Import a Non-ACIS File (demo.igs)Apply Cleanup Tools
There are many different approaches. Mesh the Model using the Cooper Tool (Hexes).
© Fluent Inc. 1/19/20058-33
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Where are the Problem Areas?
Fillet Short edge Orange edges: unconnected facesFaces can
be mergedSliver face
© Fluent Inc. 1/19/20058-34
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Steps to Clean up Import the .iges file using the default settings (Make tolerant).Change color coding to connectivity.
Blue edges (2 connections) indicate connected geometry.Orange edges (1 connection) indicate unconnected geometry.
Try healing the faces (to retain Real Geometry)Delete the problematic faceApply Cleanup Tools (Virtual Geometry Created)
Short EdgesHolesLarge AnglesFillets
Create a Volume by stitchingMesh using the Cooper Tool
Source face
© Fluent Inc. 1/19/20059-1
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Using Parameters in Journal Files and the Dynamic GUI
© Fluent Inc. 1/19/20059-2
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Outline
Basis of Journal FilesParameters: Scalars and ArraysSpecial ConstantsExpressions: Arithmetic, Logical and StringFunctions: String and ArithmeticExamplesDO and IF-THEN-ELSE CommandsSummary of Journal File UsesDynamic GUI and Examples
© Fluent Inc. 1/19/20059-3
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Journal Files
Journal File:Executable list of Gambit commands
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:
Can be parameterized, comments can be addedEasy recovery from a crash or power lossedit existing commands to create new ones
© Fluent Inc. 1/19/20059-4
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Running Journal FilesJournal files can be processed in two ways:
Batch mode (Run)All commands processed without interruption."read pause" command will force interrupt with
resume option appearing.Interactive mode (Edit/Run)
Includes text editor for easy modificationsMark lines in process field to activate for processing.Editable text field.Right click text fieldfor more options.Auto or Step throughactivated process lines.
© Fluent Inc. 1/19/20059-5
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Journal File: Parametric ModelingParameters (including arrays), control-blocks, do-loops, arithmetic functions, etc., can be used in the Journal File for simplifying parametric studies.
Comment lines
Parameter names begin with $.Parameters are case sensitive.
GAMBIT Commands are not case sensitive
© Fluent Inc. 1/19/20059-6
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Command Interpreter (1)
Commands are not case sensitiveComments begin with /
/ This is a comment line
Continue statements with \vertex create coordinates \0.0 1.0 2.0
All commands and arguments are documented in GAMBIT Command Reference GuideDO Loops, IF-THEN-ELSE blocks, constants, functions, expressions, etc. are documented in appendices of GAMBIT Users Guide (available in online help)
© Fluent Inc. 1/19/20059-7
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Parameters
Scalar or ArrayNumeric or stringDefined by: $param = value
param = name of parametervalue = numeric or string value of parameter
Name of parameterMust start with $Is not case sensitive ($length same as $LENGTH)
© Fluent Inc. 1/19/20059-8
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Scalar (1): Pipe (centered)
/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 = 2volume create height $10 radius1 $r radius3 $r zaxis frustum
Cylinder: Height = 10, Radius = 2
Axis Location: Centered Z
Center of the cylinder is at the origin of the active coordinate system
© Fluent Inc. 1/19/20059-9
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Scalar (2): Pipe (not centered)
/original journal file
volume create height 10 radius1 2 radius3 2 offset 0 0 5 zaxis frustum
/modified journal file with parameters for height ($h) and radius ($r)$h = 10$r = 2volume create height $h radius1 $r radius3 $r offset 0 0 ($h/2) \zaxis frustum
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
Use Parenthesis
© Fluent Inc. 1/19/20059-10
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Array (1)Define arrays by declare $p[{n1}:m1, {n2}:m2, ...]
Where p is the name of the parametern is the starting index ({} indicate this is optional; default is 1)m is the range of the dimensionSquare brackets [] are necessary
Elements in the array still need to have values assigned to them$p[1,2]= 6.5
© Fluent Inc. 1/19/20059-11
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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]
© Fluent Inc. 1/19/20059-12
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Array (3): Multiple Pipes
$p[3,2] = 4$p[3,1] = 23
$p[2,2] = 3$p[2,1] = 12
$p[1,2] = 3$p[1,1] = .51
HeightRadiusPipe Number
Pipe 1, 2, 3
declare $p[3,2]
1st dimension is the pipe number (1, 2 or 3)
2nd dimension is the radius (1) or height (2)
© Fluent Inc. 1/19/20059-13
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Special Constants
Available for use in any expressionPI 3.141592653590TWOPI 6.283185307180DEG2RAD 0.0174532925199RAD2DEG 57.29577951308
Examples4 * $rad * RAD2DEG$arclength = PI * $radius
© Fluent Inc. 1/19/20059-14
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
ExpressionsArithmetic, logical, or stringEnclose in parentheses when used as arguments to commands, IF statements, or DO conditionsvolume create height $h radius1 $r radius3 $r offset 0 0 ($h/2) \zaxis frustum
© Fluent Inc. 1/19/20059-15
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Arithmetic Expressions (1)
Evaluate to numeric resultsFORTRAN-like syntax
E1 op E2where E1 and E2 can also be expressions, and op* is
+ (addition)- (subtraction)* (multiplication)/ (division)^ (exponentiation, note difference from FORTRAN)
Order of operations is ^ * / + -Use parentheses to override
*op refers to operations
© Fluent Inc. 1/19/20059-16
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Arithmetic Expressions (2)
Examples:$x + 10-5.0 * $a / $b3^3.5 + 4 * $y(3^3.5 + 4) * $y
© Fluent Inc. 1/19/20059-17
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Logical Expressions (1)
Evaluate to "true" or "false"FORTRAN syntax
E1 .op. E2where 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)
© Fluent Inc. 1/19/20059-18
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Logical Expressions (2)
Examples:$x .lt. 5$y .gt. 10($a .eq. 4).and.(($b+$c) .lt. $d).not. $z
© Fluent Inc. 1/19/20059-19
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
String Expressions
String parameters defined as $name = “GAMBIT”Enclose string constants in double-quotes
"volume.1""fluid"
Concatenation: str1 + str2$base = “volume”$extension = “.one”$label = $base + $extension yields “volume.one”"/usr/" + "gambit" = "/usr/gambit”
© Fluent Inc. 1/19/20059-20
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Functions
Can be used in any expressionReturn a single numerical, logical, or string valueNot case sensitiveArguments are constants or expressions enclosed in parentheses
ABS(exp)COS(exp)
© Fluent Inc. 1/19/20059-21
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
String Functions
Many string functions available, such as STRLEN and STRCMPSTRLEN: number of characters in a string
$x= STRLEN("title")$x=5
CSTRCMP: case sensitive string compare$y= CSTRCMP ("ABD","abd")$y=0
© Fluent Inc. 1/19/20059-22
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Arithmetic Functions (1) : TrigonometricACOS(exp) arc-cosineASIN(exp) arc-sineATAN(exp) arc-tangentCOS(exp) cosineCOSH(exp) hyperbolic cosineSIN(exp) sineSINH(exp) hyperbolic sineTAN(exp) tangentTANH(exp) hyperbolic tangent
© Fluent Inc. 1/19/20059-23
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Arithmetic Functions (2) : MiscellaneousABS(exp) absolute valueDIGSUM(exp) sum of digits of integer portion, i.e., DIGSUM(123)= 6EXP(exp) exponentialINT(exp) integer truncationLOG(exp) natural logarithmLOG10(exp) base 10 logarithmMAX(exp1,exp2) maximum of exp1 and exp2MIN(exp1,exp2) minimum of exp1 and exp2MOD(exp1,exp2) modulo (remainder) of exp1/exp2POW(exp1,exp2) same as exp1^exp2SIGN(exp) -1.0 if exp < 0, else 1.0SQRT(exp) square root
© Fluent Inc. 1/19/20059-24
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Important String & Database FunctionsNTOS(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
© Fluent Inc. 1/19/20059-25
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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//end of the commands /commands to export the meshsolver select "FLUENT 5/6"$title = "pipe-"$end = ".msh"$id = $title + NTOS ($h) + $endexport fluent5 $id
/This journal file will export a file named: pipe-6.4.msh
FIDAP users: solver select "FIDAP"
$end = ".FDNEUT"
export fidap $id
Exported file: pipe-6.4.FDNEUT
© Fluent Inc. 1/19/20059-26
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
DO Loops (1)Syntax
DO PARA "$param" INIT exp1 COND(cond) INCR exp2commands
ENDDOWhere
PARA - loop parameter $param - must be defined before loopIts 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 - incrementINIT 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)
© Fluent Inc. 1/19/20059-27
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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 0enddo
enddo
© Fluent Inc. 1/19/20059-28
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
DO Loops (3): ExampleThe following GAMBIT journal creates a set of grid points (9 x 9) which are used to approximate a surface which is defined by
$i = 0$imax = 2$j = 0$jmax = 2$inc = .25$fact = .15do para "$i" init 0 cond ($i.le.$imax) incr $incdo para "$j" init 0 cond ($j.le.$jmax) incr $incvertex create coordinate $i $j ($fact*sin(RAD2DEG*PI*$i)\
*cos(RAD2DEG*PI*$j/2)) enddoenddoface create vertices "vertex.1" "vertex.2" … "vertex.81" rowdimension 9
)2/cos()sin(15. yxz ππ=
© Fluent Inc. 1/19/20059-29
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
IF-THEN-ELSE Blocks (1)
SyntaxIF COND (exp)
true-commandsELSE
false-commandsENDIF
WhereCOND - condition
Example: (exp) = ($param .le. 5) ELSE and false-commands are optionalCan be nestedNo ELSEIF defined (must use nested IF)
© Fluent Inc. 1/19/20059-30
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 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= -1if cond ($a .gt. 0)
volume mesh "volume.1" cooper source "face.1" "face.3" size 1else
volume mesh "volume.1" cooper source "face.1" "face.3" size 10endif
© Fluent Inc. 1/19/20059-31
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Current LimitationsParameter definition in the Edit - Parameters form does not produce journal commandsParameters and expressions can NOT be used within the GUIJournals produced by GAMBIT contain the values of parameters and expressions, not the parameters/expressions themselves
© Fluent Inc. 1/19/20059-32
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Steps to Use Parameters in Journal FilesBuild initial model with GUI
First use a set of basic numerical values.Mesh model and specify Boundary Types.Save journal file with unique name.
Editing the journal file:Define key parameters at the top of the file and include comments.Replace values with parameters throughout.
Check the journal file: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
© Fluent Inc. 1/19/20059-33
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Summary of Journal File Uses
Parameterized journals can save large amounts of time for parametric studiesDO 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 processGAMBIT journal files can be combined with FIDAP journal files.
allows parameters to be defined only once if any of the boundaryconditions depend on the parameterized geometry.
© Fluent Inc. 1/19/20059-34
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Dynamic GUI: Application-Specific TemplatesIncludes capabilities that enable us to create application-focused templates
Process automation toolsEasy-to-use, customized GUIsAddress specific applications, customized and fine-tuned for your specific processesAutomated geometry creation, meshing, solution, post-processing, and/or reporting
Facilitate the CFD process for both CFD engineers and non-CFD engineersDoes not replace roles of expert analyst in defining processes, exploring limits, and investigating problems
Contact Fluent's Consulting organization or your Technical Support Engineer
© Fluent Inc. 1/19/20059-35
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Template Example: Catalytic Converter
Fully parameterized
© Fluent Inc. 1/19/20059-36
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Template Example: Furnace
© Fluent Inc. 1/19/20059-37
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004
Template Example: Cyclone
© Fluent Inc. 1/19/20059-38
Fluent User Services Center
www.fluentusers.com
Introductory GAMBIT TrainingGAMBIT 2.2 December 2004