SlideShare a Scribd company logo
1 of 133
Download to read offline
CREATING AND MESHING BASIC GEOMETRY
© Fluent Inc., Sep-04 1-1
1. CREATING AND MESHING BASIC GEOMETRY
This tutorial illustrates geometry creation and mesh generation for a simple geometry
using GAMBIT.
In this tutorial you will learn how to:
• Start GAMBIT
• Use the Operation toolpad
• Create a brick and an elliptical cylinder
• Unite two volumes
• Manipulate the display of your model
• Mesh a volume
• Examine the quality of the mesh
• Save the session and exit GAMBIT
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.
Problem Description CREATING AND MESHING BASIC GEOMETRY
1-2 © Fluent Inc., Sep-04
1.2 Problem Description
The model consists of an intersecting brick and elliptical cylinder. The basic geometry is
shown schematically in Figure 1-1.
10
12
6 6
10
10
Figure 1-1: Problem specification
CREATING AND MESHING BASIC GEOMETRY Strategy
© Fluent Inc., Sep-04 1-3
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
These details, as well as others, are covered in subsequent tutorials.
Procedure CREATING AND MESHING BASIC GEOMETRY
1-4 © Fluent Inc., Sep-04
1.4 Procedure
Type
gambit -id basgeom
to start GAMBIT.
This command 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.
Figure 1-2: The GAMBIT graphical user interface (GUI)
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-5
Step 1: Create a Brick
1. Create a brick by doing the following:
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.
The name of a command button is displayed in the Description window at the
bottom of the GAMBIT GUI when you hold the mouse cursor over the
command button. The GEOMETRY command button will appear depressed
when it is selected. Selecting the GEOMETRY command button opens the
Geometry subpad. Note that when you first start GAMBIT, the GEOMETRY
command button is selected by default.
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.
This command sequence opens the Create Real Brick form.
The above description of selecting command buttons can be shortened to the following:
Procedure CREATING AND MESHING BASIC GEOMETRY
1-6 © Fluent Inc., Sep-04
GEOMETRY → VOLUME → CREATE VOLUME
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.
f) Select Centered from the option menu to the right of Direction.
NOTE: When you first open the Create Real Brick form, the Centered option is
selected by default.
i) Hold down the left mouse button on the option button to the right of Direction
until the option menu appears.
ii) Select Centered from the list.
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
use the UNDO command button to undo multiple levels of geometry
creation. At this point, you have only performed one operation, so you can
only undo one operation.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-7
Figure 1-3: Rectangular brick volume (side view)
Procedure CREATING AND MESHING BASIC GEOMETRY
1-8 © Fluent Inc., Sep-04
Step 2: Create an Elliptical Cylinder
1. Create an elliptical cylinder.
a) Hold down the right mouse button while the cursor is on the CREATE VOLUME
command button.
b) Select the CREATE REAL CYLINDER option from the resulting
menu.
! CREATE REAL CYLINDER is the text that is written in the Description window
when you hold the mouse cursor over the menu item.
This command sequence opens the Create Real Cylinder form.
The above method of selecting command buttons can be shortened to the following:
GEOMETRY → VOLUME → CREATE VOLUME R
where R indicates a toolpad choice using the right mouse button.
c) Enter a Height of 10.
d) Enter a value of 3 for Radius 1.
e) Enter a value of 6 for Radius 2.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-9
f) Retain the default Axis Location of Positive Z.
g) Click Apply.
The brick and elliptical cylinder are shown in Figure 1-4.
Figure 1-4: Brick and elliptical cylinder
Procedure CREATING AND MESHING BASIC GEOMETRY
1-10 © Fluent Inc., Sep-04
Step 3: Unite the Two Volumes
1. Unite the brick and elliptical cylinder into one volume.
GEOMETRY → VOLUME → BOOLEAN OPERATIONS
This command sequence opens the Unite Real Volumes form.
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.
b) Shift-left-click the elliptical cylinder in the graphics window.
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.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-11
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
Procedure CREATING AND MESHING BASIC GEOMETRY
1-12 © Fluent Inc., Sep-04
Step 4: Manipulate the Display
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
CONFIGURATION command button in the Global Control toolpad.
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.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-13
Figure 1-6: GAMBIT GUI—four graphics-window quadrants
6. Restore a single display of the model.
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.
Procedure CREATING AND MESHING BASIC GEOMETRY
1-14 © Fluent Inc., Sep-04
Step 5: Mesh the Volume
1. Create a mesh for the volume.
MESH → VOLUME → MESH VOLUMES
This command sequence opens the Mesh Volumes form.
a) Shift-left-click the volume in the graphics window.
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.
b) Click Apply at the bottom of the Mesh Volumes form.
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.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-15
The volume will be meshed as shown in Figure 1-7.
Figure 1-7: Meshed volume
Procedure CREATING AND MESHING BASIC GEOMETRY
1-16 © Fluent Inc., Sep-04
Step 6: Examine the Mesh
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 Skew and EquiSize Skew, 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.
This action opens the Examine Mesh form.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-17
a) Select Range under Display Type at the top of the Examine Mesh form.
A histogram appears at the bottom of the form. The histogram consists of a
bar chart representing the statistical distribution of mesh elements with
respect to the specified Quality Type. Each vertical bar on the histogram cor-
responds to a unique set of upper and lower quality limits.
The 3D Element type selected by default at the top of the form is a brick .
b) Select or retain EquiSize Skew from the Quality Type option menu.
Procedure CREATING AND MESHING BASIC GEOMETRY
1-18 © Fluent Inc., Sep-04
c) Click on one of the green vertical bars in the histogram to view elements within a
certain quality range.
Each element has a value of skewness between 0 and 1, where 0 represents an
ideal element. The histogram is divided into 10 bars; each bar represents a
0.1 increment in the skewness value. For a good mesh, the bars on the left of
the histogram will be large and those on the right will be small.
Figure 1-8 shows the view in the graphics window if you click on the fourth
bar from the left on the histogram (representing cells with a skewness value
between 0.3 and 0.4).
Figure 1-8: Elements of the mesh within a specified quality range
d) Move the Upper and Lower slider boxes beneath the histogram to redefine the
quality range to be displayed.
CREATING AND MESHING BASIC GEOMETRY Procedure
© Fluent Inc., Sep-04 1-19
Step 7: Save the Session and Exit GAMBIT
1. Save the GAMBIT session and exit GAMBIT.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
Click Yes to save the current session and exit GAMBIT.
Summary CREATING AND MESHING BASIC GEOMETRY
1-20 © Fluent Inc., Sep-04
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.
MODELING A MIXING ELBOW (2-D)
© Fluent Inc., Sep-04 2-1
2. MODELING A MIXING ELBOW (2-D)
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.
Problem Description MODELING A MIXING ELBOW (2-D)
2-2 © Fluent Inc., Sep-04
2.2 Problem Description
The problem to be considered is shown schematically in Figure 2-1. A cold fluid enters
through the large pipe and a warmer fluid enters through the small pipe. The two fluids
mix in the elbow.
16
32
32
16
4 12
39.93°
v T
1 1
,
v T
2 2
,
v T
out out
,
Figure 2-1: Problem specification
MODELING A MIXING ELBOW (2-D) Strategy
© Fluent Inc., Sep-04 2-3
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).
Procedure MODELING A MIXING ELBOW (2-D)
2-4 © Fluent Inc., Sep-04
2.4 Procedure
Start GAMBIT.
Step 1: Select a Solver
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.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-5
Step 2: Create the Initial Vertices
1. Create vertices to define the outline of the large pipe of the mixing elbow.
TOOLS → COORDINATE SYSTEM → DISPLAY GRID
This command sequence opens the Display Grid form.
a) Check that Visibility is selected.
This ensures that the background grid will be visible when it is created.
b) Select X (the default) to the right of Axis.
c) Enter a Minimum value of –32, a Maximum value of 32, and an Increment of 16.
d) Click the Update list button.
Procedure MODELING A MIXING ELBOW (2-D)
2-6 © Fluent Inc., Sep-04
This creates a background grid with four cells in the x direction and enters the
x coordinates in the XY_plane X Values list.
e) Select Y to the right of Axis.
f) Enter a Minimum value of –32, a Maximum value of 32, and an Increment of 16.
g) Click the Update list button.
This creates a background grid with four cells in the y direction and enters the
y coordinates in the XY_plane Y Values list.
h) Check that Snap is selected under Options.
The vertices you create later in this step will be “snapped” to points on the
grid where the grid lines intersect.
i) Select Lines (the default) to the right of Grid.
The grid will be displayed using lines rather than points.
j) Click Apply.
GAMBIT creates a four-by-four grid in the graphics window. To see the
whole grid, you must zoom out the display (see Figure 2-2). You can zoom out
the display by pressing and holding down the right mouse button while moving
the cursor vertically upward in the graphics window.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-7
Figure 2-2: Four-by-four grid to be used for creating vertices
NOTE: You cannot use the FIT TO WINDOW command button (located
on the Global Control toolpad) to zoom out the display because GAMBIT does
not treat the grid as a model component to be fit within the graphics window.
k) Ctrl-right-click the nine grid points shown in Figure 2-3.
“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.
Procedure MODELING A MIXING ELBOW (2-D)
2-8 © Fluent Inc., Sep-04
A
D
C
B
F G
E
H I
Figure 2-3: Create vertices at grid points
l) Unselect 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.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-9
Figure 2-4: Vertices for the main pipe
Procedure MODELING A MIXING ELBOW (2-D)
2-10 © Fluent Inc., Sep-04
Step 3: Create Arcs for the Bend of the Mixing Elbow
1. Create an arc by selecting the following command buttons in order:
GEOMETRY → EDGE → CREATE EDGE R
This command sequence opens the Create Real Circular Arc form.
a) Retain the default Method.
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.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-11
D
B
F G
E
Figure 2-5: Vertices used to create arcs
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).
The vertex will turn red.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-12 © Fluent Inc., Sep-04
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.
Figure 2-6: Vertices and arcs
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-13
Step 4: Create Straight Edges
1. Create straight edges for the large pipe.
GEOMETRY → EDGE → CREATE EDGE R
This command sequence opens the Create Straight Edge form.
a) Shift-left-click the left endpoint of the smaller arc (vertex D in Figure 2-7).
A
D
C
B
F G
H I
Figure 2-7: Vertices used to create straight edges
b) Shift-left-click the vertices marked C, A, and B in Figure 2-7, in order.
Procedure MODELING A MIXING ELBOW (2-D)
2-14 © Fluent Inc., Sep-04
c) Click Apply to accept the selection of the vertices.
Three straight edges are drawn between the vertices.
d) Shift-left-click the vertices marked F, H, I, and G in Figure 2-7, in order.
e) Click Apply to accept the selection of the vertices.
The graphics window with the arcs and straight edges is shown in Figure 2-8.
Figure 2-8: Arcs and edges
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-15
Step 5: Create the Small Pipe for the Mixing Elbow
In this step, you will create vertices on the outer radius of the bend of the mixing
elbow and split the large arc into three smaller arcs. Next, you will create vertices for
the inlet of the small pipe. Finally, you will create the straight edges for the small
pipe.
1. Create vertices on the outer radius of the bend, and split the large arc into three
sections.
GEOMETRY → EDGE → SPLIT/MERGE EDGES
This command sequence opens the Split Edge form.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-16 © Fluent Inc., Sep-04
This action 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.
ii. Select edge.2 under Available in the Edge List form.
! Note that the Available names may be different in your geometry,
depending on the order in which you created the edges.
iii. Click the − − −> button to pick edge.2.
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.
iv. Close the Edge List form.
This method of selecting an entity can be used as an alternative to Shift-
left-click in the graphics window. See the GAMBIT User’s Guide for
more information on pick lists.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-17
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.
c) Select Point (the default) to the right of Split With.
You will split the edge by creating a point on the edge and then using this
point to split the edge.
d) Select Cylindrical from the Type option menu.
You can now use cylindrical coordinates to specify where GAMBIT should
split the edge.
e) Input a value of –39.93 degrees next to t under Local.
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).
h) Input a value of –50.07 degrees next to t under Local.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-18 © Fluent Inc., Sep-04
Figure 2-9: Vertices created on outer radius of mixing elbow bend
2. Create points at the small inlet.
GEOMETRY → VERTEX → MOVE/COPY VERTICES
This command sequence opens the Move / Copy Vertices form.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-19
a) Select the second vertex created on the bend of the mixing elbow.
b) Select Copy under Vertices in the Move / Copy Vertices form.
c) Select Translate (the default) under Operation.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-20 © Fluent Inc., Sep-04
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.
g) Select the vertex just created in 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.
The vertices are shown in Figure 2-10.
Figure 2-10: Vertices to define the small pipe
3. Create straight edges for the small pipe.
GEOMETRY → EDGE → CREATE EDGE
This command sequence opens the Create Straight Edge form.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-21
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
M
L
Figure 2-11: Vertices to be used to create small pipe
The small pipe is shown (with the large pipe) in Figure 2-12.
Procedure MODELING A MIXING ELBOW (2-D)
2-22 © Fluent Inc., Sep-04
Figure 2-12: Completed small pipe
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-23
Step 6: Create Faces From Edges
1. Create a face for the large pipe.
GEOMETRY → FACE → FORM FACE
This command sequence opens the Create Face From Wireframe form.
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 unselect all edges, and then reselect the correct edges.
Procedure MODELING A MIXING ELBOW (2-D)
2-24 © Fluent Inc., Sep-04
Figure 2-13: Edges used to create face for large pipe
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.
b) Click Apply to accept the selected edges and create a face.
The edges of the face will turn blue.
2. Create a face for the small pipe by selecting the four edges shown in Figure 2-14 and
then accepting the selected edges.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-25
Figure 2-14: Edges used to create face for small pipe
Procedure MODELING A MIXING ELBOW (2-D)
2-26 © Fluent Inc., Sep-04
Step 7: Specify the Node Distribution
The next step is to define the grid density on the edges of the geometry. You will
accomplish this graphically by selecting an edge, assigning the number of nodes, and
specifying the distribution of nodes along the edge.
1. Specify the node density on the inlet and outlet of the large pipe.
MESH → EDGE → MESH EDGES
This command sequence opens the Mesh Edges form.
a) Shift-left-click the edge marked EA in Figure 2-15.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-27
EA
ED
EC
EG
EH
EI
EJ
EB
EF
EE
Figure 2-15: Edges to be meshed
The edge will change color and an arrow and several circles will appear on
the edge.
b) Shift-left-click the edge marked EB in Figure 2-15.
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 consecutive
points on the edge equal to the specified Ratio.
d) Enter 1.25 in the text entry box to the right of Ratio.
Alternatively, you can slide the Ratio slider box (the small, gray rectangle with
a vertical line in its center that is located on the slider bar) until 1.25 is
displayed in the Ratio text box.
Procedure MODELING A MIXING ELBOW (2-D)
2-28 © Fluent Inc., Sep-04
e) Select the Double sided check box under Grading.
If you specify a Double sided grading on an edge, the element intervals are
graded in two directions from a starting point on the edge. GAMBIT
determines the starting point such that the intervals on either side of the point
are approximately the same length.
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.
GAMBIT will create 10 intervals on the edge.
g) Click the Apply button at the bottom of the form.
Figure 2-16 shows the mesh on the inlet and outlet edges of the large pipe.
EA
ED
EC
EG
EH
EI
EJ
EF
EE
EB
Figure 2-16: Edge meshing on inlet and outlet of large pipe
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-29
2. Mesh the four straight edges of the large pipe.
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 unselect 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.
EA
ED
EC
EG
EH
EI
EJ
EF
EE
EB
Figure 2-17: Mesh on the straight edges of the large pipe
Procedure MODELING A MIXING ELBOW (2-D)
2-30 © Fluent Inc., Sep-04
3. Mesh the edge connecting the two pipes.
a) Select the edge marked EG in Figure 2-17.
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.
d) Click the Apply button at the bottom of the form.
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.
e) Click the Apply button at the bottom of the form.
The mesh on the two edges on the outer radius of the bend is shown in Figure
2-18.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-31
EA
ED
EC
EG
EH
EI
EJ
EF
EE
EB
Figure 2-18: Mesh on outer bend of pipe
5. Set the grading for the inner bend of the mixing elbow.
a) Select the edge marked EJ in Figure 2-18.
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.
c) Select the Double sided check box.
d) Unselect the Apply check box to the right of Spacing.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-32 © Fluent Inc., Sep-04
e) Unselect the Mesh check box under Options and click the Apply button at the
bottom of the form.
You unselected 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.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-33
Figure 2-19: Edge meshing for the mixing elbow
Procedure MODELING A MIXING ELBOW (2-D)
2-34 © Fluent Inc., Sep-04
Step 8: Create Structured Meshes on Faces
1. Create a structured mesh for the large pipe.
MESH → FACE → MESH FACES
This command sequence opens the Mesh Faces form.
a) Shift-left-click the large pipe in the graphics window.
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.
b) Click the Apply button at the bottom of the form.
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.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-35
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
2. Mesh the small pipe of the mixing elbow.
a) Select the small pipe in the graphics window.
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.
This is an example of “enforced mapping”, where GAMBIT automatically
modifies the face vertex type on the face to satisfy the chosen meshing scheme.
See the GAMBIT Modeling Guide for more information on face vertex types.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-36 © Fluent Inc., Sep-04
Figure 2-21: Structured mesh for the mixing elbow
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-37
Step 9: Set Boundary Types
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.
a) Click the SPECIFY DISPLAY ATTRIBUTES command button at the bottom of
the Global Control toolpad.
b) Select the Off radio button to the right of Mesh near the bottom of the form.
c) Click Apply and close the form.
2. Set boundary types for the mixing elbow.
ZONES → SPECIFY BOUNDARY TYPES
This command sequence opens the Specify Boundary Types form.
Procedure MODELING A MIXING ELBOW (2-D)
2-38 © Fluent Inc., Sep-04
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.
a) Define two inflow boundaries.
i. Enter the name inflow1 in the Name text entry box.
If you do not specify a name, GAMBIT will give the boundary a default
name based on what you select in the Type and Entity lists.
ii. Select INFLOW in the Type option menu.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-39
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.
EA
EK
EB
Figure 2-22: Boundary types for edges of mixing elbow
This edge will be set as an inflow boundary.
v. Enter inflow2 in the Name text entry box.
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.
b) Define an outflow boundary.
i. Enter outflow in the Name text entry box.
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.
Procedure MODELING A MIXING ELBOW (2-D)
2-40 © Fluent Inc., Sep-04
The inflow and outflow boundaries for the mixing elbow are shown in Figure
2-23. (NOTE: To display the boundary types in the graphics window, select
the Show labels options on the Specify Boundary Types form.)
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 continuum 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.
MODELING A MIXING ELBOW (2-D) Procedure
© Fluent Inc., Sep-04 2-41
Step 10: Export the Mesh and Save the Session
1. Export a mesh file for the mixing elbow.
File → Export → Mesh…
This command sequence opens the Export Mesh File form. Note that the File Type
is Structured FLUENT 4 Grid.
a) Enter the File Name for the file to be exported (2-DELBOW.GRD).
b) Click Accept.
The file will be written to your working directory.
2. Save the GAMBIT session and exit GAMBIT.
File → Exit
GAMBIT will ask you whether you wish to save the current session before you
exit.
Click Yes to save the current session and exit GAMBIT.
Summary MODELING A MIXING ELBOW (2-D)
2-42 © Fluent Inc., Sep-04
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.
Tutorial 1. Introduction to Using FLUENT: Fluid Flow and
Heat Transfer in a Mixing Elbow
Introduction
This tutorial illustrates the setup and solution of a three-dimensional turbulent fluid
flow and heat transfer problem in a mixing elbow. 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 area of the mixing region
in order to properly design the junction.
This tutorial demonstrates how to do the following:
• Read an existing grid file into FLUENT.
• Use mixed units to define the geometry and fluid properties.
• Set material properties and boundary conditions for a turbulent forced convection
problem.
• Initiate the calculation with residual plotting.
• Calculate a solution using the pressure-based solver.
• Visually examine the flow and temperature fields using FLUENT’s postprocessing
tools.
• Enable the second-order discretization scheme for improved prediction of the tem-
perature field.
• Adapt the grid based on the temperature gradient to further improve the prediction
of the temperature field.
Prerequisites
This tutorial assumes that you have little to no experience with FLUENT, and so each
step will be explicitly described.
c

 Fluent Inc. September 21, 2006 1-1
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Problem Description
The problem to be considered is shown schematically in Figure 1.1. A cold fluid at 20◦
C
flows into the pipe through a large inlet, and mixes with a warmer fluid at 40◦
C that
enters through a smaller inlet located at the elbow. The pipe dimensions are in inches,
and the fluid properties and boundary conditions are given in SI units. The Reynolds
number for the flow at the larger inlet is 50,800, so a turbulent flow model will be required.
= 4216 J/kg−K
p
C
= 8 x 10 Pa−s
µ −4
k = 0.677 W/m−K
= 0.4 m/s
x
U
4" Dia.
4"
8"
3"
1" Dia.
1"
8"
Viscosity:
Conductivity:
Specific Heat:
T = 20 C
I = 5%
= 1.2 m/s
y
U
T = 40 C
I = 5%
Density: = 1000 kg/m3
ρ
o
o
Figure 1.1: Problem Specification
1-2 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Setup and Solution
Preparation
1. Download introduction.zip from the Fluent Inc. User Services Center
(www.fluentusers.com) to your working folder. This file can be found by using
the Documentation link on the FLUENT product page.
OR,
Copy introduction.zip from the FLUENT documentation CD to your working
folder.
For Linux / UNIX systems, you can find the file by inserting the CD into your
CD-ROM drive and going to the following directory:
/cdrom/fluent6.3/help/tutfiles/
where cdrom must be replaced by the name of your CD-ROM drive.
For Windows systems, you can find the file by inserting the CD into your CD-ROM
drive and going to the following folder:
cdrom:fluent6.3helptutfiles
where cdrom must be replaced by the name of your CD-ROM drive (e.g., E).
2. Unzip introduction.zip.
The file elbow.msh can be found in the introduction folder created after unzipping
the file.
3. Start the 3D (3d) version of FLUENT.
c

 Fluent Inc. September 21, 2006 1-3
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 1: Grid
1. Read the grid file elbow.msh.
File −→ Read −→Case...
(a) Select the grid file by clicking elbow.msh in the introduction folder created
when you unzipped the original file.
(b) Click OK to read the file and close the Select File dialog box.
Note: As the grid file is read by FLUENT, messages will appear in the console
that report the progress of the conversion. FLUENT will report that 13,852
hexahedral fluid cells have been read, along with a number of boundary faces
with different zone identifiers.
1-4 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
2. Check the grid.
Grid −→Check
Grid Check
Grid Check
Domain Extents:
x-coordinate: min (m) = -8.000000e+000, max (m) = 8.000000e+000
y-coordinate: min (m) = -9.134633e+000, max (m) = 8.000000e+000
z-coordinate: min (m) = 0.000000e+000, max (m) = 2.000000e+000
Volume statistics:
minimum volume (m3): 5.098261e-004
maximum volume (m3): 2.330738e-002
total volume (m3): 1.607154e+002
Face area statistics:
minimum face area (m2): 4.865882e-003
maximum face area (m2): 1.017924e-001
Checking number of nodes per cell.
Checking number of faces per cell.
Checking thread pointers.
Checking number of cells per face.
Checking face cells.
Checking bridge faces.
Checking right-handed cells.
Checking face handedness.
Checking face node order.
Checking element type consistency.
Checking boundary types:
Checking face pairs.
Checking periodic boundaries.
Checking node count.
Checking nosolve cell count.
Checking nosolve face count.
Checking face children.
Checking cell children.
Checking storage.
Done.
Note: The minimum and maximum values may vary slightly when running on
different platforms. The grid check will list the minimum and maximum x
and y values from the grid in the default SI unit of meters, and will report
a number of other grid features that are checked. Any errors in the grid will
be reported at this time. In particular, you should always make sure that the
minimum volume is not negative, since FLUENT cannot begin a calculation
c

 Fluent Inc. September 21, 2006 1-5
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
when this is the case. In the next step, you will scale the grid so that it is in
the correct unit of inches.
3. Scale the grid.
Grid −→Scale...
(a) Select inches from the Grid Was Created In drop-down list in the Unit Conversion
group box, by first clicking the down-arrow button and then clicking the in
item from the list that appears.
(b) Click Scale to scale the grid.
! Be sure to click the Scale button only once.
The reported values of the Domain Extents will be reported in the default SI
unit of meters.
(c) Click the Change Length Units button to set inches as the working unit for
length.
(d) Confirm that the domain extents are as shown in the previous panel.
(e) Close the Scale Grid panel by clicking Close.
The grid is now sized correctly, and the working unit for length has been set to
inches.
Note: Because the default SI units will be used for everything except length, there
will be no need to change any other units in this problem. The choice of
inches for the unit of length has been made by the actions you have just taken.
If you wanted the working unit for length to be something other than inches
1-6 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(e.g., millimeters), you would have to open the Set Units panel from the Define
pull-down menu and make the appropriate change.
4. Display the grid (Figure 1.2).
Display −→Grid...
(a) Retain the default selection of all the items in the Surfaces selection list except
default-interior.
Note: A list item is selected if it is highlighted, and deselected if it is not
highlighted. You can select and deselect items by clicking on the text.
(b) Click Display to open a graphics window and display the grid.
(c) Close the Grid Display panel.
Extra: You can use the right mouse button to probe for grid information in the
graphics window. If you click the right mouse button on any node in the grid,
information will be displayed in the FLUENT console about the associated zone,
including the name of the zone. This feature is especially useful when you
have several zones of the same type and you want to distinguish between them
quickly.
For this 3D problem, you can make it easier to probe particular nodes by chang-
ing the view. You can perform any of the following actions in the graphics
window:
• Rotate the view.
Drag the mouse while pressing the left mouse button. Release the mouse
button when the viewing angle is satisfactory.
c

 Fluent Inc. September 21, 2006 1-7
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
• Translate the view.
Click the middle mouse button once at any point in the display to center
the view at that point.
• Zoom in to magnify a portion of the display.
Drag the mouse to the right and either up or down while pressing the
middle mouse button. This action will cause a white rectangle to appear
in the display. When you release the mouse button, a new view will be
displayed which consists entirely of the contents of the white rectangle.
• Zoom out to reduce the magnification.
Drag the mouse to the left and either up or down while pressing the middle
mouse button. This action will cause a white rectangle to appear in the
display. When you release the mouse button, the magnification of the view
will be reduced by an amount that is inversely proportional to the size of
the white rectangle. The new view will be centered at the center of the
white rectangle.
Z
Y
X
Grid
FLUENT 6.3 (3d, pbns, lam)
Figure 1.2: The Hexahedral Grid for the Mixing Elbow
1-8 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 2: Models
1. Retain the default solver settings.
Define −→ Models −→Solver...
(a) Retain all of the default settings.
(b) Click OK to close the Solver panel.
c

 Fluent Inc. September 21, 2006 1-9
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
2. Turn on the k- turbulence model.
Define −→ Models −→Viscous...
(a) Select k-epsilon from the Model list by clicking the radio button or the text,
so that a black dot appears in the radio button.
The Viscous Model panel will expand.
(b) Select Realizable from the k-epsilon Model list.
(c) Click OK to accept the model and close the Viscous Model panel.
1-10 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
3. Enable heat transfer by activating the energy equation.
Define −→ Models −→Energy...
(a) Enable the Energy Equation option by clicking the check box or the text.
Note: An option is enabled when there is a check mark in the check box, and
disabled when the check box is empty.
(b) Click OK to close the Energy panel.
Step 3: Materials
1. Create a new material called water.
Define −→Materials...
c

 Fluent Inc. September 21, 2006 1-11
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(a) Enter water for Name by double-clicking in the text-entry box under Name
and typing with the keyboard.
(b) Enter the following values in the Properties group box:
Property Value
Density 1000 kg/m3
Cp 4216 J/kg − K
Thermal Conductivity 0.677 W/m − K
Viscosity 8e-04 kg/m − s
(c) Click Change/Create.
A Question dialog box will open, asking if you want to overwrite air. Click No
so that the new material water is added to the list of materials which originally
contained only air.
Extra: You could have copied the material water-liquid [h2ol] from the ma-
terials database (accessed by clicking the Fluent Database... button). If the
properties in the database are different from those you wish to use, you
can edit the values in the Properties group box in the Materials panel and
click Change/Create to update your local copy (the database copy will not
be affected).
(d) Make sure that there are now two materials defined locally by examining the
Fluent Fluid Materials drop-down list.
(e) Close the Materials panel.
1-12 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 4: Boundary Conditions
Define −→Boundary Conditions...
1. Set the boundary conditions for the fluid (fluid).
(a) Select fluid from the Zone selection list.
c

 Fluent Inc. September 21, 2006 1-13
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(b) Click Set... to open the Fluid panel.
i. Select water from the Material Name drop-down list.
ii. Click OK to close the Fluid panel.
You have just specified water as the working fluid for this simulation.
2. Set the boundary conditions at the cold inlet (velocity-inlet-5).
Hint: If you are unsure of which inlet zone corresponds to the cold inlet, you can
probe the grid display with the right mouse button as described in a previous
step. Not only will information be displayed in the FLUENT console, but the
zone you probed will automatically be selected from the Zone selection list in
the Boundary Conditions panel.
(a) Select velocity-inlet-5 from the Zone selection list.
1-14 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(b) Click Set... to open the Velocity Inlet panel.
i. Select Components from the Velocity Specification Method drop-down list.
The Velocity Inlet panel will expand.
ii. Enter 0.4 m/s for X-Velocity.
iii. Retain the default value of 0 m/s for both Y-Velocity and Z-Velocity.
iv. Select Intensity and Hydraulic Diameter from the Specification Method drop-
down list in the Turbulence group box.
v. Enter 5% for Turbulent Intensity.
vi. Enter 4 inches for Hydraulic Diameter.
The hydraulic diameter Dh is defined as:
Dh =
4A
Pw
where A is the cross-sectional area and Pw is the wetted perimeter.
c

 Fluent Inc. September 21, 2006 1-15
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
vii. Click the Thermal tab.
viii. Enter 293.15 K for Temperature.
ix. Click OK to close the Velocity Inlet panel.
3. In a similar manner, set the boundary conditions at the hot inlet (velocity-inlet-6),
using the values in the following table:
Velocity Specification Method Components
X-Velocity 0 m/s
Y-Velocity 1.2 m/s
Z-Velocity 0 m/s
Specification Method Intensity  Hydraulic Diameter
Turbulent Intensity 5%
Hydraulic Diameter 1 inch
Temperature 313.15 K
1-16 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
4. Set the boundary conditions at the outlet (pressure-outlet-7), as shown in the fol-
lowing panel.
Note: FLUENT will use the backflow conditions only if the fluid is flowing into
the computational domain through the outlet. Since backflow might occur at
some point during the solution procedure, you should set reasonable backflow
conditions to prevent convergence from being adversely affected.
c

 Fluent Inc. September 21, 2006 1-17
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
5. For the wall of the pipe (wall), retain the default value of 0 W/m2
for Heat Flux in
the Thermal tab.
6. Close the Boundary Conditions panel.
1-18 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 5: Solution
1. Initialize the flow field, using the boundary conditions settings at the cold inlet
(velocity-inlet-5) as a starting point.
Solve −→ Initialize −→Initialize...
(a) Select velocity-inlet-5 from the Compute From drop-down list.
(b) Enter 1.2 m/s for Y Velocity in the Initial Values group box.
Note: While an initial X Velocity is an appropriate guess for the horizontal
section, the addition of a Y Velocity component will give rise to a better
initial guess throughout the entire elbow.
(c) Click Init and close the Solution Initialization panel.
c

 Fluent Inc. September 21, 2006 1-19
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
2. Enable the plotting of residuals during the calculation.
Solve −→ Monitors −→Residual...
(a) Enable Plot in the Options group box.
(b) Enter 1e-05 for the Absolute Criteria of continuity, as shown in the previous
panel.
(c) Click OK to close the Residual Monitors panel.
Note: By default, all variables will be monitored and checked by FLUENT as a
means to determine the convergence of the solution. Although residuals are
useful for checking convergence, a more reliable method is to define a surface
monitor. You will do this in the next step.
1-20 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
3. Define a surface monitor at the outlet (pressure-outlet-7).
Solve −→ Monitors −→Surface...
(a) Set Surface Monitors to 1 by clicking once on the up-arrow button.
(b) Enable the Plot and Write options for monitor-1.
(c) Set Every to 3 for monitor-1.
This setting instructs FLUENT to update the plot of the surface monitor and
write data to a file after every 3 iterations during the solution.
(d) Click the Define... button to open the Define Surface Monitor panel.
i. Select Mass-Weighted Average from the Report Type drop-down list.
ii. Retain the default entry of monitor-1.out for File Name.
c

 Fluent Inc. September 21, 2006 1-21
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
iii. Select Temperature... and Static Temperature from the Report of drop-
down lists.
iv. Select pressure-outlet-7 from the Surfaces selection list.
v. Click OK to close the Define Surface Monitor panel.
(e) Click OK to close the Surface Monitors panel.
4. Save the case file (elbow1.cas.gz).
File −→ Write −→Case...
(a) (optional) Indicate the folder in which you would like the file to be saved.
By default, the file will be saved in the folder from which you read in elbow.msh
(i.e., the introduction folder). You can indicate a different folder by brows-
ing to it or by creating a new folder.
(b) Enter elbow1.cas.gz for Case File.
Adding the extension .gz to the end of the file name extension instructs FLU-
ENT to save the file in a compressed format. You do not have to include .cas
in the extension (e.g., if you enter elbow1.gz, FLUENT will automatically
save the file as elbow1.cas.gz). The .gz extension can also be used to save
data files in a compressed format.
(c) Make sure that the default Write Binary Files option is enabled, so that a binary
file will be written.
1-22 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(d) Click OK to close the Select File dialog box.
Note: If you retained the default introduction folder in the Select File dialog
box, a Warning dialog box will open to alert you that the file elbow1.cas.gz
already exists. All of the files you will be instructed to save in this tutorial
already exist in the introduction folder, and can be overwritten. Click
OK in the Warning dialog box to proceed.
5. Start the calculation by requesting 150 iterations.
Solve −→Iterate...
(a) Enter 150 for Number of Iterations.
(b) Click Iterate.
c

 Fluent Inc. September 21, 2006 1-23
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Note: By starting the calculation, you are also starting to save the surface
monitor data at the rate specified in the Surface Monitors panel. If a file
already exists in your working folder with the name you specified in the
Define Surface Monitor panel, then a Question dialog box will open, asking
if you would like append the new data to the existing file. Click No in
the Question dialog box, and then click OK in the Warning dialog box that
follows to overwrite the existing file.
As the calculation progresses, the residuals will be plotted in the graphics win-
dow (Figure 1.3). An additional graphics window will open to display the
convergence history of the mass-weighted average temperature (Figure 1.4).
The solution will reach convergence after approximately 140 iterations.
Note: The number of iterations required for convergence varies according to
the platform used. Also, since the residual values are different for different
computers, the plot that appears on your screen may not be exactly the
same as the one shown here.
(c) Close the Iterate panel when the calculation is complete.
1-24 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Z
Y
X
Scaled Residuals
FLUENT 6.3 (3d, pbns, rke)
Iterations
140
120
100
80
60
40
20
0
1e+01
1e+00
1e-01
1e-02
1e-03
1e-04
1e-05
1e-06
1e-07
epsilon
k
energy
z-velocity
y-velocity
x-velocity
continuity
Residuals
Figure 1.3: Residuals for the First 140 Iterations
Z
Y
X
Convergence history of Static Temperature on pressure-outlet-7
FLUENT 6.3 (3d, pbns, rke)
Iteration
(k)
Average
Weighted
Mass
140
120
100
80
60
40
20
0
296.6000
296.5000
296.4000
296.3000
296.2000
296.1000
296.0000
monitor-1
Figure 1.4: Convergence History of the Mass-Weighted Average Temperature
c

 Fluent Inc. September 21, 2006 1-25
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
6. Examine the plots for convergence (Figures 1.3 and 1.4).
Note: There are no universal metrics for judging convergence. Residual definitions
that are useful for one class of problem are sometimes misleading for other
classes of problems. Therefore it is a good idea to judge convergence not only by
examining residual levels, but also by monitoring relevant integrated quantities
and checking for mass and energy balances.
When evaluating whether convergence has been reached, there are three indi-
cators:
• The residuals have decreased to a sufficient degree.
The solution has converged when the Convergence Criterion for each vari-
able has been reached. The default criterion is that each residual will be
reduced to a value of less than 10−3
, except the energy residual, for which
the default criterion is 10−6
.
• The solution no longer changes with more iterations.
Sometimes the residuals may not fall below the convergence criterion set
in the case setup. However, monitoring the representative flow variables
through iterations may show that the residuals have stagnated and do not
change with further iterations. This could also be considered as conver-
gence.
• The overall mass, momentum, energy, and scalar balances are obtained.
You can examine the overall mass, momentum, energy and scalar balances
in the Flux Reports panel. The net imbalance should be less than 0.2% of
the net flux through the domain when the solution has converged. In the
next step you will check to see if the mass balance indicates convergence.
1-26 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
7. Examine the mass flux report for convergence.
Report −→Fluxes...
(a) Select pressure-outlet-7, velocity-inlet-5, and velocity-inlet-6 from the Boundaries
selection list.
(b) Click Compute.
The sum of the flux for the inlets should be very close to the sum of the flux
for the outlets. The difference will be displayed in the lower right field under
kg/s, as well as in the console. Note that the imbalance is well below the 0.2%
criteria suggested previously.
(c) Close the Flux Reports panel.
8. Save the data file (elbow1.dat.gz).
File −→ Write −→Data...
In later steps of this tutorial you will save additional case and data files with dif-
ferent prefixes.
c

 Fluent Inc. September 21, 2006 1-27
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 6: Displaying the Preliminary Solution
1. Display filled contours of velocity magnitude on the symmetry plane (Figure 1.5).
Display −→ Contours...
(a) Enable Filled in the Options group box.
(b) Make sure that Node Values is enabled in the Options group box.
(c) Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.
(d) Select symmetry from the Surfaces selection list.
(e) Click Display to display the contours in the graphics window.
Extra: Clicking the right mouse button on a point in the displayed domain will
cause the value of the corresponding contour to be reported in the console.
1-28 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Contours of Velocity Magnitude (m/s)
FLUENT 6.3 (3d, pbns, rke)
1.42e+00
1.35e+00
1.28e+00
1.21e+00
1.14e+00
1.07e+00
9.95e-01
9.24e-01
8.53e-01
7.82e-01
7.11e-01
6.40e-01
5.69e-01
4.98e-01
4.26e-01
3.55e-01
2.84e-01
2.13e-01
1.42e-01
7.11e-02
0.00e+00
Z
Y
X
Figure 1.5: Predicted Velocity Distribution after the Initial Calculation
2. Display filled contours of temperature on the symmetry plane (Figure 1.6).
Display −→Contours...
(a) Select Temperature... and Static Temperature from the Contours of drop-down
lists.
c

 Fluent Inc. September 21, 2006 1-29
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(b) Click Display and close the Contours panel.
Contours of Static Temperature (k)
FLUENT 6.3 (3d, pbns, rke)
3.13e+02
3.12e+02
3.11e+02
3.10e+02
3.09e+02
3.08e+02
3.07e+02
3.06e+02
3.05e+02
3.04e+02
3.03e+02
3.02e+02
3.01e+02
3.00e+02
2.99e+02
2.98e+02
2.97e+02
2.96e+02
2.95e+02
2.94e+02
2.93e+02
Z
Y
X
Figure 1.6: Predicted Temperature Distribution after the Initial Calculation
1-30 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
3. Display velocity vectors on the symmetry plane (Figures 1.7 and 1.8).
Display −→ Vectors...
(a) Select symmetry from the Surfaces selection list.
(b) Click Display to plot the velocity vectors.
Note: The Auto Scale option is enabled by default in the Options group box.
This scaling sometimes creates vectors that are too small or too large in
the majority of the domain.
(c) Enter 4 for Scale to increase the display size of the vectors.
(d) Set Skip to 2 to make the individual vectors easier to see.
(e) Click Display again (Figure 1.7).
(f) Zoom in on the vectors in the display.
To do this, drag your mouse to the right and either up or down, while pressing
the middle mouse button. A rectangle will appear on the screen. Make sure
that the rectangle frames the region that you wish to enlarge and let go of the
middle mouse button. The image will be redisplayed at a higher magnification
(Figure 1.8).
c

 Fluent Inc. September 21, 2006 1-31
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Velocity Vectors Colored By Velocity Magnitude (m/s)
FLUENT 6.3 (3d, pbns, rke)
1.48e+00
1.42e+00
1.35e+00
1.29e+00
1.23e+00
1.17e+00
1.11e+00
1.05e+00
9.85e-01
9.24e-01
8.62e-01
8.01e-01
7.39e-01
6.77e-01
6.16e-01
5.54e-01
4.93e-01
4.31e-01
3.69e-01
3.08e-01
2.46e-01
Z
Y
X
Figure 1.7: Resized Velocity Vectors
Velocity Vectors Colored By Velocity Magnitude (m/s)
FLUENT 6.3 (3d, pbns, rke)
1.48e+00
1.42e+00
1.35e+00
1.29e+00
1.23e+00
1.17e+00
1.11e+00
1.05e+00
9.85e-01
9.24e-01
8.62e-01
8.01e-01
7.39e-01
6.77e-01
6.16e-01
5.54e-01
4.93e-01
4.31e-01
3.69e-01
3.08e-01
2.46e-01
Z
Y
X
Figure 1.8: Magnified View of Velocity Vectors
1-32 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(g) Zoom out to the original view.
To do this, drag your mouse to the left and either up or down, while pressing
the middle mouse button. A rectangle will appear on the screen. Make sure
that the rectangle is approximately the same size as the rectangle you made
while zooming in, and then let go of the middle mouse button. The image will
be redisplayed at a lower magnification (Figure 1.7). If the resulting image
is not centered, you can translate the view by clicking once with the middle
mouse button near the center of the geometry.
Alternatively, you can select the original view in the Views panel. Simply select
front from the Views selection list and click Apply, as shown in the following
panel.
Display −→Views...
(h) Close the Vectors panel.
c

 Fluent Inc. September 21, 2006 1-33
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
4. Create a line surface at the centerline of the outlet.
Surface −→Iso-Surface...
(a) Select Grid... and Z-Coordinate from the Surface of Constant drop-down lists.
(b) Click Compute.
The range of values in the z direction will be displayed in the Min and Max
fields.
(c) Retain the default value of 0 inches for Iso-Values.
(d) Select pressure-outlet-7 from the From Surface selection list.
(e) Enter z=0 outlet for New Surface Name.
(f) Click Create.
After the line surface z=0 outlet is created, a new entry will automatically
be generated for New Surface Name, in case you would like to create another
surface.
(g) Close the Iso-Surface panel.
1-34 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
5. Display and save an XY plot of the temperature profile across the centerline of the
outlet for the initial solution (Figure 1.9).
Plot −→ XY Plot...
(a) Select Temperature... and Static Temperature from the Y Axis Function drop-
down lists.
(b) Select z=0 outlet from the Surfaces selection list.
(c) Click Plot.
(d) Enable Write to File in the Options group box.
The button that was originally labeled Plot will change to Write....
(e) Click Write... to open the Select File dialog box.
i. Enter outlet temp1.xy for XY File.
ii. Click OK to save the temperature data and close the Select File dialog
box.
(f) Close the Solution XY Plot panel.
c

 Fluent Inc. September 21, 2006 1-35
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Z
Y
X
Static Temperature
FLUENT 6.3 (3d, pbns, rke)
Position (in)
(k)
Temperature
Static
8
7.5
7
6.5
6
5.5
5
4.5
4
3.5
3.02e+02
3.01e+02
3.00e+02
2.99e+02
2.98e+02
2.97e+02
2.96e+02
2.95e+02
2.94e+02
2.93e+02
z=0_outlet2
Figure 1.9: Outlet Temperature Profile for the Initial Solution
6. Define a custom field function for the dynamic head formula (ρ|V |2
/2).
Define −→ Custom Field Functions...
(a) Select Density... and Density from the Field Functions drop-down lists, and click
the Select button to add density to the Definition field.
(b) Click the X button to add the multiplication symbol to the Definition field.
(c) Select Velocity... and Velocity Magnitude from the Field Functions drop-down
lists, and click the Select button to add |V| to the Definition field.
1-36 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(d) Click y^x to raise the last entry in the Definition field to a power, and click 2
for the power.
(e) Click the / button to add the division symbol to the Definition field, and then
click 2.
(f) Enter dynamic-head for New Function Name.
(g) Click Define and close the Custom Field Function Calculator panel.
7. Display filled contours of the custom field function (Figure 1.10).
Display −→ Contours...
(a) Select Custom Field Functions... and dynamic-head from the Contours of drop-
down lists.
Hint: Custom Field Functions... is at the top of the upper Contours of drop-
down list. After you have opened the drop-down list, scroll up by clicking
the up-arrow button on the scroll bar on the right.
(b) Make sure that symmetry is selected from the Surfaces selection list.
(c) Click Display and close the Contours panel.
Note: You may need to change the view by zooming out after the last vector display,
if you have not already done so.
c

 Fluent Inc. September 21, 2006 1-37
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Contours of dynamic-head
FLUENT 6.3 (3d, pbns, rke)
1.01e+03
9.60e+02
9.09e+02
8.59e+02
8.08e+02
7.58e+02
7.07e+02
6.57e+02
6.06e+02
5.56e+02
5.05e+02
4.55e+02
4.04e+02
3.54e+02
3.03e+02
2.53e+02
2.02e+02
1.52e+02
1.01e+02
5.05e+01
0.00e+00
Z
Y
X
Figure 1.10: Contours of the Dynamic Head Custom Field Function
8. Save the settings for the custom field function by writing the case and data files
(elbow1.cas.gz and elbow1.dat.gz).
File −→ Write −→Case  Data...
(a) Make sure that elbow1.cas.gz is entered for Case/Data File.
Note: When you write the case and data file at the same time, it does not
matter whether you specify the file name with a .cas or .dat extension,
as both will be saved.
(b) Click OK to close the Select File dialog box.
1-38 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 7: Enabling Second-Order Discretization
The elbow solution computed in the first part of this tutorial uses first-order discretiza-
tion. The resulting solution is very diffusive; mixing is overpredicted, as can be seen
in the contour plots of temperature and velocity distribution. You will now change to
second-order discretization for all listed equations, in order to improve the accuracy of
the solution. With the second-order discretization, you will change the gradient option in
the solver from cell-based to node-based in order to optimize energy conservation.
1. Change the solver settings.
Define −→ Models −→ Solver...
(a) Select Green-Gauss Node Based from the Gradient Option list.
Note: This option is more suitable than the cell-based gradient option for
unstructured meshes, as it will ensure better energy conservation.
(b) Click OK to close the Solver panel.
c

 Fluent Inc. September 21, 2006 1-39
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
2. Enable the second-order scheme for the calculation of all the listed equations.
Solve −→ Controls −→Solution...
(a) Retain the default values in the Under-Relaxation Factors group box.
(b) Select Second Order from the Pressure drop-down list in the Discretization group
box.
(c) Select Second Order Upwind from the Momentum, Turbulent Kinetic Energy,
Turbulent Dissipation Rate, and Energy drop-down lists.
Note: Scroll down the Discretization group box to find Energy.
(d) Click OK to close the Solution Controls panel.
3. Continue the calculation by requesting 150 more iterations.
Solve −→ Iterate...
1-40 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Extra: To save the convergence history of the surface monitor for this set of itera-
tions as a separate output file, you would need to change the File Name in the
Define Surface Monitor to monitor-2.out prior to running the calculation.
(a) Make sure that 150 is entered for Number of Iterations.
(b) Click Iterate and close the Iterate panel when the calculation is complete.
The solution will converge in approximately 57 additional iterations (Fig-
ure 1.11). The convergence history is shown in Figure 1.12.
Z
Y
X
Scaled Residuals
FLUENT 6.3 (3d, pbns, rke)
Iterations
200
180
160
140
120
100
80
60
40
20
0
1e+00
1e-01
1e-02
1e-03
1e-04
1e-05
1e-06
1e-07
epsilon
k
energy
z-velocity
y-velocity
x-velocity
continuity
Residuals
Figure 1.11: Residuals for the Second-Order Energy Calculation
Note: You should expect to see the residuals jump whenever you change the solution
control parameters.
c

 Fluent Inc. September 21, 2006 1-41
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Z
Y
X
Convergence history of Static Temperature on pressure-outlet-7
FLUENT 6.3 (3d, pbns, rke)
Iteration
(k)
Average
Weighted
Mass
200
180
160
140
120
100
80
60
40
20
0
296.6000
296.5500
296.5000
296.4500
296.4000
296.3500
296.3000
296.2500
296.2000
296.1500
296.1000
monitor-1
Figure 1.12: Convergence History of Mass-Weighted Average Temperature
4. Save the case and data files for the second-order solution (elbow2.cas.gz and
elbow2.dat.gz).
File −→ Write −→Case  Data...
(a) Enter elbow2.gz for Case/Data File.
(b) Click OK to close the Select File dialog box.
The files elbow2.cas.gz and elbow2.dat.gz will be saved in your folder.
1-42 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
5. Examine the revised temperature distribution (Figure 1.13).
Display −→ Contours...
(a) Make sure that Filled is enabled in the Options group box.
(b) Select Temperature... and Static Temperature from the Contours of drop-down
lists.
(c) Make sure that symmetry is selected from the Surfaces selection list.
(d) Click Display and close the Contours panel.
Figure 1.13 shows the thermal spreading of the warm fluid layer near the outer wall
of the bend. Compare Figure 1.13 with Figure 1.6 to see the effects of second-order
discretization.
c

 Fluent Inc. September 21, 2006 1-43
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Contours of Static Temperature (k)
FLUENT 6.3 (3d, pbns, rke)
3.13e+02
3.12e+02
3.11e+02
3.10e+02
3.09e+02
3.08e+02
3.07e+02
3.06e+02
3.05e+02
3.04e+02
3.03e+02
3.02e+02
3.01e+02
3.00e+02
2.99e+02
2.98e+02
2.97e+02
2.96e+02
2.95e+02
2.94e+02
2.93e+02
Z
Y
X
Figure 1.13: Temperature Contours for the Second-Order Solution
6. Display and save an XY plot of the temperature profile across the centerline of the
outlet for the second-order solution (Figure 1.14).
Plot −→ XY Plot...
(a) Disable Write to File in the Options group box by clicking the check box or the
text.
The button that was labeled Write... will change to Plot.
1-44 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(b) Make sure that Temperature... and Static Temperature are selected from the Y
Axis Function drop-down lists.
(c) Make sure that z=0 outlet is selected from the Surfaces selection list.
(d) Click Plot.
Z
Y
X
Static Temperature
FLUENT 6.3 (3d, pbns, rke)
Position (in)
(k)
Temperature
Static
8
7.5
7
6.5
6
5.5
5
4.5
4
3.5
3.00e+02
2.99e+02
2.98e+02
2.97e+02
2.96e+02
2.95e+02
2.94e+02
2.93e+02
z=0_outlet
Figure 1.14: Outlet Temperature Profile for the Second-Order Solution
(e) Enable Write to File in the Options group box.
The button that was labeled Plot will change to Write....
(f) Click Write... to open the Select File dialog box.
i. Enter outlet temp2.xy for XY File.
ii. Click OK to save the temperature data.
(g) Close the Solution XY Plot panel.
c

 Fluent Inc. September 21, 2006 1-45
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Step 8: Adapting the Grid
The elbow solution can be improved further by refining the grid to better resolve the flow
details. In the following steps, you will adapt the grid based on the temperature gradients
in the current solution. Once the grid has been refined, you will continue the calculation.
1. Adapt the grid in the regions of high temperature gradient.
Adapt −→Gradient...
(a) Make sure that Refine is enabled in the Options group box.
It is not necessary to deselect Coarsen in this instance, since FLUENT will not
coarsen beyond the original mesh for a 3D grid.
(b) Select Temperature... and Static Temperature from the Gradients of drop-down
lists.
(c) Click Compute.
FLUENT will update the Min and Max values to show the minimum and max-
imum temperature gradient.
(d) Enter 0.003 for Refine Threshold.
It is a good rule of thumb to use 10% of the maximum gradient when setting
the value for Refine Threshold.
(e) Click Mark.
FLUENT will report in the console that approximately 1258 cells were marked
for adaption.
1-46 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(f) Click the Manage... button to open the Manage Adaption Registers panel.
i. Click Display.
FLUENT will display the cells marked for adaption in the graphics window
(Figure 1.15).
Z
Y
X
Adaption Markings (gradient-r0)
FLUENT 6.3 (3d, pbns, rke)
Figure 1.15: Cells Marked for Adaption
c

 Fluent Inc. September 21, 2006 1-47
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Extra: You can change the way FLUENT displays cells marked for adap-
tion (Figure 1.16) by performing the following steps:
A. Click the Options... button in the Manage Adaption Registers panel
to open the Adaption Display Options panel.
B. Enable Draw Grid in the Options group box.
The Grid Display panel will open.
C. Make sure that Edges is the only option enabled in the Options group
box.
D. Select Feature from the Edge Type list.
E. Select all of the items except default-interior from the Surfaces selec-
tion list.
F. Click Display and close the Grid Display panel.
1-48 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
G. Enable Filled in the Options group box in the Adaption Display Op-
tions panel.
H. Enable Wireframe in the Refine group box.
I. Click OK to close the Adaption Display Options panel.
J. Click Display in the Manage Adaption Registers panel.
K. Rotate the view and zoom in to get the display shown in Figure 1.16.
Adaption Markings (gradient-r0)
FLUENT 6.3 (3d, pbns, rke)
Z
Y
X
Figure 1.16: Alternate Display of Cells Marked for Adaption
L. After you are finished viewing the marked cells, rotate the view back
and zoom out again to return to the angle and magnification shown
in Figure 1.13.
ii. Click Adapt in the Manage Adaption Registers panel.
A Question dialog box will open, asking whether it is acceptable to adapt
the grid by creating hanging nodes. Click Yes to proceed.
Note: There are two different ways to adapt. You can click Adapt in
the Manage Adaption Registers panel as was just done, or close this
panel and perform the adaption using the Gradient Adaption panel. If
c

 Fluent Inc. September 21, 2006 1-49
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
you use the Adapt button in the Gradient Adaption panel, FLUENT will
recreate an adaption register. Therefore, once you have the Manage
Adaption Registers panel open, it saves time to use the Adapt button
there.
iii. Close the Manage Adaption Registers panel.
(g) Close the Gradient Adaption panel.
2. Display the adapted grid (Figure 1.17).
Display −→Grid...
(a) Make sure that All is selected from the Edge Type list.
(b) Deselect all of the highlighted items from the Surfaces selection list except for
symmetry.
(c) Click Display and close the Grid Display panel.
1-50 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Z
Y
X
Grid
FLUENT 6.3 (3d, pbns, rke)
Figure 1.17: The Adapted Grid
3. Request an additional 150 iterations.
Solve −→ Iterate...
The solution will converge after approximately 100 additional iterations (Figures 1.18
and 1.19).
4. Save the case and data files for the second-order solution with an adapted grid
(elbow3.cas.gz and elbow3.dat.gz).
File −→ Write −→ Case  Data...
(a) Enter elbow3.gz for Case/Data File.
(b) Click OK to close the Select File dialog box.
The files elbow3.cas.gz and elbow3.dat.gz will be saved in your folder.
c

 Fluent Inc. September 21, 2006 1-51
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Z
Y
X
Scaled Residuals
FLUENT 6.3 (3d, pbns, rke)
Iterations
300
250
200
150
100
50
0
1e+00
1e-01
1e-02
1e-03
1e-04
1e-05
1e-06
1e-07
epsilon
k
energy
z-velocity
y-velocity
x-velocity
continuity
Residuals
Figure 1.18: The Complete Residual History
Z
Y
X
Convergence history of Static Temperature on pressure-outlet-7
FLUENT 6.3 (3d, pbns, rke)
Iteration
(k)
Average
Weighted
Mass
300
250
200
150
100
50
0
296.6000
296.5500
296.5000
296.4500
296.4000
296.3500
296.3000
296.2500
296.2000
296.1500
296.1000
monitor-1
Figure 1.19: Convergence History of Mass-Weighted Average Temperature
1-52 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
5. Examine the filled temperature distribution (using node values) on the revised grid
(Figure 1.20).
Display −→ Contours...
Contours of Static Temperature (k)
FLUENT 6.3 (3d, pbns, rke)
3.13e+02
3.12e+02
3.11e+02
3.10e+02
3.09e+02
3.08e+02
3.07e+02
3.06e+02
3.05e+02
3.04e+02
3.03e+02
3.02e+02
3.01e+02
3.00e+02
2.99e+02
2.98e+02
2.97e+02
2.96e+02
2.95e+02
2.94e+02
2.93e+02
Z
Y
X
Figure 1.20: Filled Contours of Temperature Using the Adapted Grid
6. Display and save an XY plot of the temperature profile across the centerline of the
outlet for the adapted second-order solution (Figure 1.21).
Plot −→ XY Plot...
c

 Fluent Inc. September 21, 2006 1-53
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
(a) Disable Write to File in the Options group box.
The button that was originally labeled Write... will change to Plot.
(b) Make sure that Temperature... and Static Temperature are selected from the Y
Axis Function drop-down lists.
(c) Make sure that z=0 outlet is selected from the Surfaces selection list.
(d) Click Plot.
Z
Y
X
Static Temperature
FLUENT 6.3 (3d, pbns, rke)
Position (in)
(k)
Temperature
Static
8
7.5
7
6.5
6
5.5
5
4.5
4
3.5
3.00e+02
2.99e+02
2.98e+02
2.97e+02
2.96e+02
2.95e+02
2.94e+02
2.93e+02
z=0_outlet
Figure 1.21: Outlet Temperature Profile for the Adapted Second-Order Solution
(e) Enable Write to File in the Options group box.
The button that was originally labeled Plot will change to Write....
(f) Click Write... to open the Select File dialog box.
i. Enter outlet temp3.xy for XY File.
ii. Click OK to save the temperature data.
(g) Close the Solution XY Plot panel.
1-54 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
7. Display the outlet temperature profiles for each of the three solutions on a single
plot (Figure 1.22).
Plot −→File...
(a) Click the Add... button to open the Select File dialog box.
c

 Fluent Inc. September 21, 2006 1-55
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
i. Click once on outlet temp1.xy, outlet temp2.xy, and outlet temp3.xy.
Each of these files will be listed with their folder in the XY File(s) list to
indicate that they have been selected.
Hint: If you select a file by mistake, simply click the file in the XY File(s)
list and then click Remove.
ii. Click OK to close the Select File dialog box.
(b) Select the folder path ending in outlet temp1.xy from the Files selection list.
(c) Enter 1st Order Soln in the lowest field on the right (next to the Change
Legend Entry button).
(d) Click the Change Legend Entry button.
The item in the Legend Entries list for outlet temp1.xy will be changed to 1st
Order Soln. This legend entry will be displayed in the upper-left corner of the
XY plot generated in a later step.
(e) In a similar manner, change the legend entry for the folder path ending in
outlet temp2.xy to be 2nd Order Soln.
(f) In a similar manner, change the legend entry for the folder path ending in
outlet temp3.xy to be Adapted Grid.
(g) Click Plot and close the File XY Plot panel.
Figure 1.22 shows the three temperature profiles at the centerline of the outlet. It
is apparent by comparing both the shape of the profiles and the predicted outer wall
temperature that the solution is highly dependent on the mesh and solution options.
Specifically, further mesh adaption should be used in order to obtain a solution that
is independent of the mesh.
Extra: You can perform additional grid adaptions based on temperature gradi-
ent and run the calculation to see how the temperature profile changes at the
outlet. A case and data file (elbow4.cas.gz and elbow4.dat.gz) has been
provided in which the grid has undergone three more levels of adaption, and
the resulting temperature profiles have been plotted with outlet temp2.xy and
outlet temp3.xy in Figure 1.23.
It is evident from Figure 1.23 that as the grid is adapted further, the profiles
converge on a grid-independent profile. The resulting wall temperature at the
outlet is predicted to be around 300.25 K once grid independence is achieved.
If the adaption steps had not been performed, the wall temperature would have
incorrectly been estimated at around 298.5 K.
If computational resources allow, it is always recommended to perform succes-
sive adaptions until the solution is independent of the grid (within an accept-
able tolerance). Typically, profiles of important variables are examined (in this
case, temperature) and compared to determine grid independence.
1-56 c

 Fluent Inc. September 21, 2006
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Figure 1.22: Outlet Temperature Profiles for the Three Solutions
Figure 1.23: Outlet Temperature Profiles for Subsequent Grid Adaption Steps
c

 Fluent Inc. September 21, 2006 1-57
Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow
Summary
Comparison of the filled temperature contours for the first solution (using the original
grid and first-order discretization) and the last solution (using an adapted grid and
second-order discretization) clearly indicate that the latter is much less diffusive. While
first-order discretization is the default scheme in FLUENT, it is good practice to use
your first-order solution as a starting guess for a calculation that uses a higher-order
discretization scheme and, optionally, an adapted grid.
Note that in this problem, the flow field is decoupled from temperature, since all prop-
erties are constant. For such cases, it is more efficient to compute the flow-field solution
first (i.e., without solving the energy equation) and then solve for energy (i.e., without
solving the flow equations). You will use the Solution Controls panel to turn the solution
of the equations on and off during this procedure.
1-58 c

 Fluent Inc. September 21, 2006
GAMBIT Demo – Tutorial
Wake of a Cylinder.
1.1 Problem Description
The problem to be considered is schematically in fig. 1. We consider flow across a
cylinder and look at the wake behind the cylinder.
Figure 1: Schematic of the Problem (not to scale).
1.2 Procedure
Start GAMBIT: go to StartÆProgramsÆ Accessories Æ Command Prompt.
This opens up the DOS command window. Change the path to the directory you want
to work in.
At the command prompt, type: gambit filename
This should open up the gambit interface that would look like in fig 2.
Figure 2: Gambit Interface.
50 cm
20 cm
10 cm
Ø 1cm
Air
Walls
1 m/s
Step 1: Select a Solver
1. Choose the solver you will use to run your CFD calculation by selecting the following
from the main menu bar:
Solver — FLUENT 5/6
This selects the FLUENT 5/6 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.
Step 2: Create the domain
1. Create the outer domain by drawing a rectangle
Face command button ÆCreate face
In the create rectangle box, enter the height and width as w = 50, h = 20 and apply.
If you do not see the rectangle, fit the display to screen by using at the bottom.
2. Similarly create a circle for the cylinder.
Right click on and choose the circle option. In the radius panel enter r = 0.5.
3. Offset the circle by 10 units to the left by using the move command.
Move/Copy/Align faces . To select the circle, use shift + left click on the circle.
In the local panel, enter -10 for the x value. This will move the circle by 10 units to the
left.
4. Since we only need the region of the domain where the flow occurs, we can
subtract the circle from the rectangle.
Right click on Boolean operations and choose ‘subtract’ option. This will open up
the ‘subtract real faces’ window. For the first selection, choose the rectangle by using
shift + left click on any of the boundaries of the rectangle. Once the rectangle is selected,
it will be displayed in red. Now click in the ‘subtract faces’ box and choose the circle by
following the same procedure as before. Click apply.
The transcript window will give you a description of the operations performed. Any error
will also be displayed here.
Step 3: Meshing the edges.
While a face can be directly meshed in gambit, specifying the node distribution on
the edges gives a better control on the grid distribution. This would be especially
important when your problem requires a finer mesh in some regions of the domain and
not so fine in other regions where there is not much ‘action’ taking place. In the present
example it is clear that most of the interesting physical phenomena take place near the
surface of the cylinder and hence we need a fine mesh close to the cylinder.
Mesh Æ Edge Æ Mesh Edges
This will open up the edge meshing panel.
1. Select the edge that makes the cylinder using the same procedure
described previously. Leave the value of the ratio at the default value of 1.
Right click on the interval size button and choose interval count option.
This will allow you to specify the number of nodes you want on the
cylinder surface. Enter a value of 50 in the corresponding box to the left
and apply.
2. Select all the other edges. Right click on the interval count button and
bring it back to interval size and enter 1 in the box. Click apply. This will
create an edge mesh for all the edges. Now we are ready to mesh the face.
Mesh Æ Face Æ Mesh Faces
This will open the mesh faces panel
Select the face of the domain. In the Elements option, right click on the Quad option and
choose Tri. The type will be set to Pave by default. Click apply. The face will be meshed
with triangular mesh elements. The display should look as shown in the following figure.
As was desired, we have created a finer mesh close to the cylinder surface and it gets
coarser as we move away from the surface.
Figure 3: The Meshed Domain.
Step 4: Set Boundary Types.
Zones Æ Specify Boundary Types
This will open the Boundary types panel
1. Under Entity change the option from Faces to Edges by right clicking.
2. Choose the cylinder edge and under Type leave it as default ‘wall’. In the
Name box, enter ‘cylinder’ for the name of the edge (any name can be
specified) and apply.
3. Similarly select the top edge of the rectangular domain and name it as ‘Top
wall’. Name the bottom edge as ‘Bottom wall’.
4. Select the left boundary and choose velocity inlet from the options under
Type. Name it as ‘inlet’ and apply.
5. Select the right boundary and choose Outflow from the options under Type.
Name it as ‘outlet’ and apply.
Now we are done specifying the boundary types.
Step 5: Exporting the mesh to be read by FLUENT.
File Æ Export Æ Mesh
Will open the Export Mesh File panel. Here you can specify the path and the filename of
the mesh to be exported. Specify ‘Cylinder.msh’ as the filename. Make sure to click on
the Export 2-D mesh radio button to make it active. Click apply. The mesh will get
exported in a format that FLUENT reads.
File Æ Save as Æ Enter path and filename. This will save the .dbs file.
File Æ Exit
Creating and meshing_basic_geometry
Creating and meshing_basic_geometry
Creating and meshing_basic_geometry
Creating and meshing_basic_geometry
Creating and meshing_basic_geometry
Creating and meshing_basic_geometry
Creating and meshing_basic_geometry

