You are on page 1of 3

COMPUTATIONAL FLUID DYNAMICS 5 Introduction to GAMBIT and FLUENT 6

Geometric mode con!truction in GAMBIT

(Remember that you are modelling the fluid-filled region, not the solid structure round it.)
GAMBIT, li e similar !rograms such as A"#$#, constructs its geometry by references to a hierarchy of geometric %&ntities%. &ntities ha'e to be set u! in the order( )ertices - &dges - *aces - )olumes )ertices are !oints defined by three coordinates. &dges (straight lines, circles, cur'es, etc.) are constructed by reference to )ertices. *aces (flat and cur'ed) are constructed from &dges. )olumes are formed by stitching *aces together (but only *aces that share common &dges). T+o-dimensional modelling only goes as far as a set of !lanar *aces. $ou must start +ith good design s etch, sho+ing in !articular the )ertices (+ith their coordinates) and the &dges. $ou also need to decide ho+ you +ill s!lit your model into )olumes, because the best meshing schemes +ill need s!ecial attention to the )olume structure. There is some sco!e for ,- modelling by Boolean o!erations on %!rimiti'es% built in to GAMBIT. But it may be better to design ,- !roblems in .A- (e.g. #olid &dge, Rhino) and #a'eAs an IG&# (name.igs) file. /hen im!orted into GAMBIT, it gi'es the )ertices, &dges and *aces. 0o+e'er, some cleaning u! of the IG&# !roducts may be needed before the *aces can be stitched together to ma e )olumes. #ometimes IG&# !roduces s!urious *aces that can be easily deleted. #ometimes you may ha'e to gra!!le +ith %)irtual &ntites%. $ou +ill !robably ha'e to add faces, in order to get your o!timum )olume structure.

T"e !o#t$are - you may need to run # uent!etu% (once only)


"otation( &o d means select a menu item 1..2 means select an icon 3..4 means stuff to ty!e. italics gi'e further information 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.

GAMBIT' !tartin( u% 3gambit -id channel4 )*

(note "minus" character)

So ,er 5 F uent 6 +* GAMBIT' (eometric mode 1Geometry2 5 1)ertices2 - .oordinates -* 1Geometry2 5 1&dges2 - )ertices .* 1Geometry2 5 1*aces2 - /ireframe 5* Fi e - Sa,e save the session 6* GAMBIT' me!"in( t"e mode 1Mesh2 - 1&dge2 /*

Repeat this to give a long rectangle: suggest "## $onnect the vertices together $reate a %face& entity from the four lines

0* 3*

set s!acing or number of mesh !oints along im!ortant edges. Ma e sure Inter,a Count is selected. #et 67 inter'als on the t+o long &dges, and 87 on the t+o ends 1Mesh2 - 1*ace2 Pic1 the face9 A%% 2, Fi e - Sa,e

$ertain edges control the density of the final mesh. 'ou can "grade" them too. (ote option to delete a previous mesh.

chec) that you get a *uadrilateral mesh Save the session

GAMBIT' identi#2 &oundar2 !ur#ace! 1:ones2 - 1Boundary Ty!es2 $all end surfaces "inlet" + "outlet,. $all walls -top, and )4*
;ic edges one at a time and gi'e them names
9:;:#<"#9.doc 9#=9"=9>

-bottom,. Define inlet as a ./01$23' 2(0/34 outlet as 15360174 and the walls as 7800.

;age 8 of ,

COMPUTATIONAL FLUID DYNAMICS 5


))* )+*
Fi e - Sa,e save the session $hoose the %"d mesh& option in the bottom left corner of the bo! 3o free up the licence ">" means a >D model Remember that 6luent doesn?t carry the model geometry data. @eometry and mesh changes have to be done in @ambit Fi e - E5%ort - Me!" - 3channel.msh4 - Acce%t

Fi e6E5it )-* FLUENT' (ettin( !tarted 3fluent49 3<4 +hen as ed for 'ersion ).* Fi e - 7ead - Ca!e 5 channel.msh )5*

)6*

)/* )0* )3* +4* +)* ++* +-*

Grid 6 Sca e Ay default4 605/(3 assumes lengths are in metres. @8BA23 doesn?t have units. 'ou have to ensure that 6luent Ma e sure the grid is the si=e you )nows which units you were using (mm in this case). e>!ected, and a!!ly scale factors Fi e - 8rite - Ca!e Do this from time to time. 3he $ase file (later, +hen you ha'e results, select Ca!e 9 Data) contains your fluid model and mesh. Di!% a2 - Grid $hec) that it?s the right model. 0earn how to pan and Coom the display. Fi e 6 :ardco%2 6 select gra!hics format 6 Sa,e Saves the active graphics window Sur#ace - Line! &nter the t+o sets of coordinates (877,7)9 (877,6)9 to define a line half +ay along the !i!e De#ine - Mode ! 6 ;i!cou! De#ine - Materia ! 6 !ic or define a fluid De#ine - Boundar2 condition! #et %inlet% to ;e ocit2 In et9 enter 'elocity of > m?s #et %outlet% to Out# o$ #et @to!A and @bottomA to 8a So ,e - Initia i!e - Init So ,e - Monitor! - 7e!idua - P ot So ,e - Iterate - set 877 iterations Di!% a2 5 ;ector! o# ,e ocit2 < Contour! o# ,e ocit2 6 Contour! o# %re!!ure P ot6;e ocit2 De#ine < Boundar2 condition! .hange @inletA 'elocity So ,e6Iterate P ot 6 ;e ocit2 So ution < +nd Order 6So ,e Define any planes4 lines or points over which you might want to display information. Default viscous model is 0aminar-note the many alternatives 3he default fluid is "air" Ay default4 605/(3 assumes velocities are in m=s. ((ote second chance to give a %type& to the bc&s. Aut only if they are separately named.) 1therwise the computer array is full of the Dun) from the last user. Displays progress of iteration. (ote options available Solution stops automatically at 9## or when residuals reach 9#->. 0oo) at results on selected planes Draws graphs of data along selected lines 8dDust the inlet velocity until the velocity profile is Dust fully formed at the outlet. (ot necessary to re-initialise before solution. Draw the graph of the velocity profile at the mid-way point and save this $hange the order of the solution to "nd order (you have been wor)ing to 9st order). 8gain not necessary to initialise. $ompare the velocity profile at the mid-way point with that obtained using the 9st order solution.

+.* +5* +6* +/* +0* +3*

-4* -)* -+*

P ot 6 ;e ocit2

Me!" Den!it2 "o+ return to GAMBIT and !roduce t+o higher density meshes, doubling the number of mesh !oints in each case (ie 877, 87 and 67, <7). Run these simulations in *luent and loo at the out!ut as 'ector !lots and contour
9:;:#<"#9.doc 9#=9"=9>

;age < of ,

COMPUTATIONAL FLUID DYNAMICS 5


!lots. .om!are the half-+ay gra!hs of 'elocity from all the simulations. /hich mesh !roduces the best result and +hyB Me!" Gradin( "o+ return to GAMBIT and !roduce a further mesh at 67, 87 but grade the 87 !oints at the inlet and outlet to im!ro'e the mesh density at the +alls. #imulate in *luent and com!are the results from this simulation +ith those from the !re'ious simulations. A note on #i e! and directorie! /hen you ha'e finished, chec your directory ( !=. $ou +ill find that, e'en for this sim!le set of e>am!les, the number of files is large and the s!ace ta en u! by these files is gro+ing ra!idly. $ou +ill ha'e many fluent e>am!les by the time you finish this course. $ou should structure your files in order to be able to ee! trac of these. In order to carry out good house ee!ing, you +ill need to learn a fe+ basic uni>?linu> commands. I suggest the follo+ing !rotocol for your future +or . Aefore you run gambit or fluent 3m dir .*-64 (Cma es a directoryD called .*-6 +ithin your home directory - you only need to do this once.) 3cd .*-64 (change directory into .*-6) 3m dir channel4 (each time you start a ne+ e>am!le, gi'e it an easily recognisable name, such as channel) 3cd channel4 Enly no+ should you run gambit or fluent. This +ill be your +or ing directory by default and all files generated +ill be sa'ed here. In future, +hen you start u!, you +ill be able to go straight to the +or ing directory if you ha'e already created it. 3cd .*-64 (you ha'e Cchanged directoryD and if you !, you +ill see the directory channel) 3cd channel4 (no+ you +ill be able to CseeD your files from the last time) U!e#u Uni5>Linu5 command! 3!+d4 +hich directory am I inB (literally 5 !resent +or ing directory) 3rm filename4 delete file (literally 5 remo'e) 3cd ..4 mo'es u! to the !re'ious directory 3m' filename directoryname4 mo'es a file 3ls4 lists the files in your !resent directory 3ls directoryname4 lists the files in a subdirectory 3fluent F4 sto!s your command +indo+ hanging until you e>it 3!s 5a4 lists your current !rocesses 3 ill -G identifier4 sto!s any ChungD !rocesses

9:;:#<"#9.doc 9#=9"=9>

;age , of ,

You might also like