You are on page 1of 178

Laminar Pipe Flow

c
c
c  c
c

cc
c
c


c
c

c

cc   c
!c
c

cc   c
"c#$
%c c $
cc   c
&c#
c'$c(
cc)*'+ c
,c#-
.c
/c 0
c
 c
1c
%
c
c
(
cc
(
c!c

? 





Consider fluid flowing through a circular pipe of contant cross-section. The pipe diameter DD .2
m and length LD m. The inlet velocity Vin=1 m/ s. Consider the velocity to be constant over the
inlet cross-section. The fluid exhausts into the ambient atmosphere which is at a pressure of 1
atm. Take density ȡ=1 kg/ m3 and coefficient of viscosity µD 2 x 1 -3 kg/(ms). The Reynolds
number Re based on the pipe diameter is

where Vavg is the average velocity at the inlet, which is 1m/s in this case.

Solve this problem using FLUENT. Plot the centerline velocity, wall skin-friction coefficient,
and velocity profile at the outlet. Validate your results.

Note: The values used for the inlet velocity and flow properties are chosen for convenience
rather than to reflect reality. The key parameter value to focus on is the Reynolds no.
? 

  

*e expect the viscous boundary layer to grow along the pipe starting at the inlet. It will
eventually grow to fill the pipe completely (provided that the pipe is long enough). *hen this
happens, the flow becomes fully-developed and there is no variation of the velocity profile in the
axial direction,   (see figure below). One can obtain a closed-form solution to the governing
equations in the fully-developed region. You should have seen this in the ntroduction to Fluid
Mechanics course. *e will compare the numerical results in the fully-developed region with the
corresponding analytical results. So it's a good idea for you to go back to your textbook in the
Intro course and review the fully-developed flow analysis. *hat are the values of centerline
velocity and friction factor you expect in the fully-developed region based on the analytical
solution? *hat is the solution for the velocity profile?

*e'll create the geometry and mesh in GAMBIT which is the preprocessor for FLUENT, and
then read the mesh into FLUENT and solve for the flow solution.

    

If you would prefer to skip the mesh generation steps, you can create a working directory (see
below), download the mesh from here (right click and save as ViVe.msh) into the working
directory and go straight to step 4.

Strategy for Creating Geometry

In order to create the rectangle, we will first create the vertices at the four corners. *e'll then join
adjacent vertices by straight lines to form the "edges" of the rectangle. Lastly, we'll create a
"face" corresponding to the area enclosed by the edges. In teV 2, we'll mesh the face i.e. the
rectangle. Note that in 3D problems, you'll have to form a "volume" from faces. So the hierarchy
of geometric objects in GAMBIT is vertices -> edges -> faces -> volumes.

Create a Working Directory

Create a folder called ViVe in a convenient location. *e'll use this as the working folder in which
files created during the session will be stored.

0         Each user gets his/her own 1 MB of disk space under
S: at ACCEL. You can put your files in S: and it'll be accessible from any computer. This is
where you should put files that you want to keep and access later on.
Start GAMBIT

Start your command prompt.

Start > Programs > Lab Apps > Fluent Inc Products > Gambit 2.3.16 > Gambit 2.3.16

This brings up the a MB  startup window. Click Browse and select the folder that you just
created. Enter -id pipe in the options box to tell GAMBIT to use ViVe as the default file prefix,
then click Run.

In *indows, the E ceed X-server starts up before the GAMBIT interface comes up. E ceed is a
third-party application needed to render the interface in *indows (GAMBIT was originally
developed under Unix). To make best use of screen real estate, move the windows and resize
them so that you approximate this screen arrangement. This way you can read instructions in the
browser window and implement them in a MB .

You can resize the text in the browser window to your taste and comfort:

In Internet Explorer: Menubar > View > Text Size, then choose the appropriate font size.

In Netscape: Menubar > View > Increase Font or Menubar > View > Decrease Font.

The a MB  Interface consists of the following:

xc Main Menu Bar:

Note that the job name ViVe appears after D: in the title bar of the Utility Menu.
xc AVeration oolVad:

*e'll more or less work our way across the AVeration oolVad as we go through the
solution steps. Notice that as each of the top buttons is selected, a different "sub-pad"
appears. The aeometry sub-pad is shown in the above snaphot.
xc alobal Control oolVad:

The alobal Control oolVad has options such as Fit to Screen and Undo
that are very handy during the course of geometry and mesh creation.
xc a MB  araVhics:

This is the window where the graphical results of operations are displayed.
xc a MB  DescriVtion Panel:

The DescriVtion Panel contains descriptions of buttons or objects that the mouse is
pointing to. Move your mouse over some buttons and notice the corresponding text in the
DescriVtion Panel.
xc a MB  ranscriVt Window:

This is the window to which output from a MB  commands is written and which
provides feedback on the actions taken by a MB  as you perform operations. If, at
some point, you are not sure you clicked the right button or entered a value correctly, this
is where to look to figure out what you just did. You can click on the arrow button in the
upper right hand corner to make the ranscriVt window full-sized. You can click on the
arrow again to return the window to its original size. Go ahead, give this a try.

Select Solver

If the window titlebar does not say the solver is FLUENT 5/6, then you need to specify:
Main Menu > Solver > FLUENT 5/6

Verify this has been done by looking in the ranscriVt Window where you should see:

The boundary types that you'll be able to select in the third step depends on the solver selected.

*e can assume that the flow is axisymmetric. The problem domain is:

where r and   are the radial and axial coordinates, respectively.

Strategy for creating geometry

*e will put the origin of the coordinate system at the lower left corner of the rectangle. The
coordinates of the corners are shown in the figure below:

*e will first create four vertices at the four corners and join adjacent vertices to get the edges of
the rectangle. *e will then form a face that covers the area of the rectangle.

Create Vertices

Find the buttons described below by pointing the mouse at each of the buttons and reading the
DescriVtion Window.

Operation Toolpad > Geometry Command Button > Vertex Command Button > Create
Vertex

Notice that the Create Verte  button has already been selected by default. After you select a
button under a sub-pad, it becomes the default when you go to a different sub-pad and then come
back to the sub-pad.

Create the vertex at the lower-left corner of the rectangle:


Next to x:, enter value . Next to y:, enter value . Next to z:, enter value (these values should
be defaults). Click Apply. This creates the vertex ( , , ) which is displayed in the graphics
window.
In the ranscriVt window, GAMBIT reports that it "Created vertex: vertex.1". The vertices are
numbered vertex.1, vertex.2 etc. in the order in which they are created.

Repeat this process to create three more vertices:

Vertex 2: ( , .1, )
Vertex 3: (, .1, )
Vertex 4: (, , )

Note that for a 2D problem, the z-coordinate can always be left to the default value of .

Operation Toolpad > Global Control > Fit to *indow Button

This fits the four vertices of the rectangle we have created to the size of the araVhics Window.
(Click picture for larger image)

Create Edges

*e'll now connect appropriate pairs of vertices to form edges. To select any entity in GAMBIT,
hold down the Shift key and click on the entity.

Operation Toolpad > Geometry Command Button > Edge Command Button > Create
Edge

Select two vertices that make up an edge of this rectangle by holding down the Shift button and
clicking on the corresponding vertices. As each vertex is picked, it will appear red in the
araVhics Window. Then let go of the Shift button. *e can check the selected vertices by clicking
on the up-arrow next to Vertices:.

This will bring up a window containing the vertices that have been selected. Vertices can be
moved from the Available and Picked lists by selecting them and then pressing the left or right
arrow buttons.
After the correct vertices have been selected, click Close, then click Apply in the Create traight
Edge window.

Repeat this process to create a rectangle.

(Click picture for larger image)

Create Face

Operation Toolpad > Geometry Command Button > Face Command Button > Form
Face

To form a face out of the area enclosed by the four lines, we need to select the four ledges that
enclose this area. This can be done by holding down the Shift key, clicking on each line (notice
that the currently selected line appears red), and then releasing the Shift key after all four lines
have been selected.

Alternatively, an easier way to do this would be to click on the up arrow next to edges:

This will bring up the Edge List window. Click on All-> to select all of the edges at once. Click
Close.

Click Apply to create the face.

  

*e'll now create a mesh on the rectangular face with 1 divisions in the axial direction and 5
divisions in the radial direction. *e'll first mesh the four edges and then the face. The desired
grid spacing is specified through the edge mesh.

Mesh Edges
A$
c $c2c
cc c 2c3
cc c 2c
c3
c c

Shift-click or bring up the Edge List window and select both the vertical lines. If this is difficult,
one can zoom in on an edge by holding down the Ctrl button, clicking and dragging the mouse to
specify an area to zoom in on, and releasing the Ctrl button. To return to the main view, click on
the Global Control Toolpad > Fit to *indow Button again. You can also hold down Ctrl and
double-click in the window to zoom out to a fitting window. To pan the view, hold down the
middle mouse button and drag the mouse.
Once a vertical edge has been selected, select Interval Count from the drop down box that says
Interval Size in the Mesh Edges Window. Then, in the box to the left of this combo box, enter 5
for the interval count.

Click Apply. Nodes appear on the edges showing that they are divided into 5.

(Click picture for larger image)

Repeat the same process for the horizontal edges, but with an interval count of 1 .

Now that the edges are meshed, we are ready to create a 2-D mesh for the face.

Mesh Face
A$
c $c2c
cc c 2c)
cc c 2c
c)
c c

Shift left-click on the face or use the up arrow next to Faces to select the face. Click Apply.
(Click picture for larger image)

 
 


Create Boundary Types

*e'll next set the boundary types in GAMBIT. The left edge is the inlet of the pipe, the right
edge the outlet, the top edge the wall, and the bottom edge the axis.

A$
c $c2c4
cc c 2c#$
%c c $
cc c c

This will bring up the Vecify Boundary yVes window on the AVeration Panel. *e will first
specify that the left edge is the inlet. Under Entity:, pick Edges so that a MB  knows we want
to pick an edge (face is default).

Now select the left edge by Shift-clicking on it. The selected edge should appear in the yellow
box next to the Edges box you just worked with as well as the Label/Type list right under the
Edges box.
Next to Name:, enter inlet.

For Type:, select VELOCITY_INLET. (Note: Sometimes all the items in a dropdown menu will
not be visible. If you cannot find the VELOCITY_INLET option in the Type menu, try
maximizing the window. If it is still not visible, try auto-hiding your taskbar. Right-click on the
taskbar and go to properties.)

Click Apply. You should see the new entry appear under Name/Type box near the top of the
window.

Repeat this process for the other three edges according to the following table:

3
c( c +
c $
c
*
%c 
c 5*A 67+* c

3c 
c (##'7A' * c

$c 8c 9 **c

c 


c :#c

You should have the following edges in the Name/Type list when finished:

Save and Export


c
c2c)
c2c#-
cc

c
c2c)
c2c;$c2c
cc

Type in pipe.msh for the File Name:. Select Export 2d Mesh since this is a 2 dimensional mesh.
Click Accept.

Check pipe.msh has been created in your working directory (the box will be filled in red).

 ! "? 


#"0
aunch Fluent 6.0
*c $$ c2c)*'+ c/"!/cc

Select 2ddp from the list of options and click Run.

The "2ddp" option is used to select the 2-dimensional, double-precision solver. In the double-
precision solver, each floating point number is represented using 64 bits in contrast to the single-
precision solver which uses 32 bits. The extra bits increase not only the precision but also the
range of magnitudes that can be represented. The downside of using double precision is that it
requires more memory.

Import Grid
c
c2c)
c2c
c2c
c
Navigate to the working directory and select the pipe.msh file. This is the mesh file that was
created using the preprocessor a MB  in the previous step. FLUENT reports the mesh statistics
as it reads in the mesh:

Check the number of nodes, faces (of different types) and cells. There are 5 quadrilateral cells
in this case. This is what we expect since we used 5 divisions in the radial direction and 1
divisions in the axial direction while generating the grid. So the total number of cells is 5*1 D
5 .

Also, take a look under zones. *e can see the four zones inlet, outlet, wall, and centerline that
we defined in a MB .

Check and Display Grid

First, we check the grid to make sure that there are no errors.

c
c2cc2c
 cc

Any errors in the grid would be reported at this time. Check the output and make sure that there
are no errors reported. Check the grid size:

c
c2cc2c%c2c#0
cc

The following statistics should appear:


c

Display the grid:

c
c2c< $c2ccc

Make sure all 5 items under Surfaces is selected. Then click Display. The graphics window
opens and the grid is displayed in it. You can now click Close in the arid DisVlay menu to get
back some desktop space. The graphics window will remain.

Some of the operations available in the graphics window are:

Translation: The grid can be translated in any direction by holding down the Left Mouse Button
and then moving the mouse in the desired direction.

Zoom In: Hold down the Middle Mouse Button and drag a box from the Upper Left Hand Corner
to the Lower Right Hand Corner over the area you want to zoom in on.

Zoom Out: Hold down the Middle Mouse Button and drag a box anywhere from the Lower Right
Hand Corner to the Upper Left Hand Corner.

Use these operations to zoom into the grid to obtain the view shown below.

Note: The zooming operations cannot be performed without a middle mouse button.

(Click picture for larger image)


You can also look at specific parts of the grid by choosing the boundaries you wish to view
under Surfaces (click to select and click again to deselect a specific boundary). Click Display
again when you have selected your boundaries. For example, the wall, outlet, and centerline
boundaries have been selected in the following view:

These options will display the graph:

(Click picture for larger image)

For convenience, the button next to Surfaces selects all of the boundaries while the
deselects all of the boundaries at once.
Close the arid DisVlay Window when you are done.

Define Solver Properties


c
c2c<
%
c2c
 c2c#-
cc

Choose Axisymmetric under Space. *e'll use the defaults of pressure based ("segregated", in
older versions) solver, implicit formulation, steady flow and absolute velocity formulation. Click
OK.

c
c2c<
%
c2c
 c2c5  cc

Laminar flow is the default. So we don't need to change anything in this menu. Click Cancel.

c
c2c<
%
c2c
 c2c
3cc

For incompressible flow, the energy equation is decoupled from the continuity and momentum
equations. *e need to solve the energy equation only if we are interested in determining the
temperature distribution. *e will not deal with temperature in this example. So leave the Energy
Equation unselected and click Cancel to exit the menu.

Define Material Properties


c
c2c<
%
c2c
 cc

Change Density to 1. and Viscosity to 2e-3. These are the values that we specified under
Problem Specification. *e'll take both as constant.
c

Click Change/Create. Close the window.

Define Operating Conditions


c
c2c<
%
c2cA$
3c cc

For all flows, FLUENT uses gauge pressure internally. Any time an absolute pressure is needed,
it is generated by adding the operating pressure to the gauge pressure. *e'll use the default value
of 1 atm (1 1,325 Pa) as the Operating Pressure.

Click Cancel to leave the default in place.

Define Boundary Conditions

*e'll now set the value of the velocity at the inlet and pressure at the outlet.

c
c2c<
%
c2c c cc

*e note here that the four types of boundaries we defined are specified as zones on the left side
of the Boundary Conditions Window. The centerline zone should be selected by default. Make
sure it is, then make sure the Type of this boundary is selected as axis and click Set.... Notice that
there is nothing to set for the axis. Click OK.

Move down the list and select inlet under Zone. Note that FLUENT indicates that the Type of
this boundary is velocity-inlet. Recall that the boundary type for the "inlet" was set in GAMBIT.
If necessary, we can change the boundary type set previously in a MB  in this menu by
selecting a different type from the list on the right.

Click on Set.... Enter 1 for Velocity Magnitude. Click OK. This sets the velocity of the fluid
entering at the left boundary.

The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the
outlet gauge pressure D outlet absolute pressure - operating pressure D . Choose outlet under
Zone. The Type of this boundary is pressure-outlet. Click on Set.... The default value of the
Gauge Pressure is . Click Cancel to leave the default in place.

Lastly, click on wall under Zones and make sure Type is set as wall. Click on each of the tabs
and note that only momentum can be changed under the current conditions. This will not be so
under later exercises so make a note of the location of these options. Click OK.

Click Close to close the Boundary Conditions menu.

 $%&
*e'll use a second-order discretization scheme.

c
c2c#-
c2c c2c#cc

Change Momentum to Second Order Upwind.


Click OK.

Set Initial Guess

Initialize the flow field to the values at the inlet:

c
c2c#-
c2c0
c2c0
cc

In the olution nitialization menu that comes up, choose inlet under Compute From. The Axial
Velocity for all cells will be set to 1 m/s, the Radial Velocity to m/s and the Gauge Pressure to
Pa. These values have been taken from the inlet boundary condition.

Click Init. This completes the initialization. Close the window.


Set Convergence Criteria

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. *e'll
iterate the solution until the residual for each equation falls below 1e-6.

c
c2c#-
c2c c2c
cc

Change the residual under Convergence Criterion for continuity, x-velocity, and y-velocity, all to
1e-6.

Also, under Options, select Plot. This will plot the residuals in the graphics window as they are
calculated.

Click OK.

This completes the problem specification. Save your work:

c
c2c)
c2c9
c2c
cc

