Gambit Tutorial
Gambit Tutorial
Tutorial Guide
May 2000
Licensee acknowledges that use of Fluent, Inc.’s products can only provide an imprecise
estimation of possible future performance and that additional testing and analysis,
independent of the Licensor’s products, must be conducted before any product can be
finally developed or commercially introduced. As a result, Licensee agrees that it will not
rely upon the results of any usage of Fluent, Inc.’s products in determining the final
design, composition, or structure of any product.
FIDAP, FLUENT, RAMPANT, and GeoMesh are registered trademarks of Fluent, Inc.
NEKTON is a registered trademark of Nektonics Inc.
ImageMagick is © 1996 E.I. du Pont de Nemours and Co.
All other products or name brands are trademarks of their respective holders.
For GAMBIT Technical Support contact information, visit the Fluent, Inc. Web site at
www.fluent.com.
Fluent, Incorporated
Centerra Resource Park
10 Cavendish Court
Lebanon, NH 03766
TABLE OF CONTENTS
iii
Table of Contents
iv
Table of Contents
v
Table of Contents
vi
USING THIS TUTORIAL GUIDE What’s in This Guide
Display Operations
GAMBIT graphics-window display operations employ all three mouse buttons as well as
the Ctrl keyboard key.
Task Operations
GAMBIT graphics window task operations employ all three mouse buttons in conjunction
with the Shift key to allow you to pick entities and to execute actions related to GAMBIT
forms. There are two types of task operations:
• Picking entities
• Executing actions
Picking Entities
Many GAMBIT modeling and meshing operations require you to specify one or more
entities to which the operation applies. There are two ways to specify an entity for a
GAMBIT operation:
• Input the entity name in the appropriate list box on the specification form or select
it from the appropriate pick list.
• Use the mouse to “pick” the entity from the model as displayed in the graphics
window.
When you use the mouse to pick an entity from the model that is displayed in the graphics
window, GAMBIT inserts the entity name in the currently-active pick list as if you had
specified its name on the currently-open specification form.
There are two different types of GAMBIT entity-picking operations, each of which
involves the Shift key. Throughout the Tutorial Guide, you will see expressions such as
Shift-left-click; this indicates that you should press and hold the Shift key while clicking
the left mouse button. The two entity picking operations are as follows:
Operation Description
To select a group of objects, Shift-left-drag a box around the objects. The box does not
have to completely enclose the objects; it only needs to be enclosing parts of them.
Executing Actions
When you Shift-right-click the mouse in the graphics window, GAMBIT accepts the
selection of an entity and moves the focus to the next pick list in the form. If the current
pick list is the last one in the form, Shift-right-click executes the operation associated with
the currently open form. In this case, the Shift-right-click operation is equivalent to the act
of clicking Apply on the bottom of the form.
Geometry
subpad
Graphics
window
Transcript
window
Command Description
text box window Global Control
toolpad
Figure 0-1: The GAMBIT GUI
Subpads
When you click a main-pad command button, GAMBIT opens an associated subpad. For
example, if you click the GEOMETRY command button on the main pad, GAMBIT opens
the Geometry subpad.
Each subpad contains command buttons that perform operations related to the overall
purpose of the subpad. For example, the Geometry subpad contains command buttons that
allow you to perform operations related to the creation and refinement of model geometry.
Some of the command buttons located on subpads open related subpads of their own. For
example, when you click the VOLUME command button on the Geometry subpad,
GAMBIT opens the Geometry/Volume subpad.
Each command button on the Geometry/Volume subpad is associated with a specification
form that allows you to specify parameters related to the function indicated on the button.
is not depressed; see the MESH command button in Figure 0-1. Note that if a button
is already depressed, you need not click that button again. In fact, clicking a selected
button will deselect it.
Toolpad choices that require pressing the right mouse button are indicated by an R to the
right of the corresponding command button icon, followed by the icon to select from the
right-click the CREATE VOLUME command button , then choose the CREATE REAL
CYLINDER option from the resulting list. CREATE REAL CYLINDER is the
text that is written in the Description window when you hold the mouse cursor over the
menu item.
0.5.4 Form Field
When you click any subpad command button (except UNDO), GAMBIT opens an associ-
ated specification form. Specification forms, such as that shown in Figure 0-2, allow you
to specify parameters related to modeling and meshing operations, the assignment of
boundary attributes, and the creation and manipulation of GAMBIT coordinate systems
and grids.
1.1 Prerequisites
This tutorial assumes you have no prior experience of working with GAMBIT. You
should, however, read Chapter 0, “Using This Tutorial Guide,” to familiarize yourself
with the GAMBIT interface and with conventions used in the tutorial instructions.
10
12
6 6
10
10
1.3 Strategy
This first tutorial illustrates some of the basic operations for generating a mesh using
GAMBIT. In particular, it demonstrates:
• How to build the geometry easily using the “top-down” solid modeling approach
• How to create a hexahedral mesh automatically
The “top-down” approach means that you will construct the geometry by creating
volumes (bricks, cylinders, etc.) and then manipulating them through Boolean operations
(unite, subtract, etc.). In this way, you can quickly build complicated shapes without first
creating the underlying vertices, edges, and faces.
Once you have built a valid geometry model, you can directly and (in many cases) auto-
matically create the mesh. In this example, the Cooper meshing algorithm is used to auto-
matically create an unstructured, hexahedral mesh. More complicated geometries may
require some manual decomposition before you can create the mesh; this is demonstrated
in subsequent tutorials.
The steps you will follow in this tutorial are listed below:
• Create two volumes (a brick and an elliptical cylinder).
• Unite the two volumes.
• Automatically generate the mesh.
• Examine the quality of the resulting mesh.
To keep this introductory tutorial short and simple, certain steps that you would normally
follow have been omitted:
• Adjusting the distribution of nodes on individual edges of the geometry
• Setting continuum types (for example, identifying which mesh zones are fluid and
which are solid) and boundary types
1.4 Procedure
Type
gambit -id basgeom
to start GAMBIT.
This opens the GAMBIT graphical user interface (GUI). (See Figure 1-2.)
GAMBIT uses the name you specify (in this example, basgeom) as a prefix to all
files it creates: for example, basgeom.jou.
a) In the Operation toolpad (located in the top right corner of the GAMBIT GUI),
select the GEOMETRY command button by clicking on it with the left mouse
button. If the Geometry subpad does not appear when you select the GEOMETRY
command button, click it again.
b) Use the left mouse button to select the VOLUME command button in the
Geometry subpad.
Again, this command button will be depressed when selected. Selecting this
command button opens the Geometry/Volume subpad.
c) Use the left mouse button to select the CREATE VOLUME command button
in the Geometry/Volume subpad.
The above description of selecting command buttons can be shortened to the following:
The selection of the command buttons will be represented using this method for the
remainder of this tutorial, and in all subsequent tutorials.
d) Left-click in the text entry box to the right of Width in the Create Real Brick form,
and enter a value of 10 for the Width of the brick.
e) Use the Tab key on the keyboard to move to the Depth text entry box, and enter 6
for the Depth of the brick.
The text entry box for Height can be left blank; GAMBIT will set this value to
be the same value as the Width by default.
i) Hold down the left mouse button on the option button to the right of Direction
until the option menu appears.
g) Click Apply.
A message appears in the Transcript window at the bottom left of the GAMBIT
GUI to indicate that a volume, called volume.1, was created. The volume will
be visible in the graphics window, as shown in Figure 1-3.
If you make a mistake at any point in the geometry creation process, you can
a) Hold down the right mouse button while the cursor is on the CREATE VOLUME
command button.
! CREATE REAL CYLINDER is the text that is written in the Description window
when you hold the mouse cursor over the menu item.
The above method of selecting command buttons can be shortened to the following:
g) Click Apply.
Notice that the Volumes list box is yellow in the Unite Real Volumes form at
this point. The yellow color indicates that this is the active field in the form,
and any volume selected will be entered into this box on the form.
a) Hold down the Shift key on the keyboard and select the brick by clicking on one of
its edges in the graphics window using the left mouse button.
! The Shift key must always be held down when selecting entities in the graph-
ics window using the left mouse button. This operation will be referred to as
Shift-left-click in all further steps.
The brick will appear red in the graphics window and its name (volume.1) will
appear in the Volumes list box in the Unite Real Volumes form.
c) Click Apply to accept the selection and unite the elliptical cylinder and brick.
! Alternatively, you could continue to hold down the Shift key and click the
right mouse button in the graphics window to accept the selection of the
volumes. This method allows you to rapidly accept selections and apply
operations with minimal movement of the mouse.
! The Shift key must always be held down when clicking the right-mouse button
to accept the selection of entities in the graphics window. This operation is
referred to as Shift-right-click.
The volume is shown in Figure 1-5. You can rotate the display (as shown in
Figure 1-5) by holding down the left mouse button in the graphics window and
moving the mouse to the left. More information on manipulating the graphics
display is given in the next step.
Figure 1-5: Brick and elliptical cylinder united into one volume
1. Zoom out from the current view by holding down the right mouse button in the
graphics window and pushing the mouse away from you.
2. Rotate the view around the screen center by holding down the right mouse button and
moving the mouse from side to side.
3. Rotate the view in free-form mode by holding down the left mouse button and moving
the mouse.
4. Translate the display by holding down the middle mouse button and moving the
mouse.
5. Divide the graphics window into four quadrants by clicking the SELECT PRESET
GAMBIT divides the graphics window into four quadrants and applies a dif-
ferent orientation to the model in each of the four quadrants. Each view of the
graphics window can be manipulated independently. All changes to the model
appear in all portions of the graphics window, unless you disable one or more
quadrants.
a) Use the left mouse button to select the graphics-window “sash anchor”—the small
gray box in the center of the graphics window.
b) Use the mouse to drag the sash anchor to the bottom right corner of the graphics
window.
7. Restore the front view of the model by left-clicking the ORIENT MODEL
command button in the Global Control toolpad.
8. Scale the model to fit the graphics window by clicking the FIT TO WINDOW
command button in the Global Control toolpad.
GAMBIT will automatically choose the Cooper Scheme Type as the meshing
tool to be used, and will use an Interval size of 1 (the default) under Spacing.
See the GAMBIT Modeling Guide, Chapter 3 for details about the Cooper
meshing tool.
This accepts the volume you selected as the one to be meshed. It also accepts
the source faces (the faces whose surface meshes are to be swept through the
volume to form volume elements) that GAMBIT has chosen for the Cooper
meshing scheme and starts the meshing. A status bar appears at the top of the
GAMBIT GUI to indicate how much of the meshing is complete.
It is important that you check the quality of the resulting mesh, because properties
such as skewness can greatly affect the accuracy and robustness of the CFD solu-
tion. GAMBIT provides several quality measures (sometimes called “metrics”)
with which you can assess the quality of your mesh. In the case of skewness meas-
ures such as EquiAngle Deviation and EquiVolume Deviation, for example, smaller
values are more desirable. It is also important to verify that all of the elements in
your mesh have positive area/volume. You should consult the documentation for
the target CFD solver for additional mesh quality guidelines.
1. Select the EXAMINE MESH command button at the bottom right of the Global
Control toolpad.
a) Select Range under Display Type at the top of the Examine Mesh form.
The 3D Element type selected by default at the top of the form is a brick .
c) Click on one of the green vertical bars in the histogram to view elements within a
certain quality range.
Figure 1-8 shows the view in the graphics window if you click on the fifth bar
from the left on the histogram (representing cells with a skewness value
between 0.4 and 0.5).
d) Move the Upper and Lower slider boxes beneath the histogram to redefine the
quality range to be displayed.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
1.5 Summary
This tutorial provided a quick introduction to GAMBIT by demonstrating how to create a
simple 3-D geometry using the “top-down” modeling approach. The Cooper scheme was
used to automatically generate an unstructured, hexahedral mesh. For more information
on the Cooper scheme, consult the GAMBIT Modeling Guide.
In this tutorial, you will use GAMBIT to create the geometry for a mixing elbow and then
generate a mesh. The mixing elbow configuration is encountered in piping systems in
power plants and process industries. It is often important to predict the flow field and
temperature field in the neighborhood of the mixing region in order to properly design the
location of inlet pipes.
In this tutorial you will learn how to:
• Create vertices using a grid system
• Create arcs by selecting the center of curvature and the endpoints of the arc
• Create straight edges between vertices
• Split an arc using a vertex point
• Create faces from edges
• Specify the distribution of nodes on an edge
• Create structured meshes on faces
• Set boundary types
• Prepare the mesh to be read into FLUENT 4
• Export a mesh
2.1 Prerequisites
This tutorial assumes that you have worked through Tutorial 1 and you are consequently
familiar with the GAMBIT interface.
32
39.93°
16
V1
T1
16
4
32 12
V2
T2
2.3 Strategy
In this tutorial, you will build a 2-D mesh using a “bottom-up” approach (in contrast to
the “top-down” approach used in Tutorial 1). The “bottom-up” approach means that you
will first create some vertices, connect the vertices to create edges, and connect the edges
to make faces (in 3-D, you would stitch the faces together to create volumes). While this
process by its very nature requires more steps, the result is, just as in Tutorial 1, a valid
geometry that can be used to generate the mesh.
The mesh created in this tutorial is intended for use in FLUENT 4, so it must be a single
block, structured mesh. However, this mesh can also be used in any of the other Fluent
solvers. This type of mesh is sometimes called a mapped mesh, because each grid point
has a unique I, J, K index. In order to meet this criterion, certain additional steps must be
performed in GAMBIT and are illustrated in this tutorial. After creating the straight edges
and arcs that comprise the geometry, you will create two faces: one for the main flow
passage (the elbow) and one for the smaller inlet duct. The mesh is generated for the
larger face using the Map scheme; this requires that the number of grid nodes be equal on
opposite edges of the face. You will force GAMBIT to use the Map scheme to mesh the
smaller face as well.
Several other features are also demonstrated in this tutorial:
• Using a background grid and “snap-to-grid” to quickly create a set of vertices.
• Using “pick lists” as an alternative to mouse clicks for picking entities.
• Specifying a non-uniform distribution of nodes on an edge.
• Setting boundary types.
• Exporting a mesh for a particular Fluent solver (FLUENT 4 in this case).
2.4 Procedure
Start GAMBIT.
1. Choose the solver you will use to run your CFD calculation by selecting the following
from the main menu bar:
Solver → FLUENT 4
This selects the FLUENT 4 solver as the one to be used for the CFD calculation.
The choice of a solver dictates the options available in various forms (for
example, the boundary types available in the Specify Boundary Types form).
The solver currently selected is indicated at the top of the GAMBIT GUI.
1. Create vertices to define the outline of the large pipe of the mixing elbow.
This ensures that the background grid will be visible when it is created.
c) Enter a Minimum value of –32, a Maximum value of 32, and an Increment of 16.
This creates a background grid with four cells in the x direction and
enters the x coordinates in the XY_plane X Values list.
f) Enter a Minimum value of –32, a Maximum value of 32, and an Increment of 16.
This creates a background grid with four cells in the y direction and
enters the y coordinates in the XY_plane Y Values list.
The vertices you create later in this step will be “snapped” to points on
the grid where the grid lines intersect.
j) Click Apply.
Figure 2-2. You will need to click the FIT TO WINDOW command
button at the top left of the Global Control toolpad to see the whole grid.
You may need to move the Display Grid form in order to access the
Global Control toolpad.
“Ctrl-right-click” indicates that you should hold down the Ctrl key on
the keyboard and click on the point at which the vertex is to be created
using the right mouse button.
You can use the UNDO command button if you create any of the
vertices incorrectly.
H I
E F G
C D
A B
l) Deselect the Visibility check box in the Display Grid form and click Apply.
The grid will be removed from the graphics window and you will be
able to clearly see the nine vertices created, as shown in Figure 2-4.
Notice that the Center list box is yellow in the Create Real Circular Arc
form at this point. The yellow color indicates that this is the active field
in the form, and any vertex selected will be entered into this box on the
form.
b) Shift-left-click the vertex in the center of the graphics window (vertex E in Figure
2-5).
The selected vertex will appear red in the graphics window and its
name will appear in the Center list box under Vertices in the form.
E F G
c) Left-click in the list box to the right of End-Points to accept the selection of vertex
E and make the End-Points list box active.
! Alternatively, you could continue to hold down the Shift key and click
the right mouse button in the graphics window to accept the selection
of the vertex and move the focus to the End-Points list box.
Note that the End-Points list box is now yellow—that is, this is now the
active list box, and any vertex selected will be entered in this box.
d) Shift-left-click the vertex to the right of the center vertex in the graphics window
(vertex F in Figure 2-5).
e) Select the vertex directly below the one in the center of the graphics window
(vertex D in Figure 2-5).
f) Click Apply to accept the selected vertices and create the arc.
2. Repeat the above steps to create a second arc. The center of the arc is the vertex in the
center of the graphics window (vertex E in Figure 2-5). The endpoints of the arc are
the vertices to the right and below the center vertex that have not yet been selected
(vertices G and B, respectively, in Figure 2-5). The arcs are shown in Figure 2-6.
a) Shift-left-click the left endpoint of the smaller arc (vertex D in Figure 2-7).
H I
F G
C D
A B
The graphics window with the arcs and straight edges is shown in
Figure 2-8.
1. Create vertices on the outer radius of the bend, and split the large arc into three
sections.
a) Select the large arc as the edge to split by using the Edge pick list.
Note that you could select the edge in the graphics window; a pick list
provides an alternate way of picking an element.
i. Left-click the black arrow to the right of the Edge list box in the Split Edge
form.
This opens the Edge List form. There are two types of pick-list
forms: Single and Multiple. In a Single pick-list form, only one
entity can be selected at a time. In a Multiple pick-list form, you can
select multiple entities.
edge.2 will be moved from the Available list to the Picked list. The
large arc is the edge that should be selected and shown in red in
the graphics window.
b) Select Real connected (the default) under Type in the Split Edge form.
You should select this option because the edge you selected is real
geometry, not virtual geometry, and because you want the two edges
created by the split to share the vertex created when GAMBIT does the
split. See the GAMBIT Modeling Guide for more information on real
and virtual geometry.
You will split the edge by creating a point on the edge and then using
this point to split the edge.
This is the angle between the horizontal direction and the position of
the right-hand side of the opening of the small pipe on the bend of the
mixing elbow, as shown in Figure 2-1.
f) Click Apply.
The large arc is split into two smaller arcs and a vertex is created.
g) Use the Edge List form (or Shift-left-click in the graphics window) to select the
larger of the two arcs just created (edge.9).
This is the angle between the horizontal direction and the position of
the left-hand side of the opening of the small pipe on the bend of the
mixing elbow (-90° + 39.93°), as shown in Figure 2-1.
i) Click Apply.
The arc is split into two parts and a second vertex is created on the
bend of the mixing elbow, as shown in Figure 2-9.
a) Select the second vertex created on the bend of the mixing elbow.
d) Enter the translation vector (0, -12, 0) under Global to create the new vertex at a
position 12 units below the vertex you selected.
The inlet is 12 units below the second point created on the outer radius
of the bend.
Note that GAMBIT automatically fills in the values under Local as you
enter values under Global.
e) Click Apply.
f) Click the FIT TO WINDOW command button at the top left of the Global
Control toolpad to scale the model to fit into the graphics window.
h) Enter the translation vector (4, 0, 0) under Global in the Move / Copy Vertices form
to create the new vertex at a position 4 units to the right of the vertex you selected.
i) Click Apply.
a) Create straight edges for the small pipe by selecting the vertices marked K, L, M,
and J in Figure 2-11, in order, and accepting the selection.
K J
L M
The small pipe is shown (with the large pipe) in Figure 2-12.
a) Shift-left-click each edge of the large pipe, in turn, to form a continuous loop.
! The large pipe is created from the 10 edges shown in Figure 2-13. If
you select an incorrect edge, click Reset in the Create Face From
Wireframe form to deselect all edges, and then reselect the correct
edges.
Note that the edges must form a continuous loop, but they can be
selected in any order. An alternative method to select several edges is
to Shift-left-drag a box around the edges. The box does not have to
completely enclose the edges; it only needs to enclose a portion of an
edge to select it. The edges will be selected when you release the mouse
button.
2. Create a face for the small pipe by selecting the four edges shown in Figure 2-14 and
then accepting the selected edges.
1. Specify the node density on the inlet and outlet of the large pipe.
EB
EE EF
EJ EI
ED
EG
EA
EH
EC
The edge will change color and an arrow and several circles will
appear on the edge.
c) Check that Apply is selected to the right of Grading in the Mesh Edges form and
that Successive Ratio is selected in the Type option menu.
The Successive Ratio option sets the ratio of distances between con-
secutive points on the edge equal to the specified Ratio.
Alternatively, you can slide the Ratio slider box (the small, gray rectan-
gle with a vertical line in its center that is located on the slider bar)
until 1.25 is displayed in the Ratio text box.
Note that Ratio changes to Ratio 1 and Ratio 2 when you select the
Double sided check box. In addition, the value you entered for Ratio is
automatically entered into both the Ratio 1 and the Ratio 2 text entry
boxes.
f) Select Interval count from the option menu under Spacing and enter a value of 10 in
the text entry box. Check that Apply is selected to the right of Spacing.
Figure 2-16 shows the mesh on the inlet and outlet edges of the large
pipe.
EB
EE EF
EJ EI
ED
EG
EA
EC EH
a) Select the edges marked EC, ED, EE, and EF in Figure 2-16.
b) Check that Apply is selected to the right of Grading in the Mesh Edges form and
click the Default button to the right of Grading.
GAMBIT will deselect the Double sided check box and set the Ratio to 1.
c) Check that Apply is selected to the right of Spacing and select Interval count from
the option menu.
d) Enter a value of 15 in the text entry box below Spacing and click the Apply button
at the bottom of the form.
Figure 2-17 shows the mesh on the straight edges of the large pipe.
EB
EE EF
EJ EI
ED
EA EG
EC EH
b) Check that Apply is selected to the right of Grading in the Mesh Edges form and
enter a value of 1 for the Ratio.
c) Check that Apply is selected to the right of Spacing, select Interval count from the
option menu, and enter a value of 6 in the text entry box below Spacing.
4. Mesh the two edges on the outer radius of the bend of the mixing elbow.
a) Select the edge marked EH in Figure 2-17. The arrow should point towards the
small pipe. Shift-middle-click the edge to reverse the direction of the arrow if
necessary.
! The arrow is small and you may have to zoom into the edge to see it.
It is located near the center of the edge.
b) Select the edge marked EI in Figure 2-17. The arrow should point towards the
small pipe. Shift-middle-click the edge to reverse the direction of the arrow if
necessary.
c) Check that Apply is selected to the right of Grading in the Mesh Edges form and
enter a value of 0.9 for the Ratio.
d) Check that Apply is selected to the right of Spacing, select Interval count from the
option menu, and enter a value of 12 in the text entry box below Spacing.
The mesh on the two edges on the outer radius of the bend is shown in
Figure 2-18.
EB
EE EF
EJ EI
ED
EG
EA
EH
EC
5. Set the grading for the inner bend of the mixing elbow.
b) Check that Apply is selected to the right of Grading in the Mesh Edges form and
enter a value of 0.85 for the Ratio.
You will not set a spacing on this edge, instead you will let GAMBIT
calculate the spacing for you when it meshes the face. You will mesh
the face using a mapped mesh, so the number of nodes on the inner
bend of the mixing elbow must equal the number of nodes on the outer
bend, and GAMBIT will determine the correct number of nodes for you
automatically.
e) Deselect the Mesh check box under Options and click the Apply button at the
bottom of the form.
You deselected the Mesh check box because at this point you do not
want to mesh the edge; you only want to apply the Grading to the edge.
GAMBIT will mesh the edge using the specified Grading when it
meshes the large pipe of the mixing elbow in the next step.
Figure 2-19 shows the edge meshing for the mixing elbow geometry.
Note that four of the vertices on this face are marked with an “E” in the
graphics window; they are End vertices. Therefore, GAMBIT will
select the Map Type of Scheme in the Mesh Faces form. See the
GAMBIT Modeling Guide for more information on Map meshing.
GAMBIT will ignore the Interval size of 1 under Spacing, because the
mapped meshing scheme is being used and the existing edge meshing
fully determines the mesh on all edges.
Notice that GAMBIT calculates the number of nodes on the inner bend
of the mixing elbow and displays these nodes before creating the mesh
on the face. The face will be meshed as shown in Figure 2-20.
Figure 2-20: Structured mesh on the large pipe of the mixing elbow
You will force GAMBIT to use the Map scheme to mesh the smaller
face.
b) In the Mesh Faces form, select Quad from the Elements option menu under
Scheme and Map from the option menu to the right of Type.
c) Retain the default Interval size of 1 under Spacing and click the Apply button at the
bottom of the form.
The structured mesh for the entire elbow is shown in Figure 2-21.
1. Remove the mesh from the display before you set the boundary types.
This makes it easier to see the edges and faces of the geometry. The mesh is not
deleted, just removed from the graphics window.
b) Select Off from the option menu to the right of Mesh near the bottom of the form.
Note that FLUENT 4 is shown as the chosen solver at the top of the form. The
Specify Boundary Types form displays different Types depending on the solver
selected.
iii. Change the Entity to Edges by selecting Edges in the option menu below Entity.
iv. Shift-left-click the main inflow for the mixing elbow in the graphics window
(marked EA in Figure 2-22) and click Apply to accept the selection.
EB
EA EK
vi. Check that INFLOW is still selected in the Type option menu and select the edge
marked EK in Figure 2-22 (the inlet for the small pipe). Click Apply to accept
the selection of the edge.
ii. Change the Type to OUTFLOW by selecting OUTFLOW in the option menu
below Type.
iii. Select the main outflow for the mixing elbow (the edge marked EB in Figure
2-22) and click Apply to accept the selection.
The inflow and outflow boundaries for the mixing elbow are shown
in Figure 2-23.
Figure 2-23: Inflow and outflow boundaries for the mixing elbow
Note that you could also specify the remaining outer edges of the
mixing elbow as wall boundaries. This is not necessary, however,
because when GAMBIT saves a mesh, any edges (in 2-D) on
which you have not specified a boundary type will be written out as
wall boundaries by default. In addition, when GAMBIT writes a
mesh, any faces (in 2-D) on which you have not specified a contin-
uum type will be written as FLUID by default. This means that you
do not need to specify a continuum type in the Specify Continuum
Types form for this tutorial.
This opens the Export Mesh File form. Note that the File Type is Structured
FLUENT 4 Grid.
b) Click Accept.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
2.5 Summary
This tutorial shows you how to generate a 2-D mesh using the “bottom-up” approach.
Since the mesh is to be used in FLUENT 4, it was generated in a single block, structured
fashion. Several other features that are commonly used for 2-D mesh generation were also
demonstrated, including entering vertices using a background grid, creating straight edges
and arcs, and specifying node distributions on individual edges. As compared to Tutorial
1, which omitted some details, all steps required to create a mesh ready to read into the
solver were covered, including how to set boundary types, choose a specific Fluent solver,
and finally write out the mesh file.
3.1 Prerequisites
This tutorial assumes you have worked through Tutorial 1 and you are consequently
familiar with the GAMBIT interface.
10
3.3 Strategy
In this tutorial, you will quickly create the basic geometry for a three-pipe intersection.
The basic geometry can be automatically meshed with tetrahedra, but your goal in this
tutorial is to create a conformal, hexahedral mesh for POLYFLOW, which requires some
decomposition of the geometry before meshing. Thus, the tutorial shows some of the typi-
cal procedures for decomposing a complicated geometry into “meshable” volumes.
The first decomposition involves using a brick to split off a portion of the three-pipe inter-
section. The resulting volume is described as a sphere “octant” (one-eighth of a sphere)
residing in the corner of the intersection, as shown in Figure 3-2. This volume, which is
very similar in shape to a tetrahedron, will therefore be meshed using GAMBIT's Tet
Primitive scheme. Note that this creates a hexahedral mesh in a tetrahedral topology; it does
not create tetrahedral cells.
The remaining geometry is then split into three parts, one for each pipe, as shown in
Figure 3-1. To do this, you will create an edge and three faces that are used to split the
volume into the required three parts. These volumes are meshed using GAMBIT's Cooper
scheme (described in detail in the GAMBIT Modeling Guide). This tutorial illustrates
three different ways to specify the source faces required by the Cooper scheme.
Two other helpful topics are covered in this tutorial: the use of journal files and the mesh-
ing of boundary layers. The journal file contains a record of all your command inputs to
GAMBIT. This file can be edited and your inputs can be converted into variable parame-
ters that allow subsequent geometries (with changes in key dimensions, for example) to be
quickly created and meshed. The boundary layer meshing tools in GAMBIT allow you to
control how the mesh is refined near walls and other boundaries.
3.4 Procedure
Start GAMBIT.
1. Choose the solver you will use to run your CFD calculation by selecting the following
from the main menu bar:
Solver → POLYFLOW
The choice of a solver dictates the options available in various forms (for
example, the boundary types available in the Specify Boundary Types form).
The solver currently selected is indicated at the top of the GAMBIT GUI.
The text entry box for Radius 2 can be left blank; GAMBIT will set
this value by default to be the same value as Radius 1.
iii. Select Positive Z (the default) in the list to the right of Axis Location.
b) Create the second pipe. Use the same Height and Radius 1 as above, and select
Positive X in the list to the right of Axis Location.
c) Create the third pipe. Use the same Height and Radius 1 as above, and select
Positive Y in the list to the right of Axis Location.
2. Click the FIT TO WINDOW command button , at the top left of the Global Control
toolpad, to view all three cylinders.
You can rotate the view by holding down the left mouse button and moving the
mouse. The cylinders are shown in Figure 3-3.
b) Click Apply.
a) Shift-left-click all of the volumes in the graphics window, and click Apply.
These volumes will be united into one volume. The completed geometry
is shown in Figure 3-4.
It is possible to automatically mesh this full geometry using the TGrid scheme. However, it
is not possible to automatically mesh this geometry with conformal hexahedra. In order
to generate a conformal hexahedral mesh, you must now decompose the geometry into
portions, each fulfilling the criteria of available hexahedral meshing schemes. In this
example, you will create a brick that will be used to split the three-pipe volume, forming a
sphere octant (one-eighth of a sphere) where the three pipes intersect. You will then
create an edge, and use it to form three faces inside the geometry. These faces will be
used to split the three-pipe intersection volume into three pipe sections.
1. Create a brick.
GAMBIT will set the Depth and the Height of the brick to be the same
as the Width if no values are entered in these fields in the form.
c) Click Apply.
2. Split the volume and create a sphere octant volume where the three pipes intersect.
If you split one volume with another volume, the following volumes will result:
6SOLW$ZLWK%
5HJLRQRILQWHUVHFWLRQ
$
7ZRYROXPHV
7ZRYROXPHV
6SOLW%ZLWK$
b) Left-click in the list box to the right of Split With Volume to accept the selection of
the three-pipe volume and make the Split With Volume list box active.
GAMBIT will split the three-pipe volume using the brick, leaving two
volumes: the three pipes (volume.2) and the sphere octant (volume.3).
c) Click Apply to accept the selected vertices and create an edge between them.
The edge is shown in Figure 3-7 and will appear yellow in the graphics
window.
edge
a) Create a face inside the geometry using the edge created in the previous step.
ii. Select a curved edge on one of the cylindrical surfaces that is connected to the
edge just selected.
b) Create a second face by selecting the blue edge, a different curved edge connected
to the blue edge, and the edge that closes the loop.
c) Create a third face by selecting the blue edge, the third curved edge connected to
the blue edge, and the edge that closes the loop.
The three faces are shown in Figure 3-9. It may be useful to remove the
volumes from the display; it is then easier to see the faces you created.
The volumes are not deleted, just removed from the graphics window.
To remove the volumes from the display, click the SPECIFY MODEL
5. Split the three-pipe volume using the faces created in the previous step.
GAMBIT will use all three faces (which are connected to each other)
to split the three-pipe volume into three smaller volumes (which repre-
sent the three pipes of the intersection). All three volumes are
connected with common geometry. The decomposed geometry is shown
in Figure 3-10 and is now ready to be meshed.
! Note that this step is not an essential part of the tutorial and is designed to
provide information on using journal files in GAMBIT.
Every time a GUI operation is performed in GAMBIT, the corresponding commands are
automatically written to a journal file. This journal file, therefore, provides a backup
copy of all the commands for the current session.
Journal files can be used to recreate a geometry or mesh that was created in a previous
session. You can view, run, and edit journal files in GAMBIT. See the GAMBIT User’s
Guide for more information on journal files.
a) Select the Edit / Run Mode option at the top of the form.
The File Name for the current journal file will appear in the form.
c) Click Accept.
This opens the Edit/Run Journal form. You can see the journal file for
the current session, showing every step completed.
a) Left-click at the end of the first line and press the Enter key.
GAMBIT will open a new line where you can type a command.
! If you run the journal file without executing the reset command,
GAMBIT creates new geometry on top of the existing geometry.
a) In the File Name text entry box at the bottom of the form, delete the text
“GAMBIT.#####/jou”.
##### is the process identifier for the current GAMBIT session. In the
above form, ##### is 20668.
b) Rename the journal file by typing 3pipe.geo in the File Name text entry box.
The file will be saved to your working directory. By saving the journal
file to another name, you ensure that it will not be overwritten or
appended.
4. Replay the steps you have taken in the current session.
a) Hold down the right mouse button in the TEXT EDIT FIELD (this name will be dis-
played in the Description window when the mouse cursor is over this field) of the
Edit/Run Journal form until a menu appears. Choose the Select All option in the
menu.
b) Repeatedly click the Step button at the bottom of the Edit/Run Journal form until a
cylinder appears in the graphics window.
GAMBIT has used the information in the journal file to recreate the
first cylinder you created in Step 2.
The Auto button allows you to automatically rerun a journal file. If the
Auto button is used, GAMBIT will automatically execute all lines that
are highlighted, and skip any lines that are not highlighted. GAMBIT
just used your journal file to redo the geometry creation and decompo-
sition for the three-pipe intersection. Each line of the journal file was
displayed in the Transcript window as it was executed.
It is necessary to turn off smoothing of the mesh in this example to prevent the boundary
layers from being smoothed out during the volume meshing.
Edit → Defaults…
This displays the types of meshing for which you can set defaults.
GAMBIT displays the Variables for which defaults are set in a list in the
Edit Defaults form.
AUTO_SMOOTH will appear in the text entry box at the bottom of the list and
its default value will appear in the Value text entry box.
Boundary layers are layers of elements growing out from a boundary into the domain.
They are used to locally refine the mesh in the direction normal to a face or an edge. A
single boundary layer can be attached to several face/edge pairs or volume/face pairs.
The direction of the boundary layer is indicated during picking with an arrow that points
towards the middle of the active face or volume.
1. Create boundary layers on the edges where the sphere octant intersects the pipes.
This defines the height of the first row of elements normal to the edge.
c) Move the slider box below Rows until the number of rows = 4.
This defines the total number of element rows. Notice that GAMBIT
updates the Depth automatically. The depth is the total height of the
boundary layer.
e) Select one of the three curved edges where the sphere octant intersects the pipes
(Figure 3-11).
f) Check that the arrow indicating the direction of the boundary layer is pointing
towards the origin (Gx, Gy, Gz). If it is not, Shift-middle-click the edge until the
arrow is pointing in the correct direction.
g) Select a second curved edge where the sphere octant intersects the pipes and
ensure that the arrow on the edge is pointing towards the origin.
i) Click Apply in the Create Boundary Layer form to apply the boundary layers to the
edges.
2. Repeat the above steps to create the same boundary layer on the three curved edges
where the three pipes intersect, as shown in Figure 3-12. Again, the arrows on the
edges must point towards the origin.
Figure 3-12: Boundary layers on the three edges where the pipes intersect
GAMBIT automatically selects Hex Elements and the Tet Primitive Type
under Scheme in the Mesh Volumes form, because the volume repre-
sents a logical tetrahedron. (NOTE: The Tet Primitive scheme divides a
logical tetrahedron into four logical-hexahedral blocks and creates
hexahedral mesh elements in each block. The Tet Primitive scheme does
not create tetrahedral mesh elements. (See the GAMBIT Modeling
Guide.))
b) Accept the default Interval size under Spacing in the Mesh Volumes form and click
the Apply button at the bottom of the form.
The mesh for the sphere octant is shown in Figure 3-13 Note the
boundary layers you applied on three faces of the sphere octant.
2. Remove the mesh from the display before you mesh the three pipes.
This makes it easier to see the edges and faces of the geometry. The mesh is not
deleted, just removed from the graphics window.
b) Select Off from the option menu to the right of Mesh near the bottom of the form.
You will now mesh the three pipes. These volumes will be meshed using GAMBIT’s
Cooper scheme (described in detail in the GAMBIT Modeling Guide). This tutorial illus-
trates three different ways to specify the source faces (the faces whose surface meshes are
to be swept through the volume to form volume elements) required by the Cooper scheme.
In the first example, you will modify the face vertex types for the side face of one pipe.
This is the safest way to ensure correct meshing. In the second example, you will enforce
the Submap scheme on the side face of the pipe. In the third example, you will enforce the
Cooper meshing scheme for the volume and hand-pick all the source faces.
1. Mesh one of the pipes by changing the vertex type on the wall face to Side and then
using the Cooper meshing scheme to mesh the volume.
By changing the vertex type to Side on the wall face of the pipe, you will enable
GAMBIT to use the Submap scheme on this face. The criteria for the Cooper
meshing scheme will then be fulfilled for the pipe, and the pipe can be meshed
using the Cooper scheme.
ii. Select the wall face of the pipe (shown in Figure 3-14) in the graphics
window. Note the vertex on the wall face marked with an “E” for End (where
the three pipes intersect).
Figure 3-14: Wall face of the first pipe volume showing the End vertex
iv. Select the vertex that was marked with an “E” in the graphics window (where
the three pipes intersect, as shown in Figure 3-14).
The vertex will be changed to Type “S” for Side. You will only see
the vertex label if you reselect the face. A message will appear in
the Transcript window stating that the vertex was set to type Side.
Note that Hex Elements and the Cooper Type are automatically
selected under Scheme in the Mesh Volumes form because you
changed the vertex type on the wall face to Side.
ii. Retain the default Interval size of 1 and click the Apply button at the bottom of
the form.
Figure 3-15: Pipe meshed by changing the vertex type on the wall face to Side
and using the Cooper meshing scheme
! It may be useful to remove the mesh from the display at this point; it is
then easier to see the faces of the geometry for the other two pipes. The
mesh is not deleted, just removed from the graphics window. To remove
the mesh from the display, click the SPECIFY MODEL DISPLAY
2. Mesh the second pipe using the Submap scheme on the wall face of the pipe and using
the Cooper meshing scheme to mesh the volume.
By enforcing the Submap scheme on the wall face of the pipe, GAMBIT will
automatically modify the vertex types on this face to honor the Submap scheme.
The criteria for the Cooper meshing scheme will then be fulfilled for the pipe,
and the pipe can be meshed using the Cooper scheme.
i. Select the wall face of the second pipe (shown in Figure 3-16) in the graphics
window.
Wall face of
second pipe
ii. Select Quad in the Elements option menu under Scheme, and select Submap
under Type.
You deselected the Mesh check box because at this point you do not
want to mesh the face; you only want to apply the meshing Scheme
to the face. GAMBIT will mesh the face using the specified
Scheme when it meshes the pipe volume.
Note that Hex Elements and the Cooper Type are automatically
selected under Scheme in the Mesh Volumes form because you
enforced the Submap scheme on the side face of the pipe.
ii. Retain the default Interval size of 1 under Spacing and click the Apply button at
the bottom of the form.
Figure 3-17: Pipe meshed using the Submap scheme for the wall face of the pipe and the
project scheme for the volume
! It may be useful to remove the mesh from the display at this point; it is
then easier to see the faces of the geometry for the last pipe.
3. Mesh one of the pipes by hand-picking the source faces and then using the Cooper
meshing tool.
b) Select Hex in the Elements option menu under Scheme, and select Cooper under
Type.
c) Left-click in the Sources list box in the form, and then pick the source faces for
the mesh by selecting all the faces of the pipe except the pipe wall. The faces are
marked A through D in Figure 3-18.
The four faces to be selected are at opposite ends of the pipe, as shown
in Figure 3-18. You can select the faces in the graphics window, or you
can use the Sources pick list.
B A
Figure 3-18: Source faces used to mesh one of the pipe volumes
using the Cooper meshing scheme
d) Retain the default Interval size of 1 under Spacing and click the Apply button at the
bottom of the form.
You will only display the face meshes at this point because displaying the
volume meshes would create a cluttered view in the graphics window.
c) Select On from the option menu to the right of Mesh near the bottom of the form.
1. Select the EXAMINE MESH command button at the bottom right of the Global
Control toolpad.
This creates a section through the grid that is spherical in shape. For
the three-pipe geometry, a spherical section displays more useful
information than a planar section.
The 3D Element type selected by default at the top of the form is a brick
c) Select the + option under Cut Orientation near the bottom of the form.
The “+” option indicates that only elements on the positive side of the
cut are displayed. For a sphere, this means that only elements on the
inside of the sphere will be visible. The “0” option displays elements on
the cut, and the “-” option displays elements on the negative side of the
cut (the outside of the sphere in this case).
This divides the graphics window into four quadrants and displays a
different view of the spherical section of the grid in each quadrant.
e) Hold down the left mouse button on the X slider box in the Examine Mesh form
and move it until the spherical cut is centered in the x direction in the graphics
window.
f) Move the Y and Z slider boxes to center the spherical cut in the y and z directions
in the graphics window. The graphics window display is shown in Figure 3-20.
g) Move the R slider box in the Examine Mesh form to view the mesh on different
spherical cuts in the graphics window.
h) Hold down the left mouse button on the GRAPHICS-WINDOW SASH anchor, the
small gray box in the center of the four quadrants of the graphics window, and
drag it diagonally across the graphics window to the bottom right corner.
The spherical cut of the mesh will be removed and the face meshes will
be restored.
1. Remove the mesh and boundary layers from the display before you set the boundary
types.
This makes it easier to see the edges and faces of the geometry. The mesh and
boundary layers are not deleted, just removed from the graphics window.
b) Select Off from the option menu to the right of Mesh near the bottom of the form.
c) Click Apply.
d) Select the check box to the left of B. Layers and select Off from the option menu to
the right of Visible near the bottom of the form.
iv. Shift-left-click the end of one of the pipes (the face marked A in Figure 3-21)
and click Apply to accept the selection.
C
A
ii. Check that ELEMENT_SIDE is still selected in the Type option menu and Shift-
left-click the end of one of the other pipes in the graphics window (the face
marked B in Figure 3-21).
iv. Set the Type for the end of the third pipe (the face marked C in Figure 3-21) to
be ELEMENT_SIDE, using the Name outflow2.
c) Define wall boundary types for the walls of the three-pipe intersection.
ii. Check that ELEMENT_SIDE is still selected in the Type option menu and pick
all the wall faces (the outer walls of the three pipes and the outer face of the
sphere octant) in the graphics window.
Note that when GAMBIT writes a mesh, any volumes (in 3-D) on
which you have not specified a continuum type will be written as
FLUID by default. This means that you do not need to specify a con-
tinuum type in the Specify Continuum Types form for this tutorial.
b) Click Accept.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
3.5 Summary
In this tutorial, you created geometry consisting of three intersecting pipes. Before creat-
ing the mesh, you decomposed the three-pipe geometry into four volumes: the three indi-
vidual pipes and the wedge-shaped corner of the intersection (the sphere “octant”). These
constituent volumes were readily meshed using GAMBIT’s Cooper and Tet Primitive
meshing schemes.
In this tutorial, you will create the geometry for a burner using a top-down geometry con-
struction method in GAMBIT (creating a volume using solids). You will then mesh the
burner geometry with an unstructured hexahedral mesh.
In this tutorial you will learn how to:
• Move a volume
• Subtract one volume from another
• Shade a volume
• Intersect two volumes
• Blend the edges of a volume
• Create a volume using the sweep face option
• Prepare the mesh to be read into FLUENT/UNS
4.1 Prerequisites
This tutorial assumes that you have worked through Tutorial 1 and you are consequently
familiar with the GAMBIT interface.
20
y
30
z x
20
12 10
4
40
4.3 Strategy
In this tutorial, you will create a combustion chamber geometry using the “top-down”
construction method. You will create volumes (in this case, bricks and cylinders) and use
Boolean operations to unite, intersect, and subtract these volumes to obtain the basic
geometry. Finally, using the “blend” command, you will round off some edges to
complete the geometry creation.
For this model, it is not possible to simply pick the geometry and mesh the entire domain
with hexahedral elements, because the Cooper tool (which you will be using in this
tutorial) requires two groups of faces, one group topologically parallel to a sweep path,
and the other group topologically perpendicular. However, the rounded (blended) edges
fit in neither group. See the GAMBIT Modeling Guide for a more detailed description of
the Cooper tool. You need to decompose the geometry into portions that can be meshed
using the Cooper tool. There are several ways to decompose geometry in GAMBIT. In this
example, you will use a method whereby portions of the volume around the blend are split
off from the main volume. A detailed description of the decomposition strategy for the
combustion chamber is given below.
Note that there are several faces in the geometry for which the default meshing scheme is
the Pave scheme; most of these faces are perpendicular to the z direction. There are also
geometrical protrusions in the z direction, so this should be chosen as the main direction
for the Cooper meshing scheme. To make this possible, the paved faces in the x and y
directions (the two symmetry planes in the geometry shown in Figure 4-2) must be
changed to use the Submap or Map meshing scheme.
Figure 4-2: The two symmetry planes in the combustion chamber geometry
By default, GAMBIT selects the Pave meshing scheme for these two faces because each
has a rounded edge where the blend occurs. If you split off the rounded corners of both
faces and connect them through a volume, you can use the Submap meshing scheme on
the remaining faces, and hence the Cooper meshing scheme for the volume.
Instead of creating two faces, one on each symmetry plane, you will create a face at the
junction of the two blended edges (face A in Figure 4-3). This face will then be swept in
two directions onto the symmetry planes (creating faces B and C in Figure 4-3), to split
the volume into three parts. The three volumes can then be meshed individually using the
Cooper tool.
B A
Figure 4-3: Faces created at the blended edges and on the symmetry planes
This tutorial also demonstrates a few ways of controlling the mesh density and the mesh-
ing schemes used on individual faces. You will mesh the small quarter-circle face that
forms the second inlet with a Tri Primitive scheme and a finer mesh size. Similarly, you will
mesh the annular face of the primary inlet with a fine mapped mesh. To meet the require-
ments of the Cooper tool, you will also need to create a mapped mesh on the face between
these two faces. Finally, you will use the automatic Cooper tool to mesh the remaining
faces and the volume.
4.4 Procedure
Start GAMBIT.
1. Choose the solver you will use to run your CFD calculation by selecting the following
from the main menu bar:
Solver → FLUENT/UNS
The choice of a solver dictates the options available in various forms (for
example, the boundary types available in the Specify Boundary Types form).
The solver currently selected is indicated at the top of the GAMBIT GUI.
Edit → Defaults…
In this tutorial, you will change the default interval size used for meshing. The
mesh spacing is, by default, based on the interval size parameter, which you
will modify in the Edit Defaults form. The value you enter should be the esti-
mated average size of a mesh element in the model. This value will appear as
the default Interval size on all meshing forms. You will be able to change it on
the meshing forms, if required.
2. Select the INTERVAL radio button near the top of the form.
The text entry box for Radius 2 can be left blank; GAMBIT will set this
by default to be the same value as Radius 1.
d) Click Apply.
2. Repeat the steps above to create a cylinder of Height = 20 and Radius 1 = 10 along the
Positive Z axis.
3. Click the FIT TO WINDOW command button , at the top left of the Global Control
toolpad, to see the cylinders created.
The two cylinders are shown in Figure 4-4. Hold down the left mouse button
and move the mouse to rotate the view in the graphics window. You can zoom
out from the current view by holding down the right mouse button and pushing
the mouse away from you.
4. Move the first cylinder you created so that it is at the front of the large cylinder.
b) Select Move (the default) under Volumes in the Move / Copy Volumes form.
d) Enter a Global translation vector of (0, 0, 8) to move the cylinder 8 units in the z
direction.
Note that GAMBIT automatically fills in the values under Local as you
enter values under Global.
e) Click Apply.
The two cylinders are shown in Figure 4-5. Notice that the small cylin-
der has been moved from the back of the large cylinder to the front.
1. Create one volume from the two cylinders by subtracting one cylinder from the other.
The order of selecting the volumes is important. For example, Figure 4-6
shows the difference between subtracting volume B from volume A, and vice
versa.
$ -%
5HJLRQRILQWHUVHFWLRQ
%-$
b) Left-click in the list box to the right of Subtract Volume to accept the selection of
volume.2 and make the Subtract Volume list box active.
! Alternatively, you could continue to hold down the Shift key and click
the right mouse button in the graphics window to accept the selection
of the large cylinder and move the focus to the Subtract Volume list
box.
Selecting the cylinders in this order ensures that the small cylinder is
subtracted from the large cylinder and not vice versa.
1. Click the RENDER MODEL command button , in the middle of the bottom row of
the Global Control toolpad, to create a shaded view of the volume.
2. Hold down the left mouse button and drag the mouse to rotate the graphics display
and see the cylindrical hole created in the large cylinder (see Figure 4-7).
3. To return to the unshaded view, right-click on the RENDER MODEL command button
in the Global Control toolpad and select from the resulting list.
In this step, you will create a brick that will be intersected with the cylindrical
volume. Three quarters of the cylindrical volume will be removed, leaving the
volume for the entrance of the burner.
1. Create a brick that will be intersected with the cylindrical volume already created.
The text entry boxes for Depth and Height can be left blank; GAMBIT
will set these values by default to be the same value as the Width, to
create a cube.
c) Click Apply.
The order in which you select the two volumes is not important when
you are intersecting them. The cylindrical volume will be trimmed so
that only the part inside the brick remains, as shown in Figure 4-9.
a) Enter a value of 20 for the Width of the brick, 30 for the Depth, and 40 for the
Height.
b) Change the Direction to +X +Y -Z by selecting this option in the option menu to the
right of Direction.
c) Click Apply.
2. Click the FIT TO WINDOW command button at the top left of the Global Control
toolpad to see the brick created.
The order in which you select the two volumes is not important when
you are uniting them. The brick and the cylindrical volume will be
united as shown in Figure 4-10.
1. Blend (round off) two edges of the chamber geometry to give it a more rounded
shape.
Edges to be
blended
ii. Select Constant radius round (the default) under Options in the Edge Blend Type
form.
iv. Click Apply in the Edge Blend Type form and Close the form.
The burner geometry with the blended edges is shown in Figure 4-12.
For this model, it is not possible to simply pick the geometry and mesh it with a
hexahedral mesh. The Cooper meshing scheme requires that all “source” faces
are topologically parallel, and that all other faces can be meshed using the Map or
Submap meshing scheme. However, the curved faces resulting from the blend
operation do not satisfy the Cooper criteria. Therefore, you will need to decom-
pose the geometry into portions that are each suitable for the Cooper tool. There
are several ways to decompose geometry in GAMBIT. In this example, you will
use a method whereby portions of the volume around the blend are split off from
the main volume. To do this, you will create a vertex near the junction of the two
blended edges. You will then use this vertex to create straight edges, and use these
edges to create a face. This face will then be swept in two directions to create two
volumes. These two volumes will be used to split the burner volume into three
parts. It will then be possible to mesh each of these parts individually using the
Cooper tool.
To zoom in to an area of the graphics window, hold down the Ctrl key
and use the left mouse button to draw a box around the area you want
to view.
e) Click Apply.
The vertex will be visible in the graphics window as a white cross near
where the two blended edges meet. See vertex B in Figure 4-14.
c) Click Apply to accept the selected vertices and create two edges.
F
E
4. Create a volume by selecting the new face and sweeping it along the direction defined
by an edge.
b) Left-click in the list box to the right of Edge to make the Edge list box active.
d) Select the Perpendicular radio button under Type in the Sweep Real Faces form.
The perpendicular option will sweep the tilted face you just created to a
face that is perpendicular to the driving edge of the sweep (the edge
marked G in this example).
e) Select Draft (the default) under Option and enter 0 for the Angle.
b) Left-click in the list box to the right of Edge to make the Edge list box active.
Face H
Edge J
! Again, the arrow on this edge should be pointing away from the
selected face.
d) Select Perpendicular under Type in the Sweep Real Faces form, and enter 0 for the
Angle.
e) Click Apply.
6. Split the large burner volume using the two smaller volumes.
If you split one volume with another volume, the following volumes will result:
6SOLW$ZLWK%
5HJLRQRILQWHUVHFWLRQ
$
7ZRYROXPHV
7ZRYROXPHV
6SOLW%ZLWK$
c) Left-click in the list box to the right of Split With Volume to make the Split With
Volume list box active.
d) Select the first volume created using the sweep face method.
e) Click Apply.
GAMBIT will use both of the two smaller volumes (which are con-
nected to each other) to split the large burner volume into three smaller
volumes. All three volumes are connected with common geometry. The
complete decomposed burner geometry is shown in Figure 4-22 and is
now ready to be meshed.
It is possible to use the Cooper tool to automatically mesh the entire model with a
uniform mesh size, but this tutorial will instead demonstrate a few ways of con-
trolling the mesh density and the meshing schemes used. Typically, the Cooper tool
will use the Pave meshing scheme on all source faces, if certain criteria are not
met. See the GAMBIT Modeling Guide for more information on GAMBIT’s
meshing tools.
The two small volumes will be meshed first using the Cooper meshing scheme. For
the remaining volume, you will mesh some faces first. In this case, you will mesh
the small quarter-circle face with a Tri Primitive scheme and a finer mesh size.
Similarly, you will mesh the annular face of the inlet with a fine mapped mesh.
However, to ensure that the face in-between the quarter-circle and the annular
faces has a mapped (or submapped) mesh, which is required for the Cooper tool,
you will mesh this face before meshing the annular face. Finally, you will use the
automatic Cooper tool to mesh the remaining faces and volume.
In this case the criteria for the Cooper scheme are not fulfilled. This is
because GAMBIT will not automatically mesh the back face of the
volume using the Map or Submap meshing scheme, because the angle at
one of the face corners is not close enough to 90° for it to be automati-
cally classified with the End vertex type, which is a requirement for
automatic Map meshing on a four-sided face. However, you can force
GAMBIT to use the Cooper scheme on this volume by selecting it and
then manually picking the source faces (the faces whose surface meshes
are to be swept through the volume to form volume elements). When
you click Apply, GAMBIT will automatically enforce the Submap
scheme on all side faces not already set to use the Map or Submap
schemes, and will modify the vertex types to honor the scheme selected.
See the GAMBIT Modeling Guide for more information on using the
meshing schemes.
b) Select Hex from the Elements option menu under Scheme in the Mesh Volumes
form and select Cooper from the Type option menu.
c) Left-click in the Source list box (which will turn yellow), and then select the faces
marked K and L in Figure 4-23 as the Source faces.
! If you select the wrong face, and the face you want is the one next to
the face selected, Shift-middle-click on the face to deselect it and
select the face next to it. You can also click Reset in the Mesh
Volumes form to reset everything you set in the form.
d) Retain the default Interval size of 2 under Spacing in the Mesh Volumes form.
Note that this is the interval size for meshing that you set as the default
in Step 2 of this tutorial.
Notice that all faces are meshed before GAMBIT meshes the volume.
The mesh is shown in Figure 4-24.
Figure 4-24: Mesh generated for the first small volume in the burner geometry
2. Generate a mesh for the other small volume in the burner geometry.
b) Select Hex from the Elements option menu under Scheme in the Mesh Volumes
form and select Cooper from the Type option menu.
c) Left-click in the Source list box (which will turn yellow), and select the faces
marked M and N in Figure 4-25 as the Source faces.
! If you select the wrong face, and the face you want is the one next to
the face selected, Shift-middle-click on the face to deselect it and
select the face next to it. You can also click Reset in the Mesh
Volumes form to deselect all faces, and then select the correct faces.
d) Retain the default Interval size of 2 under Spacing in the Mesh Volumes form and
click the Apply button at the bottom of the form.
Figure 4-26: Mesh generated for the second small volume in the burner geometry
Next, you will mesh the small face where the burner entrance and the burner
chamber meet, and the face at the entrance to the burner. In GAMBIT, you
can “pre-mesh” any source faces on a volume by selecting a meshing scheme
and size, to improve the quality of the final mesh.
3. Mesh the small face where the burner entrance and the burner chamber meet.
b) Enter 0.5 for the Interval size under Spacing and click the Apply button at the
bottom of the form.
GAMBIT will automatically select the Map Scheme in the Mesh Faces
form. See the GAMBIT Modeling Guide for more information on the
Map meshing scheme.
b) Retain the default Interval size of 2 under Spacing and click the Apply button at the
bottom of the form.
Figure 4-29: Mesh on curved face along the entrance to the burner
GAMBIT will automatically select the Map Scheme in the Mesh Faces
form.
b) Enter 1 for the Interval size under Spacing and click the Apply button at the bottom
of the form.
U X
S
W
T
This accepts the volume you selected as the one to be meshed and the
source faces GAMBIT has chosen for the Cooper meshing scheme, and
starts the meshing. The complete mesh is shown in Figure 4-32.
Notice that hidden line removal has been turned on in Figure 4-32 to
make the mesh easier to see. To turn on hidden line removal, hold down
the option.
7. You can view a shaded display of the mesh using the RENDER MODEL command
button in the Global Control toolpad
a) Hold down the right mouse button on the RENDER MODEL command button
c) When you are finished, return to the wireframe view of the model, by selecting the
1. Select the EXAMINE MESH command button at the bottom right of the Global
Control toolpad.
The 3D Element type selected by default at the top of the form is a brick
c) Hold down the left mouse button on the X slider box and move it to view slices of
the mesh with different x values.
e) Select Range under Display Type, and then click with the left mouse button on the
histogram bars that appear at the bottom of the Examine Mesh form to highlight
elements in a particular quality range.
Figure 4-34 shows the view in the graphics window if you click on the
fifth bar from the left on the histogram (representing cells with a skew-
ness value between 0.4 and 0.5). These low values for the maximum
skewness indicate that the mesh is acceptable.
f) Close the Examine Mesh form by clicking the Close button at the bottom of the
form.
1. Remove the mesh from the display before you set the boundary types.
This makes it easier to see the edges and faces of the geometry. The mesh is not
deleted, just removed from the graphics window.
b) Select Off from the option menu to the right of Mesh near the bottom of the form.
iii. Shift-left-click the face marked A in Figure 4-35 and click Apply to accept the
selection.
iv. Check that VELOCITY_INLET is still selected in the Type option menu, select
the face marked B in Figure 4-35, and click Apply.
ii. Select the face marked C in Figure 4-35 and click Apply to accept the
selection.
c) Define symmetry boundary types for the two faces normal to the x axis.
iii. Select the two faces on the left side of the geometry as you look at it from the
front (the faces marked D and E in Figure 4-36). Accept the selection of the
faces.
d) Define symmetry boundary types for the two faces normal to the y axis.
ii. Check that SYMMETRY is still selected in the Type option menu and select the
two faces on the bottom of the geometry (the faces marked F and G in Figure
4-36). Accept the selection of the faces.
Note that you could also specify the remaining outer faces of the
model as WALL boundaries. This is not necessary, however,
because when GAMBIT saves a mesh, any external faces (in 3-D)
for which you have not specified a boundary type will be written
out as WALL boundaries by default.
This opens the Export Mesh File form. Notice that the File Type at the top of the
form is UNS / RAMPANT / FLUENT 5.
b) Click Accept.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
4.5 Summary
In this tutorial, you created the geometry and hexahedral mesh for a 3-D combustion
chamber using a top-down construction approach. The use of Boolean operations for
uniting, subtracting, and intersecting volumes was demonstrated. The blend volumes
command was used to create a rounded shape on the edges of the combustion chamber.
Next, the geometry was decomposed into smaller volumes for which the Cooper meshing
scheme could be used. Several different ways of meshing the source faces needed by the
Cooper scheme were shown.
In this tutorial you will import an IGES file containing the geometry for a sedan automo-
bile, clean up the geometry, and mesh it with triangles and tetrahedra.
In this tutorial you will learn how to:
• Import an IGES file
• Specify the way in which the geometry will be colored
• Connect edges, using a manual and an automatic method
• Merge faces
• Create a triangular surface mesh
• Mesh a volume with a tetrahedral mesh
• Prepare the mesh to be read into FLUENT 5
5.1 Prerequisites
This tutorial assumes you have worked through Tutorial 1 and, therefore, that you are
familiar with the GAMBIT GUI.
5.3 Strategy
In this tutorial, you will create a fully unstructured tetrahedral mesh around a car-body
geometry imported as an IGES file. This tutorial illustrates the steps you would typically
follow to prepare an imported CAD geometry for meshing. The imported geometry is
“dirty”—that is, there are gaps between some of the surfaces that make it unsuitable for
creating a CFD mesh. You will first clean up the geometry using the tools available in
GAMBIT.
Most of the gaps can be fixed automatically either during mesh import or subsequently by
means of the “connect edge” command. The original CAD geometry is not modified
during the fixing process; the modifications required to eliminate the gaps are made using
“virtual” geometry, which lies on top of the “real” geometry. Some edges in the original
geometry are very short and will be eliminated using the “vertex connect” command.
Other edges are not automatically connected, because they are farther apart than the speci-
fied tolerance. You will connect such edges manually.
The imported geometry includes a number of small surfaces, the edges of which may
unnecessarily constrain the mesh generation process. Using the “merge faces” command,
GAMBIT allows you to easily combine these surfaces prior to meshing. You can then
have GAMBIT automatically create a triangular mesh on the car body.
Since the imported geometry consists only of the car body, you need to create a suitable
domain around the car in order to conduct a CFD analysis (this is loosely equivalent to
placing the car in a wind tunnel). The remainder of the tutorial shows how to add a real
box around the car body, use virtual geometry to create some missing faces, and finally
stitch all faces together into a single volume. This volume can then be meshed (without
any decomposition) using a tetrahedral meshing scheme.
5.4 Procedure
from the GAMBIT installation area in the directory path to your working direc-
tory (for example, /home/user/tutorial/).
2. Start GAMBIT.
The choice of a solver dictates the options available in various forms (for
example, the boundary types available in the Specify Boundary Types form).
The solver currently selected is indicated at the top of the GAMBIT GUI.
1. Select the No stand-alone vertices and No stand-alone edges check boxes under Options.
This option instructs GAMBIT not to read in any vertices that do not belong to
faces, edges, or volumes. This option should be used when you want only the
surfaces. The vertices can be deleted after the geometry has been read into
GAMBIT, but this option eliminates the extra step.
clicking on the SPECIFY COLOR MODE command button in the Global Control
toolpad.
4. Set the connect tolerance to 10% of the shortest edge by selecting the Virtual Cleanup
toggle and specifying the % Shortest Edge at 10.
The IGES file for the sedan body will be read into GAMBIT, and is shown in
Figure 5-2. Notice that the geometry first appears with orange edges. As the
repair operations progress, the edges turn light blue .
The imported IGES geometry is “dirty”—that is, there are a few short edges and
gaps between the faces that need to be repaired. In this step, you will eliminate the
short edges.
GAMBIT will highlight (in white) the shortest edge—along with its
label—in the graphics window.
d) Zoom in near the highlighted edge by pressing the Ctrl key while using the mouse
to drag a box around the edge.
Figure 5-3 shows the general area on the sedan that contains the short-
est edge. Figure 5-4 shows a zoomed view of the edge.
Zoom region
c) Click Apply.
d) Select Defaults from the Edit menu on the main menu bar, and change the value of
the GEOMETRY/VERTEX/CONNECT_REMOVE_SHORT_EDGE variable to
1.
f) Click the FIT TO WINDOW command button at the top left of the Global
Control toolpad to see the full sedan in the graphics window.
g) Select the Virtual (Tolerance) option to activate the Highlight shortest edge button on
the Connect Vertices form.
h) Click the Highlight shortest edge button and repeat steps (a), (b), and (c) to eliminate
the next shortest edge (see Figure 5-5).
i) Repeat steps (f) and (g) to verify that the shortest edge is now acceptable.
The imported IGES geometry is still “dirty”—that is, there are a few gaps remaining
between the faces that make it unsuitable for creating a mesh. In this step, you will
“clean up” the geometry using GAMBIT’s tools.
1. Connect all edges in the geometry that are less than a specified tolerance apart using
an automatic method.
You want GAMBIT to connect all real and virtual edges that are within
a tolerance distance of each other.
This option ensures that edges that do not match up correctly will be
connected. GAMBIT will perform edge splits and then reconnect the
geometry; an example is shown in Figure 5-6.
7ZRHGJHV 7KUHHHGJHV
e) Click Apply.
A few more edges turn blue in the graphics window as they are
connected.
! The edges on the symmetry plane will remain orange because they
do not have any other edges with which they can be connected.
When GAMBIT has finished connecting the edges, three of the edges
will still be orange (apart from those on the symmetry plane). You
could increase the Shortest Edge % and connect the edges again, but
instead you will learn how to manually force the connections.
You will use the manual approach in this case because there are only a
few more edges to connect. The manual approach is useful when the
gaps between the edges are of the order of the shortest edge in size, or
larger, because the Shortest Edge % connection would require a size so
large that other faces would become collapsed.
a) Tilt the geometry forward slightly by holding down the left mouse button in the
graphics window and then moving the mouse pointer downward. Then turn the
geometry to view the front bumper by holding down the left mouse button in the
graphics window and moving the mouse pointer to the right.
b) Zoom in near the front of the car by holding down the Ctrl key on the keyboard
while dragging a box around the front of the car with the left mouse button. Figure
5-7 shows the area on the sedan where you will find the unconnected edges, and
Figure 5-8 shows a zoomed view of the front of the sedan. You should clearly see
three pairs of orange edges at the front of the sedan.
You will not be able to see that there are two edges to the pair, but the
fact that the edges are orange indicates that there are two unconnected
edges there.
Zoom region
c) Select Pick from the option menu to the right of Edges in the Connect Edges form.
You will force GAMBIT to manually connect the edges that you select,
using GAMBIT’s virtual geometry.
e) Select one pair of orange edges by holding down the Shift key and dragging a
small box across the edges with the left mouse button.
! The box does not have to completely enclose the edges; it only needs
to enclose a portion of an edge to select it. The edges will be selected
when you release the mouse button.
g) Repeat steps (e) and (f) to connect the other two pairs of edges.
3. Click the FIT TO WINDOW command button at the top left of the Global Control
toolpad to see the full sedan in the graphics window.
In many cases, the IGES model contains more detail than you need for meshing. The
imported geometry for the sedan includes a number of small faces, the edges of
which may constrain the mesh generation process unnecessarily. In GAMBIT, you
can merge faces together prior to meshing.
b) Zoom in to the hood of the sedan by holding down the Ctrl key on the keyboard
while dragging a box around the hood of the car with the left mouse button.
c) Select the three faces on the top of the hood as shown in Figure 5-9, either by
selecting one at a time, or by selecting all three faces within a box.
d) Click Apply to accept the selected faces and merge them into one face, as shown in
Figure 5-10.
2. Merge four faces on the trunk of the car (just behind the rear window) using the above
method. The faces to be merged are shown in Figure 5-11, and the merged faces are
shown in Figure 5-12.
3. Merge three faces near the rear end of the trunk of the car using the above method.
The faces to be merged are shown in Figure 5-13, and the merged faces are shown in
Figure 5-14.
4. Click the FIT TO WINDOW command button at the top left of the Global Control
toolpad to see the full sedan in the graphics window.
The top portion of the trunk should now consist of two large faces, as shown in
Figure 5-15.
a) Select all the faces on the car body by holding down the Shift key and using the
left mouse button to drag a box around the whole geometry in the graphics
window.
! It may take a while for GAMBIT to select all the faces. GAMBIT is
analyzing each face to determine suitable meshing schemes. You
should wait until all the edges turn red before going on to the next
step.
b) Select Tri from the hidden Elements menu under Scheme, and select Pave from the
Type option menu.
c) Enter an Interval size of 0.03 under Spacing and click the Apply button at the
bottom of the form.
GAMBIT will mesh the car body surfaces. A portion of the mesh is
shown in Figure 5-16.
! This will make it easier to see what to do in the next steps. The mesh is not
deleted, just removed from the graphics window.
b) Select Off from the option menu to the right of Mesh near the bottom of the form.
1. Create a brick.
d) Click Apply.
2. Click the FIT TO WINDOW command button at the top left of the Global Control
toolpad to see the full sedan and the brick just created in the graphics window.
b) Select Move (the default) under Volumes in the Move / Copy Volumes form.
d) Enter (0, 2.5, 2.5) under Global to move the brick 2.5 units in the y direction and
2.5 units in the z direction.
Note that GAMBIT automatically fills in the values under Local as you
enter values under Global.
e) Click Apply.
4. Click the FIT TO WINDOW command button at the top left of the Global Control
toolpad to see the full sedan and the brick in the graphics window.
You cannot simply subtract the car from the brick to produce the flow domain
around the car, because you used “virtual geometry” to clean up the car body and
GAMBIT cannot perform Boolean operations on virtual geometry. Instead, you must
“stitch together” a virtual volume from the virtual faces of the car and the real faces
of the brick. To do this you will delete the volume of the brick, leaving the lower
geometry (the faces) behind. In the next steps, you will create virtual edges and faces.
b) Deselect the Lower Geometry option in the Delete Volumes form and click Apply.
The brick volume will be deleted, but all its components (faces, edges,
and vertices) will remain in the geometry, because you deselected the
Lower Geometry option.
In this step, you will create two straight edges that will be used in the next step to
create faces on the symmetry plane.
1. Split the bottom edge of the symmetry plane into three sections.
You will split the edge by creating a point on the edge and then using
this point to split the edge.
c) Use the Ctrl key and the left mouse button to zoom in to the sedan and the line at
the bottom of the symmetry plane, similar to the view shown in Figure 5-18.
d) Select the blue line at the bottom of the symmetry plane in the graphics window.
e) Enter a U Value of 0.64 in the Split Edge form and click Apply.
The edge is split into two parts and a vertex is created near the front
bumper of the sedan, as shown in Figure 5-18.
f) Select the longer edge of the two edges just created in the graphics window.
g) Enter a U Value of 0.57 in the Split Edge form and click Apply.
Again, the position of the vertex relative to the sedan is more important
than the exact U Value.
The edge will be split and a second vertex created near the rear bumper
of the sedan, as shown in Figure 5-18.
Edge to be split
Figure 5-18: Bottom edge of symmetry plane is split into three edges
2. Create straight edges between the two points just created and two points on the sedan.
You must use Virtual because the vertex to be used on the car body is a
virtual vertex.
b) Zoom in to the front of the sedan, so that you can see the front bumper and the
first vertex created on the line at the bottom of the symmetry plane, as shown in
Figure 5-19.
c) Shift-left-click the first vertex created on the bottom line of the symmetry plane.
d) Shift-left-click the vertex on the sedan that is also on the symmetry plane, as
shown in Figure 5-19.
! Make sure that you select the vertex that is on the symmetry plane as
well as the sedan. The vertex will be on an orange line if it is on both
the symmetry plane and the sedan geometry.
e) Click Apply to accept the selected vertices and create a line, as shown in Figure 5-
19.
3. Create a straight line from the second vertex created on the bottom line of the symme-
try plane to the rear bumper of the sedan, as shown in Figure 5-20.
! Again, make sure you select the vertex that is on both the sedan geometry
and the symmetry plane.
In this step, you will create two new faces on the symmetry plane by stitching edges
together. You will use the existing symmetry plane on the brick as a host. The two
faces you create in this step will be used to create a volume in the next step.
You must use Virtual because the edges to be selected on the car body
are virtual edges.
b) Shift-left-click the edges underneath the sedan, the two small diagonal edges on
the symmetry plane, and the middle edge at the bottom of the symmetry plane.
! The area under the sedan where the edges to be selected are located
is shown in Figure 5-21, and the edges to be selected are shown in
Figure 5-22.
Figure 5-21: Area under sedan where edges to be selected are located
c) Select the Host check box in the Create Face From Wireframe form.
e) Shift-left-click the back face of the brick (the symmetry plane) in the graphics
window, as shown in Figure 5-23.
The tolerance value (0.001) must be less than or equal to the tolerance
used for the connect operation (0.00163959). (See page 5-12.)
b) Left-click in the Edges list box in the Create Face From Wireframe form.
e) Shift-left-click the back face of the brick (the symmetry plane) in the graphics
window, as shown in Figure 5-23.
a) Left-click the black arrow to the right of the Faces list box.
This opens the Face List form. There are two types of pick-list forms:
Single and Multiple. In a Single pick-list form, only one entity can be
selected at a time. In a Multiple pick-list form, you can select multiple
entities.
i. Select the two faces at the bottom of the Available list in the Face List form.
The two faces will be moved from the Available list to the Picked list,
and they will be highlighted in the graphics window.
iii. Check that the two faces highlighted in the graphics window are the correct
faces that you should have created in the previous steps.
Figure 5-22 and Figure 5-24 show the faces that you should have
created.
b) Click Reset in the Summarize Faces form to deselect the two faces in the graphics
window.
b) Select the symmetry plane in the graphics window (as shown in Figure 5-23) and
remember the label name (e.g., face.149).
c) Left-click the black arrow to the right of the Faces list box.
i. Click on the All −> button to move all the faces from the Available list to the
Picked list.
ii. Select the name of the symmetry plane in the Picked list.
iii. Click the < − − − button to move the symmetry plane face back into the
Available list.
d) Click Apply in the Stitch Faces form to accept the selection of the faces and create
the volume.
When you created the mesh on the faces of the sedan, you used a fine mesh. For the
volume, you will create a more coarse mesh, so you will need to instruct GAMBIT to
gradually change the mesh density between the coarse and fine meshes. To do this,
you will specify the distribution of nodes along some edges in the geometry.
1. Define the grid density on three edges of the geometry underneath the sedan.
a) Select the edges marked A, B, and C in Figure 5-25 (the two small edges you
created underneath the sedan and the middle section of the edge underneath the
sedan that you split into three sections).
The edges will change color and an arrow and several circles will
appear on each edge.
A C
B
Figure 5-25: Edges underneath the sedan to be selected for edge meshing
b) Check that Apply is selected to the right of Grading in the Mesh Edges form and
that Successive Ratio is selected from the Type option menu.
The Successive Ratio option sets the ratio of distances between consecu-
tive points on the edge equal to the Ratio specified in the Mesh Edges
form.
d) Check that Apply is selected to the right of Spacing. Select Interval size from the
option menu under Spacing and enter a value of 0.03 in the text entry box.
Figure 5-26 shows the mesh on two of the edges underneath the sedan.
2. Define the grid density on the two outer sections of the edge underneath the sedan that
you split into three sections.
a) Select the edges marked D and E in Figure 5-27 (two of the edges you created by
splitting the edge underneath the sedan into three sections).
b) Make sure that the arrows on the two edges point away from the sedan. Shift-
middle-click on an edge to change the direction of the arrow, if necessary.
D E
c) Check that Apply is selected to the right of Grading in the Mesh Edges form and
select First Length from the Type option menu.
The First Length option sets the length of the first interval on the edge.
The other points on the edge are calculated using the geometric ratio
factor required to fit the specified number of points in the remaining
portion of the edge.
e) Check that Apply is selected to the right of Spacing. Select Interval count from the
option menu under Spacing and enter a value of 15 in the text entry box.
1. Mesh the volume with a coarser mesh than the mesh on the car faces.
b) Select Tet/Hybrid from the Elements option menu under Scheme in the Mesh
Volumes form, and select TGrid from the Type option menu.
c) Retain the default Interval size of 1 under Spacing and click the Apply button at the
bottom of the form.
A portion of the volume mesh (looking at the sedan from the symmetry
plane side) is shown in Figure 5-29, along with the surface mesh for the
sedan, which you previously turned off. To redisplay the surface mesh,
click the SPECIFY MODEL DISPLAY ATTRIBUTES command button
option menu to the right of Mesh near the bottom of the form and click
Apply.
To achieve the model view shown in Figure 5-29, below, you must turn
on hidden-line removal mode and make the symmetry plane invisible.
ii) To make the symmetry plane invisible, click the SPECIFY MODEL
1. Select the EXAMINE MESH command button at the bottom right of the Global
Control toolpad.
The 3D Element type selected by default at the top of the form is a brick
. You will not see any mesh elements in the graphics window when
you first open the Examine Mesh form, because there are no hexahedral
elements in the mesh.
b) Left-click on the tetrahedron icon next to 3D Element near the top of the
form.
d) Click with the left mouse button on the histogram bars that appear at the bottom of
the Examine Mesh form to highlight elements in a particular quality range.
Figure 5-30 shows the view in the graphics window if you click on the
fourth bar from the right on the histogram (representing cells with a
skewness value between 0.6 and 0.7). These low values for the maxi-
mum skewness indicate that the mesh is acceptable.
e) Close the Examine Mesh form by clicking the Close button at the bottom of the
form.
1. Remove the mesh from the display before you set the boundary types.
This makes it easier to see the edges and faces of the geometry. The mesh is not
deleted, just removed from the graphics window.
b) Select Off from the option menu to the right of Mesh near the bottom of the form.
iii. Shift-left-click the face on the brick in front of the car in the graphics window
(marked A in Figure 5-31) and click Apply to accept the selection.
GAMBIT will give the boundary a default name based on what you
select in the Type and Entity lists (pressure_inlet.1 in this example).
You can also specify a name for a boundary by entering a name in
the Name text entry box.
A B
Figure 5-31: Pressure inlet (A) and pressure outlet (B) for the sedan geometry
ii. Select the face on the brick behind the car in the graphics window (marked B
in Figure 5-31) and click Apply to accept the selection.
c) Define symmetry boundary types for the two faces on the symmetry plane of the
brick.
iii. Select the two faces you created on the symmetry plane of the brick (the faces
marked C and D in Figure 5-32) and click Apply to accept the selection.
GAMBIT will merge the two faces into a single symmetry zone.
Figure 5-32: Two faces created on the symmetry plane of the brick
d) Define symmetry boundary types for the top face of the brick and the side face
opposite the symmetry plane.
iii. Select the faces on the brick that are above and to the side of the sedan (the
faces marked E and F in Figure 5-33) and accept the selection.
The pressure inlet, pressure outlet, and symmetry boundaries for the
sedan geometry are shown in Figure 5-34.
Note that you could also specify the remaining outer edges of the
sedan geometry as wall boundaries. This is not necessary, however,
because when GAMBIT saves a mesh, any faces (in 3D) on which
you have not specified a boundary type will be written out as wall
boundaries by default.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
5.5 Summary
This tutorial illustrated how to import geometry from an external CAD package as an
IGES file, and mesh it. Several geometry “cleanup” operations were demonstrated. Addi-
tional geometry was created to construct a box around the car-body geometry, and an
unstructured tetrahedral volume mesh was generated.
6.1 Prerequisites
This tutorial assumes that you have worked through Tutorials 1, 2, 3, and 4.
6.3 Strategy
In this tutorial we will combine several of the previously shown tools and strategies and
apply them on a real industrial problem. The first thing to find out is if the boundary con-
dition and the physics will allow us to model only half of the geometry. This is a very
important step since it immediately reduces the effort of preprocessing and running time.
After confirming the symmetry condition, we start building the geometry using primitives
and Boolean operations. Although we normally recommend to create the model in the
following order;
1. Geometry creation
2. Decomposition
3. Mesh generation
We will illustrate, in this journal, that the order of geometry creation and decomposition is
not strict. Mesh generation, though, should in all cases be left to last.
The overall geometry creation is fairly straightforward and based on cylinder primitives,
Boolean unites, and subtracts. The model can not be meshed as is, using hexahedral
meshing, since several faces in this model are non-trivial and their normals are facing all
three major directions. Essentially there are two pipe-pipe intersections, which needs to be
decomposed
The first section is the pipe/annulus intersection at the outlet. In this situation, the recom-
mended strategy is to use a block to split of the outlet pipe. The split has to be made with
an angle, such that the unstructured mesh from the pipe will be “projected” to the wall of
the inner pipe. (See the following figure.)
The second section is the main intersection of the inlet/outlet pipes with the tank. Again,
we are using a block to split of the bigger tank section into a center section. We are tilting
the cutting block to optimize mesh quality. This will allow the mesh on all non-trivial
source faces to be “projected” into the bottom of the tank as illustrated in the picture
below
Edge meshing and boundary layers are applied at several areas to ensure appropriate
grading in key areas of the model. The boundary layers are particularly important in areas
where the face is being paved—that is, on most source faces, while edge meshing is used
where the mesh is being mapped. In some cases edge meshing and boundary layer are
combined for full control over the mesh density
Several techniques are used in the face meshing part like; enforce Submap without
meshing and multiple source face meshing, where side faces between source faces are
also meshed
Finally, the Cooper tool is used to mesh all volumes in this model.
6.4 Procedure
Start GAMBIT using the session identifier “Tank”.
The choice of a solver dictates the options available in various forms (for
example, the boundary types available in the Specify Boundary Types form).
The solver currently selected is indicated at the top of the GAMBIT GUI.
Edit → Defaults…
In this tutorial, you will change the default interval size used for meshing. The
mesh spacing is by default based on the interval size function, which you will
modify in the Edit Defaults form. The value you enter should be the estimated
average size of an element in the model. This value will appear as the default
Interval size on all meshing forms. You will be able to change it on the meshing
forms if required.
2. Select the INTERVAL radio button near the top of the form.
SIZE will appear in the space at the bottom of the list and its default value will
appear in the Value text entry box.
The text entry box for Radius 2 can be left blank; GAMBIT will set this
value by default to be the same value as Radius 1.
c) Select Positive Z (the default) in the list to the right of Axis Location.
d) Click Apply.
e) Click the FIT TO WINDOW command button at the top left of the Global
Control toolpad to see the cylinder created.
You can rotate the view by holding down the left mouse button and
moving the mouse. The cylinder is shown in Figure 6-2.
2. Create a second cylinder, with a Height of 64, a Radius 1 of 13, in the Centered Y
direction.
1. Move three of the cylinders to create the geometry of the complex pipe junction.
a) Select the second, third, and fourth cylinders created, by either selecting them in
the graphics window or using the Volume query list.
b) Select Move (the default) under Volume in the Move / Copy Volumes form.
Note that GAMBIT automatically fills in the values under Local as you
enter values under Global.
Figure 6-6: Three cylinders moved into position for the complex pipe junction geometry
2. Move the fifth cylinder using a Global translation vector of (-32, 74, 0).
The order of selecting the volumes is important. For example, Figure 6-7
shows the difference between subtracting volume B from volume A, and vice
versa.
$ -%
5HJLRQRILQWHUVHFWLRQ
-$
%
a) Select volume.2 in the graphics window and Accept the selection of the volume.
In this tutorial we are decomposing the big tank before we are uniting it with all
the pipes. If we reversed the order, the pipes would have been split right through
them, which is undesirable. We also rotating the brick to make the cut of the tank
be more symmetric. This will also increase the edge-angle of one of the faces,
which ultimately leads to better mesh quality
c) Select Centered from the option menu to the right of Direction and click Apply.
The brick and the pipe junction are shown in Figure 6-9.
b) Select Move (the default) under Volume at the top of the Move / Copy Volumes
form.
You will use the default Active Coord. Sys. Vector. The brick will be
rotated around the z axis.
e) Click Apply.
If you split one volume with another volume, the following volumes will result:
6SOLW$ZLWK%
5HJLRQRILQWHUVHFWLRQ
$
7ZRYROXPHV
7ZRYROXPHV
6SOLW%ZLWK$
a) Select the first cylinder you created in the graphics window (the largest cylinder)
and accept the selection of the cylinder.
c) Click Apply.
&
$
a) Select the cylinder that you created by subtracting one cylinder from another in
Step 3 (the volume marked A in Figure 6-13).
b) Select the middle section of the largest pipe which was created by splitting the
pipe with the brick (the volume marked B in Figure 6-13).
c) Click Apply.
The two volumes will be united as shown in Figure 6-14. The order in
which you select the two volumes is not important when you are uniting
them.
a) Select the middle cylinder of the three concentric cylinders (the volume marked C
in Figure 6-13).
c) Click Apply.
1. Create a brick, which will be used to remove some parts of the geometry to create a
symmetry plane in the geometry.
The brick and the pipe junction are shown in Figure 6-16.
a) Select the volume that contains most of the pipe sections in the geometry (the
volume marked A in Figure 6-17). Accept the selection of the volume.
c) In the Subtract Real Volumes form, select the Retain check box below Subtract
Volume.
This option instructs GAMBIT to subtract the brick from the pipe
geometry, but retain the brick to be used again in the next step.
d) Click Apply.
The brick will be subtracted from the pipe geometry as shown in Figure
6-18. Notice that the brick is still displayed in this figure, this is
because the Retain check box is selected in the Subtract Real Volumes
form.
a) Select the smallest cylinder in the graphics window, and accept the selection.
c) In the Subtract Real Volumes form, deselect the Retain check box.
d) Click Apply.
Figure 6-19: Brick subtracted from the small pipe to create a symmetry plane
Again the decomposition of the cylinder is done before the full geometry has
been created. In this example, we are using Align instead Move/Copy to posi-
tion the tool to the appropriate position before the splitting
a) Enter a value of 20 for the Width of the brick. Leave the Depth and Height text
entry boxes blank.
GAMBIT will set the Depth and Height by default to be the same value
as the Width, to create a cube.
b) Select -X +Y +Z from the option menu to the right of Direction and click Apply.
b) Select Move (the default) under Volume at the top of the Move / Copy Volumes
form.
You will now redefine the Active Coord. Sys. Vector so that GAMBIT
rotates the brick about the y axis.
You will create a vertex on the brick and use it to align the brick correctly relative
to the geometry. This is an alternative method to moving the splitting tool (the
brick) to the right position in the geometry using coordinates.
b) Enter a U Value of 0.3 in the Split Edge form and click Apply.
a) Select the brick in the graphics window and accept the selection.
The Translation Vertex Pair list box in the Align Volumes form will be
highlighted. You will now select the vertex on the object you want to
move and then the vertex with which you want to align the object.
c) Select the vertex marked A in Figure 6-21. The vertex is on the end of the long
thin pipes near the smallest cylinder.
The brick will be aligned with the pipe volume as shown in Figure 6-22.
5. Use the brick to split the volume that contains most of the pipe sections.
a) Select the volume that contains most of the pipe sections in the geometry (the
volume marked A in Figure 6-23) and accept the selection.
Select Real connected (the default) under Type in the Split Volume form
c) Click Apply.
This is the final unite operation to complete the construction of the geometry
R
This opens the Unite Real Volumes form.
a) Select the volume you created in the previous step (marked A in Figure 6-25).
c) Click Apply.
The edges will change color and an arrow and several circles will
appear on each edge. The arrow is small and you may have to zoom
into the edge to see it. It is located near the center of the edge.
(
&
'
$
)
b) Ensure that Apply is selected to the right of Grading in the Mesh Edges form and
select Last First Ratio from the Type option menu.
The Last First Ratio is defined as the size ratio between the first element
(or grid distance) on the edge, and the last, based on the direction
(sense) of the edge. For double sided grading, the last first ratio is the
ratio between the central element and the element at the end of the edge
e) Ensure that the Apply check box is selected to the right of Spacing. Select Interval
size from the option menu under Spacing and enter a value of 2.5 in the text entry
box.
b) Ensure that Apply is selected to the right of Grading in the Mesh Edges form and
select Successive Ratio from the Type option menu.
The Successive Ratio option sets the ratio of distances between con-
secutive points on the edge equal to the Ratio specified in the Mesh
Edges form.
d) Ensure that the Apply check box is selected to the right of Spacing. Enter 5 next to
Interval size.
e) Click the Apply button at the bottom of the Mesh Edges form.
The edge meshing for the six edges is shown in Figure 6-28.
Boundary layers are layers of elements growing out from a boundary into the
domain. They are used to locally refine the mesh in the direction normal to a face
or an edge. Boundary layers are used in this example to improve mesh density
close to walls on faces that will be paved
This defines the height of the first row of elements normal to the edge.
c) Move the slider box below Rows until the number of rows = 8.
This defines the total number of element rows. Notice that GAMBIT
updates the Depth automatically. The depth is the total height of the
boundary layer.
e) Select the edge shown in Figure 6-29 with the boundary layer on it. The boundary
layer should appear in the direction shown in Figure 6-29. If it does not, Shift-
middle-click the edge to change the direction of the boundary layer.
Figure 6-29: Edge on which to apply the boundary layer, showing the direction in which
the boundary layer should point
f) Click Apply in the Create Boundary Layer form to apply the boundary layer to the
edge.
c) Move the slider box below Rows until the number of rows = 2.
e) Select the three edges shown in Figure 6-30 with boundary layers on them. The
boundary layers should appear in the directions shown in Figure 6-30. If they do
not, Shift-middle-click an edge to change the direction of the boundary layer.
Figure 6-30: Edges on which to apply the boundary layers, showing the directions in
which the boundary layers should point
f) Click Apply in the Create Boundary Layer form to apply the boundary layers to the
edges.
c) Move the slider box below Rows until the number of rows = 2.
e) Select the three edges shown in Figure 6-31 with boundary layers on them. The
boundary layers should appear in the directions shown in Figure 6-31. If they do
not, Shift-middle-click an edge to change the direction of the boundary layer.
Figure 6-31: Edges on which to apply the boundary layers, showing the directions in
which the boundary layers should point
f) Click Apply in the Create Boundary Layer form to apply the boundary layers to the
edges.
Edit → Defaults…
This displays the types of meshing for which you can set defaults.
GAMBIT displays the Variables for which defaults are set in a list in
the Edit Defaults form.
AUTO_SMOOTH will appear in the text entry box at the bottom of the list
and its default value will appear in the Value text entry box.
b) Retain the default Interval size of 2 under Spacing in the Mesh Volumes form and
click the Apply button at the bottom of the form.
This accepts the volume you selected as the one to be meshed. It also
accepts the source faces (the faces whose surface mesh is to be swept
through the volume to form volume elements) GAMBIT has chosen for
the Cooper meshing scheme and starts the meshing. If you need to
modify or confirm the source faces, either pick faces from the graphics
window or modify the selection of source faces by means of the Sources
face text box. The mesh for the volume is shown in Figure 6-33.
It may be useful to remove the mesh from the display before you mesh the faces
in the next exercise; it is then easier to see the faces of the geometry. The mesh
is not deleted, just removed from the graphics window. To remove the mesh
from the display, click the SPECIFY MODEL DISPLAY ATTRIBUTES command
button at the bottom of the Global Control toolpad. Select Off from the
option menu to the right of Mesh near the bottom of the form and click Apply.
These faces are meshed to ensure a good mesh density around the pipes and
mapped meshes on some of the source faces. Some side faces also need to be
meshed to assure mesh matching between different source faces
a) Select the face marked A in Figure 6-34 in the graphics window. The face to
select is the curved face.
b) Change the Interval size to 3 under Spacing and Click the Apply button
GAMBIT will automatically select the Map Scheme in the Mesh Faces
form. See the GAMBIT Modeling Guide for more information on the
Map meshing scheme.
b) Enter 1 as the Interval size under Spacing in the Mesh Faces form and click the
Apply button at the bottom of the form.
b) Retain the default Interval size of 2.5 under Spacing in the Mesh Faces form and
click the Apply button at the bottom of the form.
GAMBIT will automatically select the Map Scheme in the Mesh Faces
form.
b) Enter 1 as the Interval size under Spacing in the Mesh Faces form and click the
Apply button at the bottom of the form.
First, you will modify the scheme setting on two faces from Pave to
Submap. This is one way of making the main volume ready for Cooper
meshing
Secondly, you will modify the default size of one of the source faces. In this
case, you allow the Cooper meshing scheme to make sure the mesh is
matching with other source faces.
1. Set the meshing scheme to be Submap for the faces marked F and G in Figure 6-39.
a) Select the faces marked F and G in Figure 6-39 in the graphics window.
c) Retain the default Interval size of 2 under Spacing in the Mesh Faces form.
You deselected the Mesh check box because at this point you do not
want to mesh the faces; you only want to apply the Scheme to the faces.
GAMBIT will mesh the faces using the Scheme you specified when it
creates a volume mesh.
a) Select the face marked H in Figure 6-40 in the graphics window (the face at the
end of the pipe).
GAMBIT will automatically select the Pave Scheme in the Mesh Faces
form. See the GAMBIT Modeling Guide for more information on the
Pave meshing scheme.
b) Enter 1 as the Interval size under Spacing in the Mesh Faces form.
c) Check that Mesh is not selected under Options and click the Apply button at the
bottom of the form.
a) Select the volumes marked J and K in Figure 6-41 in the graphics window.
b) Enter 4 as the Interval size under Spacing in the Mesh Volumes form and click the
Apply button at the bottom of the form.
The volumes will be meshed as shown in Figure 6-42.
b) Check that the Remove lower mesh and Remove old mesh check boxes are not
selected at the bottom of the form.
Notice that hidden line removal has been turned on in Figure 6-43 to
make the mesh easier to see. To turn on hidden line removal, hold down
option.
3. You can view the mesh by shading it using the RENDER MODEL command button in
the Global Control toolpad
a) Hold down the right mouse button on the RENDER MODEL command button
c) When you are finished, return to the wireframe view of the model, by selecting the
1. Select the EXAMINE MESH command button at the bottom right of the Global
Control toolpad.
b) Examine the mesh with cut planes and with the EquiAngle Skew.
! It may be useful to remove the mesh from the display before you set the
boundary types; it is then easier to see the faces of the geometry. The
mesh is not deleted, just removed from the graphics window. To remove
the mesh from the display,
a) Define an inlet.
iv. Shift-left-click the face marked A in Figure 6-44 and accept the selection.
b) Define an outlet.
ii. Check that PLOT is still selected in the Type option menu.
iii. Select the face marked B in Figure 6-44 and accept the selection.
iii. Select all the faces on the symmetry plane (marked E, F, G, and H in Figure 6-
45). Accept the selection of the faces.
Note that you could also specify the remaining external faces of the
tank geometry as WALL boundaries. This is not necessary,
however, because when GAMBIT saves a mesh, any external faces
(in 3-D) for which you have not specified a boundary type will be
written out as WALL boundaries by default.
File → Exit.
6.5 Summary
In this tutorial multiple primitive creations and Boolean operations was used to create the
full geometry. Decomposition was embedded in the creation. Edge meshing, boundary
layers and face meshing were used to control the mesh density, and type of mesh, in dif-
ferent areas of the model . The Cooper meshing scheme was used for all volumes.