More Related Content

What's hot

Sheet solutions 2009
Sheet solutions 2009Sheet solutions 2009
Sheet solutions 2009
Hien Dinh
 
дбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How ToдбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How To
Tatyana Remayeva
 
дбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How ToдбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How To
Tatyana Remayeva
 
Fusion 360 Tutorial
Fusion 360 TutorialFusion 360 Tutorial
Fusion 360 Tutorial
NYCCTfab
 

What's hot (19)

MakerBot Replicator 2x Primer
MakerBot Replicator 2x Primer MakerBot Replicator 2x Primer
MakerBot Replicator 2x Primer
 
Visi progress
Visi progressVisi progress
Visi progress
 
Makerbot Replicator 2 Primer
Makerbot Replicator 2 PrimerMakerbot Replicator 2 Primer
Makerbot Replicator 2 Primer
 
Sheet solutions 2009
Sheet solutions 2009Sheet solutions 2009
Sheet solutions 2009
 
Introduction to Rhino
Introduction to RhinoIntroduction to Rhino
Introduction to Rhino
 
дбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How ToдбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How To
 
дбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How ToдбщбскщбсщкбсQuickpoint How To
дбщбскщбсщкбсQuickpoint How To
 
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorialDISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
 
Creo parametric-quick-start
Creo parametric-quick-startCreo parametric-quick-start
Creo parametric-quick-start
 
Adobe Illustrator CC 2018
Adobe Illustrator CC 2018 Adobe Illustrator CC 2018
Adobe Illustrator CC 2018
 
Fusion 360 Tutorial
Fusion 360 TutorialFusion 360 Tutorial
Fusion 360 Tutorial
 
mastercam_full
mastercam_fullmastercam_full
mastercam_full
 
Revit Lesson 01A
Revit Lesson 01ARevit Lesson 01A
Revit Lesson 01A
 
Pf track
Pf trackPf track
Pf track
 
Ultimaker 2+
Ultimaker 2+Ultimaker 2+
Ultimaker 2+
 
Knowledgeware
KnowledgewareKnowledgeware
Knowledgeware
 
PRO ENGINEER BASIC
PRO ENGINEER BASICPRO ENGINEER BASIC
PRO ENGINEER BASIC
 
Cad cam lab 2016 2017
Cad cam lab 2016 2017Cad cam lab 2016 2017
Cad cam lab 2016 2017
 
Surface machining
Surface machiningSurface machining
Surface machining
 

Similar to Creating and meshing_basic_geometry

Final Project Part 1 (Videos Form) Create this.docx
Final Project   Part 1 (Videos Form) Create this.docxFinal Project   Part 1 (Videos Form) Create this.docx
Final Project Part 1 (Videos Form) Create this.docx
mydrynan
 
Sheet metal design
Sheet metal designSheet metal design
Sheet metal design
Hien Dinh
 
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docxFluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
bryanwest16882
 
Xelerate eco manager
Xelerate eco managerXelerate eco manager
Xelerate eco manager
AlexDaStar
 
MapMapMap documentation
MapMapMap documentationMapMapMap documentation
MapMapMap documentation
Anome
 
Zmorph Dual Head User Manual for Printing
Zmorph Dual Head User Manual for PrintingZmorph Dual Head User Manual for Printing
Zmorph Dual Head User Manual for Printing
Ryan Dunn
 
238431355 plaxis-tutorial-manual
238431355 plaxis-tutorial-manual238431355 plaxis-tutorial-manual
238431355 plaxis-tutorial-manual
WSKT
 

Similar to Creating and meshing_basic_geometry (20)

Introductory manual for the open source meshing code SALOME
Introductory manual for the open source meshing code SALOMEIntroductory manual for the open source meshing code SALOME
Introductory manual for the open source meshing code SALOME
 
Workshop15 rolling-plate
Workshop15 rolling-plateWorkshop15 rolling-plate
Workshop15 rolling-plate
 
FEA Final Project
FEA Final ProjectFEA Final Project
FEA Final Project
 
Xmastcamcribboard
XmastcamcribboardXmastcamcribboard
Xmastcamcribboard
 