Type in pipe.cas for Case File. Click OK. Check that the file has been created in your working
directory. If you exit FLUENT now, you can retrieve all your work at any time by reading in this
case file.

Iterate Until Convergence

Start the calculation by running 1 iterations:


c
c2c#-
c2c

cc

In the terate Window that comes up, change the Number of Iterations to 1 . Click Iterate.

The residuals for each iteration is printed out as well as plotted in the graphics window as they
are calculated.

(Click picture for larger image)

The residuals fall below the specified convergence criterion of 1e-6 in about 46 iterations. Actual
number of convergence steps may vary slightly.

Save the solution to a data file:

c
c2c)
c2c9
c2c<cc

Enter pipe.dat for Data File and click OK. Check that the file has been created in your working
directory. You can retrieve the current solution from this data file at any time.

 ' () 
Centerline Velocity

*e'll plot the variation of the axial velocity along the centerline.

c
c2c(c2c:6c(cc
Make sure that Position on X Axis is set under Options, and X is set to 1 and Y to under Plot
Direction. This tells FLUENT to plot the x-coordinate value on the abscissa of the graph.

Under Y Axis Function, pick Velocity... and then in the box under that, pick Axial Velocity.

Please note that X Axis Function and Y Axis Function describe the   and y axes of the graVh,
which should not be confused with the   and y directions of the ViVe.

Finally, select centerline under Surfaces since we are plotting the axial velocity along the
centerline. This finishes setting up the plotting parameters.

Click Plot.

This brings up a plot of the axial velocity as a function of the distance along the centerline of the
pipe.

(Click picture for larger image)


In the graph that comes up, we can see that the velocity reaches a constant value beyond a certain
distance from the inlet. This is the fully-developed flow region.

Change the axes extents: In the olution XY Plot window, click on Axes.... Under Options,
deselect Auto Range. The boxes under Range should now be activated. Select X under Axis.
Enter 1 for Minimum and 3 for Maximum under Range.

*e'll turn on the grid lines to help estimate where the flow becomes fully developed. Check the
boxes next to Major Rules and Minor Rules under Options. Click Apply.

Now, pick Y under Axis and once again deselect Auto Range under Options, then enter 1. for
Minimum and 2. for Maximum under Range. Also select Major Rules and Minor Rules to turn
on the grid lines in the Y direction. *e have now finished specifying the range for each axes, so
click Apply and then Close.

Go back to the olution XY Plot menu and click Plot to replot the graph with the new axes
extents. *e can see that the fully-developed region starts at around  =3m and the centerline
velocity in this region is 1.93 m/s.
(Click picture for larger image)

Saving the Plot

Save the data from this plot:

In the olution XY Plot Window, check the *rite to File box under Options. The Plot button
should have changed to *rite.... Click on *rite.... Enter vel.xy as the XY File Name and click
OK. Check that this file has been created in your FLUENT working directory.

Now, save a picture of the plot:

Leave the olution XY Plot Window and the araVhics Window open and in the main FLUENT
window click on:

)
c2c=$cc

Under Format, choose one of the following three options:

EPS - if you have a postscript viewer, this is the best choice. EPS allows you to save the file in
vector mode, which will offer the best viewable image quality. After selecting EPS, choose
Vector from under File Type.

TIFF - this will offer a high resolution image of your graph. However, the image file generated
will be rather large, so this is not recommended if you do not have a lot of room on your storage
device.

JPG - this is small in size and viewable from all browsers. However, the quality of the image is
not particularly good.

After selecting your desired image format and associated options, click on Save...
Enter vel.eps, vel.tif, or vel.jpg depending on your format choice and click OK.

Verify that the image file has been created in your working directory. You can now copy this file
onto a disk or print it out for your records.

Coefficient of Skin Friction

FLUENT provides a large amount of useful information in the online help that comes with the
software. Let's probe the online help for information on calculating the coefficient of skin
friction.

c
c2c=
$c2c'
> c
c
;cc

Click on S in the links on top and scroll down to skin friction coefficient. Click on the second
965 link (normally, you would have to go through each of the links until you find what you are
looking for). *e can see an excerpt on the skin coefficient as well as the equation for calculating
it.

Click on the link for Reference Values panel, which tells us how to set the reference values used
in calculating the skin coefficient.

Set the reference values:

c
c2c
$c2c
%


c5
cc

Select inlet under Compute From to tell FLUENT to calculate the reference values from the
values at inlet. Check that density is 1 kg/m3 and velocity is 1 m/s. (Alternately, you could have
just typed in the appropriate values). Click OK.
Go back to the olution XY Plot menu. Uncheck *rite to File under Options since we want to
plot to the window right now. *e can leave the other Options and Plot Direction as is since we
are still plotting against the   distance along the pipe.

Under the Y Axis Function, pick *all Fluxes..., and then Skin Friction Coefficient in the box
under that.

Under Surfaces, select wall and unselect centerline by clicking on them.

Reset axes ranges: Go to Axes... and re-select Auto-Range for the Y axis. Click Apply. Set the
range of the X axis from 1 to  by selecting X under Axis, entering 1 under Minimum, and 
under Maximum in the Range box (remember to de-select Auto-Range first if it is checked).

Click Apply, Close, and then Plot in the olution XY Plot Window.
(Click picture for larger image)

*e can see that the fully developed region is reached at around xD3. m and the skin friction
coefficient in this region is around 1.54. Compare the numerical value of 1.54 with the
theoretical, fully-developed value of .16.

Save the data from this plot: Pick *rite to File under Options and click *rite.... Enter cf.xy for
XY File and click OK.

Velocity Profile

*e'll next plot the velocity at the outlet as a function of the distance from the center of the pipe.
To do this, we have to set the y axis of the graph to be the y axis of the pipe (the radial direction).

To plot the position variable on the y axis of the graph, uncheck Position on X Axis under
Options and choose Position on Y Axis instead. To make the position variable the radial distance
from the centerline, under Plot Direction, change X to and Y to 1. To plot the axial velocity on
the x axis of the graph, for X Axis Function, pick Velocity... and Axial Velocity under that.

Since we want to plot this at the outlet boundary, pick outlet under Surfaces.

Change both the x and y axes to Auto-Range. (Don't forget to click apply before selecting a
different axis)

Uncheck *rite to File under Options so that we can see the graph. Click Plot.
(Click picture for larger image)

Does this look like a parabolic profile?

Save the data from this plot: Pick *rite to File under Options and click *rite.... Enter profile.xy
for XY File and click OK.

To see how the velocity profile changes in the developing region, let us add the profiles at
xD .6m (x/DD3) and xD .12m (x/DD6) to the above plot. First, create a line at xD .6m using the
Line/Rake tool:

c
c2c#%
c2c*
?
cc

*e'll create a straight line from (x ,y )D( .6, ) to (x1,y1)D( .6, .1). Select Line Tool under
Options. Enter x D .6, y D , x1D .6, y1D .1. Enter line1 under New Surface Name. Click
Create.
To see the line just created, select

c
c2c< $c2ccc

Note that line1 appears in the list of surfaces. Select all surfaces except default-interior. Click
Display. This displays all surfaces but not the mesh cells. Zoom into the region near the inlet to
see the line created at xD .6m. (Click here to review the zoom functionality discussion in step 4.)
line1 is the white vertical line to the right in the figure below.

Similarly, create a vertical line called line2 at xD1.2; (x ,y )D(1.2, ) to (x1,y1)D(1.2, .1) in this
case. Display it in the graphics window to check that it has been created correctly.

Now we can plot the velocity profiles at xD .6m (x/DD3) and xD .12m (x/DD6) along with the
outlet profile. In the olution XY Vlot menu, use the same settings as above. Under Surfaces, in
addition to outlet, select line1 and line2. Make sure Node Values is selected under Options. Click
Plot. Your symbols might be different from the ones below. You can change the symbols and
line styles under the Curves... button. Click on Help in the Curves menu if you have problems
figuring out how to change these settings.
The profile three diameters downstream is fairly close to the fully-developed profile at the outlet.
If you redo this plot using the fine grid results in the next step, you'll see that this is not actually
the case. The coarse grid used here doesn't capture the boundary layer development properly and
underpredicts the development length.

In FLUENT, you can choose to display the computed cell-center values or values that have been
interpolated to the nodes. By default, the Node Values option is turned on, and the interpolated
values are displayed. Node-averaged data curves may be somewhat smoother than curves for cell
values.

Velocity Vectors

One can plot vectors in the entire domain, or on selected surfaces. Let us plot the velocity vectors
for the entire domain to see how the flow develops downstream of the inlet.

c
c2c< $c2c5
 c2c< $c

Zoom into the region near the inlet. (Click here to review the zoom functionality discussion in
step 4.) The length and color of the arrows represent the velocity magnitude. The vector display
is more intelligible if one makes the arrows shorter as follows: Change Scale to .4 in the
Vectors menu and click Display.

You can reflect the plot about the axis to get an expanded sectional view:

Main Menu > Display > Views...

Under Mirror Planes, only the axis surface is listed since that is the only symmetry boundary in
the present case. Select axis and click Apply. Close the Views window.
The velocity vectors provide a picture of how the flow develops downstream of the inlet. As the
boundary layer grows, the flow near the wall is retarded by viscous friction. Note the sloping
arrows in the near wall region close to the inlet. This indicates that the slowing of the flow in the
near-wall region results in an injection of fluid into the region away from the wall to satisfy mass
conservation. Thus, the velocity outside the boundary layer increases.

By default, one vector is drawn at the center of each cell. This can be seen by turning on the grid
in the vector plot: Select Draw Grid in the Vectors menu and then click Display in the arid
DisVlay as well as the Vectors menus. Velocity vectors are the default, but you can also plot
other vector quantities. See section 27.1.3 of the user manual for more details about the vector
plot functionality.

 *)

It is very important to assess the dependence of your results on the mesh used by repeating the
same calculation on different meshes and comparing the results. *e will re-do the previous
calculation on a 1 x1 mesh and compare the results with the 1 x5 mesh used previously. If
you prefer to skip the GAMBIT steps for modifying the mesh, download the 1 x1 mesh (by
right-clicking on the link) and go directly to the FLUENT analysis discussed below.

Modify Mesh in GAMBIT

The 1 x5 mesh is saved as ViVe.dbs in your working folder. Copy and paste the file in the same
folder. Rename CoVy of ViVe.dbs to ViVe2.dbs. *e will work with ViVe2.dbs in order to retain
ViVe.dbs as is. Launch a MB  and browse to where pipe2.dbs is saved. Notice that under
Session ID, ViVe2 is now listed. Select this and click Run. Note in the main menu bar that ViVe2
is the ID of this job. Files created during this session will have that prefix.

*e will delete the face mesh, modify the edge meshes for the vertical edges and remesh the face.
To delete the original face mesh, choose

A$
c $c2c
cc c2c)
cc c2c<


c)
c

c
In the Delete Face Meshes Window that comes up, uncheck the Remove unused lower mesh box.
This tells a MB  to remove the face mesh only and keep the edge meshes associated with the
face mesh. Since we will be changing the mesh on only two edges of the rectangle, there is no
need to redo the meshes for all four edges.

Select the only face of the rectangle by shift-clicking on it and then click Apply.

Modify Edge Meshes

To change the number of divisions on the vertical edges from 5 to 1 , choose:

A$
c $c2c
cc c2c3
cc c2c
c3
c

Select the two vertical edges by holding down the Shift button, clicking on each in turn, and then
releasing the Shift button. Select Interval count from the box under Spacing that says Interval
size. Change the number in the box next to the Interval count box from 5 to 1 .

Make sure that the Remove old mesh box is checked under Options. This will make sure that the
old edge meshes are erased before the new edge meshes are created.

Click Apply.

Remember that you can zoom in by holding down Ctrl, dragging a box across the area you want
to zoom in on, and then releasing Ctrl. Do this now and make sure that the vertical edges have 1
divisions.
(Click image for larger picture)

Oecreate Face Mesh


A$
c $c2c
cc c2c)
cc c2c
c)
c

Shift-click on the face in the araVhics Window to select it. Click Apply.

(Click here for larger picture)

Save & Export


c
c2c)
c2c#-
c

c
c2c)
c2c;$c2c
c

Type in pipe2.msh for the File Name:. Select Export 2d Mesh option. Click Accept.
Finer Mesh Analysis

Repeat steps 4 and 5 of this tutorial with the 1 x1 mesh (a tad on the repetitious side but
consider it good practice).

One you obtain the solution, plot the variation of the centerline velocity along the  -direction as
described in step 6. Compare this result with that obtained on the previous mesh which is stored
in the vel. y file created earlier. To do this, after centerline velocity has been plotted, click on
Load File... in the olution XY Plot window. Navigate to your working folder if necessary and
click on vel.xy and OK. Click Plot.

In the graphics window, we can see both of the lines plotted in the same window. Adjust the axes
so that you can zoom in on the beginning of the fully developed region.

(Click image for larger picture)

In the centerline velocity plot above, the white and red symbols represent the results on the
1 x1 mesh and 1 x5 meshes, respectively. The centerline velocity in the fully-developed
region for the finer mesh is 1.9 m/s. This value agrees better with the analytical value of 2 m/s
that the value of 1.93 m/s obtained on the coarser mesh. Save the data for this plot as vel2.xy.
The velocity result gets more accurate on refining the mesh as expected.

Plot the skin friction coefficient as described in step 6. Compare the result with that obtained on
the 1 x5 mesh by loading it from cf.xy.
(Click here for larger image)

The finer mesh provides a skin friction coefficient of [.159 in the fully-developed region, which
is much closer to the theoretical value of [.16 than the corresponding coarser mesh value of
[.154. Save the data for this plot as cf2.xy.

Similarly, plot the velcoity profile at the outlet and compare with the coarser grid result in
out.xy. The two results compare well with the greatest deviation occurring near the centerline.
Save the data for this plot as out2.xy.

(Click picture for larger image)

If you repeat the calculation on a 1 x2 mesh, you'll see that the results on the two finest
meshes are grid-independent to a high level of accuracy. In the plots below, the white, red and
green symbols correspond to the 1 x2 , 1 x1 and 1 x5 meshes, respectively.
r
 +   


(Click picture for larger image)

,


 

(Click picture for larger image)


A  r


(Click picture for larger image)

? 
Problem

a) Consider the problem solved in this tutorial. At the exit of the pipe, we can define the error in
the calculation of the centerline velocity as:

where c is the centerline value from FLUENT and e act is the exact analytical value for fully-
developed laminar pipe flow. *e expect the error to take the form:

where the coefficient K and the power V depend upon the method . Consider the solutions
obtained on the 1 x5, 1 x1 , and 1 x2 meshes. Using MATLAB, perform a linear least
squares fit of:

to obtain the coefficients K and V. You can look up the value of e act from any introductory
textbook in fluid mechanics such as Fluid Mechanics by F. *hite. Explain why your values
make sense.

b) Repeat the above exercise using the "first-order upwind" scheme for the momentum equation.
Contrast the value of V obtained in this case with the previous one and explain your results
briefly (2-3 sentences).
ëints

Note that the first or second order discretization applies only to the convective terms in the
Navier-Stokes equations. The viscous terms are always second order accurate.

? 
Problem

On your finest mesh (1 x2 ), rerun the FLEN calculation for Reynolds numbers 2 and
5 using the "second-order upwind" scheme. Note: change the Reynolds number by adjusting
the molecular viscosity µ. Plot the centerline velocity and skin friction as a function of axial
distance for Re D 1 (previous problem), 2 , and 5 . Plot all three cases on the same graph
for comparsion. Briefly explain the trend you observe as the Reynolds number increases.

ëints

If you've saved the 1 x2 mesh in step 7, you can load it into FLEN again without having to
recreate it in a MB .

Solve for µ for each of the Reynolds number first and then think about what steps need to be
changed.

Solution

Your solution should look something like the plots below:

  
r


(Click picture for larger image)


,




(Click picture for larger image)

Fluent 6.0: Turbulent Pipe Flow


c

c
c  c
c

c
c
c


c
c

c

cc   c
!c
c

cc   c
"c#$
%c c $
cc   cc
&c#
c'$c(
cc)*'+ c
,c#-
.cc
/c 0
c
 c
1c
%
c
c
(
ccc

? 





Let's revisit the pipe flow example considered in the previous exercise. As before, the inlet
velocity is 1 m/s, the fluid exhausts into the ambient atmosphere and density is 1 kg/m3. For µ D
2 x 1 -5 kg/(ms), the Reynolds no. based on the pipe diameter and average velocity at the inlet is

At this Reynolds number, the flow is usually completely turbulent.

A turbulent flow exhibits small-scale fluctuations in time. It is usually not possible to resolve
these fluctuations in a CFD calculation. So the flow variables such as velocity, pressure, etc. are
time-averaged. Unfortunately, the time-averaged governing equations are not closed i.e. they
contain fluctuating quantities which need to be modeled using a turbulence model. No turbulence
model is currently available that is valid for all types of flows and so it is necessary to choose
and fine-tune a model for particular classes of flows. In this exercise, you'll be turned loose on
variants of the k-İ model. But in the real world, tread with great caution: you should evaluate the
validity of your calculations using a turbulence model very carefully (which, ahem, means that
there is no getting away from studying fluid dynamics concepts and numerical methods very
carefully). FLUENT should not be used as a black box. The k-İ models consist of two
differential equations: one each for the turbulent kinetic energy k and turbulent dissipation İ.
These two equations have to be solved along with the time-averaged continuity, momentum and
energy equations. So turbulent flow calculations are much more difficult and time-consuming
than laminar flow calculations. This is an exercise to whet your appetite for turbulent flow
calculations.

    

If you would prefer to skip the mesh creation steps, you can download the mesh here (right click
and select Save As...) and go straight to step 4.

Since the flow is axisymmetric, the geometry is a rectangle as in the Laminar Pipe Flow tutorial.
*e will first use a 1 x3 mesh (i.e. 1 divisions in the axial direction and 3 divisions in the
radial direction).

*e could create this mesh from scratch, as in the Laminar Pipe Flow tutorial, but instead, we
will modify the previous 1 x5 to get the 1 x3 mesh. This will introduce you to the art of
modifying meshes in a MB .

  

aunch GAMBIT

Create a folder called ViVe2 at a convenient location to use as your working folder. Copy your
ViVe.dbs file containing the 1 x5 mesh from the Laminar Pipe Flow tutorial to this folder. If
you don't have this file, here's a copy (right-click and select Save As...). Rename this file as
ViVe1[[ 3[.dbs. *e'll modify this file to obtain the mesh for the turbulent pipe flow simulation.
Start a MB  and load pipe1 x3 . (Refer to step 1 of the Laminar Pipe Flow tutorial if you've
forgotten how to do this.) Recall that a MB  will use the id pipe1 x3 as the default prefix
for all files created during this session.

To make best use of screen real estate, resize the GAMBIT and browser windows so that you
approximate this screen arrangement. This way you can read instructions in the browser window
and implement them in a MB .

The mesh from the previous tutorial should be displayed. To fit the mesh to the size of the
window, select:

Global Control > Fit to *indow

Delete Previous Face Mesh

The first step we have to do is remove the old face mesh. Recall that the face mesh is built on top
of meshed edges, thereby forming the grid. In this case, we don't want to remove the underlying
edge meshes. So to delete only the face mesh, select:

Operation Toolpad > Mesh Command Button > Face Command Button > Delete Face
Meshes

Since we only have one face, shift-click any edge of the bounding rectangle to select the face
mesh we want to delete. The face you have selected should become red and the name of the face
listed in the Delete Face Meshes window in the drop down box.

Now, because we don't want to delete the edge meshes, uncheck the Remove unused lower mesh
box.

Click Apply.

Check that the face mesh has been removed in the a MB  araVhics Window.

Oemesh Edges

Since we are still going to use 1 divisions for the horizontal edges, we only need to remesh the
vertical edges.
To resolve the much higher gradient near the wall for a turbulent flow, we will use smaller grid
spacing near the wall by employing grid stretching.

For each vertical edge, we will specify the division length next to the wall to be . 1 and the
total number of divisions to be 3 . In a MB , each edge has a direction associated with it as
shown by an arrow. *e will set this arrow to point away from the wall. Then the division next to
the wall becomes the "First Length" and the division next to the axis becomes the "Last Length".
*e'll specify the "First Length" to be . 1 and the total number of divisions to be 3 for the
edge; GAMBIT will automatically calculate the appropriate value for the "Last Length".

Operation Toolpad > Mesh Command Button > Edge Command Button

Select the vertical edges by shift-clicking on each of them. Notice the red arrow that appears on
the edge when it is selected. Make sure these arrows are pointing down (towards the axis and
away from the wall). If both of these arrows are pointing in the wrong direction, you can reverse
them by clicking Reverse next to Pick with links. However, if only one of the edges needs to be
reversed, you can do that by shift-middle clicking on that edge. You'll have to zoom in to be able
to do this. (Recall that you can zoom in by holding down the Ctrl key and then dragging a box
with your left mouse button. Double-click with the middle mouse button to go back to the last
view.)

For Type in the Mesh Edges menu, select First Length from the drop down box. Next to Length,
type in . 1.

*e want 3 divisions on each of the vertical edges; so select Interval Count from the drop down
box under Spacing and enter 3 in the text box to its left.
Click Apply.

If you zoom in on the right edge, you should see the following:
(Click picture for larger image)

Note that the mesh spacing is smaller near the wall as indicated by the blue circles on the edge.

Oecreate Face Mesh

The next step is to recreate the face mesh on top of these edge meshes. This is the same
procedure as in the previous tutorial:

Operation Toolpad > Mesh Command Button > Face Command Button > Mesh Faces

Shift left-click on the face and click Apply. The meshed area should look like this after zooming
in:

(Click picture for larger image)


 
 

Recall that we created the following boundary types for the 1 x5 mesh in the Laminar Pipe
Flow tutorial:

3
c( c +
c $
c

*
%c 
c 5*A 67+* c

3c 
c (##'7A' * c

$c 8c 9 **c

c 


c :#c

These boundary types are still retained even if the edges are remeshed since the edges
themselves were not deleted. To verify this:

A$
c $c2c4
cc c 2c#$
%c c $
cc

Check that the following is in the Name/Type list:

Additionally, click on show labels. You should now be able to see each of the boundary names
on the respective edges in the araVhics Window. Verify that the boundary types specification is
correct.

Save and Export

As in the previous tutorial, we will now save and export the mesh.

c
c2c)
c2c#-
cc

c
c2c)
c2c;$c2c
cc
Type in pipe1 x3 .msh for the File Name:. Select Export 2d Mesh since this is a two-
dimensional mesh. Click Accept.

Check that pipe1 x3 .msh has been created in your working directory.

Exit GAMBIT: Main Menu > File > Exit and save the session.

 ! "? 


#"0
If you have skipped the previous mesh generation steps 1-3, you can download the mesh by
right-clicking on this link. Save the file as ViVe1[[ 3[.msh. You can then proceed with the flow
solution steps below.

aunch FUENT
*c $$ c2c)*'+ c/"!/cc

Select 2ddp (2D, double-precision version) from the list of options and click Run.

Import File
c
c2c)
c2c
c2c
c

Navigate to your working directory and select the pipe1 x3 .msh file. Click OK.

The following should appear in the FLUENT window:

Check the number of nodes, faces (of different types) and cells. There are 3 quadrilateral
cells in this case. This is what we'd expect since we used 3 divisions in the radial direction and
1 divisions in the axial direction while generating the grid. So the total number of cells is
3 *1 D 3 .

Also, take a look under zones. *e can see the four zones inlet, outlet, wall, and centerline that
we defined in a MB .

Grid

First, we check the grid to make sure that there are no errors.

c
c2cc2c
 cc

Any errors in the grid would be reported at this time. Check the output and make sure that there
are no errors reported. Then select:

c
c2cc2c%c2c#0
cc

The following summary about the grid should appear:

Let's look at the grid:

c
c2c< $c2ccc

Make sure all 5 items under Surfaces are selected. Then click Display. Remember that we can
zoom in using the middle mouse button. Zoom in and admire the grid. How many divisions are
there in the radial direction?
(Click picture for larger image)

Recall that you can look at specific components of the grid by choosing the entities you wish to
view under Surfaces (click to select and click again to deselect a specific boundary). Click
Display again when you have selected your boundaries. Use this feature and make sure that the
boundary labels correspond to the correct geometric entities.

Close the arid DisVlay Window when you are done.

Define Solver Properties


c
c2c<
%
c2c
 c2c#-
cc

Choose Axisymmetric under Space. As in the laminar pipe flow tutorial, we'll use the defaults of
segregated solver, implicit formulation, steady flow and absolute velocity formulation. Click
OK.

c
c2c<
%
c2c
 c2c5  cc

Choose k-epsilon (2eqn). Notice that the window expands and additional options are displayed
on choosing the k-eVsilon turbulence model. Under Near-*all Treatment, pick Enhanced *all
Treatment so that we may get a more accurate result.
Click OK.

c
c2c<
%
c2c
 c2c
3cc

The energy equation can be turned off since this is an incompressible flow and we are not
interested in the temperature. Make sure no tick mark appears next to Energy Equation.

c
c2c<
%
c2c
 cc

Change Density to 1. and Viscosity to 2e-5. These are the values in the Problem Specification.
*e'll take both as constant.

Click Change/Create.

Define Operating Conditions


c
c2c<
%
c2cA$
3c cc

Recall that for all flows, FLUENT uses the gauge pressure internally. Any time an absolute
pressure is needed, it is generated by adding the operating pressure to the gauge pressure. *e'll
use the default value of 1 atm (1 1,325 Pa) as the Operating Pressure.
Click Cancel to leave the default in place.

Define Boundary Conditions

*e'll now set the value of the velocity at the inlet and pressure at the outlet.

c
c2c<
%
c2c c cc

The four types of boundaries we defined are specified as zones on the left side of the Boundary
Conditions Window. Recall that we don't need to set any parameters for the centerline and wall
zones. Verify this by selecting each of these two zones and clicking on Set....

Choose inlet and click on Set.... Enter 1 for Velocity Magnitude. This indicates that the fluid is
coming in normal to the inlet at the rate of 1 meter per second. Select Intensity and Hydraulic
Diameter next to the Turbulence Specification Method. Then enter 1 for Turbulence Intensity
and .2 for Hydraulic Diameter. Click OK to set the velocity.

The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the
outlet gauge pressure D outlet absolute pressure - operating pressure D . Choose outlet under
Zone. The Type of this boundary is pressure-outlet. Click on Set.... The default value of the
Gauge Pressure is . Click Cancel to leave the defaults in place.

Note: Backflow in the Pressure Autlet menu refers to flow entering through an outlet boundary.
This is not likely to happen in this case. So we don't have to set the backflow parameters.

This completes the boundary condition specification. Close the Boundary Conditions menu.

 $%&
*e'll use second-order discretization for the momentum equation, as in the laminar pipe flow
tutorial, and also for the turbulence kinetic energy equation which is part of the k-eVsilon
turbulence model.

c
c2c#-
c2c c2c#cc

Change Discretization for Momentum, Turbulence Kinetic Energy and Turbulence Dissipation
Rate (scroll down to see it) equations to Second Order Upwind.

Click OK.

The order of discretization that we just set refers to the convective terms in the equations; the
discretization of the viscous terms is always second-order accurate in FLUENT. Second-order
discretization generally yields better accuracy while first-order discretization yields more robust
convergence. If the second-order scheme doesn't converge, you can try starting the iterations
with the first-order scheme and switching to the second-order scheme after some iterations.

Set Initial Guess

*e'll use an initial guess that is constant over the entire flow domain and equal to the values at
the inlet:

c
c2c#-
c2c0
c2c0
cc

In the olution nitialization menu that comes up, choose inlet under Compute From. The Axial
Velocity for all cells will be set to 1 m/s, the Radial Velocity to m/s and the Gauge Pressure to
Pa. The Turbulence Kinetic Energy and Dissipation Rate (scroll down to see it) values are set
from the prescribed values for the urbulence ntensity and Hydraulic Diameter at the inlet.
Click Init. Close the olution nitialization window.

Set Convergence Criteria

Recall that FLUENT reports a residual for each governing equation being solved. The residual is
a measure of how well the current solution satisfies the discrete form of each governing equation.
*e'll iterate the solution until the residual for each equation falls below 1e-6.

c
c2c#-
c2c c2c
cc

Notice that Convergence Criterion has to be set for the k and eVsilon equations in addition to the
three equations in the last tutorial. Set the Convergence Criterion to be 1e- 6 for all five
equations being solved.

Select Print and Plot under Options. This will print as well plot the residuals as they are
calculated which you will use to monitor convergence.
Click OK.

This completes the problem specification. Save your work:

c
c2c)
c2c9
c2c
cc

Type in pipe1 x3 .cas for Case File. Click OK. Check that the file has been created in your
working directory.

Iterate Until Convergence

Solve for 1 iterations first.

c
c2c#-
c2c

cc

In the terate menu that comes up, change the Number of Iterations to 1 . Click Iterate.

You'll find that not all residuals have fallen below 1e-6 in 1 iterations. Solve for 2 more
iterations. The solution converges in a total of 229 iterations.
(Click picture for larger image)

*e need a larger number of iterations for convergence than in the laminar case since we have a
finer mesh and are also solving additional equations from the turbulence model.

Save the solution to a data file:

c
c2c)
c2c9
c2c<cc

Enter pipe1 x3 .dat for Data File and click OK. Check that the file has been created in your
working directory.

 ' () 
y+

Turbulent flows are significantly affected by the presence of walls. The k-eVsilon turbulence
model is primarily valid away from walls and special treatment is required to make it valid near
walls. The near-wall model is sensitive to the grid resolution which is assessed in the wall unit
y+ (defined in section 1 .9.1 of the FLUENT user manual). *e'll gloss over the details for now
and use the following rule of thumb: select the near-wall resolution such that y+ > 3[ or 5 for
the wall-adjacent cell. Look at section 1 .9, arid Considerations for urbulent Flow
imulations, for details.

First, we need to set the reference values needed to calculate y+.

c
c2c
$c2c
%


c5
cc

Select inlet under Compute From to tell FLUENT to use values at the pipe inlet for the reference
values. Check that the reference value for density is 1 kg/m3, velocity is 1 m/s, and coefficient of
viscosity is 2e-5 kg/m-s as given in the Problem Specification. These reference values will be
used to non-dimensionalize the distance of the cell center from the wall to obtain the
corresponding y+ values. Click OK.

Let's plot y+ values for wall-adjacent cells to check how it compares with the recommendation
mentioned above.

c
c2c(c2c:6c(cc

Make sure that Position on X Axis is set under Options, that 1 is the value next to X, and is the
value next to Y and Z under Plot Direction. Recall that this tells FLUENT to plot the x-
coordinate value on the abscissa of the graph. Pick Turbulence... under Y Axis Function and
select *all Yplus from the drop down list under that. Since we want the y+ value for cells
adjacent to the wall of the pipe, choose wall under Surfaces.
Click Plot.

(Click picture for larger image)

As we can see, the wall y+ value is between 1.6 and 1.9 (ignoring the anamolous at the inlet).
Since this is less than 5, the near-wall grid resolution is acceptable.

Save Plot

In the olution XY Plot Window, check the *rite to File box under Options. The Plot button
should have changed to the *rite... button. Click on *rite.... Enter yplus.xy as the filename and
click OK. Check that this file has been created in your FLUENT working directory.
Centerline Velocity

Under Y Axis Function, pick Velocity... and then in the box under that, pick Axial Velocity.
Finally, select centerline under Surfaces since we are plotting the axial velocity along the
centerline. De-select wall under Surfaces.

Click on Curves... in the olution XY Plot window. Select the solid line option under Pattern as
shown below. Change *eight to 2. Select the blank option under Symbol. Click Apply and
Close.

Turn on grid lines: In the olution XY Plot window, click on Axes.... Turn on the grid by
checking the boxes Major Rules and Minor Rules under Options. Leave Auto Range checked.
Click Apply. Select Y under Axis and repeat. Click Apply and Close.

Uncheck *rite to File. Click Plot.

(Click picture for larger image)


*e can see that the fully developed region starts around  D5m with the centerline velocity
becoming constant at a value of 1.195 m/s. This is quite a bit lower than the value of 2 m/s for
the laminar case. Can you explain the difference based on the physical characteristics of laminar
and turbulent flows?

Save the data for this plot as vel.xy.

Coefficient of Skin Friction

The definition of the skin friction coefficient was discussed in the laminar pipe flow tutorial. The
required reference values of density and velocity have already been set when plotting y+.

Go back to the olution XY Plot Window. Under the Y Axis Function, pick *all Fluxes..., and
then Skin Friction Coefficient in the box under that. Under Surfaces, we are plotting the friction
coefficient along the wall. Uncheck centerline surface.

Uncheck *rite to File. Click Plot.

(Click picture for larger image)

*e can see that the fully-developed value is [.[[5. Compare this with what you'd expect from
the Moody chart.

Save the data for this plot as cf.xy.

Velocity Profile

*e'll plot the axial velocity at the outlet as a function of the distance from the center of the pipe.

Change the plot settings so that the radial distance from the axis is plotted as the ordinate: In the
olution XY Plot window, uncheck Position on X Axis under Options and choose Position on Y
Axis instead. Under Plot Direction, change X to and Y to 1. For the X Axis Function i.e. the
abscissa, pick Velocity... and Axial Velocity under that.

Since we want to plot this at the outlet boundary, pick only outlet under Surfaces.

Uncheck *rite to File. Click Plot.

(Click picture for larger image)

The axial velocity is maximum at the centerline and zero at the wall to satisfy the no-slip
boundary condition for viscous flow. Compare qualitatively the near-wall velocity gradient
normal to the wall with the laminar case. *hich is larger? From this, what can you say about the
relative stregths of near-wall mixing in the laminar and turbulent cases?

Save this plot as profile.xy.

 *)

In order to assess the numerical accuracy of the results obtained, it is necessary to compare
results on different meshes. *e'll re-do the calculation on a 1 x6 mesh which has twice the
number of nodes in the radial direction as the 1 x3 mesh. You can download the 1 x6 mesh
here.

)
c2c
c2c
c

Navigate to your working directory elect the pipe1 x6 .msh file you have created. Click OK.
Display the grid. Check its size.
Finer Mesh Analysis

Repeat steps 4, 5, and 6 of this tutorial with the finer mesh.

*hen you get to step 6 of the tutorial, plot each of the graphs as described. However, for each of
the plots, overlay the corresponding result for the coarser mesh so that we may compare them.
To do this, after the plotting the finer mesh result, in the olution XY Plot Window, click on Load
File.... Navigate to your working folder, click on the appropriate filename for the previous result,
eg. vel.xy for centerline velocity, and click OK. Click Plot. You'll see both results plotted in the
same the graphics window.

(Click picture for larger image)

In the centerline velocity plot above, the white line represents the centerline velocity of the finer
mesh, while the red line represents the velocity of the coarser mesh from before. As we can see,
there isn't too much of a difference between the two plots. Save this plot as vel2.xy.

Now, let's take a look at the coefficient of skin friction. This time, load the cf.xy file to compare
against the plot. This is the coefficient of skin friction plot:
(Click picture for larger image)

Once again, we can see that due to the fine degree of each mesh, there isn't much difference
between the two plots. Save this plot as cf2.xy. Now, study the velocity of the outlet by plotting
and comparing to the graph in profile.xy.

(Click picture for larger image)

Once again, the finer mesh in this case doesn't offer much more precision than the coarser mesh.
Save this plot as profile2.xy. Now let's take a look at the YPlus plot.
(Click picture for larger image)

As we can see, there is a significant increase in the accuracy of the plot from the finer mesh.
Save this plot as yplus2.xy.

You may want to experiment with meshes of other granularities and compare their plots with the
plots saved from the 1 x3 and 1 x6 meshes.

In Problem 1, we will be looking at the effect of coarse meshes with uniform granularity.

? 
Problem

Use FLUENT to resolve the developing flow in a pipe (same configuration as was done in the
tutorial) for a pipe Reynolds number of 1 , on the following meshes: 1 x5, 1 x2 with
uniform spacing in the radial direction. Plot the skin friction cf as a function of axial location for
each grid. Compare the exit value with the expected value for fully developed flow (e.g., see
*hite pgs. 345-346). Recall that a key question for the integrity of the mesh is the non-
dimensional value of the first nodal point:

This should be either less than 4 (so that you resolve down into the viscous sublayer) or greater
than 3 (where wall functions can accurately compensate for the poorly resolved viscous
sublayer). Intermediate values can lead to greater errors. Calculate the value of y1+ for each
mesh; use that to help explain (briefly) the trends in the agreement that you observe.
ëints

If you no longer have the 1 x5 or 1 x2 mesh, you can download them here: pipe1 x5.msh,
pipe1 x2 .msh

upersonic Flow Over a Wedge


c

c
c  c
c

cc
c
c


c
c

c

cc   c
!c
c

cc   c
"c#$
%c c $
cc   c
&c#
c'$c(
cc)*'+ c
,c#-
.c
/c 0
c
 c
1c5
%c
 cc

? 





Consider a 15° angle wedge at zero angle of attack. The incoming flow conditions are: M1D3,
p1D1 atm, T1D3 K. Use FLUENT to obtain the flowfield over the wedge. Compare the
pressure coefficient on the wedge surface with the corresponding analytical result for an oblique
shock.

    

This tutorial leads you through the steps for generating a mesh in GAMBIT for a wedge
geometry. The generated mesh can then be read into FLUENT for fluid flow simulation.

In an external flow such as that over a wedge, we need to define a farfield boundary and mesh
the region between the wedge and the farfield boundary. It is a good idea to place the farfield
boundary well away from the wedge to reduce interference with the shock that we want to
observe.

The overall boundary is shown below.

*here ABCDE is the farfield boundary and FE is the wedge.

Start GAMBIT

Create a new directory called wedge and start a MB  from that directory by typing gambit -id
wedge at the command prompt.

Under 
, select % -#"0$.'since the mesh to be created is to be used in
FLUENT 6. .

Create Vertices

The coordinates needed for the mesh are shown below

*
cc
  y z
c @c @c @c
c @c !,Ac @c

c @,c !,Ac @c

<c ,c !,Ac @c

c ,c @!/c @c

)c @,c @c @c

Using bottom up approach, we start by creating vertices of the geometry using the coordinate
given.

A
 -     -r /    -
  r /

Create the vertices by entering the coordinates under Global and the label under Label:

Click the F  A W NDAW button to scale the display so that you can see all the vertices. The
resulting image should look like this:

(Click picture for larger image)

Create Faces

Now we can create the edges using the vertices created.

A
 -     - +    -
   +
Create the edge AB by selecting the vertex A followed by vertex B. Enter AB for Label. Click
Apply. GAMBIT will create the edge. You will see a message saying something like "Created
edge: AB'' in the ranscriVt window.

Similarly, create the edges BC, CD, DE, EF, FA and CF. Click on the to select the vertices
from the list and move them to the picked list. You can also hold the shift button and mouse click
the vertices for selection.The resulting image should look like this.

(Click picture for larger image)

Create Faces

The edges we have created can be joined together to form faces. *e will need to define two
faces.

A
 -     -#     -
# # 

This brings up the Create Face From Wireframe menu. Recall that we had selected vertices in
order to create edges. Similarly, we will select edges in order to form a face.

*e will call two faces face1 and face2. To create the face1, select the edges AB, BC, CF, and
FA. Enter face1 for the label and click Apply. GAMBIT will tell you that it has "Created face:
face1'' in the transcript window.

Similarly, create the face face2 by selecting CD, DE, EF and CF.

*e are now ready to mesh the geometry.


  

Mesh Faces

*e will mesh each of the 2 faces separately to get our final mesh. Before we mesh a face, we
need to define the point of distribution for each of the edges that form the face.

*e will use the default setting for meshing of the edge.

A
 -    - +    -
 +

Select the edge AB. The edge will change color and an arrow will appear on the edge. This
indicates that you are ready to mesh this edge. Select interval size under Spacing. Enter . 4 for
interval size.

Next we will mesh the edge BC. Select the edge BC and enter . 4 for interval size.

Do the same for edge CD and CF.

Now that the appropriate edge meshes have been specified, mesh the face face1:

A
 -    -#     -
# 

Select the face1. The face will change color. You can use the defaults of Quad (i.e.
quadrilaterals) and Map. Click Apply.

The meshed face should look as follows:

(Click picture for larger image)


Next mesh face face2 in a similar fashion.

The resultant mesh should look as follws:

(Click picture for larger image)

Note that for each mesh face, we only define 2 mesh edges. Gambit will automatically define the
other two mesh edge for face mesh creation. Manual mesh of all edges can be done if more
control of the mesh is required. Please refer to the index of the GAMBIT User Guide and look
under Edge>Meshing for explanation on other type of meshing parameters.

 
 

*e'll label the boundary ABCDE as farfield, EF as wedge and AF as symmetry. Recall that these
will be the names that show up under boundary zones when the mesh is read into FLUENT.

Group Edges

*e'll create groups of edges and then create boundary entities from these groups.
First, we will group AB, BC, CD and DE together.

A
 -    -    -  
 

Select Edges and enter farfield for Label, which is the name of the group. Select the edges AB,
BC, CD and DE.

Note that GAMBIT adds the edge to the list as it is selected in the GUI.
Click Apply.

In the transcript window, you will see the message ³Created group: farfield´.

Similarly, create the other two groups. You should have created a total of three groups:

ac c R c


cac

%%
c B B<B<c

8
3
c )c


c )c

Define Boundary Types

Now that we have grouped each of the edges into the desired groups, we can assign appropriate
boundary types to these groups.

A$
c $c2c4
cc c 2c#$
%c c $
c c
Under Entity, select Groups.

Click on the wedge surface. Next to Name:, enter wedge. Leave the Type as *ALL.

Click Apply.

In the ranscriVt Window, you will see a message saying "Created Boundary entity: wedge".

Similarly, create boundary entities corresponding to farfield and symmetry groups. Set the Type
to Pressure Farfield and symmetry in each case.

Save Your Work


c
c2c)
c2c#-
c
Export Mesh
c
c2c)
c2c;$c2c
c

Save the file as wedge.msh.

Make sure that the Export 2d Mesh option is selected.

Check to make sure that the file is created.

 ! "? 


#"0
If you have skipped the previous mesh generation steps 1-3, you can download the mesh by
right-clicking on this link. Save the file as wedge.msh. You can then proceed with the flow
solution steps below.

aunch FUENT
#c2c(3 c2c)
cc2c)*'+ c/"!/cc

