You are on page 1of 5

CHEG 341 CFD MODELING USING FLUENT

Fluent consists of two separate programs – Gambit and Fluent. Gambit is used to
construct the flow geometry, along with the mesh for solving the equations of
motion and continuity at fixed points. Fluent 6.2.16 is the program which actually
solves the equations for the geometries constructed using Gambit.

GAMBIT OPERATION

1. Before using either Fluent or Gambit in eCALC or the Dell Lab, you must set the
environment. Using the Windows drop-down menus, enter: Start  Programs 
Fluent Inc. Products Fluent 6.2.16  Set Environment. Answer “Yes” and “OK”
when prompted.

2. Create a new geometry file using Gambit. Go to Start  Run and type

cmd
At the Z: prompt, type C:
At the C: prompt, type gambit

This will create a new gambit file. After about 10 seconds, a large black
screen with a Cartesian coordinate system will appear. MINIMIZE (but DO
NOT CLOSE) the smaller black command window.

3. In Gambint, click on the grey cube (the Geometry button). Then, click on the
fourth button, which looks like a white cube. A new button menu, called “Volume,”
should appear.

4. RIGHT click on the icon that looks like a white shoebox (the second button). This
will reveal a drop down menu of different 3D shapes. Select Frustrum for this
practice session. Create a frustrum with a height of 27, with Radius 1 and Radius 2
both 1.55, and Radius 3 = 1.0 (we will insert units later, in Fluent rather than
Gambit). Make the Axis Location “Centered X.” Label the tube LAD. When you have
entered all this info, click the Apply button. If you want your tube to fill the entire
screen, Click the button with the triangle near the bottom of the screen, under the
word Active.

5. Right click on the frustrum symbol, and select Torus as the next geometry to
build. Choose Radius 1 as 1.275 and Radius 2 as 0.5. Label this Stenosis and center
it on the X axis. Click Apply.

6. Right click on the icon of the two intersecting circles, and select Subtract from the
drop down menu.
Pick LAD as the Volume, and Stenosis as the Subtract Volumes. Click Apply. Your
tube will now have a toroidal chunk missing from its center.
If you mess up, the “Undo” button is the curved blue arrow at the bottom right hand
of the screen.

7. Choose Solver  Fluent 5/6. DO NOT SKIP THIS STEP.

8. From the Operation menu at the top, select Zones (third button from the left, a
blue-green divided cube). You will now label the boundaries of your LAD. Click the
left cube (white one with blue side) to specify boundary types Click the dark black
arrow next to the yellow box to bring up the list of boundaries. Select face.1 from
the Available list, and transfer it to the Picked list using the arrow. Face.1 will then
be highlighted in red. (You can also “pick” an entity by left-clicking on it while you
hold down the Shift key.) If this is your exit face, name it Outlet, and select
Outlet_Vent as the Type from the dropdown menu.

9. Repeat step 6 for the inlet (Type is Mass_Flow_Inlet). The remaining faces are
considered Walls as default.

10. Next, create the mesh. Click on the Yellow cube in the Operation menu. Click
the White cube (4th button) under Mesh, and then the first button (Cube with Pencil)
under Volume. Pick “LAD” as your Volumes:, and choose Tet/Hybrid as your
Elements: Enter 0.4 as your Spacing, then click the Apply button. Note that 0.4 mm
will be too coarse of a mesh for your actual study, but we will use a coarse mesh
here so that the calculations take less time.

11. Finally, Export your mesh. Choose File  Export  Mesh from the top menu
bar. Browse for the location on the scratch drive where you store your personal files
(e.g., your thumb drive), and save the file with filename.msh (be sure to include the
.msh). You may now exit Gambit.

FLUENT OPERATION

(1) Before using either Fluent or Gambit in eCALC or the Dell Lab, you must set the
environment. Using the Windows drop-down menus, enter: Start  All Programs 
Fluent Inc.  Set Environment. Answer “Yes” and “OK” when prompted. You do not
need to repeat this step if you already did it once since sitting down at the computer.

(2) Start up Fluent: Start  Programs  Fluent Inc.  Fluent 6.2.16. Select 3d to
RUN.

(3) Read in the desired geometry . From the Fluent drop down menu, choose: File 
Read  Case  Look in: Location where you stored your mesh (C: is default).
Fluent will then open the mesh file which you created.
(4) Check the grid: Grid  Check

(5) Set the Scale of the grid to be mm. This is important, because the default is
meters, and larger diameters will result in larger Reynolds numbers. Select Grid 
Scale and enter mm as the unit the grid was created in, then click SCALE (and close
the window).

(5) Display the grid: Diplay  Grid. Be sure the surfaces are highlighted, and click
Display. The grid should come up in a black window on your screen.

(6) Tell Fluent that your fluid is blood. Select DefineMaterials. Change the name
from air to “Blood” and replace the density and viscosity of air with those of blood.
Click Change/Create, and agree when Fluent asks if it’s OK to overwrite “air.” Close
the dialog box.

(7) Tell Fluent this will be a laminar flow problem. Choose Define  Models 
Viscous  Laminar  OK.

(8) Input the correct inlet flow rate by selecting Define  Boundary Conditions 
Inlet  Mass Flow Inlet  Set. Enter 0.00167 kg/sec as the mass flow rate. Click
OK.

(8) Initialize the grid with numerical values. You only have to do this the FIRST time
you run a calculation with a new Fluent geometry. For all subsequent times, you can
just start from the last calculated values, which is usually faster. Choose: Solve 
Initialize  Initialize  Init. You can accept the default values. Close the window
when finished initializing.

(9) Solve the problem. If you want to monitor the progress of the solver as it works,
first choose: Solve  Monitors  Residual and check both the Print and Plot boxes,
and click OK. This is useful in order to catch any mistakes you may have made in
solving a problem. Then, choose Solve  Iterate and select the number of iterations
to be 200, then click Iterate. If it takes more than 200 iterations, simply click the
Iterate button again until you get a “Solution is converged” message on the screen.

(10) Display the pressure profiles. Choose: Display  Contours  Pressure. Select
default-interior from the Surfaces list. Choose the options you prefer – Filled is quite
impressive. Click Display. A color image of the pressure contours will be displayed.
You can rotate this image to see inside the pipe by drigging any point on the screen.

(11) View the outlet velocity profile by rotating the pipe to look at it end-on, or by
returning to the Contours window and selecting outlet as the surface (remember to
de-select default-interior).
(12) You may wish to save your case and data to your own folder by choosing: File
 Write  Case and Data.
(13) You can copy pictures for your report as a JPEG or other formats. Choose: File
 Hard Copy  JPEG. Choose the Color option, and the Reverse
Foreground/Background option (to avoid wasting the expensive color toner on the
black background).

(14) You can save numerical data from a fixed surface by choosing File  Write 
Profile and then selecting the surface and value you wish to record (e.g. Outlet and
Velocity). Save the file as filename.csv; this format can be opened in Excel. In your
.csv file, you will get a single column listing first all the x-coordinates for your
chosen surface, followed by the y-coordinates, the z-coordinates and the value (e.g.,
velocity) associated with the respective (x,y,z) coordinates. You will probably want to
convert this data into a 4-column listing, so that each row contains the x, y, and z
coordinates, followed by the velocity.

MODIFYING AN EXISTING GEOMETRY (BEFORE MESHING)

You should use this procedure when modeling the bifurcation in the left main
coronary artery. Because geometry construction in Gambit is tedious, we have built
for you a model of the healthy (no stenosis) bifurcation. For your project, you will
have to mesh this geometry, as well as add stenoses and bypass grafts. These
instructions explain how to open the file in Gambit.

(1) The geometry file of the healthy bifurcation is located on the classfiles Y:
drive in eCALC and the Dell Lab, as
Y:\CHEG341\2005Fluent\artery_healthy.dbs However, because students do
not have write privileges to this drive, you must first copy the file onto your
own accessible media (e.g., your C: drive). Otherwise, you will NOT be able to
open the file.
(2) Start up Gambit using the instructions 1. and 2. under Gambit Operation,
above..
(3) Open the geometry file: File  Open. In the ID: box, type the address of
your file, e.g., F:\artery-healthy. DO NOT append the .dbs to the “artery-
healthy” name. Agree to save the current session.
(4) Continue with step (10) under Gambit Operation.

SOME COMMENTS ON BOUNDARY CONDITIONS

When you have a single inlet and a single outlet, as we had in the example above,
you can either specify the inlet flow rate (or velocity), and Fluent will calculate the
pressure at the inlet, or else you can specify the inlet pressure, and Fluent will
calculate the velocity. Note that specifying an Outlent Vent as an exit BC sets the
pressure there to 0 (gage).

When you model a geometry in Fluent which has more than one outlet, you must
provide boundary conditions for each inlet and outlet. Unfortunately, you can
provide a mass flow BC only for inlet boundaries; outlet BCs must be specified as
pressure BCs. Hence, a trial-and-error procedure is necessary, even for a stenosis-
free bifurcation. Using the known pressure at the LM inlet, you must guess the
pressures at the LCX and the LAD exits (these will likely be different) until your
Fluent simulation reports the correct flow rates for the healthy LCX and LAD.

A note about numerical simulations: Fluent “solves” the flow equations to within a
certain tolerance – the default value of the residual is 0.001. So, if you are solving
for the pressure drop across a vessel where the entrance pressure is 10,000 Pa,
Fluent will consider the problem “solved” when the exit pressure is calculated to
within +/- 10 Pa (10 Pa / 10,000 Pa = 0.001). However, if the total pressure drop
across your vessel is supposed to be 20 Pa, note that Fluent will only be able to
calculate the pressure drop to within 50%, i.e., to 20 Pa +/- 10 Pa. Although you can
“fix” this problem by lowering the tolerance (say, to 0.00001), this will dramatically
increase the computation time, and may even run up against the limit of single
precision computations. So, a “trick” for avoiding this problem is to set the initial
pressure to a value that is lower than what you know the true value is, say, to 100 Pa
instead of 10,000 Pa. Then Fluent will calculate your exit pressure precise to +/-
0.1 Pa (at a tolerance of 0.001), so your P will be 20 +/- 0.1 Pa, which is correct to
within +/- 0.5%.

ONLINE USER’S MANUAL FOR FLUENT

If you wish additional information about using Fluent, you can access the User’s
Manual on the X: Drive in eCALC or the Dell Lab.

In eCALC, go to

X: (applications on archimedes) Fluent.IncFluent6.0helpindex.htm and click


on the User’s Guide.

In the Dell Lab, go to

ChEApplicationsFluentIncFluent6.2Documentation and click User’s Guide.

You might also like