Sunteți pe pagina 1din 4

Fluent and Gambit - Introduction and General Information

Komputasi dinamika fluida, Benny D Leonanda

Introduction: "Fluent" is the general name for the collection of computational fluid dynamics(CFD) programs sold by Fluent, Inc. of Lebanon, NH. The Mechanical Engineering Department at Penn State has a site license for Fluent, along with its family of programs. Up to 20 users can run Fluent simultaneously in the Graduate Computing Lab.
y y

y y

Gambit is the program used to generate the grid or mesh for the CFD solver. Fluent is the CFD solver which can handle both structured grids, i.e. rectangular grids with clearly defined node indices, and unstructured grids. Unstructured grids are generally of triangular nature, but can also be rectangular. In 3-D problems, unstructured grids can consist of tetrahedrals (pyramid shape), rectangular boxes, prisms, etc. Note: Since version 5.0, Fluent can solve both incompressible and compressible flows. The normal procedure in any CFD problem is to first generate the grid (with Gambit), and then to run Fluent.

Instructions: In these learning modules, different types of formatting are used to save writing, as follows:
y

y y y

Italic text is used to indicate the name of a window or the name of a parameter within a window. For example, if a window has the title "Meshing an Edge", and within that window is a parameter called "Number of nodes", an instruction will appear as follows: In Meshing an Edge, change Number of nodes to 16. Underlined text implies that the user should click on the corresponding button or option with the left mouse button. R-Underlined text preceded by an R means to use the right mouse button rather than the standard left mouse button. When two or more underlined texts are shown with a dash, like this: First-Second, the user should click with the left mouse button on the first item, which will open up a new pop-up window or selection box. In the new window, the user clicks on the second item (Sometimes the mouse button must be held down without releasing in order to open up this new window. In that case, the user releases the mouse button when it is positioned over the desired selection in the second window.) Sometimes, left clicks and right clicks are required for a specific task. The R will indicate a right click in these cases, since left click is the default. For example, Edge Command Button-R-Create Edge-NURBS. When text is to be entered with the keyboard, it will be shown in double quotes. For example, Type "text" means to type the text within the quotes, but not the quotes themselves. When the Enter key is to be pressed after typing, this will be indicated in these learning modules as Enter "text" instead of Type "text". For example, Enter "fluent 2d &" means to type the words in double quotes, and then hit the Enter key on the keyboard.

Selecting in Gambit: Most commands in Gambit require the user to select an object (a vertex, en edge, etc.). To select an object, hold down the Shift key on the keyboard, and click on the object with the left mouse button. In most cases, an alternate way to select is provided by a List window, which allows the user to click on object(s) from the Available column, and transfer them to the Picked column. This is especially useful when an operation is to be done on many objects at the same time. In cases where more than one object can be selected by the same click (for example two faces which share an edge), the first Shift click may pick the "wrong" one. In such a case, Shift click with the middle mouse button until the desired one is selected. Graphical Manipulation: Graphical manipulation means zooming in and out, moving objects around, rotating objects, etc. Unfortunately, the mouse commands for Gambit and Fluent are different for these manipulations. Note, a 3-button mouse is assumed. If you have a two-button mouse, the normal default is that clicking both left and right buttons simultaneously denotes a middle mouse click.
y

In Gambit, the left mouse button controls rotation, the middle controls location, and the right controls zoom. Click and move the left mouse button to rotate. This takes some practice. Click and drag the middle mouse button to move the image. Click and drag down the right mouse button to zoom in, and click and drag up the right mouse button to zoom out. In Fluent, the mouse functions depend on whether the flow is 2-D or 3-D. If 2-D, click and drag the left mouse button to move the image around. The graphical display can be zoomed-in or zoomed-out with the middle mouse button. If you start on the upper left and draw a rectangle with the middle mouse button towards the lower right, the display will zoom in on what is included in the rectangle. If you draw a rectangle backwards with the middle mouse button, i.e. from the lower right to the upper left, it will zoom out. The right mouse button simply identifies the boundary or type of cell on which you click. In 3-D flow, the left mouse button controls rotation if it is dragged. If the left button is just clicked somewhere, that point is moved to the center of the display. Other functions in 3-D are essentially the same as in 2-D.

Running Fluent in Background Mode: When many iterations are required, it is possible (and preferrable) to fun fluent in background mode. This enables a user to logout of the computer while fluent churns away in the background. This is especially useful when the solution requires several hours of CPU time in cases like that, it is best to run at night. For detailed instructions on how to run Fluent in background mode, see the learning module, fluent_background.htm .

Fluent - Running in Background Mode


Latest revision: 07 November, 2003, 12:10 p.m.

Introduction and Instructions: This learning module contains a procedure to run Fluent in background mode. This enables users to log in, start the code running in the background, log out, and come back later to look at the solutions. This is especially useful for a large number of iterations, which can be most time-effective overnight. When Fluent runs in the background, it must be run in its nongraphical interface form, of course. Run Fluent to set up the case and data files : 1. Before Fluent can run from the journal file, both case and data files must be available. 2. Run Geomesh to generate the grid, and run Fluent in the normal graphical way, set up the boundary conditions, initialize, and run a few iterations to make sure everything is working properly. 3. Write out case and data files for your problem. For this example, suppose the files are called test.cas and test.dat. 4. Exit Fluent. Create a journal file for Fluent: 1. Create a text (ascii) file, which can be any name. For this example, the file will be called test.jou (this is the journal file for the example case called test). 2. In this journal file, copy and paste the following lines: (Note: A text file containing these lines can be downloaded from this web site for your convenience.)

file read-case-data test.cas /solve iterate 20 quit /file write-case-data y quit quit quit quit quit quit

quit quit quit exit

3. In this example, the number of iterations is set to 20. This should be changed to the desired number of iterations, of course. 4. Also, change the name of the case and data files. Run Fluent in background mode : 1. Make sure you are in the directory which contains the case and data files. 2. Enter one of the following unix commands:
3. fluent 2d -g -i test.jou & 4. 5. fluent 3d -g -i test.jou &

depending on whether it is a 2-D or 3-D problem. The -g tells Fluent to run without the graphical user interface. The -i tells Fluent to run with instructions from journal file test.jou. Change the file name to your journal file name, of course. 6. Now you can log out, go home, eat supper, sleep, etc. When the program is done running, it will write (update) your case and data files! 7. Option - It is also possible to record the Fluent output on some other file. This is strongly recommended because then you have a record of the iterations completed and any errors that may occur. To run Fluent in background mode and send the output to a file called test.out, Enter one of the following the unix commands:
8. fluent 2d -g -i test.jou >& test.out & 9. 10. fluent 3d -g -i test.jou >& test.out &

depending on whether it is a 2-D or 3-D problem. As in the commands above, change the file name to your journal file name, of course.

S-ar putea să vă placă și