Select 2ddp from the list of options and click Run.

The "2ddp" option is used to select the two-dimensional (2d), double-precision (dp) solver. In the
double-precision solver, each floating point number is represented using 64 bits in contrast to the
single-precision solver which uses 32 bits. The extra bits increase not only the precision but also
the range of magnitudes that can be represented. The downside of using double precision is that
it requires more memory.

Import File
c
c2c)
c2c
c2c
c

Navigate to your working directory and select the wedge.msh file. Click OK.

Check that the displayed information is consistent with our expectations.

Analyze Grid

First, we check the grid to make sure that there are no errors.

c
c2cc2c
 cc

Any errors in the grid would be reported at this time. Check the output and make sure that there
are no errors reported.

Grid > Info > Size

How many cells and nodes does the grid have?


Display > Grid

You can look at specific parts of the grid by choosing the items you wish to view under Surfaces
(click to select and click again to deselect a specific boundary). Click Display again when you
have selected your boundaries. Note what the surfaces farfield, wedge, etc. correspond to by
selecting and plotting them in turn.

Define Properties

Define > Models > Solver...

*e see that FLUENT offers two methods ("solvers") for solving the governing equations:
Pressure-Based and Density-Based. To figure out the basic difference between these two solvers,
let's turn to the documentation.

c
c2c=
$c2c'
> c
c
 ccc

This should bring up FLEN 6.3 ser's auide in your web browser. If not, access the User's
Guide from the Start menu: Start > Programs > Fluent Inc Products > Fluent 6.3 Documentation
> Fluent 6.3 Documentation. This will bring up the FLUENT documentation in your browser.
Click on the link to the user's guide.

Go to chapter 25 in the user's guide; it discusses the Pressure-Based and Density-Based solvers.
Section 25.1 introduces the two solvers:

"Historically speaking, the pressure-based approach was developed for low-speed


incompressible flows, while the density-based approach was mainly used for high-speed
compressible flows. However, recently both methods have been extended and reformulated to
solve and operate for a wide range of flow conditions beyond their traditional or original intent."

"In both methods the velocity field is obtained from the momentum equations. In the density-
based approach, the continuity equation is used to obtain the density field while the pressure field
is determined from the equation of state."

"On the other hand, in the pressure-based approach, the pressure field is extracted by solving a
pressure or pressure correction equation which is obtained by manipulating continuity and
momentum equations."

Mull over this and the rest of this section. So which solver do we use for our wedge problem?
Turn to section 25.7.1 in chapter 25:

"The pressure-based solver traditionally has been used for incompressible and mildly
compressible flows. The density-based approach, on the other hand, was originally designed for
high-speed compressible flows. Both approaches are now applicable to a broad range of flows
(from incompressible to highly compressible), but the origins of the density-based formulation
may give it an accuracy (i.e. shock resolution) advantage over the pressure-based solver for high-
speed compressible flows."

Since we expect an oblique shock for our problem and the density-based solver is likely to
resolve the shock better, let's pick this solver.

In the Solver menu, select Density Based.

Click OK.

Define > Models > Viscous

Select nviscid under Model.


Click OK. This means the solver will neglect the viscous terms in the governing equations.

Define > Models > Energy

In compressible flow, the energy equation is coupled to the continuity and momentum equations.
So we need to solve the energy equation for our problem.

To turn on the energy equation, check the box next to Energy Equation and click OK.

Define > Materials

Make sure air is selected under Fluid Materials. Set Density to ideal-gas and make sure Cp is
constant and equal to 1 6.43 j/kg-k. Also make sure the Molecular *eight is constant and equal
to 2.966 kg/kgmol. Selecting the ideal-gas option means that FLUENT will use the ideal gas
equation of state to relate density to the static pressure and temperature.

Click Change/Create.

Define > Operating Conditions

To understand what the Operating Pressure is, read through the short-and-sweet section .14.2 in
the user's guide. *e see that for all flows, FLUENT uses the gauge pressure internally in order to
minimize round-off errors. Any time an absolute pressure is needed, as in the ideal gas law, it is
generated by adding the operating pressure to the gauge pressure:

absolute Vressure D gage Vressure + oVerating Vressure

Round-off errors occur when pressure changes ǻV in the flow are much smaller than the pressure
values V. One then gets small differences of large numbers. For our supersonic flow, we'll get
significant variation in the absolute pressure so that pressure changes ǻV are comparable to
pressure levels V. So we can work in terms of absolute pressure without being hassled by pesky
round-off errors. To have FLUENT work in terms of the absolute pressure, set the Operating
Pressure to .

Thus, in our case, there is no difference between the gauge and absolute pressures. Click OK.

Define > Boundary Conditions

Set farfield to Vressure-far-field boundary type.

Then click Set.... Set the Gauge Pressure to 1 1325. Set the Mach Number to 3. Under X-
Component of Flow Direction, put a value of 1 (i.e. the farfield flow isin the X direction).

Next, click on the Thermal Tab. Change the temperature to 3 K. *e are assuming ambient
temperature.

Click OK.

Set wedge to wall boundary type and symmetry to symmetry type.

 $%&
Solve > Control > Solution

*e'll use a second-order discretization scheme. Under Discretization, set Flow to Second Order
Upwind. Under Solver Parameters, set the Courant Number to .1.

Click OK.

Solve > Initialize > Initialize...

This is where we set the initial guess values for the iterative solution. *e'll use the farfield
values (MD3, pD1 atm, TD3 K) as the initial guess for the entire flowfield. Select farfield under
ComVute From. This fills in values from the farfield boundary in the corresponding boxes.
(Alternately, I could have typed in these values but I like to palm off as much grunt work as
possible to the computer.)

Click nit. Now, for each cell in the mesh, MD3, pD1 atm, TD3 K. These values will of course
get updated as we iterate the solution below.

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. *e'll
iterate the solution until the residual for each equation falls below 1e-6.

%-
 -)
 000
Set Absolute Criteria for all equations to 1e-6.

Also, under Options, select Plot. This will plot the residuals in the graphics window as they are
calculated, giving you a visual feel for if/how the iterations are proceeding to convergence.

Click OK.


-#
-1
- 000

This will save your FLUENT settings and the mesh to a "case" file. Type in wedge.cas for Case
File. Click OK.

%-  

Set the Number of Iterations to 1 . Click Iterate.

The residuals for each iteration are printed out as well as plotted in the graphics window as they
are calculated. The residuals after 1 iterations are not below the convergence criterion of 1e-6
specified before. So run the solution for 1 more iterations. The solution converges in about
151 iterations; the residuals for all the governing equations are below 1e-6 at this point.

Save the solution to a data file:

Main Menu > File > *rite > Data...

Enter wedge.dat for Data File and click OK. Check that the file has been created in your working
directory. You can retrieve the current solution from this data file at any time.

 ' () 
Plot Velocity Vectors

Let's plot the velocity vectors obtained from the FLUENT solution.

-
 -r  

Under Color by, select Mach Number in place of Velocity Magnitude since the former is of
greater interest in compressible flow. The colors of the velocity vectors will indicate the Mach
number. Use the default settings by clicking Display.

This draws an arrow at the center of each cell. The direction of the arrow indicates the velocity
direction and the magnitude is proportional to the velocity magnitude (not Mach number, despite
the previous setting). The color indicates the corresponding Mach number value. The arrows
show up a little more clearly if we reduce their lengths. Change Scale to .2. Click Display.

Zoom in a little using the middle mouse button to peer more closely at the velocity vectors.
(Click picture for larger image)

*e can see the flow turning through an oblique shock wave as expected. Behind the shock, the
flow is parallel to the wedge and the Mach number is 2.2. Save this figure to a file:

c
c2c)
c2c=$cc

Select JPEG and Color. Uncheck Landscape Orientation. Save the file as wedge_vv.jpg in your
working directory. Check this iimage by opening this file in an image viewer.

Let's investigate how many mesh cells it takes for the flow to turn. Tturn on the mesh by clicking
on the Draw Grid checkbox in the Vectors menu. In the arid DisVlay menu that pops up, click
Display. This displays the mesh in the graphics window. Close the arid DisVlay menu. Click
Display in the Vectors menu. Zoom in further as shown below.

(Click picture for larger image)