CIM and automation laboratory manual
CIM and automation laboratory manualCIM and automation laboratory manual
CIM and automation laboratory manual
 
Maya
MayaMaya
Maya
 
Final Project Part 1 (Videos Form) Create this.docx
Final Project   Part 1 (Videos Form) Create this.docxFinal Project   Part 1 (Videos Form) Create this.docx
Final Project Part 1 (Videos Form) Create this.docx
 
Maya
MayaMaya
Maya
 
Sheet metal design
Sheet metal designSheet metal design
Sheet metal design
 
Icem102
Icem102Icem102
Icem102
 
Type 23 Frigate FEA Hull Design
Type 23 Frigate FEA Hull DesignType 23 Frigate FEA Hull Design
Type 23 Frigate FEA Hull Design
 
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docxFluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
 
Plaxis 3d tutorial manual
Plaxis 3d tutorial manualPlaxis 3d tutorial manual
Plaxis 3d tutorial manual
 
𝕬𝖓𝖎𝖒𝖆𝖙𝖎𝖓𝖌 𝖙𝖊𝖝𝖙 𝖆𝖓𝖉 𝖔𝖇𝖏𝖊𝖈𝖙 𝖇𝖞 𝕽𝖔𝖓𝖊𝖑𝖑 𝕸𝖔𝖍𝖆𝖓 7𝖙𝖍 𝕭.pptx
𝕬𝖓𝖎𝖒𝖆𝖙𝖎𝖓𝖌 𝖙𝖊𝖝𝖙 𝖆𝖓𝖉 𝖔𝖇𝖏𝖊𝖈𝖙 𝖇𝖞 𝕽𝖔𝖓𝖊𝖑𝖑 𝕸𝖔𝖍𝖆𝖓 7𝖙𝖍 𝕭.pptx𝕬𝖓𝖎𝖒𝖆𝖙𝖎𝖓𝖌 𝖙𝖊𝖝𝖙 𝖆𝖓𝖉 𝖔𝖇𝖏𝖊𝖈𝖙 𝖇𝖞 𝕽𝖔𝖓𝖊𝖑𝖑 𝕸𝖔𝖍𝖆𝖓 7𝖙𝖍 𝕭.pptx
𝕬𝖓𝖎𝖒𝖆𝖙𝖎𝖓𝖌 𝖙𝖊𝖝𝖙 𝖆𝖓𝖉 𝖔𝖇𝖏𝖊𝖈𝖙 𝖇𝖞 𝕽𝖔𝖓𝖊𝖑𝖑 𝕸𝖔𝖍𝖆𝖓 7𝖙𝖍 𝕭.pptx
 
Xelerate eco manager
Xelerate eco managerXelerate eco manager
Xelerate eco manager
 
3 d2012 1-tutorial
3 d2012 1-tutorial3 d2012 1-tutorial
3 d2012 1-tutorial
 
Safe tutorial
Safe tutorialSafe tutorial
Safe tutorial
 
MapMapMap documentation
MapMapMap documentationMapMapMap documentation
MapMapMap documentation
 
Zmorph Dual Head User Manual for Printing
Zmorph Dual Head User Manual for PrintingZmorph Dual Head User Manual for Printing
Zmorph Dual Head User Manual for Printing
 
238431355 plaxis-tutorial-manual
238431355 plaxis-tutorial-manual238431355 plaxis-tutorial-manual
238431355 plaxis-tutorial-manual
 

Recently uploaded

如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
Resume all my skills and educations and achievement
Resume all my skills and educations and  achievement Resume all my skills and educations and  achievement
Resume all my skills and educations and achievement
210303105569
 
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
yhavx
 
Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
mark11275
 
如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
awasv46j
 
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
drmarathore
 

Recently uploaded (20)

Solutions For Social Media App Development (1).pptx
Solutions For Social Media App Development (1).pptxSolutions For Social Media App Development (1).pptx
Solutions For Social Media App Development (1).pptx
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Bath毕业证书)巴斯大学毕业证成绩单本科硕士学位证留信学历认证
 
Academic Portfolio (2017-2021) .pdf
Academic Portfolio (2017-2021)      .pdfAcademic Portfolio (2017-2021)      .pdf
Academic Portfolio (2017-2021) .pdf
 
Resume all my skills and educations and achievement
Resume all my skills and educations and  achievement Resume all my skills and educations and  achievement
Resume all my skills and educations and achievement
 
Spring Summer 26 Colors Trend Book Peclers Paris
Spring Summer 26 Colors Trend Book Peclers ParisSpring Summer 26 Colors Trend Book Peclers Paris
Spring Summer 26 Colors Trend Book Peclers Paris
 
18+ Young ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Girl Serviℂ...
18+ Young ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Girl Serviℂ...18+ Young ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Girl Serviℂ...
18+ Young ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Girl Serviℂ...
 
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
 
Morgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity DesignMorgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity Design
 
Spring Summer 2026 Inspirations trend book Peclers Paris
Spring Summer 2026 Inspirations trend book Peclers ParisSpring Summer 2026 Inspirations trend book Peclers Paris
Spring Summer 2026 Inspirations trend book Peclers Paris
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahim
 
Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Semarang ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
 
如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UW毕业证书)华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
 
Software Architecture - Architecture Styles and Patterns-1.pdf
Software Architecture - Architecture Styles and Patterns-1.pdfSoftware Architecture - Architecture Styles and Patterns-1.pdf
Software Architecture - Architecture Styles and Patterns-1.pdf
 
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
Abortion pills in Kuwait 🚚+966505195917 but home delivery available in Kuwait...
 

Creating and meshing_basic_geometry

  • 1. CREATING AND MESHING BASIC GEOMETRY © Fluent Inc., Sep-04 1-1 1. CREATING AND MESHING BASIC GEOMETRY This tutorial illustrates geometry creation and mesh generation for a simple geometry using GAMBIT. In this tutorial you will learn how to: • Start GAMBIT • Use the Operation toolpad • Create a brick and an elliptical cylinder • Unite two volumes • Manipulate the display of your model • Mesh a volume • Examine the quality of the mesh • Save the session and exit GAMBIT 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.
  • 2. Problem Description CREATING AND MESHING BASIC GEOMETRY 1-2 © Fluent Inc., Sep-04 1.2 Problem Description The model consists of an intersecting brick and elliptical cylinder. The basic geometry is shown schematically in Figure 1-1. 10 12 6 6 10 10 Figure 1-1: Problem specification
  • 3. CREATING AND MESHING BASIC GEOMETRY Strategy © Fluent Inc., Sep-04 1-3 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 These details, as well as others, are covered in subsequent tutorials.
  • 4. Procedure CREATING AND MESHING BASIC GEOMETRY 1-4 © Fluent Inc., Sep-04 1.4 Procedure Type gambit -id basgeom to start GAMBIT. This command 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. Figure 1-2: The GAMBIT graphical user interface (GUI)
  • 5. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-5 Step 1: Create a Brick 1. Create a brick by doing the following: 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. The name of a command button is displayed in the Description window at the bottom of the GAMBIT GUI when you hold the mouse cursor over the command button. The GEOMETRY command button will appear depressed when it is selected. Selecting the GEOMETRY command button opens the Geometry subpad. Note that when you first start GAMBIT, the GEOMETRY command button is selected by default. 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. This command sequence opens the Create Real Brick form. The above description of selecting command buttons can be shortened to the following:
  • 6. Procedure CREATING AND MESHING BASIC GEOMETRY 1-6 © Fluent Inc., Sep-04 GEOMETRY → VOLUME → CREATE VOLUME 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. f) Select Centered from the option menu to the right of Direction. NOTE: When you first open the Create Real Brick form, the Centered option is selected by default. i) Hold down the left mouse button on the option button to the right of Direction until the option menu appears. ii) Select Centered from the list. 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 use the UNDO command button to undo multiple levels of geometry creation. At this point, you have only performed one operation, so you can only undo one operation.
  • 7. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-7 Figure 1-3: Rectangular brick volume (side view)
  • 8. Procedure CREATING AND MESHING BASIC GEOMETRY 1-8 © Fluent Inc., Sep-04 Step 2: Create an Elliptical Cylinder 1. Create an elliptical cylinder. a) Hold down the right mouse button while the cursor is on the CREATE VOLUME command button. b) Select the CREATE REAL CYLINDER option from the resulting menu. ! CREATE REAL CYLINDER is the text that is written in the Description window when you hold the mouse cursor over the menu item. This command sequence opens the Create Real Cylinder form. The above method of selecting command buttons can be shortened to the following: GEOMETRY → VOLUME → CREATE VOLUME R where R indicates a toolpad choice using the right mouse button. c) Enter a Height of 10. d) Enter a value of 3 for Radius 1. e) Enter a value of 6 for Radius 2.
  • 9. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-9 f) Retain the default Axis Location of Positive Z. g) Click Apply. The brick and elliptical cylinder are shown in Figure 1-4. Figure 1-4: Brick and elliptical cylinder
  • 10. Procedure CREATING AND MESHING BASIC GEOMETRY 1-10 © Fluent Inc., Sep-04 Step 3: Unite the Two Volumes 1. Unite the brick and elliptical cylinder into one volume. GEOMETRY → VOLUME → BOOLEAN OPERATIONS This command sequence opens the Unite Real Volumes form. 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. b) Shift-left-click the elliptical cylinder in the graphics window. 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.
  • 11. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-11 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
  • 12. Procedure CREATING AND MESHING BASIC GEOMETRY 1-12 © Fluent Inc., Sep-04 Step 4: Manipulate the Display 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 CONFIGURATION command button in the Global Control toolpad. 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.
  • 13. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-13 Figure 1-6: GAMBIT GUI—four graphics-window quadrants 6. Restore a single display of the model. 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.
  • 14. Procedure CREATING AND MESHING BASIC GEOMETRY 1-14 © Fluent Inc., Sep-04 Step 5: Mesh the Volume 1. Create a mesh for the volume. MESH → VOLUME → MESH VOLUMES This command sequence opens the Mesh Volumes form. a) Shift-left-click the volume in the graphics window. 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. b) Click Apply at the bottom of the Mesh Volumes form. 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.
  • 15. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-15 The volume will be meshed as shown in Figure 1-7. Figure 1-7: Meshed volume
  • 16. Procedure CREATING AND MESHING BASIC GEOMETRY 1-16 © Fluent Inc., Sep-04 Step 6: Examine the Mesh 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 Skew and EquiSize Skew, 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. This action opens the Examine Mesh form.
  • 17. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-17 a) Select Range under Display Type at the top of the Examine Mesh form. A histogram appears at the bottom of the form. The histogram consists of a bar chart representing the statistical distribution of mesh elements with respect to the specified Quality Type. Each vertical bar on the histogram cor- responds to a unique set of upper and lower quality limits. The 3D Element type selected by default at the top of the form is a brick . b) Select or retain EquiSize Skew from the Quality Type option menu.
  • 18. Procedure CREATING AND MESHING BASIC GEOMETRY 1-18 © Fluent Inc., Sep-04 c) Click on one of the green vertical bars in the histogram to view elements within a certain quality range. Each element has a value of skewness between 0 and 1, where 0 represents an ideal element. The histogram is divided into 10 bars; each bar represents a 0.1 increment in the skewness value. For a good mesh, the bars on the left of the histogram will be large and those on the right will be small. Figure 1-8 shows the view in the graphics window if you click on the fourth bar from the left on the histogram (representing cells with a skewness value between 0.3 and 0.4). Figure 1-8: Elements of the mesh within a specified quality range d) Move the Upper and Lower slider boxes beneath the histogram to redefine the quality range to be displayed.
  • 19. CREATING AND MESHING BASIC GEOMETRY Procedure © Fluent Inc., Sep-04 1-19 Step 7: Save the Session and Exit GAMBIT 1. Save the GAMBIT session and exit GAMBIT. File → Exit GAMBIT will ask you whether you wish to save the current session before you exit. Click Yes to save the current session and exit GAMBIT.
  • 20. Summary CREATING AND MESHING BASIC GEOMETRY 1-20 © Fluent Inc., Sep-04 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.
  • 21. MODELING A MIXING ELBOW (2-D) © Fluent Inc., Sep-04 2-1 2. MODELING A MIXING ELBOW (2-D) 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.
  • 22. Problem Description MODELING A MIXING ELBOW (2-D) 2-2 © Fluent Inc., Sep-04 2.2 Problem Description The problem to be considered is shown schematically in Figure 2-1. A cold fluid enters through the large pipe and a warmer fluid enters through the small pipe. The two fluids mix in the elbow. 16 32 32 16 4 12 39.93° v T 1 1 , v T 2 2 , v T out out , Figure 2-1: Problem specification
  • 23. MODELING A MIXING ELBOW (2-D) Strategy © Fluent Inc., Sep-04 2-3 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).
  • 24. Procedure MODELING A MIXING ELBOW (2-D) 2-4 © Fluent Inc., Sep-04 2.4 Procedure Start GAMBIT. Step 1: Select a Solver 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.
  • 25. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-5 Step 2: Create the Initial Vertices 1. Create vertices to define the outline of the large pipe of the mixing elbow. TOOLS → COORDINATE SYSTEM → DISPLAY GRID This command sequence opens the Display Grid form. a) Check that Visibility is selected. This ensures that the background grid will be visible when it is created. b) Select X (the default) to the right of Axis. c) Enter a Minimum value of –32, a Maximum value of 32, and an Increment of 16. d) Click the Update list button.
  • 26. Procedure MODELING A MIXING ELBOW (2-D) 2-6 © Fluent Inc., Sep-04 This creates a background grid with four cells in the x direction and enters the x coordinates in the XY_plane X Values list. e) Select Y to the right of Axis. f) Enter a Minimum value of –32, a Maximum value of 32, and an Increment of 16. g) Click the Update list button. This creates a background grid with four cells in the y direction and enters the y coordinates in the XY_plane Y Values list. h) Check that Snap is selected under Options. The vertices you create later in this step will be “snapped” to points on the grid where the grid lines intersect. i) Select Lines (the default) to the right of Grid. The grid will be displayed using lines rather than points. j) Click Apply. GAMBIT creates a four-by-four grid in the graphics window. To see the whole grid, you must zoom out the display (see Figure 2-2). You can zoom out the display by pressing and holding down the right mouse button while moving the cursor vertically upward in the graphics window.
  • 27. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-7 Figure 2-2: Four-by-four grid to be used for creating vertices NOTE: You cannot use the FIT TO WINDOW command button (located on the Global Control toolpad) to zoom out the display because GAMBIT does not treat the grid as a model component to be fit within the graphics window. k) Ctrl-right-click the nine grid points shown in Figure 2-3. “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.
  • 28. Procedure MODELING A MIXING ELBOW (2-D) 2-8 © Fluent Inc., Sep-04 A D C B F G E H I Figure 2-3: Create vertices at grid points l) Unselect 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.
  • 29. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-9 Figure 2-4: Vertices for the main pipe
  • 30. Procedure MODELING A MIXING ELBOW (2-D) 2-10 © Fluent Inc., Sep-04 Step 3: Create Arcs for the Bend of the Mixing Elbow 1. Create an arc by selecting the following command buttons in order: GEOMETRY → EDGE → CREATE EDGE R This command sequence opens the Create Real Circular Arc form. a) Retain the default Method. 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.
  • 31. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-11 D B F G E Figure 2-5: Vertices used to create arcs 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). The vertex will turn red. 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.
  • 32. Procedure MODELING A MIXING ELBOW (2-D) 2-12 © Fluent Inc., Sep-04 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. Figure 2-6: Vertices and arcs
  • 33. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-13 Step 4: Create Straight Edges 1. Create straight edges for the large pipe. GEOMETRY → EDGE → CREATE EDGE R This command sequence opens the Create Straight Edge form. a) Shift-left-click the left endpoint of the smaller arc (vertex D in Figure 2-7). A D C B F G H I Figure 2-7: Vertices used to create straight edges b) Shift-left-click the vertices marked C, A, and B in Figure 2-7, in order.
  • 34. Procedure MODELING A MIXING ELBOW (2-D) 2-14 © Fluent Inc., Sep-04 c) Click Apply to accept the selection of the vertices. Three straight edges are drawn between the vertices. d) Shift-left-click the vertices marked F, H, I, and G in Figure 2-7, in order. e) Click Apply to accept the selection of the vertices. The graphics window with the arcs and straight edges is shown in Figure 2-8. Figure 2-8: Arcs and edges
  • 35. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-15 Step 5: Create the Small Pipe for the Mixing Elbow In this step, you will create vertices on the outer radius of the bend of the mixing elbow and split the large arc into three smaller arcs. Next, you will create vertices for the inlet of the small pipe. Finally, you will create the straight edges for the small pipe. 1. Create vertices on the outer radius of the bend, and split the large arc into three sections. GEOMETRY → EDGE → SPLIT/MERGE EDGES This command sequence opens the Split Edge form. 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.
  • 36. Procedure MODELING A MIXING ELBOW (2-D) 2-16 © Fluent Inc., Sep-04 This action 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. ii. Select edge.2 under Available in the Edge List form. ! Note that the Available names may be different in your geometry, depending on the order in which you created the edges. iii. Click the − − −> button to pick edge.2. 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. iv. Close the Edge List form. This method of selecting an entity can be used as an alternative to Shift- left-click in the graphics window. See the GAMBIT User’s Guide for more information on pick lists.
  • 37. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-17 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. c) Select Point (the default) to the right of Split With. You will split the edge by creating a point on the edge and then using this point to split the edge. d) Select Cylindrical from the Type option menu. You can now use cylindrical coordinates to specify where GAMBIT should split the edge. e) Input a value of –39.93 degrees next to t under Local. 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). h) Input a value of –50.07 degrees next to t under Local. 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.
  • 38. Procedure MODELING A MIXING ELBOW (2-D) 2-18 © Fluent Inc., Sep-04 Figure 2-9: Vertices created on outer radius of mixing elbow bend 2. Create points at the small inlet. GEOMETRY → VERTEX → MOVE/COPY VERTICES This command sequence opens the Move / Copy Vertices form.
  • 39. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-19 a) Select the second vertex created on the bend of the mixing elbow. b) Select Copy under Vertices in the Move / Copy Vertices form. c) Select Translate (the default) under Operation. 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.
  • 40. Procedure MODELING A MIXING ELBOW (2-D) 2-20 © Fluent Inc., Sep-04 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. g) Select the vertex just created in 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. The vertices are shown in Figure 2-10. Figure 2-10: Vertices to define the small pipe 3. Create straight edges for the small pipe. GEOMETRY → EDGE → CREATE EDGE This command sequence opens the Create Straight Edge form.
  • 41. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-21 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 M L Figure 2-11: Vertices to be used to create small pipe The small pipe is shown (with the large pipe) in Figure 2-12.
  • 42. Procedure MODELING A MIXING ELBOW (2-D) 2-22 © Fluent Inc., Sep-04 Figure 2-12: Completed small pipe
  • 43. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-23 Step 6: Create Faces From Edges 1. Create a face for the large pipe. GEOMETRY → FACE → FORM FACE This command sequence opens the Create Face From Wireframe form. 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 unselect all edges, and then reselect the correct edges.
  • 44. Procedure MODELING A MIXING ELBOW (2-D) 2-24 © Fluent Inc., Sep-04 Figure 2-13: Edges used to create face for large pipe 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. b) Click Apply to accept the selected edges and create a face. The edges of the face will turn blue. 2. Create a face for the small pipe by selecting the four edges shown in Figure 2-14 and then accepting the selected edges.
  • 45. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-25 Figure 2-14: Edges used to create face for small pipe
  • 46. Procedure MODELING A MIXING ELBOW (2-D) 2-26 © Fluent Inc., Sep-04 Step 7: Specify the Node Distribution The next step is to define the grid density on the edges of the geometry. You will accomplish this graphically by selecting an edge, assigning the number of nodes, and specifying the distribution of nodes along the edge. 1. Specify the node density on the inlet and outlet of the large pipe. MESH → EDGE → MESH EDGES This command sequence opens the Mesh Edges form. a) Shift-left-click the edge marked EA in Figure 2-15.
  • 47. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-27 EA ED EC EG EH EI EJ EB EF EE Figure 2-15: Edges to be meshed The edge will change color and an arrow and several circles will appear on the edge. b) Shift-left-click the edge marked EB in Figure 2-15. 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 consecutive points on the edge equal to the specified Ratio. d) Enter 1.25 in the text entry box to the right of Ratio. Alternatively, you can slide the Ratio slider box (the small, gray rectangle with a vertical line in its center that is located on the slider bar) until 1.25 is displayed in the Ratio text box.
  • 48. Procedure MODELING A MIXING ELBOW (2-D) 2-28 © Fluent Inc., Sep-04 e) Select the Double sided check box under Grading. If you specify a Double sided grading on an edge, the element intervals are graded in two directions from a starting point on the edge. GAMBIT determines the starting point such that the intervals on either side of the point are approximately the same length. 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. GAMBIT will create 10 intervals on the edge. g) Click the Apply button at the bottom of the form. Figure 2-16 shows the mesh on the inlet and outlet edges of the large pipe. EA ED EC EG EH EI EJ EF EE EB Figure 2-16: Edge meshing on inlet and outlet of large pipe
  • 49. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-29 2. Mesh the four straight edges of the large pipe. 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 unselect 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. EA ED EC EG EH EI EJ EF EE EB Figure 2-17: Mesh on the straight edges of the large pipe
  • 50. Procedure MODELING A MIXING ELBOW (2-D) 2-30 © Fluent Inc., Sep-04 3. Mesh the edge connecting the two pipes. a) Select the edge marked EG in Figure 2-17. 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. d) Click the Apply button at the bottom of the form. 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. e) Click the Apply button at the bottom of the form. The mesh on the two edges on the outer radius of the bend is shown in Figure 2-18.
  • 51. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-31 EA ED EC EG EH EI EJ EF EE EB Figure 2-18: Mesh on outer bend of pipe 5. Set the grading for the inner bend of the mixing elbow. a) Select the edge marked EJ in Figure 2-18. 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. c) Select the Double sided check box. d) Unselect the Apply check box to the right of Spacing. 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.
  • 52. Procedure MODELING A MIXING ELBOW (2-D) 2-32 © Fluent Inc., Sep-04 e) Unselect the Mesh check box under Options and click the Apply button at the bottom of the form. You unselected 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.
  • 53. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-33 Figure 2-19: Edge meshing for the mixing elbow
  • 54. Procedure MODELING A MIXING ELBOW (2-D) 2-34 © Fluent Inc., Sep-04 Step 8: Create Structured Meshes on Faces 1. Create a structured mesh for the large pipe. MESH → FACE → MESH FACES This command sequence opens the Mesh Faces form. a) Shift-left-click the large pipe in the graphics window. 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. b) Click the Apply button at the bottom of the form. 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.
  • 55. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-35 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 2. Mesh the small pipe of the mixing elbow. a) Select the small pipe in the graphics window. 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. This is an example of “enforced mapping”, where GAMBIT automatically modifies the face vertex type on the face to satisfy the chosen meshing scheme. See the GAMBIT Modeling Guide for more information on face vertex types. 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.
  • 56. Procedure MODELING A MIXING ELBOW (2-D) 2-36 © Fluent Inc., Sep-04 Figure 2-21: Structured mesh for the mixing elbow
  • 57. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-37 Step 9: Set Boundary Types 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. a) Click the SPECIFY DISPLAY ATTRIBUTES command button at the bottom of the Global Control toolpad. b) Select the Off radio button to the right of Mesh near the bottom of the form. c) Click Apply and close the form. 2. Set boundary types for the mixing elbow. ZONES → SPECIFY BOUNDARY TYPES This command sequence opens the Specify Boundary Types form.
  • 58. Procedure MODELING A MIXING ELBOW (2-D) 2-38 © Fluent Inc., Sep-04 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. a) Define two inflow boundaries. i. Enter the name inflow1 in the Name text entry box. If you do not specify a name, GAMBIT will give the boundary a default name based on what you select in the Type and Entity lists. ii. Select INFLOW in the Type option menu.
  • 59. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-39 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. EA EK EB Figure 2-22: Boundary types for edges of mixing elbow This edge will be set as an inflow boundary. v. Enter inflow2 in the Name text entry box. 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. b) Define an outflow boundary. i. Enter outflow in the Name text entry box. 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.
  • 60. Procedure MODELING A MIXING ELBOW (2-D) 2-40 © Fluent Inc., Sep-04 The inflow and outflow boundaries for the mixing elbow are shown in Figure 2-23. (NOTE: To display the boundary types in the graphics window, select the Show labels options on the Specify Boundary Types form.) 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 continuum 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.
  • 61. MODELING A MIXING ELBOW (2-D) Procedure © Fluent Inc., Sep-04 2-41 Step 10: Export the Mesh and Save the Session 1. Export a mesh file for the mixing elbow. File → Export → Mesh… This command sequence opens the Export Mesh File form. Note that the File Type is Structured FLUENT 4 Grid. a) Enter the File Name for the file to be exported (2-DELBOW.GRD). b) Click Accept. The file will be written to your working directory. 2. Save the GAMBIT session and exit GAMBIT. File → Exit GAMBIT will ask you whether you wish to save the current session before you exit. Click Yes to save the current session and exit GAMBIT.
  • 62. Summary MODELING A MIXING ELBOW (2-D) 2-42 © Fluent Inc., Sep-04 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.
  • 63. Tutorial 1. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Introduction This tutorial illustrates the setup and solution of a three-dimensional turbulent fluid flow and heat transfer problem in a mixing elbow. 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 area of the mixing region in order to properly design the junction. This tutorial demonstrates how to do the following: • Read an existing grid file into FLUENT. • Use mixed units to define the geometry and fluid properties. • Set material properties and boundary conditions for a turbulent forced convection problem. • Initiate the calculation with residual plotting. • Calculate a solution using the pressure-based solver. • Visually examine the flow and temperature fields using FLUENT’s postprocessing tools. • Enable the second-order discretization scheme for improved prediction of the tem- perature field. • Adapt the grid based on the temperature gradient to further improve the prediction of the temperature field. Prerequisites This tutorial assumes that you have little to no experience with FLUENT, and so each step will be explicitly described. c Fluent Inc. September 21, 2006 1-1
  • 64. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Problem Description The problem to be considered is shown schematically in Figure 1.1. A cold fluid at 20◦ C flows into the pipe through a large inlet, and mixes with a warmer fluid at 40◦ C that enters through a smaller inlet located at the elbow. The pipe dimensions are in inches, and the fluid properties and boundary conditions are given in SI units. The Reynolds number for the flow at the larger inlet is 50,800, so a turbulent flow model will be required. = 4216 J/kg−K p C = 8 x 10 Pa−s µ −4 k = 0.677 W/m−K = 0.4 m/s x U 4" Dia. 4" 8" 3" 1" Dia. 1" 8" Viscosity: Conductivity: Specific Heat: T = 20 C I = 5% = 1.2 m/s y U T = 40 C I = 5% Density: = 1000 kg/m3 ρ o o Figure 1.1: Problem Specification 1-2 c Fluent Inc. September 21, 2006
  • 65. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Setup and Solution Preparation 1. Download introduction.zip from the Fluent Inc. User Services Center (www.fluentusers.com) to your working folder. This file can be found by using the Documentation link on the FLUENT product page. OR, Copy introduction.zip from the FLUENT documentation CD to your working folder. For Linux / UNIX systems, you can find the file by inserting the CD into your CD-ROM drive and going to the following directory: /cdrom/fluent6.3/help/tutfiles/ where cdrom must be replaced by the name of your CD-ROM drive. For Windows systems, you can find the file by inserting the CD into your CD-ROM drive and going to the following folder: cdrom:fluent6.3helptutfiles where cdrom must be replaced by the name of your CD-ROM drive (e.g., E). 2. Unzip introduction.zip. The file elbow.msh can be found in the introduction folder created after unzipping the file. 3. Start the 3D (3d) version of FLUENT. c Fluent Inc. September 21, 2006 1-3
  • 66. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 1: Grid 1. Read the grid file elbow.msh. File −→ Read −→Case... (a) Select the grid file by clicking elbow.msh in the introduction folder created when you unzipped the original file. (b) Click OK to read the file and close the Select File dialog box. Note: As the grid file is read by FLUENT, messages will appear in the console that report the progress of the conversion. FLUENT will report that 13,852 hexahedral fluid cells have been read, along with a number of boundary faces with different zone identifiers. 1-4 c Fluent Inc. September 21, 2006
  • 67. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 2. Check the grid. Grid −→Check Grid Check Grid Check Domain Extents: x-coordinate: min (m) = -8.000000e+000, max (m) = 8.000000e+000 y-coordinate: min (m) = -9.134633e+000, max (m) = 8.000000e+000 z-coordinate: min (m) = 0.000000e+000, max (m) = 2.000000e+000 Volume statistics: minimum volume (m3): 5.098261e-004 maximum volume (m3): 2.330738e-002 total volume (m3): 1.607154e+002 Face area statistics: minimum face area (m2): 4.865882e-003 maximum face area (m2): 1.017924e-001 Checking number of nodes per cell. Checking number of faces per cell. Checking thread pointers. Checking number of cells per face. Checking face cells. Checking bridge faces. Checking right-handed cells. Checking face handedness. Checking face node order. Checking element type consistency. Checking boundary types: Checking face pairs. Checking periodic boundaries. Checking node count. Checking nosolve cell count. Checking nosolve face count. Checking face children. Checking cell children. Checking storage. Done. Note: The minimum and maximum values may vary slightly when running on different platforms. The grid check will list the minimum and maximum x and y values from the grid in the default SI unit of meters, and will report a number of other grid features that are checked. Any errors in the grid will be reported at this time. In particular, you should always make sure that the minimum volume is not negative, since FLUENT cannot begin a calculation c Fluent Inc. September 21, 2006 1-5
  • 68. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow when this is the case. In the next step, you will scale the grid so that it is in the correct unit of inches. 3. Scale the grid. Grid −→Scale... (a) Select inches from the Grid Was Created In drop-down list in the Unit Conversion group box, by first clicking the down-arrow button and then clicking the in item from the list that appears. (b) Click Scale to scale the grid. ! Be sure to click the Scale button only once. The reported values of the Domain Extents will be reported in the default SI unit of meters. (c) Click the Change Length Units button to set inches as the working unit for length. (d) Confirm that the domain extents are as shown in the previous panel. (e) Close the Scale Grid panel by clicking Close. The grid is now sized correctly, and the working unit for length has been set to inches. Note: Because the default SI units will be used for everything except length, there will be no need to change any other units in this problem. The choice of inches for the unit of length has been made by the actions you have just taken. If you wanted the working unit for length to be something other than inches 1-6 c Fluent Inc. September 21, 2006
  • 69. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (e.g., millimeters), you would have to open the Set Units panel from the Define pull-down menu and make the appropriate change. 4. Display the grid (Figure 1.2). Display −→Grid... (a) Retain the default selection of all the items in the Surfaces selection list except default-interior. Note: A list item is selected if it is highlighted, and deselected if it is not highlighted. You can select and deselect items by clicking on the text. (b) Click Display to open a graphics window and display the grid. (c) Close the Grid Display panel. Extra: You can use the right mouse button to probe for grid information in the graphics window. If you click the right mouse button on any node in the grid, information will be displayed in the FLUENT console about the associated zone, including the name of the zone. This feature is especially useful when you have several zones of the same type and you want to distinguish between them quickly. For this 3D problem, you can make it easier to probe particular nodes by chang- ing the view. You can perform any of the following actions in the graphics window: • Rotate the view. Drag the mouse while pressing the left mouse button. Release the mouse button when the viewing angle is satisfactory. c Fluent Inc. September 21, 2006 1-7
  • 70. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow • Translate the view. Click the middle mouse button once at any point in the display to center the view at that point. • Zoom in to magnify a portion of the display. Drag the mouse to the right and either up or down while pressing the middle mouse button. This action will cause a white rectangle to appear in the display. When you release the mouse button, a new view will be displayed which consists entirely of the contents of the white rectangle. • Zoom out to reduce the magnification. Drag the mouse to the left and either up or down while pressing the middle mouse button. This action will cause a white rectangle to appear in the display. When you release the mouse button, the magnification of the view will be reduced by an amount that is inversely proportional to the size of the white rectangle. The new view will be centered at the center of the white rectangle. Z Y X Grid FLUENT 6.3 (3d, pbns, lam) Figure 1.2: The Hexahedral Grid for the Mixing Elbow 1-8 c Fluent Inc. September 21, 2006
  • 71. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 2: Models 1. Retain the default solver settings. Define −→ Models −→Solver... (a) Retain all of the default settings. (b) Click OK to close the Solver panel. c Fluent Inc. September 21, 2006 1-9
  • 72. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 2. Turn on the k- turbulence model. Define −→ Models −→Viscous... (a) Select k-epsilon from the Model list by clicking the radio button or the text, so that a black dot appears in the radio button. The Viscous Model panel will expand. (b) Select Realizable from the k-epsilon Model list. (c) Click OK to accept the model and close the Viscous Model panel. 1-10 c Fluent Inc. September 21, 2006
  • 73. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 3. Enable heat transfer by activating the energy equation. Define −→ Models −→Energy... (a) Enable the Energy Equation option by clicking the check box or the text. Note: An option is enabled when there is a check mark in the check box, and disabled when the check box is empty. (b) Click OK to close the Energy panel. Step 3: Materials 1. Create a new material called water. Define −→Materials... c Fluent Inc. September 21, 2006 1-11
  • 74. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (a) Enter water for Name by double-clicking in the text-entry box under Name and typing with the keyboard. (b) Enter the following values in the Properties group box: Property Value Density 1000 kg/m3 Cp 4216 J/kg − K Thermal Conductivity 0.677 W/m − K Viscosity 8e-04 kg/m − s (c) Click Change/Create. A Question dialog box will open, asking if you want to overwrite air. Click No so that the new material water is added to the list of materials which originally contained only air. Extra: You could have copied the material water-liquid [h2ol] from the ma- terials database (accessed by clicking the Fluent Database... button). If the properties in the database are different from those you wish to use, you can edit the values in the Properties group box in the Materials panel and click Change/Create to update your local copy (the database copy will not be affected). (d) Make sure that there are now two materials defined locally by examining the Fluent Fluid Materials drop-down list. (e) Close the Materials panel. 1-12 c Fluent Inc. September 21, 2006
  • 75. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 4: Boundary Conditions Define −→Boundary Conditions... 1. Set the boundary conditions for the fluid (fluid). (a) Select fluid from the Zone selection list. c Fluent Inc. September 21, 2006 1-13
  • 76. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (b) Click Set... to open the Fluid panel. i. Select water from the Material Name drop-down list. ii. Click OK to close the Fluid panel. You have just specified water as the working fluid for this simulation. 2. Set the boundary conditions at the cold inlet (velocity-inlet-5). Hint: If you are unsure of which inlet zone corresponds to the cold inlet, you can probe the grid display with the right mouse button as described in a previous step. Not only will information be displayed in the FLUENT console, but the zone you probed will automatically be selected from the Zone selection list in the Boundary Conditions panel. (a) Select velocity-inlet-5 from the Zone selection list. 1-14 c Fluent Inc. September 21, 2006
  • 77. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (b) Click Set... to open the Velocity Inlet panel. i. Select Components from the Velocity Specification Method drop-down list. The Velocity Inlet panel will expand. ii. Enter 0.4 m/s for X-Velocity. iii. Retain the default value of 0 m/s for both Y-Velocity and Z-Velocity. iv. Select Intensity and Hydraulic Diameter from the Specification Method drop- down list in the Turbulence group box. v. Enter 5% for Turbulent Intensity. vi. Enter 4 inches for Hydraulic Diameter. The hydraulic diameter Dh is defined as: Dh = 4A Pw where A is the cross-sectional area and Pw is the wetted perimeter. c Fluent Inc. September 21, 2006 1-15
  • 78. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow vii. Click the Thermal tab. viii. Enter 293.15 K for Temperature. ix. Click OK to close the Velocity Inlet panel. 3. In a similar manner, set the boundary conditions at the hot inlet (velocity-inlet-6), using the values in the following table: Velocity Specification Method Components X-Velocity 0 m/s Y-Velocity 1.2 m/s Z-Velocity 0 m/s Specification Method Intensity Hydraulic Diameter Turbulent Intensity 5% Hydraulic Diameter 1 inch Temperature 313.15 K 1-16 c Fluent Inc. September 21, 2006
  • 79. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 4. Set the boundary conditions at the outlet (pressure-outlet-7), as shown in the fol- lowing panel. Note: FLUENT will use the backflow conditions only if the fluid is flowing into the computational domain through the outlet. Since backflow might occur at some point during the solution procedure, you should set reasonable backflow conditions to prevent convergence from being adversely affected. c Fluent Inc. September 21, 2006 1-17
  • 80. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 5. For the wall of the pipe (wall), retain the default value of 0 W/m2 for Heat Flux in the Thermal tab. 6. Close the Boundary Conditions panel. 1-18 c Fluent Inc. September 21, 2006
  • 81. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 5: Solution 1. Initialize the flow field, using the boundary conditions settings at the cold inlet (velocity-inlet-5) as a starting point. Solve −→ Initialize −→Initialize... (a) Select velocity-inlet-5 from the Compute From drop-down list. (b) Enter 1.2 m/s for Y Velocity in the Initial Values group box. Note: While an initial X Velocity is an appropriate guess for the horizontal section, the addition of a Y Velocity component will give rise to a better initial guess throughout the entire elbow. (c) Click Init and close the Solution Initialization panel. c Fluent Inc. September 21, 2006 1-19
  • 82. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 2. Enable the plotting of residuals during the calculation. Solve −→ Monitors −→Residual... (a) Enable Plot in the Options group box. (b) Enter 1e-05 for the Absolute Criteria of continuity, as shown in the previous panel. (c) Click OK to close the Residual Monitors panel. Note: By default, all variables will be monitored and checked by FLUENT as a means to determine the convergence of the solution. Although residuals are useful for checking convergence, a more reliable method is to define a surface monitor. You will do this in the next step. 1-20 c Fluent Inc. September 21, 2006
  • 83. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 3. Define a surface monitor at the outlet (pressure-outlet-7). Solve −→ Monitors −→Surface... (a) Set Surface Monitors to 1 by clicking once on the up-arrow button. (b) Enable the Plot and Write options for monitor-1. (c) Set Every to 3 for monitor-1. This setting instructs FLUENT to update the plot of the surface monitor and write data to a file after every 3 iterations during the solution. (d) Click the Define... button to open the Define Surface Monitor panel. i. Select Mass-Weighted Average from the Report Type drop-down list. ii. Retain the default entry of monitor-1.out for File Name. c Fluent Inc. September 21, 2006 1-21
  • 84. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow iii. Select Temperature... and Static Temperature from the Report of drop- down lists. iv. Select pressure-outlet-7 from the Surfaces selection list. v. Click OK to close the Define Surface Monitor panel. (e) Click OK to close the Surface Monitors panel. 4. Save the case file (elbow1.cas.gz). File −→ Write −→Case... (a) (optional) Indicate the folder in which you would like the file to be saved. By default, the file will be saved in the folder from which you read in elbow.msh (i.e., the introduction folder). You can indicate a different folder by brows- ing to it or by creating a new folder. (b) Enter elbow1.cas.gz for Case File. Adding the extension .gz to the end of the file name extension instructs FLU- ENT to save the file in a compressed format. You do not have to include .cas in the extension (e.g., if you enter elbow1.gz, FLUENT will automatically save the file as elbow1.cas.gz). The .gz extension can also be used to save data files in a compressed format. (c) Make sure that the default Write Binary Files option is enabled, so that a binary file will be written. 1-22 c Fluent Inc. September 21, 2006
  • 85. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (d) Click OK to close the Select File dialog box. Note: If you retained the default introduction folder in the Select File dialog box, a Warning dialog box will open to alert you that the file elbow1.cas.gz already exists. All of the files you will be instructed to save in this tutorial already exist in the introduction folder, and can be overwritten. Click OK in the Warning dialog box to proceed. 5. Start the calculation by requesting 150 iterations. Solve −→Iterate... (a) Enter 150 for Number of Iterations. (b) Click Iterate. c Fluent Inc. September 21, 2006 1-23
  • 86. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Note: By starting the calculation, you are also starting to save the surface monitor data at the rate specified in the Surface Monitors panel. If a file already exists in your working folder with the name you specified in the Define Surface Monitor panel, then a Question dialog box will open, asking if you would like append the new data to the existing file. Click No in the Question dialog box, and then click OK in the Warning dialog box that follows to overwrite the existing file. As the calculation progresses, the residuals will be plotted in the graphics win- dow (Figure 1.3). An additional graphics window will open to display the convergence history of the mass-weighted average temperature (Figure 1.4). The solution will reach convergence after approximately 140 iterations. Note: The number of iterations required for convergence varies according to the platform used. Also, since the residual values are different for different computers, the plot that appears on your screen may not be exactly the same as the one shown here. (c) Close the Iterate panel when the calculation is complete. 1-24 c Fluent Inc. September 21, 2006
  • 87. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Z Y X Scaled Residuals FLUENT 6.3 (3d, pbns, rke) Iterations 140 120 100 80 60 40 20 0 1e+01 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07 epsilon k energy z-velocity y-velocity x-velocity continuity Residuals Figure 1.3: Residuals for the First 140 Iterations Z Y X Convergence history of Static Temperature on pressure-outlet-7 FLUENT 6.3 (3d, pbns, rke) Iteration (k) Average Weighted Mass 140 120 100 80 60 40 20 0 296.6000 296.5000 296.4000 296.3000 296.2000 296.1000 296.0000 monitor-1 Figure 1.4: Convergence History of the Mass-Weighted Average Temperature c Fluent Inc. September 21, 2006 1-25
  • 88. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 6. Examine the plots for convergence (Figures 1.3 and 1.4). Note: There are no universal metrics for judging convergence. Residual definitions that are useful for one class of problem are sometimes misleading for other classes of problems. Therefore it is a good idea to judge convergence not only by examining residual levels, but also by monitoring relevant integrated quantities and checking for mass and energy balances. When evaluating whether convergence has been reached, there are three indi- cators: • The residuals have decreased to a sufficient degree. The solution has converged when the Convergence Criterion for each vari- able has been reached. The default criterion is that each residual will be reduced to a value of less than 10−3 , except the energy residual, for which the default criterion is 10−6 . • The solution no longer changes with more iterations. Sometimes the residuals may not fall below the convergence criterion set in the case setup. However, monitoring the representative flow variables through iterations may show that the residuals have stagnated and do not change with further iterations. This could also be considered as conver- gence. • The overall mass, momentum, energy, and scalar balances are obtained. You can examine the overall mass, momentum, energy and scalar balances in the Flux Reports panel. The net imbalance should be less than 0.2% of the net flux through the domain when the solution has converged. In the next step you will check to see if the mass balance indicates convergence. 1-26 c Fluent Inc. September 21, 2006
  • 89. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 7. Examine the mass flux report for convergence. Report −→Fluxes... (a) Select pressure-outlet-7, velocity-inlet-5, and velocity-inlet-6 from the Boundaries selection list. (b) Click Compute. The sum of the flux for the inlets should be very close to the sum of the flux for the outlets. The difference will be displayed in the lower right field under kg/s, as well as in the console. Note that the imbalance is well below the 0.2% criteria suggested previously. (c) Close the Flux Reports panel. 8. Save the data file (elbow1.dat.gz). File −→ Write −→Data... In later steps of this tutorial you will save additional case and data files with dif- ferent prefixes. c Fluent Inc. September 21, 2006 1-27
  • 90. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 6: Displaying the Preliminary Solution 1. Display filled contours of velocity magnitude on the symmetry plane (Figure 1.5). Display −→ Contours... (a) Enable Filled in the Options group box. (b) Make sure that Node Values is enabled in the Options group box. (c) Select Velocity... and Velocity Magnitude from the Contours of drop-down lists. (d) Select symmetry from the Surfaces selection list. (e) Click Display to display the contours in the graphics window. Extra: Clicking the right mouse button on a point in the displayed domain will cause the value of the corresponding contour to be reported in the console. 1-28 c Fluent Inc. September 21, 2006
  • 91. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Contours of Velocity Magnitude (m/s) FLUENT 6.3 (3d, pbns, rke) 1.42e+00 1.35e+00 1.28e+00 1.21e+00 1.14e+00 1.07e+00 9.95e-01 9.24e-01 8.53e-01 7.82e-01 7.11e-01 6.40e-01 5.69e-01 4.98e-01 4.26e-01 3.55e-01 2.84e-01 2.13e-01 1.42e-01 7.11e-02 0.00e+00 Z Y X Figure 1.5: Predicted Velocity Distribution after the Initial Calculation 2. Display filled contours of temperature on the symmetry plane (Figure 1.6). Display −→Contours... (a) Select Temperature... and Static Temperature from the Contours of drop-down lists. c Fluent Inc. September 21, 2006 1-29
  • 92. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (b) Click Display and close the Contours panel. Contours of Static Temperature (k) FLUENT 6.3 (3d, pbns, rke) 3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.09e+02 3.08e+02 3.07e+02 3.06e+02 3.05e+02 3.04e+02 3.03e+02 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 Z Y X Figure 1.6: Predicted Temperature Distribution after the Initial Calculation 1-30 c Fluent Inc. September 21, 2006
  • 93. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 3. Display velocity vectors on the symmetry plane (Figures 1.7 and 1.8). Display −→ Vectors... (a) Select symmetry from the Surfaces selection list. (b) Click Display to plot the velocity vectors. Note: The Auto Scale option is enabled by default in the Options group box. This scaling sometimes creates vectors that are too small or too large in the majority of the domain. (c) Enter 4 for Scale to increase the display size of the vectors. (d) Set Skip to 2 to make the individual vectors easier to see. (e) Click Display again (Figure 1.7). (f) Zoom in on the vectors in the display. To do this, drag your mouse to the right and either up or down, while pressing the middle mouse button. A rectangle will appear on the screen. Make sure that the rectangle frames the region that you wish to enlarge and let go of the middle mouse button. The image will be redisplayed at a higher magnification (Figure 1.8). c Fluent Inc. September 21, 2006 1-31
  • 94. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Velocity Vectors Colored By Velocity Magnitude (m/s) FLUENT 6.3 (3d, pbns, rke) 1.48e+00 1.42e+00 1.35e+00 1.29e+00 1.23e+00 1.17e+00 1.11e+00 1.05e+00 9.85e-01 9.24e-01 8.62e-01 8.01e-01 7.39e-01 6.77e-01 6.16e-01 5.54e-01 4.93e-01 4.31e-01 3.69e-01 3.08e-01 2.46e-01 Z Y X Figure 1.7: Resized Velocity Vectors Velocity Vectors Colored By Velocity Magnitude (m/s) FLUENT 6.3 (3d, pbns, rke) 1.48e+00 1.42e+00 1.35e+00 1.29e+00 1.23e+00 1.17e+00 1.11e+00 1.05e+00 9.85e-01 9.24e-01 8.62e-01 8.01e-01 7.39e-01 6.77e-01 6.16e-01 5.54e-01 4.93e-01 4.31e-01 3.69e-01 3.08e-01 2.46e-01 Z Y X Figure 1.8: Magnified View of Velocity Vectors 1-32 c Fluent Inc. September 21, 2006
  • 95. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (g) Zoom out to the original view. To do this, drag your mouse to the left and either up or down, while pressing the middle mouse button. A rectangle will appear on the screen. Make sure that the rectangle is approximately the same size as the rectangle you made while zooming in, and then let go of the middle mouse button. The image will be redisplayed at a lower magnification (Figure 1.7). If the resulting image is not centered, you can translate the view by clicking once with the middle mouse button near the center of the geometry. Alternatively, you can select the original view in the Views panel. Simply select front from the Views selection list and click Apply, as shown in the following panel. Display −→Views... (h) Close the Vectors panel. c Fluent Inc. September 21, 2006 1-33
  • 96. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 4. Create a line surface at the centerline of the outlet. Surface −→Iso-Surface... (a) Select Grid... and Z-Coordinate from the Surface of Constant drop-down lists. (b) Click Compute. The range of values in the z direction will be displayed in the Min and Max fields. (c) Retain the default value of 0 inches for Iso-Values. (d) Select pressure-outlet-7 from the From Surface selection list. (e) Enter z=0 outlet for New Surface Name. (f) Click Create. After the line surface z=0 outlet is created, a new entry will automatically be generated for New Surface Name, in case you would like to create another surface. (g) Close the Iso-Surface panel. 1-34 c Fluent Inc. September 21, 2006
  • 97. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 5. Display and save an XY plot of the temperature profile across the centerline of the outlet for the initial solution (Figure 1.9). Plot −→ XY Plot... (a) Select Temperature... and Static Temperature from the Y Axis Function drop- down lists. (b) Select z=0 outlet from the Surfaces selection list. (c) Click Plot. (d) Enable Write to File in the Options group box. The button that was originally labeled Plot will change to Write.... (e) Click Write... to open the Select File dialog box. i. Enter outlet temp1.xy for XY File. ii. Click OK to save the temperature data and close the Select File dialog box. (f) Close the Solution XY Plot panel. c Fluent Inc. September 21, 2006 1-35
  • 98. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Z Y X Static Temperature FLUENT 6.3 (3d, pbns, rke) Position (in) (k) Temperature Static 8 7.5 7 6.5 6 5.5 5 4.5 4 3.5 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 z=0_outlet2 Figure 1.9: Outlet Temperature Profile for the Initial Solution 6. Define a custom field function for the dynamic head formula (ρ|V |2 /2). Define −→ Custom Field Functions... (a) Select Density... and Density from the Field Functions drop-down lists, and click the Select button to add density to the Definition field. (b) Click the X button to add the multiplication symbol to the Definition field. (c) Select Velocity... and Velocity Magnitude from the Field Functions drop-down lists, and click the Select button to add |V| to the Definition field. 1-36 c Fluent Inc. September 21, 2006
  • 99. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (d) Click y^x to raise the last entry in the Definition field to a power, and click 2 for the power. (e) Click the / button to add the division symbol to the Definition field, and then click 2. (f) Enter dynamic-head for New Function Name. (g) Click Define and close the Custom Field Function Calculator panel. 7. Display filled contours of the custom field function (Figure 1.10). Display −→ Contours... (a) Select Custom Field Functions... and dynamic-head from the Contours of drop- down lists. Hint: Custom Field Functions... is at the top of the upper Contours of drop- down list. After you have opened the drop-down list, scroll up by clicking the up-arrow button on the scroll bar on the right. (b) Make sure that symmetry is selected from the Surfaces selection list. (c) Click Display and close the Contours panel. Note: You may need to change the view by zooming out after the last vector display, if you have not already done so. c Fluent Inc. September 21, 2006 1-37
  • 100. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Contours of dynamic-head FLUENT 6.3 (3d, pbns, rke) 1.01e+03 9.60e+02 9.09e+02 8.59e+02 8.08e+02 7.58e+02 7.07e+02 6.57e+02 6.06e+02 5.56e+02 5.05e+02 4.55e+02 4.04e+02 3.54e+02 3.03e+02 2.53e+02 2.02e+02 1.52e+02 1.01e+02 5.05e+01 0.00e+00 Z Y X Figure 1.10: Contours of the Dynamic Head Custom Field Function 8. Save the settings for the custom field function by writing the case and data files (elbow1.cas.gz and elbow1.dat.gz). File −→ Write −→Case Data... (a) Make sure that elbow1.cas.gz is entered for Case/Data File. Note: When you write the case and data file at the same time, it does not matter whether you specify the file name with a .cas or .dat extension, as both will be saved. (b) Click OK to close the Select File dialog box. 1-38 c Fluent Inc. September 21, 2006
  • 101. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 7: Enabling Second-Order Discretization The elbow solution computed in the first part of this tutorial uses first-order discretiza- tion. The resulting solution is very diffusive; mixing is overpredicted, as can be seen in the contour plots of temperature and velocity distribution. You will now change to second-order discretization for all listed equations, in order to improve the accuracy of the solution. With the second-order discretization, you will change the gradient option in the solver from cell-based to node-based in order to optimize energy conservation. 1. Change the solver settings. Define −→ Models −→ Solver... (a) Select Green-Gauss Node Based from the Gradient Option list. Note: This option is more suitable than the cell-based gradient option for unstructured meshes, as it will ensure better energy conservation. (b) Click OK to close the Solver panel. c Fluent Inc. September 21, 2006 1-39
  • 102. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 2. Enable the second-order scheme for the calculation of all the listed equations. Solve −→ Controls −→Solution... (a) Retain the default values in the Under-Relaxation Factors group box. (b) Select Second Order from the Pressure drop-down list in the Discretization group box. (c) Select Second Order Upwind from the Momentum, Turbulent Kinetic Energy, Turbulent Dissipation Rate, and Energy drop-down lists. Note: Scroll down the Discretization group box to find Energy. (d) Click OK to close the Solution Controls panel. 3. Continue the calculation by requesting 150 more iterations. Solve −→ Iterate... 1-40 c Fluent Inc. September 21, 2006
  • 103. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Extra: To save the convergence history of the surface monitor for this set of itera- tions as a separate output file, you would need to change the File Name in the Define Surface Monitor to monitor-2.out prior to running the calculation. (a) Make sure that 150 is entered for Number of Iterations. (b) Click Iterate and close the Iterate panel when the calculation is complete. The solution will converge in approximately 57 additional iterations (Fig- ure 1.11). The convergence history is shown in Figure 1.12. Z Y X Scaled Residuals FLUENT 6.3 (3d, pbns, rke) Iterations 200 180 160 140 120 100 80 60 40 20 0 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07 epsilon k energy z-velocity y-velocity x-velocity continuity Residuals Figure 1.11: Residuals for the Second-Order Energy Calculation Note: You should expect to see the residuals jump whenever you change the solution control parameters. c Fluent Inc. September 21, 2006 1-41
  • 104. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Z Y X Convergence history of Static Temperature on pressure-outlet-7 FLUENT 6.3 (3d, pbns, rke) Iteration (k) Average Weighted Mass 200 180 160 140 120 100 80 60 40 20 0 296.6000 296.5500 296.5000 296.4500 296.4000 296.3500 296.3000 296.2500 296.2000 296.1500 296.1000 monitor-1 Figure 1.12: Convergence History of Mass-Weighted Average Temperature 4. Save the case and data files for the second-order solution (elbow2.cas.gz and elbow2.dat.gz). File −→ Write −→Case Data... (a) Enter elbow2.gz for Case/Data File. (b) Click OK to close the Select File dialog box. The files elbow2.cas.gz and elbow2.dat.gz will be saved in your folder. 1-42 c Fluent Inc. September 21, 2006
  • 105. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 5. Examine the revised temperature distribution (Figure 1.13). Display −→ Contours... (a) Make sure that Filled is enabled in the Options group box. (b) Select Temperature... and Static Temperature from the Contours of drop-down lists. (c) Make sure that symmetry is selected from the Surfaces selection list. (d) Click Display and close the Contours panel. Figure 1.13 shows the thermal spreading of the warm fluid layer near the outer wall of the bend. Compare Figure 1.13 with Figure 1.6 to see the effects of second-order discretization. c Fluent Inc. September 21, 2006 1-43
  • 106. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Contours of Static Temperature (k) FLUENT 6.3 (3d, pbns, rke) 3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.09e+02 3.08e+02 3.07e+02 3.06e+02 3.05e+02 3.04e+02 3.03e+02 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 Z Y X Figure 1.13: Temperature Contours for the Second-Order Solution 6. Display and save an XY plot of the temperature profile across the centerline of the outlet for the second-order solution (Figure 1.14). Plot −→ XY Plot... (a) Disable Write to File in the Options group box by clicking the check box or the text. The button that was labeled Write... will change to Plot. 1-44 c Fluent Inc. September 21, 2006
  • 107. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (b) Make sure that Temperature... and Static Temperature are selected from the Y Axis Function drop-down lists. (c) Make sure that z=0 outlet is selected from the Surfaces selection list. (d) Click Plot. Z Y X Static Temperature FLUENT 6.3 (3d, pbns, rke) Position (in) (k) Temperature Static 8 7.5 7 6.5 6 5.5 5 4.5 4 3.5 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 z=0_outlet Figure 1.14: Outlet Temperature Profile for the Second-Order Solution (e) Enable Write to File in the Options group box. The button that was labeled Plot will change to Write.... (f) Click Write... to open the Select File dialog box. i. Enter outlet temp2.xy for XY File. ii. Click OK to save the temperature data. (g) Close the Solution XY Plot panel. c Fluent Inc. September 21, 2006 1-45
  • 108. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Step 8: Adapting the Grid The elbow solution can be improved further by refining the grid to better resolve the flow details. In the following steps, you will adapt the grid based on the temperature gradients in the current solution. Once the grid has been refined, you will continue the calculation. 1. Adapt the grid in the regions of high temperature gradient. Adapt −→Gradient... (a) Make sure that Refine is enabled in the Options group box. It is not necessary to deselect Coarsen in this instance, since FLUENT will not coarsen beyond the original mesh for a 3D grid. (b) Select Temperature... and Static Temperature from the Gradients of drop-down lists. (c) Click Compute. FLUENT will update the Min and Max values to show the minimum and max- imum temperature gradient. (d) Enter 0.003 for Refine Threshold. It is a good rule of thumb to use 10% of the maximum gradient when setting the value for Refine Threshold. (e) Click Mark. FLUENT will report in the console that approximately 1258 cells were marked for adaption. 1-46 c Fluent Inc. September 21, 2006
  • 109. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (f) Click the Manage... button to open the Manage Adaption Registers panel. i. Click Display. FLUENT will display the cells marked for adaption in the graphics window (Figure 1.15). Z Y X Adaption Markings (gradient-r0) FLUENT 6.3 (3d, pbns, rke) Figure 1.15: Cells Marked for Adaption c Fluent Inc. September 21, 2006 1-47
  • 110. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Extra: You can change the way FLUENT displays cells marked for adap- tion (Figure 1.16) by performing the following steps: A. Click the Options... button in the Manage Adaption Registers panel to open the Adaption Display Options panel. B. Enable Draw Grid in the Options group box. The Grid Display panel will open. C. Make sure that Edges is the only option enabled in the Options group box. D. Select Feature from the Edge Type list. E. Select all of the items except default-interior from the Surfaces selec- tion list. F. Click Display and close the Grid Display panel. 1-48 c Fluent Inc. September 21, 2006
  • 111. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow G. Enable Filled in the Options group box in the Adaption Display Op- tions panel. H. Enable Wireframe in the Refine group box. I. Click OK to close the Adaption Display Options panel. J. Click Display in the Manage Adaption Registers panel. K. Rotate the view and zoom in to get the display shown in Figure 1.16. Adaption Markings (gradient-r0) FLUENT 6.3 (3d, pbns, rke) Z Y X Figure 1.16: Alternate Display of Cells Marked for Adaption L. After you are finished viewing the marked cells, rotate the view back and zoom out again to return to the angle and magnification shown in Figure 1.13. ii. Click Adapt in the Manage Adaption Registers panel. A Question dialog box will open, asking whether it is acceptable to adapt the grid by creating hanging nodes. Click Yes to proceed. Note: There are two different ways to adapt. You can click Adapt in the Manage Adaption Registers panel as was just done, or close this panel and perform the adaption using the Gradient Adaption panel. If c Fluent Inc. September 21, 2006 1-49
  • 112. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow you use the Adapt button in the Gradient Adaption panel, FLUENT will recreate an adaption register. Therefore, once you have the Manage Adaption Registers panel open, it saves time to use the Adapt button there. iii. Close the Manage Adaption Registers panel. (g) Close the Gradient Adaption panel. 2. Display the adapted grid (Figure 1.17). Display −→Grid... (a) Make sure that All is selected from the Edge Type list. (b) Deselect all of the highlighted items from the Surfaces selection list except for symmetry. (c) Click Display and close the Grid Display panel. 1-50 c Fluent Inc. September 21, 2006
  • 113. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Z Y X Grid FLUENT 6.3 (3d, pbns, rke) Figure 1.17: The Adapted Grid 3. Request an additional 150 iterations. Solve −→ Iterate... The solution will converge after approximately 100 additional iterations (Figures 1.18 and 1.19). 4. Save the case and data files for the second-order solution with an adapted grid (elbow3.cas.gz and elbow3.dat.gz). File −→ Write −→ Case Data... (a) Enter elbow3.gz for Case/Data File. (b) Click OK to close the Select File dialog box. The files elbow3.cas.gz and elbow3.dat.gz will be saved in your folder. c Fluent Inc. September 21, 2006 1-51
  • 114. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Z Y X Scaled Residuals FLUENT 6.3 (3d, pbns, rke) Iterations 300 250 200 150 100 50 0 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07 epsilon k energy z-velocity y-velocity x-velocity continuity Residuals Figure 1.18: The Complete Residual History Z Y X Convergence history of Static Temperature on pressure-outlet-7 FLUENT 6.3 (3d, pbns, rke) Iteration (k) Average Weighted Mass 300 250 200 150 100 50 0 296.6000 296.5500 296.5000 296.4500 296.4000 296.3500 296.3000 296.2500 296.2000 296.1500 296.1000 monitor-1 Figure 1.19: Convergence History of Mass-Weighted Average Temperature 1-52 c Fluent Inc. September 21, 2006
  • 115. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 5. Examine the filled temperature distribution (using node values) on the revised grid (Figure 1.20). Display −→ Contours... Contours of Static Temperature (k) FLUENT 6.3 (3d, pbns, rke) 3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.09e+02 3.08e+02 3.07e+02 3.06e+02 3.05e+02 3.04e+02 3.03e+02 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 Z Y X Figure 1.20: Filled Contours of Temperature Using the Adapted Grid 6. Display and save an XY plot of the temperature profile across the centerline of the outlet for the adapted second-order solution (Figure 1.21). Plot −→ XY Plot... c Fluent Inc. September 21, 2006 1-53
  • 116. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow (a) Disable Write to File in the Options group box. The button that was originally labeled Write... will change to Plot. (b) Make sure that Temperature... and Static Temperature are selected from the Y Axis Function drop-down lists. (c) Make sure that z=0 outlet is selected from the Surfaces selection list. (d) Click Plot. Z Y X Static Temperature FLUENT 6.3 (3d, pbns, rke) Position (in) (k) Temperature Static 8 7.5 7 6.5 6 5.5 5 4.5 4 3.5 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 z=0_outlet Figure 1.21: Outlet Temperature Profile for the Adapted Second-Order Solution (e) Enable Write to File in the Options group box. The button that was originally labeled Plot will change to Write.... (f) Click Write... to open the Select File dialog box. i. Enter outlet temp3.xy for XY File. ii. Click OK to save the temperature data. (g) Close the Solution XY Plot panel. 1-54 c Fluent Inc. September 21, 2006
  • 117. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow 7. Display the outlet temperature profiles for each of the three solutions on a single plot (Figure 1.22). Plot −→File... (a) Click the Add... button to open the Select File dialog box. c Fluent Inc. September 21, 2006 1-55
  • 118. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow i. Click once on outlet temp1.xy, outlet temp2.xy, and outlet temp3.xy. Each of these files will be listed with their folder in the XY File(s) list to indicate that they have been selected. Hint: If you select a file by mistake, simply click the file in the XY File(s) list and then click Remove. ii. Click OK to close the Select File dialog box. (b) Select the folder path ending in outlet temp1.xy from the Files selection list. (c) Enter 1st Order Soln in the lowest field on the right (next to the Change Legend Entry button). (d) Click the Change Legend Entry button. The item in the Legend Entries list for outlet temp1.xy will be changed to 1st Order Soln. This legend entry will be displayed in the upper-left corner of the XY plot generated in a later step. (e) In a similar manner, change the legend entry for the folder path ending in outlet temp2.xy to be 2nd Order Soln. (f) In a similar manner, change the legend entry for the folder path ending in outlet temp3.xy to be Adapted Grid. (g) Click Plot and close the File XY Plot panel. Figure 1.22 shows the three temperature profiles at the centerline of the outlet. It is apparent by comparing both the shape of the profiles and the predicted outer wall temperature that the solution is highly dependent on the mesh and solution options. Specifically, further mesh adaption should be used in order to obtain a solution that is independent of the mesh. Extra: You can perform additional grid adaptions based on temperature gradi- ent and run the calculation to see how the temperature profile changes at the outlet. A case and data file (elbow4.cas.gz and elbow4.dat.gz) has been provided in which the grid has undergone three more levels of adaption, and the resulting temperature profiles have been plotted with outlet temp2.xy and outlet temp3.xy in Figure 1.23. It is evident from Figure 1.23 that as the grid is adapted further, the profiles converge on a grid-independent profile. The resulting wall temperature at the outlet is predicted to be around 300.25 K once grid independence is achieved. If the adaption steps had not been performed, the wall temperature would have incorrectly been estimated at around 298.5 K. If computational resources allow, it is always recommended to perform succes- sive adaptions until the solution is independent of the grid (within an accept- able tolerance). Typically, profiles of important variables are examined (in this case, temperature) and compared to determine grid independence. 1-56 c Fluent Inc. September 21, 2006
  • 119. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Figure 1.22: Outlet Temperature Profiles for the Three Solutions Figure 1.23: Outlet Temperature Profiles for Subsequent Grid Adaption Steps c Fluent Inc. September 21, 2006 1-57
  • 120. Introduction to Using FLUENT: Fluid Flow and Heat Transfer in a Mixing Elbow Summary Comparison of the filled temperature contours for the first solution (using the original grid and first-order discretization) and the last solution (using an adapted grid and second-order discretization) clearly indicate that the latter is much less diffusive. While first-order discretization is the default scheme in FLUENT, it is good practice to use your first-order solution as a starting guess for a calculation that uses a higher-order discretization scheme and, optionally, an adapted grid. Note that in this problem, the flow field is decoupled from temperature, since all prop- erties are constant. For such cases, it is more efficient to compute the flow-field solution first (i.e., without solving the energy equation) and then solve for energy (i.e., without solving the flow equations). You will use the Solution Controls panel to turn the solution of the equations on and off during this procedure. 1-58 c Fluent Inc. September 21, 2006
  • 121. GAMBIT Demo – Tutorial Wake of a Cylinder. 1.1 Problem Description The problem to be considered is schematically in fig. 1. We consider flow across a cylinder and look at the wake behind the cylinder. Figure 1: Schematic of the Problem (not to scale). 1.2 Procedure Start GAMBIT: go to StartÆProgramsÆ Accessories Æ Command Prompt. This opens up the DOS command window. Change the path to the directory you want to work in. At the command prompt, type: gambit filename This should open up the gambit interface that would look like in fig 2. Figure 2: Gambit Interface. 50 cm 20 cm 10 cm Ø 1cm Air Walls 1 m/s
  • 122. Step 1: Select a Solver 1. Choose the solver you will use to run your CFD calculation by selecting the following from the main menu bar: Solver — FLUENT 5/6 This selects the FLUENT 5/6 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. Step 2: Create the domain 1. Create the outer domain by drawing a rectangle Face command button ÆCreate face In the create rectangle box, enter the height and width as w = 50, h = 20 and apply. If you do not see the rectangle, fit the display to screen by using at the bottom. 2. Similarly create a circle for the cylinder. Right click on and choose the circle option. In the radius panel enter r = 0.5. 3. Offset the circle by 10 units to the left by using the move command. Move/Copy/Align faces . To select the circle, use shift + left click on the circle.
  • 123. In the local panel, enter -10 for the x value. This will move the circle by 10 units to the left. 4. Since we only need the region of the domain where the flow occurs, we can subtract the circle from the rectangle. Right click on Boolean operations and choose ‘subtract’ option. This will open up the ‘subtract real faces’ window. For the first selection, choose the rectangle by using shift + left click on any of the boundaries of the rectangle. Once the rectangle is selected, it will be displayed in red. Now click in the ‘subtract faces’ box and choose the circle by following the same procedure as before. Click apply. The transcript window will give you a description of the operations performed. Any error will also be displayed here. Step 3: Meshing the edges. While a face can be directly meshed in gambit, specifying the node distribution on the edges gives a better control on the grid distribution. This would be especially important when your problem requires a finer mesh in some regions of the domain and not so fine in other regions where there is not much ‘action’ taking place. In the present example it is clear that most of the interesting physical phenomena take place near the surface of the cylinder and hence we need a fine mesh close to the cylinder. Mesh Æ Edge Æ Mesh Edges This will open up the edge meshing panel. 1. Select the edge that makes the cylinder using the same procedure described previously. Leave the value of the ratio at the default value of 1.
  • 124. Right click on the interval size button and choose interval count option. This will allow you to specify the number of nodes you want on the cylinder surface. Enter a value of 50 in the corresponding box to the left and apply. 2. Select all the other edges. Right click on the interval count button and bring it back to interval size and enter 1 in the box. Click apply. This will create an edge mesh for all the edges. Now we are ready to mesh the face. Mesh Æ Face Æ Mesh Faces This will open the mesh faces panel Select the face of the domain. In the Elements option, right click on the Quad option and choose Tri. The type will be set to Pave by default. Click apply. The face will be meshed with triangular mesh elements. The display should look as shown in the following figure. As was desired, we have created a finer mesh close to the cylinder surface and it gets coarser as we move away from the surface.
  • 125. Figure 3: The Meshed Domain. Step 4: Set Boundary Types. Zones Æ Specify Boundary Types This will open the Boundary types panel
  • 126. 1. Under Entity change the option from Faces to Edges by right clicking. 2. Choose the cylinder edge and under Type leave it as default ‘wall’. In the Name box, enter ‘cylinder’ for the name of the edge (any name can be specified) and apply. 3. Similarly select the top edge of the rectangular domain and name it as ‘Top wall’. Name the bottom edge as ‘Bottom wall’. 4. Select the left boundary and choose velocity inlet from the options under Type. Name it as ‘inlet’ and apply. 5. Select the right boundary and choose Outflow from the options under Type. Name it as ‘outlet’ and apply. Now we are done specifying the boundary types. Step 5: Exporting the mesh to be read by FLUENT. File Æ Export Æ Mesh Will open the Export Mesh File panel. Here you can specify the path and the filename of the mesh to be exported. Specify ‘Cylinder.msh’ as the filename. Make sure to click on the Export 2-D mesh radio button to make it active. Click apply. The mesh will get exported in a format that FLUENT reads. File Æ Save as Æ Enter path and filename. This will save the .dbs file. File Æ Exit