Sie sind auf Seite 1von 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
<gambit -id channel>
1.

Sessions can be saved so that you can re-start at


the same state later on. Delete unwanted
sessions from your file store from time to time.

(note "minus" character)


Solver Fluent 6
2.
GAMBIT: geometric model
{Geometry} {Vertices} - Coordinates
3.
{Geometry} {Edges} - Vertices
4.
{Geometry} {Faces} - Wireframe
5.
File - Save save the session
6.
GAMBIT: meshing the model
{Mesh} - {Edge}
7.
set spacing or number of mesh points along
important edges.
Make sure Interval Count is selected. Set 50
intervals on the two long Edges, and 10 on the two
ends

Repeat this to give a long rectangle: suggest 5 x


200
Connect the vertices together
Create a face entity from the four lines

Certain edges control the density of the final


mesh. You can "grade" them too. Note option
to delete a previous mesh.

8.

{Mesh} - {Face}
Pick the face; Apply,

check that you get a quadrilateral mesh

9.

File - Save

Save the session

GAMBIT: identify boundary surfaces


{Zones} - {Boundary Types}
Call end surfaces "inlet" & "outlet. Call walls top and
10.
Pick edges one at a time and
give them names
Introduction to gambit example.doc 23/09/13

bottom. Define inlet as a VELOCITY INLET, outlet as


OUTFLOW, and the walls as WALL.

Page 1 of 3

COMPUTATIONAL FLUID DYNAMICS


11.
12.

File - Save

save the session

File - Export - Mesh - <channel.msh> - Accept

File-Exit
13.
FLUENT: getting started
<fluent>;
<2> when asked for version
14.
File - Read - Case channel.msh
15.

"3" means a 3D model


Remember that Fluent doesn't carry the model geometry
data. Geometry and mesh changes have to be done in
Gambit
By default, FLUENT assumes lengths are in metres.
GAMBIT doesn't have units. You have to ensure that Fluent
knows which units you were using (mm in this case).

16.

Grid - Scale
Make sure the grid is the size you
expected, and apply scale factors

17.

File - Write - Case


(later, when you have results, select Case & Data)
Display - Grid

18.
19.
20.

Choose the 2d mesh option in the bottom left


corner of the box
To free up the licence

File - Hardcopy - select graphics format - Save

Do this from time to time. The Case file


contains your fluid model and mesh.
Check that it's the right model. Learn how to
pan and zoom the display.
Saves the active graphics window

Surface - Lines Enter the two sets of coordinates


(100,0); (100,5); to define a line half way along the
pipe
Define - Models - Viscous

Define any planes, lines or points over which


you might want to display information.

22.
23.

Define - Materials - pick or define a fluid

The default fluid is "air"

Define - Boundary conditions


Set "inlet" to Velocity Inlet; enter velocity of x m/s
Set "outlet" to Outflow
Set top and bottom to Wall

By default, FLUENT assumes velocities are in


m/s. (Note second chance to give a type to the
bcs. But only if they are separately named.)

24.

Solve - Initialise - Init

25.

Solve - Monitors - Residual - Plot

Otherwise the computer array is full of the junk


from the last user.
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


velocity - Contours of pressure
Plot-Velocity

Look at results on selected planes

21.

28.
29.

30.

Define Boundary conditions


Change inlet velocity
Solve-Iterate
Plot - Velocity

31.

Solution 2nd Order -Solve

32.

Plot - Velocity

Default viscous model is Laminar-note the many


alternatives

Draws graphs of data along selected lines


Adjust the inlet velocity until the velocity profile
is just fully formed at the outlet. Not necessary
to re-initialise before solution.
Draw the graph of the velocity profile at the
mid-way point and save this
Change the order of the solution to 2nd order
(you have been working to 1st order). Again not
necessary to initialise.
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

Das könnte Ihnen auch gefallen