*e see that it takes 2-3 mesh cells for the flow to turn. According to inviscid theory, the shock is
a discontinuity and the flow should turn instantly. In the FLUENT results, the shock is
"smeared" over 2-3 cells. In the discrete equations that FLUENT solves, there are terms that act
like viscosity. This introduced viscosity contributes to the smearing. A more thorough
explanation would have to go into the details of the numerical solution procedure.

Plot Mach Number Contours

Let's take a look at the Mach number variation in the flowfield.

-
 -  

Under Contours of, choose Velocity.. and Mach Number. Select the Filled option. Increase the
number of contour levels plotted: set Levels to 1 .

Click Display.
*e see that the Mach number behind the shockwave is uniform and equal to 2.2. Compare this
to the corresponding analytical result.

Plot Pressure Coefficient Contours

Let's set the reference values necessary to calculate the pressure coefficient.

) -)   r 

Select farfield under Compute From.

The above reference values of density, velocity and pressure will be used to calculate the
pressure coefficient from the pressure. Click OK.

-
 -  000

Select Pressure... and Static Pressure from under Contours Of. Then select Pressure Coeffient.
(Click picture for larger image)

The pressure coefficient after the shockwave is .293, very close to the theoretical value of
.29. The pressure increases after the shockwave as we would expect.

 *r
) 
Comparing Solution for Coarse, Medium and Fine Mesh

Now that we observed the result that we are supposed to obtain, we can continue to compare the
results with different mesh density. *e start with creating fine and course mesh in Gambit, then
obtain the solution using Fluent.

Contours of pressure coefficient for coarse mesh


Contours of pressure coefficient for medium mesh

Contours of pressure coefficient for fine mesh

From the comparison of pressure coefficient for diffent mesh density, we see that the pressure
coeffient values are still the same. However, the shockwave get thinner as the mesh get more
refine. This suggest the solution is more accurate as the mesh is more refine.
Comparing Solutions Solved Using First Order and Second Order Method

Contours of pressure coefficient for first order discretization method

Contours of pressure coefficient using second order discretization method

From comparison, both methods provide slightly different value of pressure coefficient. The
oblique shockwave is thinner using second order method. This suggest that the second order
method provide a more accurate simulation of the super sonic flow over wedge. In general,
second order discretization method will provide more accurate solution, but it is more difficult to
obtain converged solution if the geometry is complex. So it is a good practice to start with a first
order solution and then continue solving the problem using second order discretization method.

Jompressible Flow in a Nozzle


c

c
c  c
c

cc
c
c


c
c

c

cc   c
!c
c

cc   c
"c#$
%c c $
cc   c
&c#
c'$c(
cc)*'+ c
,c#-
.c
/c 0
c
 c
1c
%
c
c
(
cc
(
c!cc

? 





Consider air flowing at high-speed through a convergent-divergent nozzle having a circular
cross-sectional area, , that varies with axial distance from the throat,  , according to the formula

A D .1 + x2; - .5 < x < .5

where is in square meters and   is in meters. The stagnation pressure Vo at the inlet is 1 1,325
Pa. The stagnation temperature o at the inlet is 3 K. The static pressure V at the exit is 3,73.9
Pa. *e will calculate the Mach number, pressure and temperature distribution in the nozzle using
FLUENT and compare the solution to quasi-1D nozzle flow results. The Reynolds number for
this high-speed flow is large. So we expect viscous effects to be confined to a small region close
to the wall. So it is reasonable to model the flow as inviscid.

    

Since the nozzle has a circular cross-section, it's reasonable to assume that the flow is
axisymmetric. So the geometry to be created is two-dimensional.

Start GAMBIT

Create a new folder called nozzle and select this as the working directory. Add -id nozzle to the
startup options.

Create Axis Edge

*e'll create the bottom edge corresponding to the nozzle axis by creating vertices and B shown
in the problem specification and joining them by a straight line.

A$
c $c2c

cc c 2c5

;cc c 2c

c5

;c
c

Create the following two vertices:

Vertex 1: (- .5, , )
Vertex 2: ( .5, , )

A$
c $c2c

cc c 2c3
cc c 2c

c3
c c

Select vertex 1 by holding down the Shift button and clicking on it. Next, select vertex 2. Click
Apply in the Create traight Edge window.

Create Wall Edge

*e'll next create the bottom edge corresponding to the nozzle wall. This edge is curved. Since

ADpi r2

where r(x) is the radius of the cross-section at x and

A D .1 + x2

for the given nozzle geometry, we get

r(x) D [( .1 + x2)/pi] .5; - .5 < x < .5


This is the equation of the curved wall. Life would have been easier if GAMBIT allowed for this
equation to be entered directly to create the curved edge. Instead, one has to create a file
containing the coordinates of a series of points along the curved line and read in the file. The
more number of points used along the curved edge, the smoother the resultant edge.

The file vert.dat contains the point definitions for the nozzle wall. Take a look at this file. The
first line is

21 1

which says that there are 21 points along the edge and we are defining only 1 edge. This is
followed by  ,r and z coordinates for each point along the edge. The r-value for each   was
generated from the above equation for r( . The z-coordinate is for all points since we have a
2D geometry.

Right-click on vert.dat and select Save As... to download the file to your working directory.

Main Menu > File > Import > ICEM Input ...

Next to File Name:, enter the path to the vert.dat file that you downloaded or browse to it by
clicking on the Browse button.

Then, check the Verticesand Edges boxes under Geometry to Create as we want to create the
vertices as well as the curved edge.

Click Accept.

This should create the curved edge. Here it is in relation to the vertices we created above:
(Click picture for larger image)

Create Inlet and Outlet Edges

Create the vertical edge for the inlet:

A$
c $c2c

cc c 2c3
cc c 2c

c3
c c

Shift-click on vertex 1 and then the vertex above it to create the inlet edge.

Similarly, create the vertical edge for the outlet.

(Click picture for larger image)

Create Face

Form a face out of the area enclosed by the four edges:


A$
c $c2c

cc c 2c)
cc c 2c)c)
c c

Recall that we have to shift-click on each of the edges enclosing the face and then click Apply to
create the face.

Save Your Work


c
c2c)
c2c#-
c

This will create the nozzle.dbs file in your working directory. Check that it has been created so
that you will able to resume from here if necessary.

  

Now that we have the basic geometry of the nozzle created, we need to mesh it. *e would like
to create a 5 x2 grid for this geometry.

Mesh Edges

As in the previous tutorials, we will first start by meshing the edges.

A$
c $c2c
cc c 2c3
cc c 2c
c3
c c

Like the Laminar Pipe Flow Tutorial, we are going to use even spacing between each of the
mesh points. *e won't be using the Grading this time, so deselect the box next to Grading that
says Apply.

Then, change Interval Count to 2 for the side edges and Interval Count to 5 for the top and
bottom edges.

(Click picture for larger image)


Mesh Face

Now that we have the edges meshed, we need to mesh the face.

A$
c $c2c
cc c 2c)
cc c 2c
c)
c c

As before, select the face and click the Apply button.

(Click picture for large image)

Save Your Work


c
c2c)
c2c#-
c

 
 

Specify Boundary Types

Now that we have the mesh, we would like to specify the boundary conditions here in a MB .

A$
c $c2c4
cc c 2c#$
%c c $
cc c c

This will bring up the Vecify Boundary yVes window on the AVeration Panel. *e will first
specify that the left edge is the inlet. Under Entity:, pick Edges so that a MB  knows we want
to pick an edge (face is default).
Now select the left edge by Shift-clicking on it. The selected edge should appear in the yellow
box next to the Edges box you just worked with as well as the Label/Type list right under the
Edges box.

Next to Name:, enter inlet.

For Type:, select *ALL.

Click Apply. You should see the new entry appear under Name/Type box near the top of the
window.

Repeat for the outlet, centerline, and wall edges.

You should have the following edges in the Name/Type list when finished:
Save and Export
c
c2c)
c2c#-
cc

c
c2c)
c2c;$c2c
cc

Type in nozzle.msh for the File Name:. Select Export 2d Mesh since this is a 2 dimensional
mesh. Click Accept.

Check nozzle.msh has been created in your working directory.

 ! "? 


#"0
If you have skipped the previous mesh generation steps 1-3, you can download the mesh by
right-clicking on this link. Save the file as nozzle.msh in your working directory. You can then
proceed with the flow solution steps below.

aunch FUENT
#c2c(3 c2c)
cc2c)*'+ c/"!/c2c)*'+ c/"!/cc

Select 2ddp from the list of options and click Run.

Import File
c
c2c)
c2c
c2c
c

Navigate to your working directory and select the nozzle.msh file. Click OK.

The following should appear in the FLUENT window:


Check that the displayed information is consistent with our expectations of the nozzle grid.

Check and Display Grid

First, we check the grid to make sure that there are no errors.

c
c2cc2c
 cc

Any errors in the grid would be reported at this time. Check the output and make sure that there
are no errors reported.

Grid > Info > Size

How many cells and nodes does the grid have?

Main Menu > Display > Grid

Make sure all items under Surfaces is selected. Then click Display. The graphics window opens
and the grid is displayed in it.

Some of the operations available in the graphics window are:

Translation: The grid can be translated in any direction by holding down the Left Mouse Button
and then moving the mouse in the desired direction.

Zoom In: Hold down the Middle Mouse Button and drag a box from the Upper Left Hand Corner
to the Lower Right Hand Corner over the area you want to zoom in on.

Zoom Out: Hold down the Middle Mouse Button and drag a box anywhere from the Lower Right
Hand Corner to the Upper Left Hand Corner.
The grid has 5 divisions in the axial direction and 2 divisions in the radial direction. The total
number of cells is 5 x2 D1 . Since we are assuming inviscid flow, we won't be resolving the
viscous boundary layer adjacent to the wall. (The effect of the boundary layer is small in our case
and can be neglected.) Thus, we don't need to cluster nodes towards the wall. So the grid has
uniform spacing in the radial direction. *e also use uniform spacing in the axial direction.

Look at specific parts of the grid by choosing each boundary (centerline, inlet, etc) listed under
Surfaces in the arid DisVlay menu. Click to select and click again to deselect a specific
boundary. Click Display after you have selected your boundaries.

Define Solver Properties

Define > Models > Solver...

*e see that FLUENT offers two methods ("solvers") for solving the governing equations:
Pressure-Based and Density-Based. To figure out the basic difference between these two solvers,
let's turn to the documentation.

c
c2c=
$c2c'
> c
c
 ccc

This should bring up FLEN 6.3 ser's auide in your web browser. If not, access the User's
Guide from the Start menu: Start > Programs > Fluent Inc Products > Fluent 6.3 Documentation
> Fluent 6.3 Documentation. This will bring up the FLUENT documentation in your browser.
Click on the link to the user's guide.

Go to chapter 25 in the user's guide; it discusses the Pressure-Based and Density-Based solvers.
Section 25.1 introduces the two solvers:

"Historically speaking, the pressure-based approach was developed for low-speed


incompressible flows, while the density-based approach was mainly used for high-speed
compressible flows. However, recently both methods have been extended and reformulated to
solve and operate for a wide range of flow conditions beyond their traditional or original intent."

"In both methods the velocity field is obtained from the momentum equations. In the density-
based approach, the continuity equation is used to obtain the density field while the pressure field
is determined from the equation of state."

"On the other hand, in the pressure-based approach, the pressure field is extracted by solving a
pressure or pressure correction equation which is obtained by manipulating continuity and
momentum equations."

Mull over this and the rest of this section. So which solver do we use for our nozzle problem?
Turn to section 25.7.1 in chapter 25:

"The pressure-based solver traditionally has been used for incompressible and mildly
compressible flows. The density-based approach, on the other hand, was originally designed for
high-speed compressible flows. Both approaches are now applicable to a broad range of flows
(from incompressible to highly compressible), but the origins of the density-based formulation
may give it an accuracy (i.e. shock resolution) advantage over the pressure-based solver for high-
speed compressible flows."

Since we are solving a high-speed compressible flow, let's pick the density-based solver.

In the Solver menu, select Density Based.

Under Space, choose  isymmetric. This will solve the axisymmetric form of the governing
equations.

Click OK.

Define > Models > Viscous

Select nviscid under Model.


Click OK. This means the solver will neglect the viscous terms in the governing equations.

Define > Models > Energy

The energy equation needs to be turned on since this is a compressible flow where the energy
equation is coupled to the continuity and momentum equations.

Make sure there is a check box next to Energy Equation and click OK.

Define > Materials

Select air under Fluid materials. Under Properties, choose deal aas next to Density. You
should see the window expand. This means FLUENT uses the ideal gas equation of state to
relate density to the static pressure and temperature.
Click Change/Create. Close the window.

Define > Operating Conditions

*e'll work in terms of absolute rather than gauge pressures in this example. So set Operating
Pressure in the Pressure box to .

Click OK.

It is important that you set the operating pressure correctly in compressible flow calculations
since FLUENT uses it to compute absolute pressure to use in the ideal gas law.

Define > Boundary Conditions

Set boundary conditions for the following surfaces: inlet, outlet, centerline, wall.
Select inlet under Zone and pick Vressure-inlet under Type as its boundary condition. Click
Set.... The Pressure nlet window should come up.

Set the total pressure (noted as Gauge Total Pressure in FLUENT) at the inlet to 1 1,325 Pa as
specified in the problem statement. For a subsonic inlet, uVersonic/ nitial aauge Pressure is the
initial guess value for the static pressure. This initial guess value can be calculated from the 1D
analysis since we know the area ratio at the inlet. This value is 99,34 Pa. Note that this value
will be updated by the code. After you have entered the values, click OK to close the window.

Check that under the Thermal tab, the Total Temperature is 3 K. Click OK.

Using the same steps as above, pick Vressure-outlet as the boundary condition for the outlet
surface. Then, when the Pressure Autlet window comes up, set the pressure to 373.9 as
specified in the problem statement. Click OK.

Set the centerline zone to axis boundary type.

Make sure that wall zone is set to wall boundary type.

 $%&
Now we will set the solve settings for this problem and then iterate through and actually solve it.

Solve > Control > Solution

*e'll just use the defaults. Note that a second-order discretization scheme will be used. Click
OK.

Set Initial Guess

Main Menu > Solve > Initialize > Initialize...

As you may recall from the previous tutorials, this is where we set the initial guess values for the
iterative solution. *e'll set these values to be the ones at the inlet. Select inlet under ComVute
From.

Click nit. The above values of pressure, velocity and temperature are now assigned to each cell
in the grid. This completes the initialization. Close the window.

Set Convergence Criteria

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. *e'll
iterate the solution until the residual for each equation falls below 1e-6.

Main Menu > Solve > Monitors > Residual...

Change the residual under Convergence Criterion for continuity, x-velocity, y-velocity and
energy to 1e-6.

Also, under Options, select Plot. This will plot the residuals in the graphics window as they are
calculated.
Click OK.

Iterate Until Convergence

Main Menu > Solve > Iterate...

In the terate Window that comes up, change the Number of Iterations to 5 . Click Iterate.

The residuals for each iteration is printed out as well as plotted in the graphics window as they
are calculated.

Save case and data after you have obtained a converged solution.

 ' () 
Mach Number Plot

As in the previous tutorials, we are going to plot the velocity along the centerline. However, this
time, we are going to use the dimensionless Mach quantity.

Plot > XY Plot


*e are going plot the variation of the Mach number in the axial direction at the axis and wall. In
addition, we will plot the corresponding variation from 1D theory. You can download the file
here: mach_1D.xy.

Do everything as we would do for plotting the centerline velocity. However, instead of selecting
Axial Velocity as the Y Axis Function, select Mach Number.

Also, since we are going to plot this number at both the wall and axis, select centerline and wall
under Surfaces.

Then, load the mach_1D.xy by clicking on Load File....

Click Plot.

(Click picture for large image)

How does the FLUENT solution compare with the 1D solution?


Is the comparison better at the wall or at the axis? Can you explain this?

Save this plot as machplot.xy by checking *rite to File and clicking *rite....

Pressure Contour Plot

Sometimes, it is very useful to see how the pressure and temperature changes throughout the
object. This can be done via contour plots.

Display > Contours...

First, we are going to plot the pressure contours of the nozzle. Therefore, make sure that under
Contours Of, Pressure... and Static Pressure is selected.

*e want this at a fine enough granularity so that we can see the pressure changes clearly. Under
Levels, change the default 2 to 4 . This increases the number of lines in the contour plot so that
we can get a more accurate result.

Click Display.
(Click picture for large image)

Notice that the pressure on the fluid gets smaller as it flows to the right, as is consistent with
fluid going through a nozzle.

Temperature Contour Plot

Now we will plot the temperature contours and see how the temperature varies throughout the
nozzle.

Back in the Contours window, under Contours Of, select Temperature... and Static Temperature.

Click Display.

(Click picture for large image)


As we can see, the temperature decreases towards the right side of the nozzle, indicating a
change of internal energy to kinetic energy as the fluid speeds up.

 *)

Solve the nozzle flow for the same conditions as used in class on a  x3 grid. Recall that the
static pressure V at the exit is 3,73.9 Pa. The grid for this calculation can be downloaded here.

(a) Plot the variation of Mach number at the axis and the wall as a function of the axial distance
 . Also, plot the corresponding results obtained on the 5 x2 grid used in class and from the
