Professional Documents
Culture Documents
Introductory Manual
ANSYS12 - FLUENT
CFD Finite Volume Program FLUENT and the
Mesh Generator GAMBIT
Prepared by
R. Mokhtarzadeh and S. Natarajan
Numerical
model
The right side of the GAMBIT window contains all the tool pads. Top right is the main operation
tool pad containing all geometry, mesh, zone and tool commands. Immediately below that are the
corresponding sub pads. Upon activation of the sub pad further options will appear in the mid
section. Finally, the global control tool pad is located in the lower right of the window containing
various image and view manipulation options. Simply by holding the mouse pointer over various
buttons shows its function in the description window.
An example of a simple 2D domain of a sharp double bend is shown below. Working through this
tutorial will show you how to set up a mesh using GAMBIT.
in let
3 cm
0,0
2 cm
outlet
8 cm 3 cm 8 cm
IMPORTANT: In order to avoid problems with scaling, it is better to enter the dimensions in
meters (although the above dimensions are in cm).
Begin by defining the corners of the geometry.
1. If you make a mistake simply use UNDO in the global controls lower right.
2. Note that some buttons (like UNDO) have a little arrow, this indicates that multiple
options are available by right clicking the button changes to REDO.
3. Use the FIT TO WINDOW button to view the extents of your drawing.
Connect the vertices to form edges
Manipulation of the graphics view point is conducted with the mouse and the three buttons.
Mouse controls in the graphics window
1. EXAMIN the shape - Left-click and drag
2. PAN the view - Middle-click and drag
3. ROTATE the view - Right-click and drag left and right
4. ZOOM in/out - Right-click and drag up and down
To reset the view you may choose the PRESET CONFIGURATION four view button in the
global control tool pad. To return back to the favoured view, right-click PRESET
CONFIGURATION and choose the lower left window (not from the Active menu).
PRESET CONFIGURATION R
Remember you have already begun this session using the name "example".
1. Left-click File > Save overwriting the pervious file.
2. Alternatively you may Left-click File > Save as... and specify a new filename.
While saving, GAMBIT updates 3 files in this case,
1. example.dbs (the database file)
© Brunel University, Mechanical Engineering, last modified Oct2009Page 5
2. example.jou (the journal file containing a sequential list of commands)
3. example.trn (the transcript file containing a sequential list of response messages)
It is advisable to save your work frequently, since computer or network problems can result in
data loss.
Next we need to define the region of flow. For purposes of mesh distribution this region will be
considered as two offset rectangular sections.
Prior to discretizing the flow into elements it is beneficial to choose the number of elements and
distribution at the edges.
The benefit of using a double sided grading on the vertical faces is to concentrate elements closer
to the wall in order to better resolve the relatively large velocity gradients present in a boundary
layer. The quality of the grid in any CFD problem is a major contributor to the quality of the
solution. Now the model is ready to be meshed.
button under the relevant menu. Note that usually when deleting a mesh alone you should
unselect "remove unused lower mesh" since this would otherwise remove all associated edges,
faces, lines and points. When you are happy with your mesh, save your work (see section 2.4).
GAMBIT can be used to generate grids for a wide range of numerical solvers, such as FIDAP,
FLUENT, RAMPANT, ANSYS. The type of boundary definition depends on the solver
application, in this case FLUENT5. Choose from the top menu "Solver" and then "Fluent5".
1. Solver > FLUENT5 (specifies the model will be used by FLUENT5)
2. Next we define the types of various boundaries
wall
wall
outlet
heated-wall-lower
wall
You should then see the boundary types associated with the given names as shown below. If you
make a mistake before you APPLY then use RESET (as before) otherwise if you have an incorrect
entry you must highlight it and choose delete followed by APPLY. Note that any boundary edges
that you do not define will be treated as a WALL by default.
When you have finished, close the "specify boundary types" menu, and save your work.
Choose your file "example.msh" and OK (the mesh data will be imported).
mesh > Check (will display statistics of the grid so you need to check that there are no error
messages, particularly that the minimum volume is positive).
Display > mesh (just to see that your import has worked correctly).
Use Each of the following items on the menu in turn and check the default conditions set, modify
if necessary using "edit": General, Models (-> viscous), Materials, Boundary conditions,
Solution, Results. Leave all default conditions, which at this stage is for a laminar flow.
Define Boundary Conditions
Use the Boundary Conditions key. You will notice that the parts of the geometry you defined in
GAMBIT are shown. Use Edit to enter the boundary conditions as: in the zone box. Select each
boundary:
Use Solution and Initialization of the flow field using the inlet velocity.
Use Solution and Monitor. Here you can check that both print and plot options for monitoring of
the residuals as the iteration process progresses is on.
Select Solve, Run Calculation, set number of iterations and calculate
This will save both Mesh with the settings (example.cas) and the numerical results data just
calculated (example.dat).
Set the model to solve for heat transfer by selecting Models, and Edit to select energy equation.
Change the velocity to 10 m/s, set the "heated-wall upper" to constant heat flux of 500 W/m2, and
the heated-wall-lower and enter a constant heat flux of say 700 W/m2 following the procedure you
use before. Check the discretization schemes by selecting solve, method
The results can be displayed in various forms. Vector plot of the velocity field, contour plot of a
particular variable and line plots are three basic methods of displaying the results. Various menus
can be found under Display key:
Line plots can be found under Surface, Line/Rake - You need to define a line by defining the
coordinates and also giving it a name, so that you can pick that later in the menu: