You are on page 1of 3

COMPUTATIONAL FLUID DYNAMICS

Introduction to GAMBIT and FLUENT 6

Geometric model construction in GAMBIT


(Remember that you are modelling the fluid-filled region, not the solid structure round it.)
GAMBIT, like similar programs such as ANSYS, constructs its geometry by references to a hierarchy of
geometric "Entities". Entities have to be set up in the order:
Vertices - Edges - Faces - Volumes
Vertices are points defined by three coordinates. Edges (straight lines, circles, curves, etc.) are constructed by
reference to Vertices. Faces (flat and curved) are constructed from Edges. Volumes are formed by stitching
Faces together (but only Faces that share common Edges).
Two-dimensional modelling only goes as far as a set of planar Faces.
You must start with good design sketch, showing in particular the Vertices (with their coordinates) and the
Edges. You also need to decide how you will split your model into Volumes, because the best meshing schemes
will need special attention to the Volume structure.
There is some scope for 3D modelling by Boolean operations on "primitives" built in to GAMBIT. But it may
be better to design 3D problems in CAD (e.g. Solid Edge, Rhino) and SaveAs an IGES (name.igs) file. When
imported into GAMBIT, it gives the Vertices, Edges and Faces. However, some cleaning up of the IGES
products may be needed before the Faces can be stitched together to make Volumes. Sometimes IGES produces
spurious Faces that can be easily deleted. Sometimes you may have to grapple with "Virtual Entites". You will
probably have to add faces, in order to get your optimum Volume structure.

The software - you may need to run fluentsetup (once only)


Notation: bold means select a menu item {..} means select an icon <..> means stuff to type.
italics give further information
GAMBIT: starting up
1. <gambit -id channel> Sessions can be saved so that you can re-start at
(note "minus" character) the same state later on. Delete unwanted
sessions from your file store from time to time.
2. Solver Fluent 6
GAMBIT: geometric model
3. {Geometry} {Vertices} - Coordinates Repeat this to give a long rectangle: suggest 5 x
200
4. {Geometry} {Edges} - Vertices Connect the vertices together
5. {Geometry} {Faces} - Wireframe Create a face entity from the four lines
6. File - Save save the session
GAMBIT: meshing the model
7. {Mesh} - {Edge} Certain edges control the density of the final
set spacing or number of mesh points along mesh. You can "grade" them too. Note option
important edges. to delete a previous mesh.
Make sure Interval Count is selected. Set 50
intervals on the two long Edges, and 10 on the two
ends
8. {Mesh} - {Face} check that you get a quadrilateral mesh
Pick the face; Apply,
9. File - Save Save the session

GAMBIT: identify boundary surfaces


10. {Zones} - {Boundary Types} Call end surfaces "inlet" & "outlet. Call walls top and
Pick edges one at a time and bottom. Define inlet as a VELOCITY INLET, outlet as
give them names OUTFLOW, and the walls as WALL.

Introduction to gambit example.doc 23/09/13 Page 1 of 3


COMPUTATIONAL FLUID DYNAMICS

11. File - Save save the session


12. File - Export - Mesh - <channel.msh> - Accept Choose the 2d mesh option in the bottom left
corner of the box
13. File-Exit To free up the licence
FLUENT: getting started
14. <fluent>; <2> when asked for version "3" means a 3D model
15. File - Read - Case channel.msh Remember that Fluent doesn't carry the model geometry
data. Geometry and mesh changes have to be done in
Gambit
16. Grid - Scale By default, FLUENT assumes lengths are in metres.
Make sure the grid is the size you GAMBIT doesn't have units. You have to ensure that Fluent
expected, and apply scale factors knows which units you were using (mm in this case).
17. File - Write - Case Do this from time to time. The Case file
(later, when you have results, select Case & Data) contains your fluid model and mesh.
18. Display - Grid Check that it's the right model. Learn how to
pan and zoom the display.
19. File - Hardcopy - select graphics format - Save Saves the active graphics window
20. Surface - Lines Enter the two sets of coordinates Define any planes, lines or points over which
(100,0); (100,5); to define a line half way along the you might want to display information.
pipe
21. Define - Models - Viscous Default viscous model is Laminar-note the many
alternatives
22. Define - Materials - pick or define a fluid The default fluid is "air"
23. Define - Boundary conditions By default, FLUENT assumes velocities are in
Set "inlet" to Velocity Inlet; enter velocity of x m/s m/s. (Note second chance to give a type to the
Set "outlet" to Outflow bcs. But only if they are separately named.)
Set top and bottom to Wall
24. Solve - Initialise - Init Otherwise the computer array is full of the junk
from the last user.
25. Solve - Monitors - Residual - Plot Displays progress of iteration. Note options
available
26. Solve - Iterate - set 100 iterations Solution stops automatically at 100 or when
residuals reach 10-3.
27. Display Vectors of velocity Contours of Look at results on selected planes
velocity - Contours of pressure
28. Plot-Velocity Draws graphs of data along selected lines
29. Define Boundary conditions Adjust the inlet velocity until the velocity profile
Change inlet velocity is just fully formed at the outlet. Not necessary
to re-initialise before solution.
Solve-Iterate
30. Plot - Velocity Draw the graph of the velocity profile at the
mid-way point and save this
31. Solution 2nd Order -Solve Change the order of the solution to 2nd order
(you have been working to 1st order). Again not
necessary to initialise.
32. Plot - Velocity Compare the velocity profile at the mid-way
point with that obtained using the 1st order
solution.

Mesh Density
Now return to GAMBIT and produce two higher density meshes, doubling the number of mesh points in each
case (ie 100, 10 and 50, 20). Run these simulations in Fluent and look at the output as vector plots and contour

Introduction to gambit example.doc 23/09/13 Page 2 of 3


COMPUTATIONAL FLUID DYNAMICS
plots. Compare the half-way graphs of velocity from all the simulations. Which mesh produces the best result
and why?

Mesh Grading
Now return to GAMBIT and produce a further mesh at 50, 10 but grade the 10 points at the inlet and outlet to
improve the mesh density at the walls. Simulate in Fluent and compare the results from this simulation with
those from the previous simulations.
A note on files and directories
When you have finished, check your directory (ls). You will find that, even for this simple set of examples, the
number of files is large and the space taken up by these files is growing rapidly. You will have many fluent
examples by the time you finish this course. You should structure your files in order to be able to keep track of
these. In order to carry out good housekeeping, you will need to learn a few basic unix/linux commands. I
suggest the following protocol for your future work.
Before you run gambit or fluent
<mkdir CFD5> (makes a directory called CFD5 within your home directory - you only need to do this once.)
<cd CFD5> (change directory into CFD5)
<mkdir channel> (each time you start a new example, give it an easily recognisable name, such as channel)
<cd channel>
Only now should you run gambit or fluent. This will be your working directory by default and all files generated
will be saved here.
In future, when you start up, you will be able to go straight to the working directory if you have already created
it.
<cd CFD5> (you have changed directory and if you ls, you will see the directory channel)
<cd channel> (now you will be able to see your files from the last time)

Useful Unix/Linux commands


<pwd> which directory am I in? (literally present working directory)
<rm filename> delete file (literally remove)
<cd ..> moves up to the previous directory
<mv filename directoryname> moves a file
<ls> lists the files in your present directory
<ls directoryname> lists the files in a subdirectory
<fluent &> stops your command window hanging until you exit
<ps a> lists your current processes
<kill -9 identifier> stops any hung processes

shrish shukla

Introduction to gambit example.doc 23/09/13 Page 3 of 3

You might also like