quasi-1D assumption. Recall that the quasi-1D result for the Mach number variation was given to
you in the M_1D.xy file. Note all five curves should be plotted on the same graph so that you
can compare them. You can make the plots in FLUENT, MATLAB or EXCEL.

(b) Plot the variation of static pressure at the axis and the wall as a function of the axial distance
 . Also, plot the corresponding results obtained on the 5 x2 grid used in class and from the
quasi-1D assumption. Calculate the static pressure variation for the quasi-1D case from the Mach
number variation given in M_1D.xy.

(c) Plot the variation of static temperature at the axis and the wall as a function of the axial
distance  . Also, plot the corresponding results obtained on the 5 x2 grid used in class and from
the quasi-1D assumption. Calculate the static temperature variation for the quasi-1D case from
the Mach number variation given in M_1D.xy.

Comment very briefly on the grid dependence of your results and the comparison with the quasi-
1D results.

? 
Consider the nozzle flow problem solved using FLUENT in the tutorial. Recall that the nozzle
has a circular cross-sectional area, , that varies with axial distance from the throat,  , according
to the formula:

= [.1 +  2

where is in square meters and   is in meters. The stagnation pressure Voand stagnation
temperature o at the inlet are 1 1,325 Pa and 3 K, respectively.

Using the quasi-1D flow assumption, determine the static pressure at the nozzle inlet and outlet
for the following conditions:

(a) Sonic flow at the throat, and supersonic, isentropic flow in the diverging section.
(b) Sonic flow at the throat, and subsonic, isentropic flow in the diverging section.
(c) Sonic flow at the throat and normal shock at the exit.
? 
Change the exit pressure to 4 , Pa while keeping all the other boundary conditions the same.
*hat flow regime do you expect for this exit pressure based on the quasi-1D results in problem
1? Re-run the FLUENT calculation with this exit pressure on the 5 x2 grid.

(a) Plot contours of the Mach number and static pressure for this case. Is the flow regime as
predicted by quasi-1D theory? Explain briefly the possible causes for any similarities or
disparities.

(b) Plot the static and stagnation pressures at the axis as a function of the axial distance. Also,
plot the corresponding values from the case where the exit pressure is 3,73.9 Pa. (These four
curves should be on the same graph.) Explain briefly the salient features of this plot.

(c) Plot the static and stagnation temperatures at the axis as a function of the axial distance.
Again provide a brief explanation for the salient features.

Flow over an Airfoil


c

c
c  c
c

cc
c
c


c
c

c

cc   c
!c
c

cc   c
"c#$
%c c $
cc   c
&c#
c'$c(
cc)*'+ c
,c#-
.c
/c 0
c
 c
1c
%
c
c
(
cc
(
c!cc

? 





Consider air flowing over NACA 4412 airfoil. The freestream velocity is 5 m/s and the angle of
attack is 2°. Assume standard sea-level values for the freestream properties:
Pressure D 1 1,325 Pa
Density D 1.225 kg/m3
Temperature D 2.16 K
Kinematic viscosity v D 1.46 7e-5 m2/s
*e will determine the lift and drag coefficients under these conditions using FLUENT.

    

If you wish to skip the steps for grid creation, you can download the mesh file here (right-click
and select Save As...) and go to Step 4.

This tutorial leads you through the steps for generating a mesh in GAMBIT for an airfoil
geometry. This mesh can then be read into FLUENT for fluid flow simulation.

In an external flow such as that over an airfoil, we have to define a farfield boundary and mesh
the region between the airfoil geometry and the farfield boundary. It is a good idea to place the
farfield boundary well away from the airfoil since we'll use the ambient conditions to define the
boundary conditions at the farfield. The farther we are from the airfoil, the less effect it has on
the flow and so more accurate is the farfield boundary condition.

The farfield boundary we'll use is the line ABCDEFA in the figure above. c is the chord length.

Start GAMBIT

Create a new directory called airfoil and start a MB  from that directory by typing gambit -id
airfoil at the command prompt.
Under 
, select % -#"0$.'since the mesh to be created is to be used in
FLUENT 6. .

Import Edge

To specify the airfoil geometry, we'll import a file containing a list of vertices along the surface
and have GAMBIT join these vertices to create two edges, corresponding to the upper and lower
surfaces of the airfoil. *e'll then split these edges into 4 distinct edges to help us control the
mesh size at the surface.

The file containing the vertices for the airfoil can be downloaded here: naca4412.dat (right click
and select Save As...)

Let's take a look at the naca4412.dat file:

The first line of the file represents the number of points on each edge (61) and the number of
edges (2). The first 61 set of vertices are connected to form the edge corresponding to the upper
surface; the next 61 are connected to form the edge for the lower surface.

The chord length, c for the geometry in naca4412.dat file is 1, so x varies between and 1. If
you are using a different airfoil geometry specification file, note the range of   values in the file
and determine the chord length c. You will need this later on.

Note: NACA series geometry can be found in many online website. One such website is:
http://www.pagendarm.de/trapp/programming/java/profiles/NACA4.html


-#
- - 000

For File Name, browse and select the naca4412.dat file. Select both Vertices and Edges under
Geometry to Create: since these are the geometric entities we need to create. Deselect Face.
Click Accept.
(Click picture for larger image)

Create Farfield Boundary

Next, we will create the following farfield boundary. This picture of the farfield nomenclature
will be handy.

*e will create the farfield boundary by creating vertices and joining them appropriately to form
edges.

A
 -     -r /    -
  r /

Create the following vertices by entering the coordinates under Global and the label under Label:

*
cc
  y z

c c !,c @c

c !c !,c @c

c !c @c @c

<c !c !,c @c

c c !,c @c

)c ,c @c @c
c c @c @c

Click the F  A W NDAW button to scale the display so that you can see all the vertices. The
resulting image should look like this:

(Click picture for larger image)

Now we can create the edges using the vertices created.

A
 -     - +    -
   +

Create the edge AB by selecting the vertex A followed by vertex B. Enter AB for Label. Click
Apply. GAMBIT will create the edge. You will see a message saying something like "Created
edge: AB'' in the ranscriVt window.

Similarly, create the edges BC, CD, DE, EG, GA and CG. Note that you might have to zoom in
on the airfoil to select vertex G correctly or click on the to select the vertices from the list
and move them to the picked list. The rest of the tutorial will use this method for vertices
selection.

Next we'll create the circular arc AF. Right-click on the Create Edge button and select Arc.
In the Create Real Circular rc menu, the box next to Center will be yellow. That means that the
vertex you select will be taken as the center of the arc. Select vertex G and click Apply. Now the
box next to End Points will be highlighted in yellow. This means that you can now select the two
vertices that form the end points of the arc. Select vertex A and then vertex F. Enter AF under
Label. Click Apply.

If you did this right, the arc AF will be created. If you look in the transcript window, you'll see a
message saying that an edge has been created.

Similarly, create an edge corresponding to arc EF.

(Click picture for larger image)

Create Faces

The edges we have created can be joined together to form faces. *e will need to define three
faces as shown in the image above. Two rectangular faces, rect1 and rect2 lie to the right of the
airfoil. The third face, circ1 consists of the area outside of the airfoil but inside of the semi-
circular boundary.
A
 -     -#     -
# # 

This brings up the Create Face From Wireframe menu. Recall that we had selected vertices in
order to create edges. Similarly, we will select edges in order to form a face.

To create the face rect1, select the edges AB, BC, CG, and GA. Enter rect1for the label and click
Apply. GAMBIT will tell you that it has "Created face: rect1'' in the transcript window.

Similarly, create the face rect2 by selecting ED, DC, CG and GE.

To create the last face we will need to make two seperate faces, one for the outer boundary and
one for the airfoil and then subtract the airfoil from the boundary . Create semi-circular face
circ1 by selecting GA, AF, FE and EG and enter circ1 for the label. Create the face for the airfoil
by selecting corresponding edges. Subtract the airfoil from circ1.

A
 -     -#    

right click on the Boolean Operations Button and select Subtract


The Face box will be highlighted yellow. Shift click to select circ1, the outer semi-circular
boundary. Then select the lower box labeled Subtract Faces which will allow you to select faces
to subtract from our outer boundary. Select the airfoil face and click apply.

  

Mesh Faces

*e'll mesh each of the 3 faces separately to get our final mesh. Before we mesh a face, we need
to define the point distribution for each of the edges that form the face i.e. we first have to mesh
the edges. *e'll select the mesh stretching parameters and number of divisions for each edge
based on three criteria:

c 9
>c
cc 
c$ c
c
c%c 
c c c8

c
c%8c c%
c
c Cc
c

c
c c8
c$$c
c%%
c
cc

c$3
-
c
c 
c

c%8c3
 c$$c0
c
!c 
cc
c %
Bc8
c

c
c c
c
c
c
3cc3c
3
c 
c


c
cc
 c8c
c 

$
c3
 c
"c 9
c8c  cc
c 0
cc
c Cc3
Bc  c3
cc
c
c 0
c
3%c


c
c
cc

The edge mesh parameters we'll use for controlling the stretching are successive ratio, first
length and last length. Each edge has a direction as indicated by the arrow in the graphics
window. The successive ratio R is the ratio of the length of any two successive divisions in the
arrow direction as shown below. Go to the index of the GAMBIT User Guide and look under
Edge>Meshing for this figure and accompanying explanation. This help page also explains what
the first and last lengths are; make sure you understand what they are.

A
 -    - +    -
 +

Select the edge GA. The edge will change color and an arrow and several circles will appear on
the edge. This indicates that you are ready to mesh this edge. Make sure the arrow is pointing
upwards. You can reverse the direction of the edge by clicking on the Reverse button in the Mesh
Edges menu. Enter a ratio of 1.15. This means that each successive mesh division will be 1.15
times bigger in the direction of the arrow. Select Interval Count under Spacing. Enter 45 for
Interval Count. Click Apply. GAMBIT will create 45 intervals on this edge with a successive
ratio of 1.15.

For edges AB and CG, we'll set the First Length (i.e. the length of the division at the start of the
edge) rather than the uccessive Ratio. Repeat the same steps for edges BC, AB and CG with the
following specifications:

Arrow Successive Interval


Edges
Direction Ratio Count
GA
and Upwards 1.15 45
BC

Arrow First Interval


Edges
Direction Length Count
AB
Left to
and . 2c 6
Right
CG

Note that later we'll select the length at the trailing edge to be . 2c so that the mesh length is
continuous between IG and CG, and HG and CG.
Now that the appropriate edge meshes have been specified, mesh the face rect1:

A
 -    -#     -
# 

Select the face rect1. The face will change color. You can use the defaults of Quad (i.e.
quadrilaterals) and Map. Click Apply.

The meshed face should look as follows:

(Click picture for larger image)

Next mesh face rect2 in a similar fashion. The following table shows the parameters to use for
the different edges:

Arrow Successive Interval


Edges
Direction Ratio Count
EG
and Downwards 1.15 45
CD

Arrow First Interval


Edges
Direction Length Count
Left to
DE . 2c 6
Right
The resultant mesh should be symmetric about CG as shown in the figure below.

(Click picture for larger image)

Split Edges

Next, we will split the top and bottom edges of the airfoil into two edges so that we have better
control of the mesh point distribution. Figure of the splitting edges is shown below.

*e need to do this because a non-uniform grid spacing will be used for   [.3c and a uniform
grid spacing for  >[.3c. To split the top edge into HI and IG, select

A
 -     - +    -

. + +

Make sure Point is selected next to Split *ith in the Vlit Edge window.

Select the top edge of the airfoil by Shift-clicking on it. You should see something similar to the
picture below:
(Click picture for larger image)

*e'll use the point at  D .3c on the upper surface to split this edge into HI and IG. To do this,
enter .3 for x: under Global. If your c is not equal to one, enter the value of .3*c instead of just
.3.For instance, if cD4, enter 1.2. From here on, whenever you're asked to enter (some factor)*c,
calculate the appropriate value for your c and enter it.

You should see that the white circle has moved to the correct location on the edge.

(Click picture for larger image)

Click Apply. You will see a message saying ``Edge edge.1 was split, and edge edge.3 created'' in
the ranscriVt window.
(Click picture for larger image)

Note the yellow marker in place of the white circle, indicating the original edge has been split
into two edges with the yellow marker as its dividing point.
Repeat this procedure for the lower surface to split it into HJ and JG. Use the point at  D .3c on
the lower surface to split this edge.

Finally, let's mesh the face consisting of circ1 and the airfoil surface. For edges HI and HJ on the
front part of the airfoil surface, use the following parameters to create edge meshes:

Arrow Last Interval


Edges
Direction Length Count
From H
HI . 2c 4
to I
From H
HJ . 2c 4
to J

For edges IG and JG, we'll set the divisions to be uniform and equal to . 2c. Use nterval ize
rather than nterval Count and create the edge meshes:

Arrow Successive Interval


Edges
Direction Ratio Size
IG
Left to
and 1 . 2c
Right
JG

For edge AF, the number of divisions needs to be equal to the number of divisions on the line
opposite to it, in this case, the upper surface of the airfoil(this is a subtle point; chew over it). To
determine the number of divisions that GAMBIT has created on edge IG, select
A
 -    - +   
-
( +

Select edge IG and then Elements under Component and click Apply. This will give the total
number of nodes (i.e. points) and elements (i.e. divisions) on the edge in the ranscriVt window.
The number of divisions on edge IG is 36. (If you are using a different geometry, this number
will be different; I'll refer to it as N a). So the nterval Count for edge AF is NH +N a= 4 +36D
*'.

Similarly, determine the number of divisions on edge JG. This comes out as 35 for the current
geometry. So the nterval Count for edge EF is*$.
Create the mesh for edges AF and EF with the following parameters:

c
Arrow First Interval
3
ccDirection Length Count

From A
AF . 2c 4 +N a
to F
From E
EF . 2c 4 +NJa
to F

Mesh the face. The resultant mesh is shown below.

(Click picture for larger image)

 
 

*e'll label the boundary AFE as farfield1, ABDE as farfield2 and the airfoil surface as airfoil.
Recall that these will be the names that show up under boundary zones when the mesh is read
into FLUENT.
Group Edges

*e'll create groups of edges and then create boundary entities from these groups.

First, we will group AF and EF together.

A
 -    -    -  
 

Select Edges and enter farfield1 for Label, which is the name of the group. Select the edges AF
and EF.

Note that GAMBIT adds the edge to the list as it is selected in the GUI.

Click Apply.

In the transcript window, you will see the message ³Created group: farfield1 group´.

Similarly, create the other two farfield groups. You should have created a total of three groups:
ac c R c
cac

%%
c )B)c

%%
!c B<c

%%
"c B<c

%c =BB=DBDcE
c3c-Fc

Define Boundary Types

Now that we have grouped each of the edges into the desired groups, we can assign appropriate
boundary types to these groups.

A$
c $c2c4
cc c 2c#$
%c c $
c c

Under Entity, select Groups.

Select any edge belonging to the airfoil surface and that will select the airfoil group. Next to
Name:, enter airfoil. Leave the Type as *ALL.
Click Apply.

In the ranscriVt Window, you will see a message saying "Created Boundary entity: airfoil".

Similarly, create boundary entities corresponding to farfield1, farfield2 and farfield3 groups. Set
the Type to Pressure Farfield in each case.

Save Your Work


c
c2c)
c2c#-
c

Export Mesh
c
c2c)
c2c;$c2c
c

Save the file as airfoil.msh.


Make sure that the Export 2d Mesh option is selected.

Check to make sure that the file is created.

 ! "? 


#"0
aunch FUENT
#c2c(3 c2c)
cc2c)*'+ c/"!/cc

Select 2ddp from the list of options and click Run.

Import File
c
c2c)
c2c
c2c
c

Navigate to your working directory and select the airfoil.msh file. Click OK.

The following should appear in the FLUENT window:

Check that the displayed information is consistent with our expectations of the airfoil grid.

Analyze Grid

Grid > Info > Size

How many cells and nodes does the grid have?

Display > Grid


Note what the surfaces farfield1, farfield2, etc. correspond to by selecting and plotting them in
turn.

Zoom into the airfoil.

*here are the nodes clustered? *hy?

Define Properties

Define > Models > Solver...

Under the Solver box, select Pressure Based.

Click OK.

Define > Models > Viscous

Select nviscid under Model.


Click OK.

Define > Models > Energy

The speed of sound under SSL conditions is 34 m/s so that our freestream Mach number is
around .15. This is low enough that we'll assume that the flow is incompressible. So the energy
equation can be turned off.

Make sure there is no check in the box next to Energy Equation and click OK.

Define > Materials

Make sure air is selected under Fluid Materials. Set Density to constant and equal to 1.225
kg/m3.

Click Change/Create.

Define > Operating Conditions


*e'll work in terms of gauge pressures in this example. So set AVerating Pressure to the
ambient value of 1 1,325 Pa.

Click OK.

Define > Boundary Conditions

Set farfield1 and farfield2 to the velocity-inlet boundary type.

For each, click Set.... Then, choose Components under Velocity Specification Method and set the
x- and y-components to that for the freestream. For instance, the x-component is
5 *cos(1.2)D49.99. (Note that 1.2° is used as our angle of attack instead of 2° to adjust for the
error caused by assuming the airfoil to be 2D instead of 3D.)

Click OK.

Set farfield3 to pressure-outlet boundary type, click Set... and set the Gauge Pressure at this
boundary to . Click OK.

 $%&
Solve > Control > Solution

Take a look at the options available.

Under Discretization, set Pressure to PRESTO! and Momentum to Second-Order Upwind.

Click OK.

Solve > Initialize > Initialize...

As you may recall from the previous tutorials, this is where we set the initial guess values (the
base case) for the iterative solution. Once again, we'll set these values to be equal to those at the
inlet (to review why we did this look back to the tutorial about CFG programs) . Select farfield1
under ComVute From.

Click nit.

%-
 -)
 000
Now we will set the residual values (the criteria for a good enough solution). Once again, we'll
set this value to 1e- 6.

Click OK.

%-
 -# 000

Under Coefficient, choose Lift. Under Options, select Print and Plot. Then, Choose airfoil under
*all Zones.

Lastly, set the Force Vector components for the lift. The lift is the force perpendicular to the
direction of the freestream. So to get the lift coefficient, set X to -sin(1.2°)D- 2 942 and Y to
cos(1.2°)D .999.
Click Apply for these changes to take effect.

Similarly, set the Force Monitor options for the Drag force. The drag is defined as the force
component in the direction of the freestream. So under Force Vector, set X to cos(1.2°)D .999
and Y to sin(1.2°)D . 2 942 Turn on only Print for it.

) -)   r 

Now, set the reference values to set the base cases for our iteration. Select farfield1 under
Compute From.

Click OK.
Note that the reference Vressure is zero, indicating that we are measuring gage Vressure.


-#
-1
- 000

Save the case file before you start the iterations.

%-  

Make note of your findings, make sure you include data such as;

*hat does the convergence plot look like?

How many iterations does it take to converge?

How does the Lift coefficient compared with the experimental data?


-#
-1
- 2- 000

Save case and data after you have obtained a converged solution.

 ' () 
Plot Velocity Vectors

Let's see the velocity vectors along the airfoil.

-
 -r  

Use the default setting by clicking Display.

(Click picture for larger image)


As can be seen, the velocity of the upper airfoil is faster than the velocity on the lower airfoil.

(Click picture for larger image)

On the leading edge, we see a stagnation point where the velocity of the flow is nearly zero. The
fluid accelerates on the upper surface as can be seen from the change in colors of the vectors.

(Click picture for larger image)

On the trailing edge, the flow on the upper surface decelerates and converge with the flow on the
lower surface.

Plot Pressure Coefficient

?  

 is a dimensionless parameter defined by the equation

where is the static pressure, is the reference pressure, and is the reference dynamic
pressure defined by . The reference pressure, density, and velocity are defined in the
)   r  panel in Step 5. Please refer to FLUENT's help for more information. Go to
Help > User's Guide Index for help.

? -34? 000

Change the Y Axis Function to Pressure..., followed by Pressure Coefficient. Then, select airfoil
under Surfaces.

Click Plot.

(Click picture for larger image)

The negative part of the plot is upper surface of the airfoil as the pressure is lower than the
reference pressure.

Plot Pressure Contours

Plot static pressure contours.


-
 -  000

Select Pressure... and Static Pressure from under Contours Of. Click Display. Check also the
Filled and Draw Grid under Options menu.

(Click picture for larger image)

From the figure, we see that in one grid, there is no more than 3 different pressure contours
which suggests that our mesh is fine enough.

How can we compare the pressure contour with velocity vector plot? *e see that the pressure on
the upper surface is negative while the velocity on the upper surface is higher than the reference
velocity. *henever there is high velocity vectors, we have low pressures and vise versa. The
phenomenon that we see comply with the Bernoulli equation.

Comparisons
*ith our simulation data, we can now compare the Fluent with experimental data. The summary
of result is shown in the table.

c
CL
c
)*'+ c
c c
;$

c c
c

c c @c
 *)

**Under construction**

? 
Consider the incomVressible, inviscid airfoil calculation in FLEN presented in class. Recall
that the angle of attack, Į, was 5°.

Repeat the calculation for the airfoil for Į D ° and Į D 1 °. Save your calculation for each angle
of attack as a different case file.

(a) Graph the pressure coefficient (CV) distribution along the airfoil surface at Į D 5° and Į D 1 °
in the manner discussed in class (i.e., follow the aeronautical convention of letting CV decrease
with increasing ordinate (y-axis) values).

*hat change do you see in the CV distribution on the upper and lower surfaces as you increase
the angle of attack?

*hich part of the airfoil surface contributes most to the increase in lift with increasing Į?

ë
  The area under the CV vs. x curve is approximately equal to Cl.

(b) Make a table of Cl and Cd values obtained for Į D °, 5°, and 1 °. Plot Cl vs.Į for the three
values of Į. Make a linear leastsquares fit of this data and obtain the slope. Compare your result
to that obtained from inviscid, thinairfoil theory:

where Į is in degrees.

? 
Repeat the incompressible calculation at Į D 5° including viscous effects. Since the Reynolds
number is high, we expect the flow to be turbulent. Use the k-İ turbulence model with the
enhanced wall treatment option. At the farfield boundaries, set turbulence intensityD1% and
turbulent length scaleD . 1.

(a) Graph the pressure coefficient (CV) distribution along the airfoil surface for this calculation
and the inviscid calculation done in the previous problem at Į D 5°. Comment on any differences
you observe.
(b) Compare the Cl and Cd values obtained with the corresponding values from the inviscid
calculation. Discuss briefly the similarities and differences between the two results.

Forced Jonvection over a Flat Plate


c

c
8cA%%
cc
c-!

cc
c
c


c
c

c

cc   c
!c
c

cc   c
"c#$
%c c $
cc   c
&c#
c'$c(
cc)*'+ c
,c#-
.c
/c 0
c
 c
1c
%
c
c
c

? 





In our problem, we have a flat plate at a constant temperature of 413K. The plate is infinitely
wide. The velocity profile of the fluid is uniform at the point x D . The free stream temperature
of the fluid is 353K. The assumption of incompressible flow becomes invalid increasingly less
valid for larger temperature differences between the plate and freestream. Because of this, we
will treat this as a compressible flow. *e will analyze a fluid flow with the following non-
dimensional conditions:

In order to achieve these flow conditions, we will use these free stream flow conditions:
According to the ideal gas law, this temperature and pressure result in the following freestream
density:

These flow conditions do not necessarily represent a realistic fluid. Rather, they are chosen to
provide the Prandtl and Reynolds numbers specified above. This will make calculations simpler
throughout this tutorial.

Solve this problem in FLUENT. Validate the solution by plotting the y+ values at the plate. Also
plot the velocity profile at x D 1m. Then plot Reynolds Number vs. Nusselt Number. Compare
the accuracy of your results from FLUENT with empirical correlations.

? 

  

*e expect the turbulent boundary layer to grow along the plate. As the boundary layer grows in
thickness, the rate of heat transfer (q'') and thus the heat transfer coefficient (h) will decrease.

*e will compare the numerical results with experimentally-derived heat transfer correlations.
*e will create the geometry and mesh in GAMBIT, read the mesh into FLUENT, and solve the
flow problem.
    

Start GAMBIT & Select Solver

Specify that the mesh to be created is for use with FLUENT 6:

c
c2c#-
c2c)*'+ c,?/c

Verify this has been done by looking in the ranscriVt Window where you should see:

The boundary types that you'll be able to select in the third step depends on the solver selected.

Strategy for creating flow field geometry

In creating the geometry for our flow field we must consider what is necessary for our model to
approximate real flow. A boundary layer grows along the plate, which must satisfy the no slip
condition. The flow velocity at the plate must be zero. Continuity requires that this condition
gives rise to a y-velocity. Although the y-velocity is significantly smaller in magnitude than the
x-velocity, it can affect the solution significantly if not taken into consideration when creating
the geometry of the flow field.

*************************************************************

*e will put the origin of the coordinate system at the lower left corner of the rectangle that
defines our flow field. The coordinates of the corners are shown in the figure below:

*e will first create four vertices at the four corners and join adjacent vertices to get the edges of
the rectangle. *e will then form a face that covers the area of the rectangle.

  r

*e will treat this problem as a 2-dimensional problem by assuming that the plate is infinitely
wide. Let's begin by creating the vertices that define our flow region.

A$
c $c2c

cc c 2c5

;cc c 2c

c5

;c
c

Note that the Create Verte  button has already been selected by default. After you select a button
under a sub-pad, it becomes the default when you go to a different sub-pad and then come back
to the sub-pad.

Create the vertex at the lower-left corner of the rectangle:


Next to x:, enter value . Next to y:, enter value . Next to z:, enter value (these values should
be defaults). Click Apply.

This creates the vertex ( , , ) which is displayed in the graphics window.

In the ranscriVt window, GAMBIT reports that it "Created vertex: vertex.1". The vertices are
numbered vertex.1, vertex.2 etc. in the order in which they are created.

Repeat this process to create three more vertices:


Vertex 2: (1, , )
Vertex 3: (1,1, )
Vertex 4: ( ,1, )

Note that for a 2D problem, the z-coordinate can always be left to the default value of .

Operation Toolpad > Global Control > Fit to *indow Button

This fits the four vertices of the rectangle we have created to the size of the araVhics Window.

(click picture for larger image)


Another useful button on the Operation Toolpad is the Orient Model button . If you click and
hold the left mouse button and then move the mouse, the model will rotate 3-dimensionally. This
is, of course, not usually a helpful feature when creating 2-D models in a MB . Click the
Orient Model button to make the z-axis normal to the page again.

   +

An edge is created by selecting two vertices and creating a line between them.

Operation Toolpad > Geometry Command Button > Edge Command Button > Create
Edge

Click the up arrow button next to the vertices box in the Create traight Edge window.

This brings up a list of vertices, from which vertices 1 and 2 can be selected. Select Vertex.1 and
Vertex.2. Then push the right arrow button to bring these vertices into the Picked column.
Click Close. Then click Apply in the Create traight Edge window to create this edge.

Alternately, these vertices can be selected by holding down the Shift button and clicking on the
corresponding vertices. As each vertex is picked, it will appear red in the araVhics Window.
Then let go of the Shift button and click Apply in the Create traight Edge window.

Repeat this process to create edges between vertices 2 & 3, vertices 3 & 4, and vertices 4 & 1.

(click picture for larger image)

Create Face
A$
c $c2c

cc c 2c)
cc c 2c)c)
c c

To form a face out of the area enclosed by the four lines, we need to select the four edges that
enclose this area. This is done in much the same way as when we selected the vertices.

Click the up arrow button next to the vertices box in the Create Face From Wireframe
window. Then push the All right arrow button to bring these vertices into the Picked
column.
Click Close. Then click Apply in the Create Face From Wireframe window to create the face.
The edges and vertices will become blue, indicating that they now form a face.

(click picture for larger image)

 %
Save your a MB  file in your working directory.

c
c2c)
c2c#-
c c2c 8
cc

Find your working directory and save your a MB  file there. Make sure to enter the file name,
plate.dbs, in the Selection box in addition to the path.

  

*e'll now create a mesh on the rectangular face with 1 divisions in the vertical direction and
3 divisions in the horizontal direction. *e'll first mesh the four edges and then the face. The
desired grid spacing is specified through the edge mesh.

Mesh Edges
A$
c $c2c
cc c 2c3
cc c 2c
c3
c c

Mesh Strategy

In creating this mesh, it is desirable to have more cells near the plate (Edge 1) because we want
to resolve the turbulent boundary layer, which is very thin compared to the height of the flow
field.
Click the up arrow button next to the Edges box in the Mesh Edges window. Select edge
Edge.2. Then push the right arrow button to bring this vertex into the Picked column.
Notice that the arrow on the selected edge should be pointing upwards. An upwards pointing
arrow indicates the direction of closely spaced nodes to widely spaced nodes. Remember, we
will need more closely spaced nodes near the boundary layer in order to resolve it accurately.

The proper arrow direction is necessary to ensure a proper mesh. Select Edge.4 in the Mesh
Edges window. The arrow on this edge is pointing downwards, which needs to be changed. Shift
+ Middle-click on the selected edge to change the direction of the arrow to upward.

Under yVe, select Successive Ratio, if it is not already selected. Set Ratio to 1. . Under
Vacing, select Interval Count. Set Interval Count to 1 and then click Apply.

Select Edge.1 and Edge.3 in the Mesh Edges *indow. The direction of the arrows on these
edges is irrelevant because the divisions will be the same length. Leave the Successive Ratio set
to 1 and set the Interval Count to 3 . Click Apply.

(click picture for larger image)


Mesh Face
A$
c $c2c
cc c 2c)
cc c 2c
c)
c c

Shift left-click on the face or use the up arrow next to Faces to select the face. Click Apply.

(click picture for larger image)

 
 

Create Boundary Types

*e'll next set the boundary types in a MB . The left edge is the inflow of the flow field, the
right edge the outflow, the top edge the open top of the flow field, and the bottom edge the plate.

A$
c $c2c4
cc c 2c#$
%c c $
cc c c

This will bring up the Vecify Boundary yVes window on the AVeration Panel. *e will first
specify that the left edge is the inflow. Under Entity:, pick Edges so that a MB  knows we
want to pick an edge (face is default).

Now select the left edge by Shift-clicking on it. The selected edge should appear in the yellow
box next to the Edges box as well as the Label/Type list under the Edges box.

Next to Name:, enter inflow.

For yVe:, select VELOCITY_INLET. You may have to move the Vecify Boundary yVes box
up in order to see the bottom of the list and select VELOCITY_INLET.
Click Apply. You should see the new entry appear under Name/Type box near the top of the
window.

Repeat this process for the other three edges according to the following table:

3
c( c +
c $
c

*
%c %8c 5*A 67+* c

3c %8c (##'7A' * c

$c $c #6 6c


c $
c 9 **c

You should have the following edges in the Name/yVe list when finished:

Save and Export


c
c2c)
c2c#-
cc

c
c2c)
c2c;$c2c
cc

Type in plate.msh for the File Name:. Select Export 2d Mesh because this is a 2 dimensional
mesh. Click Accept.

It is important to check that plate.msh has been created in your working directory. a MB  may
periodically fail to write the .msh file. If this should happen, simply try writing the .msh file to
another directory and then coping it into your working directory.

 ! "? 


#"0
aunch Fluent 6.0
#c2c(3 c2c)
cc2c)*'+ c/@cc

Select the 2ddp version and click Run.

The "2ddp" option is used to select the 2-dimensional, double-precision solver. In the double-
precision solver, each floating point number is represented using 64 bits in contrast to the single-
precision solver which uses 32 bits. The extra bits increase not only the precision but also the
range of magnitudes that can be represented. The downside of using double precision is that it
requires more memory.

Import Grid
c
c2c)
c2c
c2c
c

Navigate to the working directory and select the plate.msh file. This is the mesh file that was
created using the preprocessor a MB  in the previous step. FLUENT reports the mesh statistics
as it reads in the mesh:
Check the number of nodes, faces (of different types) and cells. There are 3 quadrilateral
cells in this case. This is what we expect because we used 3 divisions in the horizontal direction
and 1 divisions in the vertical direction while generating the grid. So the total number of cells
is 3 *1 D 3 .

Also, take a look under zones. *e can see the four zones inflow, outflow, top, and plate that we
defined in a MB .

Check and Display Grid

First, we check the grid to make sure that there are no errors.

c
c2cc2c
 cc

Any errors in the grid would be reported at this time. Check the output and make sure that there
are no errors reported. Check the grid size:

c
c2cc2c%c2c#0
cc

The following statistics should appear:

c
Display the grid:

c
c2c< $c2ccc

Make sure all 5 items under urfaces are selected.

Then click Display. The graphics window opens and the grid is displayed in it. Your grid should
look like this:

(click picture for larger image)

Define Solver Properties


c
c2c<
%
c2c
 c2c#-
cc
*e'll use the defaults of 2D space, segregated solver, implicit formulation, steady flow and
absolute velocity formulation. Click OK.

c
c2c<
%
c2c
 c2c
3cc

*e are interested in solving the temperature distribution, so we need to solve the energy
equation. Select the Energy Equation and click OK to exit the menu.

c
c2c<
%
c2c
 c2c5  cc

Under Model, select the k-epsilon turbulence model. *e will use the Realizable model in the k-
epsilon Model box. The Realizable k-epsilon model produces more accurate results for boundary
layer flows than the Standard k-epsilon model. In the Near-Wall reatment box, observe the
Enhanced *all Treatment option, which deals with the resolution of the boundar layer in our
model. There are 3 regions in the boundary layer that we are concerned with, starting at the wall:
1. Laminar sublayer (y+ < 5)

2. Buffer region (5 < y+ < 3 )

3. Turbulent region (y+ > 3 )

y+ is a mesh-dependent dimensionless distance that quantifies to what degree the wall layer is
resolved. After solving this problem in FLUENT, we will observe the value of y+ for each mesh
we use. The Enhanced *all Treatment option serves to more accurately resolve the boundary
layer in the case when the mesh is only fine enough to resolve to the turbulent region (y+ > 3 ).
Enhanced *all Treatment also improves the accuracy of meshes that can only be resolved to the
Buffer region (5< y+ < 3 ). However, solutions with y+ values in the buffer region are generally
less accurate than if the solution is resolved to one of the other 2 regions. Look at FLUENT Help
section 1 .9, arid Considerations for urbulent Flow imulations, for more details.

For our mesh, FLUENT will be able to resolve the laminar sublayer, thus Enhanced *all
Treatment does not improve the accuracy of our solution with our mesh. It will however make a
difference in Step 7 when we use a less refined mesh. The thickness of the boundary layer is
significantly smaller than the height of our flow field. Resolving the solution to the laminar
sublayer is computationally intensive, especially in high Reynolds Number flows. Resolving to
the turbulent region is often the only reasonable option. Thus it is good practice to always use
Enhanced *all Treatment when dealing with a boundary layer. Although it is not necessary with
the current mesh, it will be necessary for the less refined mesh later on, so go ahead and select
Enhanced *all Treatment now.

Select Thermal Effects in the Enhanced Wall reatment AVtions box to include the thermal
terms in the Enhanced *all Treatment equation.

The values in the Model Constants box are constants used in the k-epsilon turbulence equations.
These values for the Model Constants are well-accepted for a wide range of wall-bounded shear
flows. Leave all values in the Model Constants box set to their default values.

Click OK.
Define Material Properties
c
c2c<
%
c2c
 cc

Change Density to ideal gas because we are treating the flow as compressible. FLUENT will
calcualte the density of the flow at each point based on the pressure and temperature it calculates
at that point. Leave Cp set as the default value of 1 6.43. Change Thermal Conductivity to
9.45 5 e-4. Change Viscosity to 6.667e-7. Scroll down to see Molecular *eight. Leave
Molecular *eight set to the default value of 2.966. These are the values that we specified under
Problem Specification.
c

Click Change/Create. Simply clicking close without clicking Change/Create will cause these
properties to revert back to their default values.

Define Operating Conditions


c
c2c<
%
c2cA$
3c cc

For all flows, FLUENT uses gauge pressure internally. Any time an absolute pressure is needed,
it is generated by adding the operating pressure to the gauge pressure. *e'll use the default value
of 1 atm (1 1,325 Pa) as the Operating Pressure.

Click Cancel to leave the default value in place.

Define Boundary Conditions

*e'll now set the value of the velocity at the inflow and pressure at the outflow.
c
c2c<
%
c2c c cc

*e note here that the four types of boundaries we defined are specified as zones on the left side
of the Boundary Conditions Window. There are also 2 zones default-interior fluid, used to define
the interior of the flow field. *e will not need to change any setting for these 2 zones.

Move down the list and select inflow under Zone. Note that FLUENT indicates that the yVe of
this boundary is velocity-inlet. Recall that the boundary type for the inflow was set in GAMBIT.
If necessary, we can change the boundary type set previously in a MB  in this menu by
selecting a different type from the list on the right. Click Set....

Enter 1 for Velocity Magnitude. This sets the velocity of the fluid entering at the left boundary to
a uniform velocity profile of 1m/s. Set emVerature to 353K. Change urbulence Vecification
Method to Intensity and Viscosity Ratio. Set urbulence ntensity to 1 and urbulent Viscosity
Ratio to 1. Click OK.

Choose outflow under Zone. The yVe of this boundary is pressure-outlet. Click Set.... The
default value of the Gauge Pressure is . The (absolute) pressure at the outflow is 1 atm. Since
the operating pressure is set to 1 atm, the outflow gauge pressure D outflow absolute pressure -
operating pressure D . Because we do not expect any backflow, we do not need to set any
backflow conditions. Click Cancel to leave the defaults in place.
Click on plate under Zones and make sure yVe is set as wall. Click Set.... Because we have a
heated isothermal plate, we need to set the temperature. On the Thermal tab, select Temperature
under hermal Conditions. Change emVerature to 413. The material selected is inconsequential
because the plate has zero thickness in our model, thus the material properties of the plate do not
affect the heat transfer properties of the plate. Click OK.
The last boundary condition to set is for the top of the flow field. Click on top under Zones and
make sure yVe is set as symmetry. Click Set... to see that there is nothing to set for this
boundary. Click OK.

Click Close to close the Boundary Conditions menu.

 $%&
*e'll use a second-order discretization scheme.

c
c2c#-
c2c c2c#cc

Change Density, Momentum, Turbulence Kinetic Energy, Turbulence Dissipation Rate, and
Energy all to Second Order Upwind. Leave Pressure and Pressure-Velocity CouVling set to the
default methods (Standard and SIMPLE, respectively). The other Pressure and Pressure-Velocity
CouVling methods are useful for flows with particular characteristics not present in our problem.

Click OK.

Set Initial Guess

Initialize the flow field to the values at the inflow:


c
c2c#-
c2c0
c2c0
cc

In the olution nitialization window that comes up, choose inflow under ComVute From. The X
Velocity for all cells will automatically be set to 1 m/s, the Y Velocity to m/s and the Gauge
Pressure to Pa. These values have been taken from the inflow boundary condition.

Click Init. This completes the initialization. Then click Close.

Set Convergence Criteria

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. *e will
iterate until the residual for each equation falls below 1e-6.

c
c2c#-
c2c c2c
cc

Change the residual under Convergence Criterion for continuity, x-velocity, and y-velocity,
energy, k, and epsilon all to 1e-6.

Also, under Options, select Print and Plot. This will print the residuals in the main window and
plot the residuals in the graphics window as they are calculated.
Click OK.

This completes the problem specification. Save your work:

c
c2c)
c2c9
c2c
cc

Type in plate.cas for Case File. Click OK. Check that the file has been created in your working
directory. If you exit FLUENT now, you can retrieve all your work at any time by reading in this
case file.

Iterate Until Convergence

Start the calculation by running 1 , iterations. The solution will converge before 1 ,
iterations are performed, which will stop the iteration process.

c
c2c#-
c2c

cc

In the terate *indow, change the Number of Iterations to 1 . Click Iterate.


The residuals for each iteration are printed out as well as plotted in the graphics window as they
are calculated.

(Click picture for larger image)

The residuals fall below the specified convergence criterion of 1e-6 in approximately 1623
iterations.
Save the solution to a data file:

c
c2c)
c2c9
c2c<cc

Enter plate.dat for Data File and click OK. Check that the file has been created in your working
directory. You can retrieve the current solution from this data file at any time.

 ' () 
y+

Turbulent flows are significantly affected by the presence of walls. The k-eVsilon turbulence
model's validity is grid-independent away from walls but requires verification to make sure it is
valid when used near walls. The near-wall model is sensitive to the grid resolution, which is
assessed in the wall unit y+, as discussed in Step 4.

First, we need to set the reference values needed to calculate y+.

c
c2c
$c2c
%


c5
cc

Select inflow under Compute From to tell FLUENT to use values at the inflow for the reference
values. Check that the reference value for velocity is 1 m/s, temperature is 353 K, and coefficient
of viscosity is 6.667e-7 kg/m-s as given in the Problem Specification. These reference values will
be used to non-dimensionalize the distance of the cell center from the wall to obtain the
corresponding y+ values. Click OK.
By using the following method, plot y+ values for wall-adjacent cells to check how they
compare with the recommendation mentioned above.

c
c2c(c2c:6c(cc

Make sure that Position on X Axis is set under Options, that 1 is the value next to X, and is the
value next to Y under Plot Direction. Recall that this tells FLUENT to plot the x-coordinate
value on the abscissa of the graph. Select Turbulence... under Y Axis Function and select *all
Yplus from the drop down list under that. Since we want the y+ value for cells adjacent to the
wall of the pipe, choose plate under Surfaces.
Click Plot.

(Click picture for larger image)


As we can see, the wall y+ value is between 1. and 1.4 (ignoring the anamolous at the inflow).
Because these values are less than 5, the near-wall mesh resolution is in the laminar sublayer,
which is the most accurate region to which we can resolve the boundary layer.

Save Plot

In the olution XY Plot Window, check the *rite to File box under Options. The Plot button
should have changed to the *rite... button. Click on *rite.... Enter yplus.xy as the filename and
click OK. Check that this file has been created in your FLUENT working directory.

Velocity at x = 1m
c
c2c(c2c:6c(cc

Under AVtions, unselect Position on X Axis and select Position on Y Axis. Under Plot Direction,
enter in the X box and 1 in the Y box. This tells FLUENT to plot a vertical rather than
horizontal profile.

Under X Axis Function, pick Velocity... and then in the box under that, pick X Velocity. Finally,
select outflow under Surfaces since we are plotting the velocity profile at the outflow. De-select
plate under Surfaces.

Click on Axes... in the olution XY Plot window. Select X in the  is box. In the AVtions box
select Major Rules to turn on the grid lines in the plot. Click Apply. Then select the Y in the  is
box, select Major Rules again, and turn off Auto Range. In the Range box enter .1 for the
Ma imum so that we may view the velocity profile in the boundary layer region more closely.
Click Apply and Close.

Uncheck *rite to File. Click Plot.

(Click picture for larger image)


*e notice here that the x velocity reaches 1 m/s at approximately y D . 2 m. This shows the
relative thinness of the boundary layer compared to the length scale of the plate. *e also notice
that the velocity profile is slightly greater than 1 m/s above the boundary layer. *e know this
would not happen in real flow, rather it is a result of the boundary condition we have chosen for
our model. *e chose the Symmetry boundary condition at the top of our flow field, which is
essentially a wall without the no-slip condition. Thus, no flow is permitted to escape through this
boundary.

In a real external flow, there is no such boundary at the top and flow is permitted to pass through
freely. *hen we consider the inflow and outflow velocity profiles in terms of conservation of
mass, the uniform velocity profile of 1 m/s at x D has more mass entering the flow field than
the non-uniform velocity profile at x D 1m, in which the velocity is lower near the plate. In
addition, the fluid is expanding near the plate because its temperature is increasing, further
increasing the y-velocity of the fluid above it. These factors require that some mass must escape
through the top of our flow field in order to satisfy conservation of mass.

Choosing a Pressure Outlet for the top boundary condition would represent real external flow
more accurately. Unfortunately, this cannot be used in our flow field without encountering
convergence problems, so selecting the Symmetry boundary condition was the next best option.
Because we are not allowing flow to escape through the top boundary, we observe an outflow
velocity profile in which outflow velocity is greater than 1 above the boundary layer in order to
satisfy conservation of mass. Fortunately, the inaccuracies resulting from the model we chose
have no significant effect on the heat transfer coefficients at the plate.

Select *rite to File and save the data for this plot as outflow_profile.xy.
Plot Nusselt Number vs. Oeynolds Number

Recall that the Nusselt Number is a non-dimensional heat transfer coefficient that relates
convective and conductive heat transfer.

In order to obtain the Nusselt Number from FLUENT, we will begin by plotting Total Surface
Heat Flux.

Main Menu > Plot > XY Plot...

In the AVtions box, change back to Position on X Axis. In the Plot Direction box, enter the
default values of 1 in the X box and in the Y box. Under Y-  is Function choose *all Fluxes.
In the box below, chose Total Surface Heat Flux. Select Plate under urfaces. Before plotting, be
sure to turn on Auto Range for the Y axis under Axes....

Click Plot.
(click picture for larger image)

Now Select *rite to File. Save the data for this plot as heatflux.xy. Click *rite....

Open the file heatflux.xy using *ordpad or a similar application. You can simply copy and paste
the data into Excel.
If Excel does not automatically separate the data into columns, separate it by selecting the
column of data and then using the Text to Columns function:

c
c2c<c2c
;cc cc

The first column is the x location on the plate and the second column is the total surface heat flux
(q'') at the corresponding x location. *e now need to determine the Nusselt number from these
values at each x location. *e will define positive q'' as heat transfer into the fluid. Use the
following expression to convert q'' to Nusselt Number in your Excel spreadsheet.

Reynolds Number can be defined at each x location by


Now plot Re vs. Nu in Excel. Your plot should look like this:

(click picture for larger image)

Compare Oesults with Correlation & Experiment

Validate your results form FLUENT by comparing to a correlation and experimental results. The
correlation we will use is derived by Reynolds [1]:

All properties in this correlation are evaluated at the free-stream static temperature of 3 K.This
correlation assumes the following:

1. Pr D .7

2. 1 5 < Re < 1 7

3. Fluid properties evaluated at free-stream conditions


4. Turbulent compressible boundary layer

5. Flat plate

6. Friction factor calculated from the following relation (implicit in Nu equation above, does not
need to be calculated in your analysis):

Add the Reynolds correlation for Nusselt Number to your Excel spreadsheet.

Seban & Doughty [2] performed a heated flat plate experiment for which they derived the
following expression for Nusselt Number:

The Seban & Doughtyexperiment was performed with air as the fluid (Pr D .7) and at various
Reynolds Numbers in the range 1e5 < Re < 4e6. Add the this experimental relation for Nusselt
Number to your Excel spreadsheet.

Now plot and compare Re vs. Nu from FLUENT, the Reynolds Correlation, and Seban's
experiment.
(click picture for larger image)

As we can see, there is very little variation between these 3 results. The largest % error between
the FLUENT results and the Reynolds correlation is only 7.5%. In turbulent flow as we have
here, similar results between FLUENT and correlation are more difficult to come by than in
laminar flow because a turbulent model must be used in FLUENT, which does not solve the
Navier-Stokes Equations exactly. Experimental error (in experiments from which correlations
are derived) also accounts for some of this 7.5% error. Each of the turbulence models that
FLUENT offers produces results similar to these, although the k-epsilon model is the most
appropriate model to use in this case.

 *)

It is very important to assess the dependence of your results on the mesh used by repeating the
same calculation on different meshes and comparing the results. *e will re-do the previous
calculation on a 3 x 5 mesh as well as a 3 x 15 mesh and then compare the results with the
3 x1 mesh used previously.

Modify Mesh in GAMBIT to a 30x50 mesh

The 3 x1 mesh is saved as Vlate.dbs in your working directory. Bring up the command prompt
window as in step 1. To copy Vlate.dbs to Vlate5[.dbs, at the command prompt, type
coVy Vlate.dbs Vlate5[.dbs
*e will work with Vlate5[.dbs in order to retain Vlate.dbs as is. Launch a MB  with
Vlate5[.dbs as the input file by typing:
gambit plate5 .dbs

Follow the same method as in previous tutorials to change the mesh. The face mesh will be
automatically deleted when you re-mesh the edges. The top and bottom edges will remain the
same.

Mesh the inflow and outflow edges at a Successive Ratio of 1. 95 and an Interval Count of 5 .

Remesh the face and then export this as the 2D mesh file, plate5 .msh.

Read the file into FLUENT and repeat step 4 and step 5 of this tutorial to set up and solve the
problem in FLUENT. The solution should converge in approximately 115 iterations. Plot y+ at
the plate as explained in step 6.
(click picture for larger image)

y+ ranges from 29 to 5 in this plot. This is (mostly) outside of the ill-defined Buffer region (5 <
y+ < 3 ) and is thus acceptable.

Now use the Total Surface Heat Flux plot to determine Nu(x). Plot Re vs. Nu and compare with
the 3 x1 mesh results.
(click picture for larger image)

*e can see that the courser mesh produces slightly different results, although they are still
reasonable. Some numerical error is introduced when the less-refined 3 x5 mesh is used. As
one would expect, resolving the boundary layer to the laminar sublayer, which we did with the
orignial mesh, produces more accurate results than resolving only to the turbulent region.
Resolving to the laminar sublayer is not always a reasonable thing to do, especially at high
Reynolds numbers. The results from using the 3 x 5 grid show that a reasonable solution can
still be obtained without resolving down to the laminar sublayer.

Modify Mesh in GAMBIT to a 30x150 mesh

Create a mesh that is finer than the original mesh to see if our original solution contained
inaccuracies due to the mesh. Mesh the inflow and outflow edges at a Successive Ratio of 1. 65
and an Interval Count of 15 .
Remesh the face and then export this as the 2D mesh file, plate15 .msh.

Read the file into FLUENT and repeat step 4 and step 5 of this tutorial to set up and solve the
problem in FLUENT. The solution should converge in approximately 455 iterations. Plot y+ at
the plate.
(click picture for larger image)

y+ ranges from .14 to .25 in this plot, well within the laminar sublayer.

Now use the Total Surface Heat Flux plot to determine Nu(x). Plot Re vs. Nu and compare with
the 3 x1 mesh results.
(click picture for larger image)

This plot shows that the results did not change by increasing the fineness of the mesh. Thus, we
can conclude that our 3 x1 mesh was good enough. It is also important to verify that the
solution does not change by refining the mesh in the streamwise direction. In this case, the mesh
in the streamwise direction is already fine enough to eliminate mesh-dependent numerical error.

You might also like