You are on page 1of 262

1

ANSYS WB - 2D Steady Convection


Problem Specification
A fluid enters a pipe of radius 0.06 meters at a constant velocity of 0.1 m/s. The fluid has a density of 1.2
kg/m^3, a thermal conductivity of 0.02 W/mK, a specific heat of 1000 J/kgK, and a viscosity of 1.8e-5 kg/ms.
The first 5.76 meters of the pipe are isothermal, held at 300 K. The remaining 2.88 meters of the pipe have a
constant heat flux of 37.5 W/m^2 added at the wall.

Pre-Analysis & Start-Up


Boundary Value Problem
We will assume that the flow is axisymmetric. This means that in cylindrical coordinates (r, , z), there is no
variation in the circumferential direction (). So the geometry in the simulation is a rectangle as shown below.
Revolving the rectangle 360 degrees about the axis gives the full 3D pipe geometry. We need to solve a
boundary value problem. The governing equations for this problem are conservation of mass, conservation of
momentum (in r and z directions), and conservation of energy. The governing equations and boundary conditions
are shown below. We will solve this boundary value problem numerically using the ANSYS FLUENT solver.

Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going to Start > ANSYS
> Workbench. This will open the start up screen seen as seen below

Screen Management

This tutorial is designed such that the user can have both ANSYS Workbench and the tutorial open. As shown
below, this online tutorial should fill approximately 1/3 of the screen, while ANSYS Workbench fills the
remaining 2/3 of the screen.

Setup Project

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of the start up
window, you will see the Toolbox Window. Take a look through the different selections. We will be using
FLUENT to complete the simulation. Load the Fluid Flow (FLUENT) box by dragging and dropping it into the
Project Schematic.

Right click the top box of the project schematic


and go to Rename, and name the project
2D Steady Convection.You are ready to create the geometry for the simulation.

Geometry
Overview

The geometry is created in the following steps:


-Sketch: Sketch the rectangle
-Split edges: Split the horizontal edges to demarcate the unheated and heated sections.
-Dimension edges
-Create "Surface Body": Create a "Surface Body" from the sketch. This is analogous to, say, extruding a sketch
to create a 3D body. We always go from a "sketch" to a "body" in DesignModeler. Here the "body" is 2D and
referred to idiosyncratically as "Surface Body".

Specify Geometry as 2D

First, we need to specify that the geometry is 2-dimensional. Right click the Geometry box
and
select Properties. This will open the Properties of Schematic A2: Geometry Window. Under Advance Geometry
Options change Analysis Type from 3D to 2D.

After the analysis type has been set, you can dismiss the Properties window. We are now ready to launch
DesignModeler, the drawing tool in ANSYS. Open DesignModeler by double-clicking the geometry box
. Twiddle your thumbs until the DesignModeler window comes up. You will be prompted to
choose a standard unit of measurement. Select Meter as the standard unit, and click OK.
Sketching

We want to sketch on the XY plane. To look at the XY plane, click the positive Z-Axis on the compass in the
Graphics window.

Look to the left and you'll see the Tree Outline window. To sketch on the XY plane, highlight XYPlane in the
Tree Outline window.To begin sketching, click on the Sketching tab at the bottom of the Tree Outline window.
To draw our domain, we will use the Rectangle tool. Click on
in the Sketching Toolboxes window.
In the blue graphics window, draw the rectangle by first clicking on the origin (make sure the P icon is showing,
meaning the cursor is coincident with a "P"oint, in this case the origin). Then select a point in the 1st quadrant.

Because the wall has two sections, an isothermal section and a heated section, we will need to split the upper
edge. To split the edge, select the Modify tab in the Sketching Toolboxes window, and select
. Next,
click any point along the upper surface of the rectangle. This will split the line into 2 segments.

It turns out that to get a nice regular mesh, the bottom edge should also be split in the same way. So split the
bottom edge as well (don't worry about the location, we'll adjust that next).
Now we will make the second segment of each edge to be of the same length (this will automatically ensure that
the first segments are also of the same length). Go to the Constraints tab and select "Equal Length." Click on the
top, right partition first. Then click on the bottom right partition. This will make these segments the same length
ensuring that both the top and bottom edges are split at the same location. If you made a mistake,there is an undo
button at the top left (caveat: this undo button works only in the sketching mode).
Dimensioning

The next step in creating the domain will be adding dimensions. In the Sketching Toolboxes window, select
Dimensions > General. First, click the left segment of the upper edge of the rectangle, then drag the cursor to
place the dimension above the line. Repeat this process for the right segment of the upper edge. Last, dimension
the left edge as shown below.

We can set the dimension in the Details View window. In the Details View window, change H1 to 5.76, H2 to
2.88, and V3 to .06. You can zoom in/out using the middle mouse wheel. You can move the dimensions by
selecting Dimensions > Move and then dragging the labels by grabbing them with the mouse.
Surface from Sketches

Recall that we need to create a 2D "Surface Body" from the sketch. To accomplish this, look to the top menu and
select Concept > Surfaces From Sketches.
7

Next, click any edge on the sketch in the Graphics window. This will select the corresponding sketch. In the
Details View window, select Base Objects > Apply. Now the program knows from which sketch to create the
surface.

Click Generate
to create the surface. The geometry of the domain, if you have followed the tutorial
successfully, should look like this:

Mesh
Launch the Mesher

Now that we have completed creating the geometry of the domain, we are ready to mesh it. The meshing step
chops up the domain into little chunks called cells or elements. The solver approximates the governing equations
8

and/or boundary conditions on each of these chunks. The end result is a large system of simultaneous algebraic
equations which we hand over to the computer to solve.
Return to the Project Schematic Window. In this window, double click the Mesh box
the mesher.

to launch

Twiddle your thumbs and try to avoid checking facebook while the meshing application launches. If a Meshing
Options window shows up to the right, you can dismiss it.
Mapped Face Meshing

First we will apply "mapped face meshing" to get a regular mesh. In the Outline window, click
in the
tree. This will show the meshing options in the main menu bar (look just above the tree outline). In the meshing
options, select Mesh Control > Mapped Face Meshing.

In the Graphics window, click on the rectangle to select it, then in the Details window, click Geometry > Apply.

This will apply "Mapped Face Meshing" to the rectangle which will yield a regular mesh.
Edge Sizing

We will control the mesh size by specifying the size of the divisions to be used on the edges of the rectangle. To
create the edge sizings, make sure Mesh is highlighted in the tree. Then select Mesh Control > Sizing.

10

We'll be applying the sizing in meters. So check that the units are set to Metric (m, kg ...).

Since we'll be applying the sizing to edges, select the edge selection filter by clicking on it.

11

Select Zoom to Fit as shown in the snapshot below to fit the entire geometry in the graphics window. Hold down
the left mouse button and drag over the four horizontal edges (two top and two bottom). The surfaces will be
highlighted in green when they've been selected.

In the details window, select Geometry > Apply. Now the mesher knows which edges to apply the sizing to.
Ensure that Type is set to Element Size, then change the Size from Default to 0.05 m as shown below. This will
set each division size on the corresponding edges to 0.05 m. (If we want a finer mesh, we would input a smaller
size.)

12

Now, we will create an edge sizing for the vertical edges of the geometry. Create another edge sizing, and this
time, choose the left and right vertical edges of the geometry by holding down the Ctrl key and selecting each of
them, and go to Geometry > Apply. Change the Type to Number of Divisions. Next, specify Number of
Divisions to 30. Note that one can specify the Element Size or Number of Divisions depending on which is more
convenient.
Generate the Mesh

In the Mesh context menu, Mesh > Generate Mesh.

The generated mesh should now be seen. (If you don't see it at first, select
in the tree outline to show
the generated mesh). You can zoom in/out using the middle mouse wheel. We see that ANSYS decreases the
mesh size near the entrance since it sees a corner. This is fine for our case since this will better resolve the
rapidly developing boundary layer near the entrance. So we won't override this.
Named Selections

Next, we will have to specify names of different portions of the geometry to use in FLUENT to define boundary
conditions. Make sure the Edge Selection Filter

is selected before proceeding.

Inlet

Select the left, vertical edge of the geometry with a left mouse click - it should highlight green. Right click, and
select Create Named Selection. Name the selection Inlet. Click OK once finished.
Centerline

Next, we will specify the axis/centerline of the pipe. Select the bottom surface of the pipe, and create a named
selection. Name it Centerline.
13

Isothermal Wall

We will now specify the portion of the wall that is isothermal. Select the left portion of the upper surface of the
pipe. Create a named selection and call it Isothermal Wall.
Heated Wall

We will now specify the portion of the wall that is heated. Select the right portion of the upper surface of the
pipe. Create a named selection and call it Heated Wall.
Outlet

Finally, we will specify the outlet of the pipe. Select the right, vertical edge of the pipe. Create a named
selection, and call it Outlet.

Click here to enlarge

Click
to update all the changes made in the mesher.
We are done with the mesh creation, so we can now save the project, and close the mesher.

Setup (Physics)
The geometry and the mesh have been set up to solve the problem using FLUENT but a few things need to be
considered before we proceed.
Double Precision
Both single and double precision versions of FLUENT are available in workbench. Although single precision is
sufficiently accurate in most cases, the disparate length scale in our model (long, thin pipe) may create large
round-off error. Hence, we will use double precision to reduce this error.
Axisymmetric
14

When Axisymmetric is selected, FLUENT transforms the Cartesian coordinates to cylindrical polar coordinates.
The gradient in the axis symmetric model now becomes:

Material Properties
The values entered in material properties will be applied to the constants in the governing equations.
Operating Condition
The absolute pressure is defined as the sum of the gauge pressure and the reference pressure:

In FLUENT, the reference pressure can be specified under operating condition. By default, the operating
condition is 1 atm.
Open FLUENT

Make sure a check mark appears next to the mesh panel in workbench. Double click Setup
open FLUENT.

to

Initial Settings

Before FLUENT launches, we will be prompted to set some options. In Options check the box next to Double
Precision. The default processing option is Serial. In this tutorial, we will use the Serial option to solve the 2D
convection problem. If you have a dual processor, you can set the option under Processing Options to Parallel,
and change the Number of Processes to 2.

15

Once the options are set, click OK.


Problem Setup - General

Now, FLUENT should open. We will begin setting up some options for the solver. In the left hand window (in
what I will call the Outline window), under Problem Setup, select General. The only option we need to change
here will address the fact that pipe domain we created is axisymmetric. Under 2D Space, click the radio box next
to Axisymmetric.
Models

In the outline window, click Models. We will need to utilize the energy equation in order to solve for the
temperature. Under Models highligh Energy - Off and click Edit.... Now, the Energy window will launch. Check
the box next to Energy Equation and hit OK.
Materials

In the Outline window, highlight Materials. In the Materials window, highlight Fluid, and click Create/Edit....
this will launch the Create/Edit Materials window; here we can specify the properties of the fluid. Set the
Density to 1.2, the Specific Heat to 1000, the Thermal Conductivity to .02, and the Viscosity to 1.8e-5.

16

click here to enlarge

Once finished, click Change/Create, then Close.


Boundary Conditions

Now we will specify the boundary conditions governing the problem. In the Outline window, highlight
Boundary Conditions.
Operating Conditions

The default operating pressure in FLUENT is 1 atm, which is 101325 Pa. We can equate the operating pressure
to the absolute pressure by setting the gauge pressure to zero.
Centerline

Under Zone, highlight Centerline. Change the Type to axis. Confirm you are changing the selection, then leave
the name as the default centerline.
Heated Wall

Under Zone, highlight heated_wall. The Type should have defaulted to wall. Next, click Edit.... Click the
Thermal tab, and select the Heat Flux radio button. Change the Heat Flux (w/m2) to 37.5. Click OK.
Inlet

Under Zone, highlight inlet. The Type should have defaulted to velocity-inlet. Next, click Edit.... In the
Momentum tab, change the Velocity Specification Method to Components, and specify the Axial Velocity to
0.1. Click OK

17

Isothermal Wall

Under Zone, highlight isothermal_wall. The Type should have defaulted to wall. Next, click Edit.... Click the
Thermal tab, and select the Temperature radio button. Change the Temperature (k) to 300. Click OK.
Outlet

Under Zone, highlight outlet. The Type should have defaulted to pressure-outlet. Next, click Edit.... In the
Momentum tab, ensure the Gauge Pressure is 0. Click OK.
Reference Values

In the Outline window, select Reference Values. Under Compute From, select Inlet. Ensure that the values
displayed are the values we specified. We are now ready to setup the solution.

Solution
Solution Methods

In the Outline window, select Solution Methods to open the Solution Methods window. Under Spatial
Discretization, change the option under Momentum from First Order Upwind to Second Order Upwind. Under
Energy, also change the option to Second Order Upwind.

Monitors

In the Outline window, click Monitors to open the Monitors window. In the Monitors window, select Residuals Print,Plot and press Edit.... This will open the Residual Monitors window. We want to change the convergence
criteria for our solution. Under Equation and to the right of Continuity, change the Absolute Criteria to 1e-6.
Repeat for x-velocity, y-velocity, and energy, then press OK.

18

Solution Initialization

In the Outline window, select Solution Initialization. We need to make an "Initial Guess" to the solution so
FLUENT can iterate to find the final solution. In the Solution Initialization window, under Compute from, select
Inlet from the drop down box. Check to see that the values that generate match our inputted values, then press
Initialize
Run Calculation

In the Outline window, select Run Calculation. Change the Number of Iterations to 200. Double click
Calculate to run the calculation. After the calculation is complete, save the project, and you may close the solver.

Results
Open the Post Processor

In the Project Schematic double click Results to open the post processor. When the A6: Fluid Flow (FLUENT) CFD - Post Window opens, look at the geometry by clicking the +Z axis on the compass

Velocity Vectors

In the Post Processing window, click the Vector icon


to create a vector result. When prompted, name the
result Velocity Vector. In the Details of Velocity Vector window, begin on the Geometry tab. Under
Locations, select Periodic 1. This will show the velocity along the entire geometry surface periodically. Next,
19

click on the Symbol tab. Change the Symbol Size to 0.1. Finally, move to the View tab. We want to see the
entire geometry of the pipe: not just half of it like we currently see. To see the whole pipe, check the box next to
Apply Reflection/Mirroring, and change the Method to ZX Plane. Because the pipe is long and skinny, it will be
difficult to see the results. This post processor allows us to stretch the results to make the results easier to see. To
apply a scaling, check the box next to Apply Scale, and change the Scale to 1,10,1 (this will scale the ydirection by 10). When finished, press Apply to see the result. If you wish to see the result without the wireframe
of the pipe, uncheck the box next to Wireframe under User Location and Plots.

click here to enlarge

Velocity Contour

In the Post Processing window, click the Contour icon


to create a Contour result. When prompted, name the
result Velocity Contour. In the Details of Velocity Contour window, begin on the Geometry tab. Under
Locations, again select Periodic 1. Also, change the Variable to Velocity. Next, move to the View tab. Check the
box next to Apply Reflection/Mirroring, and change the Method to ZX Plane and again,check the box next to
Apply Scale, and change the Scale to 1,10,1. When finished, press Apply to see the result. Finally, we need to
remove the Velocity Vectors from the Graphic Window. Do this by unchecking the box next to Velocity Vector
in the Outline window under User Location and Plots.

20

Click here to enlarge

Temperature Contour

In the Post Processing window, click the Contour icon


to create another Contour result. When prompted,
name the result Temperature Contour. In the Details of Temperature Contour window, begin on the Geometry
tab. Under Locations, select Periodic 1. This time, change the Variable to Temperature. Next, move to the View
tab. Apply the same mirroring and scaling as we did for the Velocity Contours. When finished, press Apply.
Uncheck the box next to Velocity Contour to only see the Temperature Contours.

21

Click here to enlarge

Pressure Contour

Create another contour result, and name Pressure Contour. Use all of the same settings as the previous results
but this time choosing Variable > Pressure in the Geometry tab.

Click here to enlarge


Graph of Temperature along Centerline

To graph the temperature along the centerline, we first need to create the centerline as a path. To accomplish this,
click on the Location icon
, select Line, and name the line Centerline. In the Details of Centerline
window, set the Method to two points. Point 1 is (0,0,0), and Point 2 is (8.64,0,0). Enter these values into the
details window. Next, change the number of Samples to 100. Press Apply once finished.

To create a chart, press the chart icon


. When prompted, name the page Temperature Along Centerline. In
the Details of Temperature Along Centerline window, begin on the General tab. In the Title, enter Temperature
22

Along Centerline.

Next, click on the Data Series tab. Under Data Source, in the drop down menu next to
Location, select Centerline. Now move to the X Axis tab. In the drop down menu next to Variable, scroll all the
way down and select X. In the Y Axis tab, change the Variable to Temperature. when finished, press Apply to
see the chart.

Click here to enlarge

Graph of Temperature along Outlet

To graph the temperature along the outlet, we need to create the outlet as a path much like we did with the
centerline. Click on the Location icon
, select Line, and name the line Outlet. In the Details of
Centerline window, set the Method to two points. Point 1 is (8.64,0,0), and Point 2 is (8.64,0.06,0). Enter these
values into the details window. Next, change the number of Samples to 100. Press Apply once finished.

23

Next, press the chart icon


. When prompted, name the page Temperature Along Outlet. In the Details of
Temperature Along Outlet window, begin on the General tab. In the Title, enter Temperature Along Outelt.
Next, click on the Data Series tab. Under Data Source, in the drop down menu next to Location, select Outlet.
Now move to the X Axis tab. In the drop down menu next to Variable, and select Temperature. In the Y Axis
tab, change the Variable to Y. when finished, press Apply to see the chart.

Click here to enlarge


Graph of Nusselt Number along the heated section of the pipe

The Nusselt number is a non-dimensional parameter that provides a measure of the convection heat transfer at a
surface. It is the ratio of convection to pure conduction heat transfer. We will now derive the Nussult number as
a function of the given parameters and temperature.
The convection heat transfer at the pipe wall is:

We can rearrange terms to find an expression for h, the convection coefficient:

Substitute the convection coefficient expression into the Nusselt Number expression:

24

where
h is the convection coefficient.
k is the thermal conductivity.
L is the length scale. Similar to the Reynold's Number, the length scale is the diameter of the pipe for an internal
pipe flow.
q''_w is the heat flux at the heated surface, 37.5 W/m^2.
Tw is the pipe wall temperature at a given location along the pipe.
Tm is the mean temperature in the pipe at the location where Tw is defined.
To find the temperature at the wall, click on insert >> location >> point, and name it Tw exit. In the Details of
Tw exit window, set Method to XYZ and enter (8.64, 0.06, 0) in Point. Click Apply to create a point at the upper
right corner of the pipe. Click on Expression right below
and right click in the window to create a
new expression named Tw. Under Details of Tw panel, enter probe(Temperature)@Tw exit in the Definition tab.
Tw now gives the temperature at the location (8.64, 0.06, 0), which is on the exit pipe wall.

25

26

To find the mean temperature at a given location in the pipe, click on insert >> location >> line, and name it
exit. In the Details of exit window, set Method to Two Points and enter (8.64, 0, 0) for Point 1 and (8.64, 0.06, 0)
for Point 2. Click Apply to create a line at the exit of the pipe. The mean temperature is the area weighted
average temperature and we can use integral to find the appropriate mean Temperature:

Click on the Calculators tab and double click on Function Calculator. Select lengthInt for the Function, exit for
the Location, and Velocity u for the Variable. Check show equivalent expression and click Calculate. The
expression "lengthInt(Velocity u)@exit is essentially the integral of u*dr and can be conveniently used to
calculate the mean temperature.
Under Expressions, right click in the window to create a new expression and name it Tm. In the Details of Tm
window, enter the following:
lengthInt(Velocity u*Y*Temperature)@exit/lengthInt(Velocity u*Y)@exit
This expression will now give the mean temperature at the location in which we called "exit". Recall the pipe
radius r is defined in the Y direction in FLUENT. Hence we will use Y to define the radial position in the pipe,

27

as shown in the expression above.

We are now ready to find the Nusselt Number. Create another expression and name it Nu exit. Under the
Definition tab, enter the Nusselt Number expression shown in the equation above. The units are entered in square

28

brackets, this is done to ensure the expression for the Nusselt Number is dimensionless.

We would like to compare the Nusselt Number along the heated section of the pipe. We can generate the Nusselt
Number at a different location by simply changing the x-coordinate of exit and Tw exit, which we defined
earlier. Once the new coordinates defined in exit and Tw exit are updated, the associated expression Tw, Tm, and
Nu exit will be updated automatically.
We can expect a maximum and dominant convection heat transfer at the entrance of the heated section of the
pipe. The convection heat transfer raises the temperature inside the pipe, as well as mean temperature, along the
downstream direction. The mean temperature near the exit is higher relative to the entrance and therefore a lower
convection heat transfer is expected at the exit. Again, the Nusselt Number is a measure of convection heat
transfer relative to conduction heat transfer. Thus we should expect the Nusselt Number to decrease along the
length of the pipe.

To export the data, click on the "export" button. Comma Seperated Value (.csv) is able to be read by matlab and
Excel, so it should be fine.
We are now ready to validate and verify our results.
29

Verification & Validation


Create Another Instance of the Project

Return to the Project Schematic Window. Right click on the Fluid Flow (FLUENT) box
, and select Duplicate. This will create another instance of the project. When the
duplicate box generates, rename it Refined Mesh

Refine the Mesh

Open up the mesher of the newly created project by double clicking


box of Refined Mesh. We
want to refine the mesh by increasing the number of elements. To accomplish this, expand Mesh in the Outline
window, and click Edge Sizing. If you followed the tutorial, this should be an element sizing of the horizontal
lines of the domain. Decrease the Element Size from 0.1 to .025. Next, click Edge Sizing 2, the divisional edge
sizing of the outlet and inlet. Increase the Number of Divisions to {{80)) divisions. In the menu bar, select Mesh
> Generate Mesh. After the Mesh Generates, close the mesher.
Connect The Unrefined Mesh's Solution

Return to the project schematic. We want to be able to compare the Unrefined Mesh's results to those of the
Refined Mesh. To accomplish, click and drag the Solution Box
of the 2D Steady
Convection project instance to the Results Box of the Refined Mesh Project instance. See the picture below for
clarification.

Next, press

to update the project.

30

View Results

Next, open the Post Processor of the Refined Mesh project instance by double clicking
. In the
Outline, select the Temperature Along Centerline chart we made earlier. Next, In the Details of Temperature
Along Centerline window, go to the Line Display tab. You should see there are two data series on the graph.
Select Series 1 for Refined Mesh, change Line Style to Dot, and press Apply. You should now see two plotted
lines on the plot, as below.

Click here to enlarge

Repeat this process for the Temperature Along Outlet chart.

31

Click here to enlarge

Because the data does not diverge as we refine the mesh, we have validated our results. We are done with the
simulation.

FLUENT - Laminar Pipe Flow


Problem Specification

Consider fluid flowing through a circular pipe of constant radius as illustrated above. The pipe diameter D = 0.2
m and length L = 8 m. The inlet velocity z = 1 m/s. Consider the velocity to be constant over the inlet crosssection. The fluid exhausts into the ambient atmosphere which is at a pressure of 1 atm. Take density = 1 kg/
m3 and coefficient of viscosity = 2 x 10-3 kg/(ms). The Reynolds number Re based on the pipe diameter is

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

Solve this problem using FLUENT via ANSYS Workbench. 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 number.

Step 1: Pre-Analysis & Start-up


Preliminary Analysis

We 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). When this happens, the flow becomes fullydeveloped and there is no variation of the velocity profile in the axial direction, x (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 Introduction to Fluid Mechanics course. We 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. What values would you expect for the centerline
velocity and the friction factor in the fully-developed region based on the analytical solution? What is the
solution for the velocity profile?

We'll create the geometry and mesh in ANSYS 12.1 which is the preprocessor for FLUENT, and then read the
mesh into FLUENT and solve for the flow solution.
Start ANSYS FLUENT

Prior to opening ANSYS, create a folder called pipe in a convenient location. We'll use this as the working folder
in which files created during the session will be stored. For this simulation Fluent will be run within the ANSYS
Workbench Interface. Start ANSYS workbench:
Start> All Programs> Ansys 12.1> Workbench
The following figure shows the workbench window.

33

Higher Resolution Image


Management of Screen Real Estate

This tutorial is specially configured, so the user can have both the tutorial and ANSYS open at the same time as
shown below. It will be beneficial to have both ANSYS and your internet browser displayed on your monitor
simultaneously. Your internet browser should consume approximately one third of the screen width while
ANSYS should take the other two thirds as shown below.

Click Here for Higher Resolution


If the monitor you are using is insufficient in size, you can press the Alt and Tab keys simultaneously to toggle
between ANSYS and your internet browser.

Step 2: Geometry

Care to skip the geometry and meshing steps? README


If you would prefer to skip the geometry and mesh steps, then you can download the necessary files here. Download
the "zip" file, then extract the files to your working directory. In order to load the necessary files, go to the Workbench
Project Page, then (Click) File > Open > "pipe_laminar.wbpj". Lastly, click here to skip ahead to Step 4 of the tutorial.

34

Saving

It would be of best interest, to save the project at this point. Click on the "Save As.." button,
, which
is located on the top of the Workbench Project Page. Save the project as "LaminarPipeFlow" in your working
directory. When you save in ANSYS a file and a folder will be created. For instance if you save as
"LaminarPipeFlow", a "LaminarPipeFlow" file and a folder called "LaminarPipeFlow_files" will appear. In
order to reopen the ANSYS files in the future you will need both the ".wbpj" file and the folder. If you do not
have BOTH, you will not be able to access your project.
Fluid Flow(FLUENT) Project Selection

On the left hand side of the workbench window, you will see a toolbox full of various analysis systems. To the
right, you see an empty work space. This is the place where you will organize your project. At the bottom of the
window, you see messages from ANSYS.
Left click (and hold) on Fluid Flow (FLUENT), and drag the icon into the empty space in the Project
Schematic. Your ANSYS window should now look comparable to the image below.

Since we selected Fluid Flow(FLUENT), each cell of the system corresponds to a step in the process of
performing CFD analysis using FLUENT. Rename the project to Laminar Pipe.
We will work through each step from top down to obtain the solution to our problem.
Analysis Type

In the Project Schematic of the Workbench window, right click on Geometry and select Properties, as shown
below.

35

The properties menu will then appear to the right of the Workbench window. Under Advance Geometry Options,
change the Analysis Type to 2D as shown in the image below.

36

Launch Design Modeler

In the Project Schematic, double click on Geometry to start preparing the geometry.
At this point, a new window, ANSYS Design Modeler will be opened. You will be asked to select desired length
unit. Use the default meter unit and click OK.
Creating a Sketch

Start by creating a sketch on the XYPlane. Under Tree Outline, select XYPlane, then click on Sketching right
before Details View. This will bring up the Sketching Toolboxes.
Click Here for Select Sketching Toolboxes Demo
Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look of the XY Plane.
Click Here for Select Normal View Demo
In the Sketching toolboxes, select Rectangle. In the Graphics window, create a rough Rectangle by clicking once
on the origin and then by clicking once somewhere in the positive XY plane. (Make sure that you see a letter P at
the origin before you click. The P implies that the cursor is directly over a point of intersection.) At this point
you should have something comparable to the image below.

Dimensions

At this point the rectangle will be properly dimensioned.


Under Sketching Toolboxes, select Dimensions tab, use the default dimensioning tools. Dimension the geometry
as shown in the following image.

Click Here for Higher Resolution


Under the Details View table (located in the lower left corner), set V1=0.1m and set H2=8m, as shown in the
image below.

37

Click Here for Higher Resolution


Surface Body Creation

In order to create the surface body, first (Click )Concept > Surface From Sketches as shown in the image below.

This will create a new surface SurfaceSK1. Under Details View, select Sketch1 as Base Objects and then under
Surface body select the thickness to 0.1m and click Apply. Finally click Generate to generate the surface.
At this point, you can close the Design Modeler and go back to Workbench Project Page. Save your work thus
far in the Workbench Project Page.

Step 3: Mesh
In this section the geometry will be meshed with 500 elements. That is, the pipe will be divided into 100
elements in the axial direction and 5 elements in the radial direction.
Launch Mesher

In order to begin the meshing process, go to the Workbench Project Page, then (Double Click) Mesh.
Default Mesh

In this section the default mesh will be generated. This can be carried out two ways. The first way is to (Right
Click) Mesh > Generate Mesh, as shown in the image below.
38

The second way in which the default mesh can be generated is to (Click) Mesh > Generate Mesh as can be seen
below.

Either method should give you the same results. The default mesh that you generate should look comparable to
the image below.

Note that in Workbench there is generally at least two ways to implement actions as has been shown above. For,
simplicity's sake the "menu" method of implementing actions will be solely used for the rest of the tutorial.
Mapped Face Meshing

As can be seen above, the default mesh has irregular elements. We are interested in creating a grid style of mesh
that can be mapped to a rectangular domain. This meshing style is called Mapped Face Meshing. In order to
incorporate this meshing style (Click) Mesh Control > Mapped Face Meshing as can be seen below.

39

Now, the Mapped Face Meshing still must be applied to the pipe geometry. In order to do so, first click on the
pipe body which should then highlight green. Next, (Click) Apply in the Details of Mapped Face Meshing table,
as shown below.

This process is shown here


Now, generate the mesh by using either method from the "Default Mesh" section above. You should obtain a
mesh comparable to the following image.

Edge Sizing

The desired mesh has specific number of divisions along the radial and the axial direction. In order to obtain the
specified number of divisions Edge Sizing must be used. The divisions along the axial direction will be specified
first. Now, an Edge Sizing needs to be inserted. First, (Click) Mesh Control > Sizing as shown below.

40

Now, the geometry and the number of divisions need to be specified. First (Click) Edge Selection Filter,
.
Then hold down the "Control" button and then click the bottom and top edge of the rectangle. Both sides should
highlight green. Next, hit Apply under the Details of Sizing table as shown below.

Now, change Type to Number of Divisions as shown in the image below.

Then, set Number of Divisions to 100 as shown below.

Follow the same procedure as for the edge sizing in the radial direction, except select the left and right side
41

instead of the top and bottom and set the Number of Division to 5. Then, generate the mesh by using either
method from the "Default Mesh" section above. You should obtain the following mesh.

As it turns out, in the mesh above there are 540 elements, when there should be only 500. Mesh statistics can be
found by clicking on Mesh in the Tree and then by expanding Statistics under the Details of Mesh table. In order
to get the desired 500 element mesh the Behavior needs to be changed from Soft to Hard for both Edge Sizing's.
In order to carry this out first Expand Mesh in the tree outline then click Edge Sizing and then change Behavior
to Hard under the Details of Edge Sizing table, as shown below.

Then set the Behavior to Hard for Edge Sizing 2. Next, generate the mesh using either method from the "Default
Mesh" section above. You should then obtain the following 500 element mesh.

Radial Sizing
Create Named Selections

Here, the edges of the geometry will be given names so one can assign boundary conditions in Fluent in later
steps. The left side of the pipe will be called "Inlet" and the right side will be called "Outlet". The top side of the
rectangle will be called "PipeWall" and the bottom side of the rectangle will be called "CenterLine" as shown in
the image below.

In order to create a named selections first (Click) Edge Selection Filter,


. Then click on the left side of the
rectangle and it should highlight green. Next, right click the left side of the rectangle and choose Create Named
Selection as shown below.

42

Select the left edge and right click and select Create Named Selection. Enter Inlet and click OK, as shown
below.

Now, create named selections for the remaining three sides and name them according to the diagram.
Save, Exit & Update

First save the project. Next, close the Mesher window. Then, go to the Workbench Project Page and click the
Update Project button,

Step 4: Setup (Physics)


Your current Workbench Project Page should look comparable to the following image. Regardless of whether
you downloaded the mesh and geometry files or if you created them yourself, you should have checkmarks to the
right of Geometry and Mesh.

43

Next, the mesh and geometry data need to be read into FLUENT. To read in the data (Right Click) Setup >
Refresh in the Workbench Project Page as shown in the image below.

After you click Update, a question mark should appear to the right of the Setup cell. This indicates that the Setup
process has not yet been completed.
Launch Fluent

Double click on Setup in the Workbench Project Page which will bring up the FLUENT Launcher. When the
FLUENT Launcher appears change the options to "Double Precision", and then click OK as shown below.The
Double Precision option is used to select the 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.

44

Click Here for Higher Resolution


Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll specify the governing
equations and boundary conditions for our boundary-value problem. On the left-hand side of the FLUENT
interface, we see various items listed under Problem Setup. We will work from top to bottom of the Problem
Setup items to setup the physics of our boundary-value problem. On the right hand side, we have the Graphics
pane and, below that, the Command pane.
Check and Display Mesh

First, the mesh will be checked to verify that it has been properly imported from Workbench. In order to obtain
the statistics about the mesh (Click) Mesh > Info > Size, as shown in the image below.

Then, you should obtain the following output in the Command pane.

The mesh that was created earlier has 500 elements(5 Radial x 100 Axial). Note that in FLUENT elements are
45

called cells. The output states that there are 500 cells, which is a good sign. Next, FLUENT will be asked to
check the mesh for errors. In order to carry out the mesh checking procedure (Click) Mesh > Check as shown in
the image below.

You should see no errors in the Command Pane. Now, that the mesh has been verified, the mesh display options
will be discussed. In order to bring up the display options (Click) General > Mesh > Display as shown in the
image below.

The previous step should cause the Mesh Display window to open, as shown below. Note that the Named
Selections created in the meshing steps now appear.

46

Click Here for Higher Resolution


You should have all the surfaces shown in the above snapshot. Clicking on a surface name in the Mesh Display
menu will toggle between select and unselect. Clicking Display will show all the currently selected surface
entities in the graphics pane. Unselect all surfaces and then select each one in turn to see which part of the
domain or boundary the particular surface entity corresponds to (you will need to zoom in/out and translate the
model as you do this). For instance, if you select wall, outlet, and centerline and then click Display you should
then obtain the following output in the graphics window.

Now, make sure all 5 items under Surfaces are selected. The
button next to Surfaces selects all of the
boundaries while the button deselects all of the boundaries at once. Once, all the 5 boundaries have been
selected click Display, then close the Mesh Display window. The long, skinny rectangle displayed in the
graphics window corresponds to our solution domain. Some of the operations available in the graphics window
to interrogate the geometry and mesh are:
Translation: The model 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 in and interrogate the mesh.
47

Define Solver Properties

In this section the various solver properties will be specified in order to obtain the proper solution for the laminar
pipe flow. First, the axisymmetric nature of the geometry must be specified. Under General > Solver > 2D Space
select Axisymmetric as shown in the image below.

Click Here for Higher Resolution


Next, the Viscous Model parameters will be specified. In order to open the Viscous Model Options Models >
Viscous - Laminar > Edit.... By default, the Viscous Model options are set to laminar, so no changes are needed.
Click Cancel to exit the menu.
Now, the Energy Model parameters will be specified. In order to open the Energy Model Options Models >
Energy-Off > Edit.... For incompressible flow, the energy equation is decoupled from the continuity and
momentum equations. We need to solve the energy equation only if we are interested in determining the
temperature distribution. We will not deal with temperature in this example. So leave the Energy Equation set to
off and click Cancel to exit the menu.
Define Material Properties

Now, the properties of the fluid that is being modeled will be specified. The properties of the fluid were specified
in the Problem Specification section. In order to create a new fluid (Click) Materials > Fluid > Create/Edit... as
shown in the image below.

48

In the Create/Edit Materials menu set the Density to 1kg/m^3 (constant) and set the Viscosity to 2e-3 kg/(ms)
(constant) as shown in the image below.

Click Here for Higher Resolution


Click Change/Create. Close the window.
Define Boundary Conditions

At this point the boundary conditions for the four Named Selections will be specified. The boundary condition
for the inlet will be specified first.
Inlet Boundary Condition

In order to start the process (Click) Boundary Conditions > inlet > Edit... as shown in the following image.

49

Click Here for Higher Resolution


Note that the Boundary Condition Type should have been automatically set to velocity-inlet. Now, the velocity
at the inlet will be specified. In the Velocity Inlet menu set the Velocity Specification Method to Components,
and set the Axial-Velocity (m/s) to 1 m/s, as shown below.

Click Here for Higher Resolution


Then, click OK to close the Velocity Inlet menu.
Outlet Boundary Condition

First, select outlet in the Boundary Conditions menu, as shown below.

50

Click Here for Higher Resolution


As can be seen in the image above the Type should have been automatically set to pressure-outlet. If the Type is
not set to pressure-outlet, then set it to pressure-outlet. Now, no further changes are needed for the outlet
boundary condition.
Centerline Boundary Condition

Select centerline in the Boundary Conditions menu, as shown below.

Click Here for Higher Resolution


51

As can be seen in the image above the Type has been automatically set to wall which is not correct. Change the
Type to axis, as shown below.

Click Here for Higher Resolution


When the dialog boxes appear click Yes to change the boundary type. Then click OK to accept "centerline" as the
zone name.
Pipe Wall Boundary Condition

First, select pipe_wall in the Boundary Conditions menu, as shown below.

52

Click Here for Higher Resolution


As can be seen in the image above the Type should have been automatically set to wall. If the Type is not set to
wall, then set it to wall. Now, no further changes are needed for the pipe_wall boundary condition.
Save

In order to save your work (Click)File > Save Project as shown in the image below.

53

Step 5: Solution
Second Order Scheme

A second-order discretization scheme will be used to approximate the solution. In order to implement the second
order scheme click on Solution Methods then click on Momentum and select Second Order Upwind as shown in
the image below.

Click Here for Higher Resolution


Set Initial Guess

Here, the flow field will be initialized to the values at the inlet. In order to carry out the initialization click on
Solution Initialization then click on Compute from and select inlet as shown below.

54

Click Here for Higher Resolution


Then, click the Initialize button,

. This completes the initialization.

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. We'll iterate the solution until the residual
for each equation falls below 1e-6. In order to specify the residual criteria (Click) Monitors > Residuals >
Edit..., as shown in the image below.

55

Click Here for Higher Resolution


Next, change the residual under Convergence Criterion for continuity, x-velocity,and y-velocity, all to 1e-6, as
can be seen below.

Click Here for Higher Resolution


Lastly, click OK to close the Residual Monitors menu.
Execute Calculation

Prior, to running the calculation the maximum number of iterations must be set. To specify the maximum
number of iterations click on Run Calculation then set the Number of Iterations to 100, as shown in the image
below.

56

Click Here for Higher Resolution


As a safeguard save the project now. Now, click on Calculate two times in order to run the calculation. The
residuals for each iteration are printed out as well as plotted in the graphics window as they are calculated. After
running the calculation, you should obtain the following residual plot.

Click Here for Higher Resolution


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

Click Here for Higher Resolution


At this point, save the project once again.

Step 6: Results
The results steps shown below are for the CFD-Post postprocessor that is included in ANSYS Workbench. For
instructions to view the results in the traditional FLUENT post-processor, click here.
Velocity Vectors

The following video shows how to visualize velocity vectors.

Velocity Magnitude Contours

The following video shows how to plot velocity magnitude contours. In order to get a better view of the
contours, the video also shows how to stretch the domain in the radial direction as well as reflect it about the
axis.
57

Velocity Profile at the Outlet

The following video shows how to plot the velocity profile at the outlet.

Tip: You can increase the number of Samples along the "Pipe Outlet location" to get a smoother curve (though it
might not make a difference here since the radial mesh is very coarse). See snapshot below.

Axial Variation of Pressure

The following video shows how to plot the pressure variation along the wall and the axis.

You can increase the number of Samples for "Centerline" and "Pipe Wall" locations to get smoother curves.

58

Step 7: Verification & Validation


It is very important that you take the time to check the validity of your solution. This section leads you through
some of the steps you can take to validate your solution.
Refine Mesh

Let's repeat the solution on a finer mesh. For the finer mesh, we will increase the number of radial divisions from
5 to 10. In the Workbench Project Page right click on Mesh then click Duplicate as shown below.

Higher Resolution Image


Rename the duplicate project to Laminar Pipe Flow (mesh 2). You should have the following two projects in
your Workbench Project Page.

Next, double click on the Mesh cell of the Laminar Pipe Flow (mesh 2) project. A new ANSYS Mesher window
will open. Under Outline, expand Mesh and click on Edge Sizing, as shown below.

59

Under Details of "Edge Sizing", enter 10 for Number of Divisions, as shown below.

Higher Resolution Image


Sometimes, you need to turn-off "Advanced Size Function" under "Details of Mesh" to get the mesher to accept
the modified settings. That way the Advanced Size Function feature will not over-ride your settings (this feature
is useful for meshing complex geometries). Click Mesh in the tree and turn off Advanced Size Function under
"Details of Mesh" as shown below.

60

Then, click Update to generate the new mesh.

The mesh should now have 1000 elements (10 x 100). A quick glance of the mesh statistics reveals that there are
indeed 1000 elements.

Higher Resolution Image


Compute the Solution

Close the ANSYS Mesher to go back to the Workbench Project Page. Under Laminar Pipe Flow (mesh 2),
right click on Fluid Flow (FLUENT) and click on Update, as shown below.
61

Higher Resolution Image


Now, wait a few minutes for FLUENT to obtain the solution for the refined mesh. After FLUENT obtains the
solution, save your project.
It is necessary to check that the solution iterations have converged. Launch FLUENT by double clicking on
Solution of the "Laminar Pipe Flow (mesh 2)" project in the Workbench Project Page. After FLUENT launches,
select Monitors > Residuals > Edit... and then Plot, as shown in the images below.

It looks like my solution hasn't converged, so I need to run more iterations by selecting Run Calculation. You
may want to increase the number of iterations to, say, 1000. Ensure that you have a converged solution and save
the project.

62

If you double-click on Results for mesh 2 in the project page, you'll see that all results have been updated for the
new mesh. Also, you can drag Solution for the original mesh on to Results for mesh 2 in the project page. CFDPost will automatically add the results from the original mesh to the plots for mesh 2. For instance, you will get
the velocity profiles for both meshes in the same plot and you can export that to Excel and compare with the fulldeveloped analytical solution.
For instructions to compare results in the traditional FLUENT post-processor, click here and scroll down.
Further Verification

The plot below shows the results of a further refined mesh ( 20 radial x 100 axial ) and the theoretical results.

Higher Resolution Image


Notice that for the further refined mesh, the results are almost indistinguishable from theory.

FLUENT - Turbulent Pipe Flow

63

Problem Specification

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 = 2 x 10 -5 kg/(ms), the Reynolds no.
based on the pipe diameter and average velocity at the inlet is

This change of viscosity has taken us from a Reynolds number of 100 to 10,000. At this Reynolds number, the
flow is usually completely turbulent.
We'll solve this problem numerically using ANSYS FLUENT. Among the results we'll look at are centerline
velocity, skin friction coefficient and the axial velocity profile at the outlet.

Step 1: Pre-Analysis & Start-Up


Preliminary Analysis

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.
Start ANSYS FLUENT

Since the flow is axisymmetric, the geometry is a rectangle as in the Laminar Pipe Flow tutorial. We will first
use a 100x30 mesh (i.e. 100 divisions in the axial direction and 30 divisions in the radial direction).
We could create this mesh from scratch, as in the Laminar Pipe Flow tutorial, but instead, we will modify the
previous 100x5 to get the 100x30 mesh. This will introduce you to the art of modifying meshes in the ANSYS
Workbench Mechanical Mesher.

64

Step 2: Geometry
For this tutorial we are going to be using the same geometry that we created in the previous tutorial. Once you have
completed the Laminar Pipe Flow tutorial, you can open the saved project and use it as a template for this tutorial.

Step 3: Mesh
Care to skip the Laminar Flow tutorial?
If you would like to skip the Laminar Flow tutorial, you can download the completed project here (right click and select
Save As..., which will be used as a template in this Turbulent Flow tutorial. Unzip the folder and open up the project
before continuing.

You should have completed the Laminar Pipe Flow tutorial before continuing with this one. The starting point
for this tutorial is the ending point of the one before it. If you bring up the project we have already completed,
you can follow the next steps.
Right click on Mesh . Then click on Duplicate, which will duplicate the mesh from the previous tutorial. Enter
"Turbulent Flow" in the highlighted field to rename it. At this point your project schematic window should
appear as below:

Next, double click on the Mesh cell so we can edit the mesh.
We need to change the edge sizing, as we did in the previous tutorial, to 100 by 30 (instead of 100 by 5). We are
also going to need to bias it. This is because we want smaller divisions the closer you get to the wall. First, right
click on Edge Sizing 2 in the Project tree on the left, and click Delete to remove the existing edge sizing on the
inlet and outlet.
Next, we'll apply an edge sizing with bias to the inlet, the left end of the pipe. Click Mesh Control > Sizing.
Using the edge selection tool, highlight the inlet (left end) of the pipe and click Apply next to Geometry. As in
the Laminar Pipe Flow tutorial, change Type to Number of Divisions, and enter 30. Change Behavior to Hard.
Now, let's apply a bias to the edge sizing. Under Bias Type, select the second option, - ----. Enter a Bias
Factor of 10. Your Details of "Edge Sizing 2" should now appear like the image below.

65

Now we would like to apply an edge sizing to the outlet, the right end of the pipe. Once again, we'll use 30
divisions, with a bias factor of 10 and with the smaller divisions at the top, near the wall. This time, when
selecting Bias Type, choose the first option, ---- -. This will put the smallest divisions at the top. Other than
this, the procedure is the same as for the inlet. When complete, your Details of "Edge Sizing 3" should look like
this:

Right click on Mesh and select "Generate Mesh". The bias factor generates a finer mesh near the pipe wall. This
is done to compute the small fluctuation in fluid property near the wall.

Next, close the meshing window to return to the main project view.
66

Recall that we created the following boundary types for the 100x5 mesh in the Laminar Pipe Flow tutorial:
Edge Position Name

Type

Left

inlet

VELOCITY_INLET

Right

outlet

PRESSURE_OUTLET

Top

wall

WALL

Bottom

centerline AXIS

Step 4: Setup (Physics)


Launch FLUENT

We will be working within ANSYS Workbench. To launch FLUENT, double click on the Setup cell from the
Project view. Make sure the Double Precision option is selected. This will use 64 bits (rather than 32) per
floating point number, decreasing round-off errors.

Once Fluent has opened, select Problem Setup > General > Display...
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 mesh. How many divisions are there in the radial direction?

67

Recall that you can look at specific components of the mesh 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.
Define Governing Equations

Problem Setup > General > Solver


Choose Axisymmetric under 2D Space. As in the laminar pipe flow tutorial, we'll use the defaults of PressureBased Type, Steady flow and Absolute Velocity Formulation.
Problem Setup > Models > Energy...
The energy equation can be turned off since this is an incompressible flow and we are not interested in the
temperature. Make sure Energy - Off appears.
Problem Setup > Models > Viscous - Laminar
Click Edit... and choose k-epsilon (2eqn). Notice that the window expands and additional options are displayed
on choosing the k-epsilon turbulence model. Under Near-Wall Treatment, pick Enhanced Wall Treatment. This
option uses a blended function to go between a two-layer model and standard wall functions. If the mesh near the
wall is fine enough, the two-layer model is used. Otherwise, standard wall functions are used. You could
alternately use Standard Wall Functions; this will work well when 30 < y+ < 100. Refer to the turbulence
chapter in the FLUENT user manual.

68

Click OK.
Problem Setup > Materials
Double click on air and change Density to 1.0 kg/m^3 and Viscosity to 2e-5 kg/(m*s). These are the values in
the Problem Specification and are picked to give us a Reynolds number of 10,000. We'll take both as constant.

Click Change/Create and close the window.


69

Define Boundary Conditions

Problem Setup > Boundary conditions > Operating Conditions...


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. We'll use the default value of 1 atm (101,325
Pa) as the Operating Pressure.
Click Cancel to leave the default in place.
We'll now setup the boundary conditions at the wall, centerline, inlet and outlet.
Problem Setup > Boundary conditions
We don't need to set any parameters for the pipewall zone. FLUENT will automatically detect that this location
should be set as a wall based on its name. Verify this by selecting that zone and looking at its type in the drop
down menu.
Next, let's look at the centerline. Since we are solving an axisymmetric problem, we will set the centerline as the
axis; this will impose symmetry at this boundary. Set centerline to axis boundary type, using the drop down
menu. Click Yes and OK to confirm.

Choose inlet and click on Edit..... This boundary is set to velocity-inlet type by default which is right in our case.
Change the Velocity Specification Method to Magnitude, Normal to Boundary. Enter 1 m/sfor 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 0.2m for Hydraulic Diameter. Click OK to set the boundary conditions for the inlet.
70

The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the outlet gauge
pressure = outlet absolute pressure - operating pressure = 0. Choose outlet under Zone. The Type of this
boundary is pressure-outlet. Click on Edit. The default value of the Gauge Pressure is 0. Click Cancel to leave
the defaults in place.
Note: Backflow in the Pressure Outlet 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.
Reference Values

Let's setup the reference values, which will be used later on while while viewing non-dimensional results (this
setting doesn't affect the numerical solution).
Problem Setup > Reference Values
Select Compute from > inlet.

Step 5: Solution
We'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-epsilon turbulence model.
Solution > Solution Methods
Change the Discretization for Momentum, Turbulence Kinetic Energy and Turbulence Dissipation Rate
equations to Second Order Upwind (if you do not see all of the equations scroll down to see them).

71

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 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. We'll iterate the solution
until the residual for each equation falls below 1e-6.
Solution > Monitors > Residuals, Statistic and Force Monitors
Double click on Residuals.Notice that Convergence Criterion has to be set for the k and epsilon equations in
addition to the three equations in the last tutorial. Set the Convergence Criterion to be 1e-06 for all five
equations being solved.
Select Print to Console and Plot under Options (these are the defaults). This will print as well plot the residuals
as they are calculated which you will use to monitor convergence.

72

Click OK.
Set Initial Guess

We'll use an initial guess that is constant over the entire flow domain and equal to the values at the inlet:
Solution > Solution Initialization > Standard Initialization

In the Solution Initialization 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 0 m/s and the Gauge Pressure to 0 Pa. The Turbulence Kinetic
Energy and Dissipation Rate(scroll down to see it) values are set from the prescribed values for the Turbulence
Intensity and Hydraulic Diameter at the inlet.

73

Click Initialize (this is easy to overlook).


This completes the problem specification. Save your project.
Iterate Until Convergence

Solve for 700 iterations.


Solution > Run Calculation
In the Iterate menu that comes up, change the Number of Iterations to 700. Click Calculate.
The solution converges in a total of about 220 iterations. You may get a different number of iterations to
convergence depending on your mesh and software version.

74

Click here to see a higher resolution image.


We 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.
Setup Data Export

In addition to the standard data quantities, we would also like to view the results for the Skin Friction
Coefficient. This quantity is not transferred to the post-processor by default; so we have to do it manually.
File > Data File Quantities
Under Additional Quantities, select Skin Friction Coefficient, which should be roughly half way down. Your
window should now look like this:

75

Step 6: Results
After the solution is complete, close the FLUENT window to return to the Workbench window. Double click
Results in the main Workbench window to open CFD Post, where we will be viewing the results. For a basic
orientation on how to use CFD Post, pl. see the videos in the results step of the Laminar Pipe Flow tutorial.
The following instructions show only how to view results using the "chart" option. But one should really start by
viewing velocity vectors, velocity/pressure/TKE contours etc. and check that the solution looks basically right.
The Laminar Pipe Flow tutorial walks you through the steps to view vectors and contours in CFD Post.
Locations

Before viewing the results, we need to define the locations in CFD Post where we would like to view the results,
namely the wall, centerline, and outlet.
Insert > Location > Line
Rename this location "Pipe Wall". Avoid naming locations in CFD Post with identical names to those used in
FLUENT, this can cause problems. We will define the line by two points. Enter (0,0.1,0) for Point 1 and
(8,0.1,0) for Point 2. Change Samples to 100.
Repeat the process for the two other locations needed:
Name

Point 1 Point 2

"Pipe Centerline" (0,0,0) (8,0,0)

76

"Pipe Outlet"

(8,0,0) (8,0.1,0)

y+

Turbulent flows are significantly affected by the presence of walls. The k-epsilon 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 10.9.1 of the FLUENT
user manual). We'll gloss over the details for now and use the following rule of thumb: select the near-wall
resolution such that y+ > 30 or < 5 for the wall-adjacent cell when using the Enhanced Wall Treatment option.
Look at section 10.9, Grid Considerations for Turbulent Flow Simulations, for details.
Let's plot y+ values for wall-adjacent cells to check how it compares with the recommendation mentioned above.
Insert > Chart
Let's rename the graph "Wall Y plus". Also, change Title to "Wall Y plus".
Data Series Tab
Rename the data series to "Y plus". Next, change Location to Pipe Wall.

X Axis Tab
Change Variable to X.
Y Axis Tab
Change Variable to Yplus.
Click Apply and our chart should appear.
77

As we can see, the wall _y+_value is between roughly 1.35 and 2.45. Since this is less than 5, the near-wall grid
resolution is acceptable.

78

Export the data to a .csv file ("comma separated values") by clicking on Export. This file can be opened in Excel.

Centerline Velocity

Next, we would like to make a graph of the axial velocity along the centerline. We will do this by creating
another chart.
Insert > Chart
Rename this chart "Centerline Velocity", and change the title of the chart as well.
Data Series
Change Name to "Centerline Velocity", and this time set Location to "Pipe Centerline".
X Axis
Once again, change Variable to X.
Y Axis
Change Variable to Velocity u, which corresponds to the Axial Velocity.
Click Apply and our chart should appear.

79

Coefficient of Skin Friction

The definition of the skin friction coefficient was discussed in the laminar pipe flow tutorial.
Once again, insert another chart, naming and titling it Coefficient of Skin Friction. Rename the data series and
choose Pipe Wall for Location. Plot X on the X Axis and the Skin Friction Coefficient on the Y Axis. When
complete, your chart should match the image below:

We can see that the fully-developed value is 0.0085. Compare this with what you'd expect from the Moody chart.

80

Velocity Profile

We'll plot the axial velocity at the outlet as a function of the distance from the center of the pipe.
Insert another chart, naming and titling it "Outlet Velocity". Change the name of the data series, and set the
Location to Pipe Outlet. This time, put Velocity u on the X Axis and Y on the Y Axis. When complete, your
chart should appear as below:

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.
Which is larger? From this, what can you say about the relative strengths of near-wall mixing in the laminar and
turbulent cases?

Step 7: Verification & Validation


Useful Information
Click here for the FLUENT 12 version.

In order to assess the numerical accuracy of the results obtained, it is necessary to compare results on different
meshes. We'll re-do the calculation on a 100x60 mesh which has twice the number of nodes in the radial
direction as the 100x30 mesh.
In Workbench, under Turbulent Flow project, right click on Fluid Flow (FLUENT) and click duplicate.
Rename the duplicate project to Turbulent Flow Refined Mesh. You should have three project cells in
workbench.

81

Double click on Mesh for Turbulent Flow Refined Mesh. The ANSYS Mesher window will open. Under
Outline, expand mesh tree and click on Edge Sizing 2.
Highlight "Edge Sizing 2". Under Details of "Edge Sizing 2", increase Number of Divisions to 60. This will
refine the mesh in the radial direction at the inlet.
Highlight "Edge Sizing 3". Under Details of "Edge Sizing 3", increase Number of Divisions to 60. This will
refine the mesh in the radial direction at the outlet.
Click Update to generate the new mesh.
Close the ANSYS Mesher and go back to Workbench windows. Under Turbulent Flow Refined Mesh, right
click on Fluid Flow (FLUENT) and click Update. Wait for a few minutes for FLUENT to obtain a solution and
update all the results.
We would want to compare the solution on the two meshes. To do that, drag the Solution cell of Turbulent Flow
Refined Mesh to Results cell of Turbulent Flow.
Double click the Results cell of Turbulent Flow, and after CFD Post opens, we can compare our results by
simply selecting the desired chart!
Result Comparison

The following images show comparisons of Centerline Velocity, Coefficient of Skin Friction, Outlet Velocity,
and Wall Y-plus.

82

83

From the first three plots, we can see that the velocity and skin friction coefficient results have remained nearly
unchanged. However, the Y-plus results show significant improvement.
You may want to experiment with meshes of other granularities and compare their plots with the plots saved
from the 100x30 and 100x60 meshes.
In Problem 1, we will be looking at the effect of coarse meshes with uniform granularity.

FLUENT - Forced Convection

84

Problem Specification

This tutorial shows you how to simulate forced convection in a pipe using ANSYS FLUENT. The simulation
corresponds to the forced convection experiment in MAE 4272 at Cornell University. The diagram shows a pipe
with a heated section in the middle where constant heat flux is added at the wall. The ambient air is flowing into
the pipe from the left with a uniform velocity. We'll use FLUENT to solve the relevant boundary-value problem
and obtain the velocity, temperature, pressure and density distribution in the pipe. Inputs necessary for the
simulation, such as the velocity at the pipe inlet and heat flux added at the wall, are obtained from one particular
experimental run. Results from the simulation will be compared with corresponding experimental values.
Background information is provided in this presentation from MAE 4272 at Cornell University. Your
fingers might be itching to launch FLUENT and get busy with the mouse and keyboard. Nevertheless, you will
be well-served by reviewing the presentation before proceeding. That way, you will be better able to apply the
solution procedure to new problems.
Note to Cornell students enrolled in MAE 4272, Fall 2011: It is best to run FLUENT in the ACCEL lab in the
Engineering Library. The CIT labs in B7 Upson and 318 Phillips also have FLUENT. However, there is a video
card incompatibility on the CIT computers that appears in the post-processing step. As a result, the temperature
contours can look weird. Everything else works fine in the CIT labs. So, alternately, you can go through the
simulation in the CIT labs, save your files and load them on to the ACCEL computers to obtain the correct
temperature contours.
Simulation Inputs Obtained from Experiment

The following inputs are necessary to specify the domain, boundary conditions and material properties for the
Boundary Value Problem (BVP) that we'll solve using FLUENT. The relevant BVP is discussed in presentation
mentioned above.
Pipe Geometry:
Circular cross-section
Pipe radius = 2.94e-2 m
Pipe length = 6.045 m

85

Material Properties:
Coeff. of viscosity = 1.787e-5 kg/(m s)
Cp = 1005 J/(kg K)
Thermal conductivity = 0.0266 W/(m K)
Molecular weight = 28.97 g/mole
Inlet:
u = 30.06 m/s
v = 0 m/s
T = 298.15 K
k = 0.09 m2/s2; epsilon = 16 m2/s3 (These are not measured and are rough guess values)
Outlet:
Pressure = 97225.9 Pa
Wall:
Heating between x = 1.83 m and x = 4.27 m
Wall heat flux = 5210.85 W/m2
Wall roughness: 0 (assume smooth)
Wall thickness: 0 (assume negligible)
Ambient conditions:
Ambient pressure = 98338.2 Pa

Step 1: Pre-Analysis & Start-Up


Since the pipe cross-section is circular and heat is applied in an axisymmetric manner, we'll assume that the flow
is axisymmetric. In cylindrical polar coordinates, this means that the flow variables depend only on the axial
coordinate x and radial coordinate r, and are independent of the azimuthal coordinate . Hence we can model the
pipe problem with a rectangular domain.

Here R = radius of the pipe, and L = length of the pipe. Rotating the above rectangle 360 degrees about the axis
will recover the full pipe geometry.The radial direction is label as y in FLUENT.

86

Start ANSYS FLUENT

This tutorial is specially configured, so the user can have both the tutorial and ANSYS open at the same time as
shown below. It will be beneficial to have both ANSYS and your internet browser displayed on your monitor.
Your internet browser should consume approximately one third of the screen width while ANSYS should take
the other two thirds. You can use the windows command Alt + Tab to switch screens.

We'll run FLUENT within the ANSYS Workbench interface. Start ANSYS workbench:
Start > All Programs > ANSYS 13.0 > Workbench
The following figure shows the workbench window.

Higher Resolution Image

On the left hand side of the workbench window, you will see a toolbox full of various analysis systems. To the
right, you see an empty work space. This is the place where you will organize your project. At the bottom of the
window, you see messages from ANSYS.
Note to Cornell students enrolled in MAE 4272: You can skip the geometry and mesh steps. Download the mesh by
right clicking here and saving the zip file to a convenient location. Unzip the downloaded file (you cannot read in the
zip file directly). After unzipping, you should see a file called pipe_flow.wbpj and a folder called pipe_flow_files. Read
the mesh into Workbench using File > Open. Browse to the pipe_flow.wbpj file and select it. Then skip to Step 4:
Setup (Physics).

87

Step 2: Geometry
Since our problem involves fluid flow, we will select the FLUENT component on the left panel.
Left click (and hold) on Fluid Flow (FLUENT), and drag the icon to the empty space in the Project Schematic.
Here's what you get:

Since we selected Fluid Flow (FLUENT), each cell of the system corresponds to a step in the process of
performing CFD analysis using FLUENT. Rename the project to Forced Convection.
We will work through each step from top down to obtain the solution to our problem.
In the Project Schematic of Workbench window, right click on Geometry and select Properties. You will see the
properties menu on the right of the Workbench window. Under Advance Geometry Options, change the Analysis
Type to 2D.

88

In the Project Schematic, double click on Geometry to start preparing the geometry. To make best use of screen
real estate, move the windows around and resize them so that you approximate
this screen arrangement
At this point, a new window, ANSYS Design Modeler will be opened. You will be asked to select desired length
unit. Use the default meter unit and click OK.
The geometry is a rectangle of length L = 6.045m and height R = 2.94 x 10^-2 m.
Creating a Sketch

Start by creating a sketch on the XYPlane. Under Tree Outline, select XYPlane, then click on Sketching right
before Details View. This will bring up the Sketching Toolboxes.
Click Here for Select Sketching Toolboxes Demo
Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look of the XY Plane.
Click Here for Select Normal View Demo

89

In the Sketching toolboxes, select Rectangle. Hover the cursor near the origin until you see a letter P. This
means the cursor is coincident with a point, in this case the origin. Then drag the cursor to draw a rectangle.

Note: You do not have to worry about dimensions for now, we will specify them properly in the later step.
Modify the Sketch

Since we have a heated section in the middle of the pipe, we need to split the geometry appropriately. Click
Modify tab and select Split. Select two points at the top of the rectangle, where there will be a heated section.
Then select two points at the bottom of the rectangle.
Now we can constraint the lower rectangle with the top of the rectangle. Click Constraints tab, select Equal
Length. Click the appropriate top and bottom edge and set them to be of equal length. This is shown below:

90

Dimensions

Under Sketching Toolboxes, select Dimensions tab, use the default dimensioning tools. Then click on the lines
and drag upwards or sideways as the case may be to place the dimensions (V1, H2, H3, H4). Note: For
horizontal dimensioning (shown in H2, H3 and H4), click first on the horizontal dimension tab under the
dimensions tab and then click (turns yellow) on the end points of the split section lines (H2, H3 and H4). Then
click on any point on the y-axis and drag up. For the vertical dimensioning (V1), click on the vertical dimension
tab under the dimensions tab. Then click on the any point on the x-axis then click on V1 (turns yellow). Then
drag V1 to the left side.
Dimensioning of the geometry is shown below:

Under Details View on the lower left corner, input the value for dimension appropriately. Then hit enter each
time each dimension is entered.
V1: 0.0294 m
H2: 1.83 m
H3: 4.27 m
H4: 6.045 m
91

At this point, you should see something like this for your sketch:

Now that we have the sketch done, we can create a surface for this sketch.
Then click on Concept tab in the Design modeler window, then click on Surface from sketches.
This will create a new surface SurfaceSK1. Under the Tree Outline, click on the X-Y Plane and select Sketch1
as Base Objects and under Details View, click Apply. Finally click Generate to generate the surface.
Click Here for Create Surface Demo

Remember to save the project: File > Save Project


You can close the Design Modeler and go back to Workbench.

Step 3: Mesh
Save your work in Workbench window. In the Workbench window, right click on Mesh, and click Edit. A new
ANSYS Mesher window will open. We will create a mesh with 200x30 elements along the pipe. This means that
we will divide the pipe with 200 elements in axial direction and 30 elements along the radial direction.
In ANSYS Mesher, make sure that the unit we are working on is meter Metric unit. On the top menu, click on
Units and make sure that Metric (m, kg, N, s, V, A) is selected.
Since we are going to manually specify meshing type and element size, we should turn off ANSYS build-in
advanced sizing function. Under Details of "Mesh", expand Sizing, select Off next to Use Advanced Size
Function.
Turn off advanced size demo

Meshing Method

We would also like to create a structured mesh where the opposite edges correspond with each other. Let's insert
a Mapped Face mesh. Under Outline, right click on Mesh, move cursor to Insert, and select Mapped Face
Meshing. Alternatively, you can click on Mesh Control on the third menu and select Mapped Face Meshing.
Finally select the pipe surface body in the Graphics window and click Apply next to Geometry.
Mapped Face Demo

Edge Sizing

Now let us move on to specify the element sizing along the pipe radial direction.
Outline > Mesh > Insert > Sizing
In the Graphics window, select both the left and right edge of the geometry (click on the Edge tab on the Fluid
flow Fluent - Mesh window and then press Ctrl + mouse click to multiple select). Under Details of "Edge
Sizing", click Apply next to Geometry. Change the edge sizing definition Type to Number of Divisions. Enter 30
92

for Number of Divisions.


Radial Sizing

Now continue with the sizing in the axial direction.


Outline > Mesh > Insert > Sizing
In the Graphics window, select all the top and bottom edge of the geometry (press Ctrl + mouse click to multiple
select). Under Details of "Edge Sizing", click Apply next to Geometry. Enter 0.03 for Element Size (this will
give us roughly 200 divisions). Next to Behaviour, change Soft to Hard (This is to overwrite the sizing function
employed by ANSYS Mesher. Try meshing with soft behavior and see what you get).
Axial Sizing Demo

We have specified all the meshing conditions. Click Update on the third menu to see the mesh.
Click on Mesh and look under Details of "Mesh", next to Statistics, you should see that we have 6120 Elements
for our mesh.
Create Named Selection

Next, we will name the edges accordingly so that we can specify the appropriate boundary conditions in the later
step. We know the bottom edges of the geometry are the centerline of the pipe, the left edge is the inlet of the
pipe, the right edge is the outlet of the pipe, top side edges are wall and the top middle edge is the heated wall
section. Let's name the edges according to the diagram below. Remember to click on the Edge tab on the Fluid
flow Fluent - Mesh window and then press Ctrl + mouse click to multiple select the 3 line sections that make up
the center line before naming it.

Select the left edge and right click and select Create Named Selection. Enter Inlet and click OK. Under Outline,
you will see the name Inlet under Named Selections.
Named Selection Demo

Finish naming rest of the edges. Finally, click Update

Step 4: Setup (Physics)


In the Workbench window, this is what you should see currently in the Project Schematic space.

93

Double click on Setup which will bring up the FLUENT Launcher. Click OK to select the default options in the
FLUENT Launcher. Twiddle your thumbs a bit while the FLUENT interface comes up. This is where we'll
specify the governing equations and boundary conditions for our boundary-value problem. On the left-hand side
of the FLUENT interface, we see various items listed under Problem Setup. We will work from top to bottom of
the Problem Setup items to setup the physics of our boundary-value problem. On the right hand side, we have
the Graphics pane and, below that, the Command pane.
Display Mesh

Let's first display the mesh that was created in the previous step.
Problem Setup > General > Mesh > Display...

The long, skinny rectangle displayed in the graphics window corresponds to our solution domain. Some of the
operations available in the graphics window to interrogate the geometry and mesh are:
Translation: The model 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.
94

Use these operations to zoom in and interrogate our mesh.


You should have all the surfaces shown in the above snapshot. Clicking on a surface name in the Mesh Display
menu will toggle between select and unselect. Clicking Display will show all the currently selected surface
entities in the graphics pane. Unselect all surfaces and then select each one in turn to see which part of the
domain or boundary the particular surface entity corresponds to (you will need to zoom in/out and translate the
model as you do this). For instance, the surface labeled heated_section should correspond to the part of the wall
where heating occurs.
Specify Governing Equations

We ask FLUENT to solve the axisymmetric form of the governing equations.


General > Solver > 2D Space > Axisymmetric

The energy equation is turned off by default. Turn on the energy equation.
Models > Energy - Off > Edit...
Turn on the Energy Equation and click OK.
By default, FLUENT will assume the flow is laminar. Let's tell it that our flow is turbulent rather than laminar
and that we want to use the k-epsilon turbulence model to simulate our turbulent flow. This means FLUENT will
solve for mean (i.e. Reynolds-averaged) quantities at every point in the domain. It will add the k and epsilon
equations to the governing equations to calculate the effect of the turbulent fluctuations on the mean, as
discussed in the powerpoint presentation.
Models > Viscous - Laminar > Edit...
Under Model, select k-epsilon (2 eqn). Since we'll use the default settings for the k-epsilon turbulence model,
click OK.

95

This is what you should currently see under Models.

Now let's set the "material properties" i.e. properties of air that appear in our boundary value problem.
Materials > Fluid air > Create/Edit...
Since variations in absolute pressure are small in our pipe, we'll use a constant absolute pressure in the ideal gas
law as discussed in the powerpoint presentation. This is called the "Incompressible ideal gas" model in FLUENT
(it's non-standard nomenclature). Change the Density (kg/m3) from constant to incompressible-ideal-gas. The
constant absolute pressure to be used in the ideal gas equation is specified later as Operating Pressure.
The other properties are also functions of temperature. However, we'll use constant values equal to the average
values over temperature range obtained in the experiment. Enter the following constant values:
Cp (Specific Heat) (j/kg-k): 1005
Thermal Conductivity (w/m-k): 0.0266
Viscosity (kg/m-s): 1.787e-5
Molecular Weight (kg/kgmol): 28.97

Higher Resolution Image

Click Change/Create and Close the Create/Edit Materials window.


96

Specify Boundary Conditions

FLUENT uses gauge pressure internally in order to minimize round-off errors stemming from small differences
of big numbers. Any time an absolute pressure is needed, it is generated by adding the so-called "operating
pressure" to the gauge pressure:
absolute pressure = gauge pressure + "operating pressure"
This "operating pressure" is also used in the "incompressible ideal gas" model as mentioned above. We will
specify the "operating pressure" as equal to the measured ambient pressure since the absolute pressure in the pipe
varies only slightly from this (you do get significant variations in gauge pressures though).
Boundary Conditions > Operating Conditions...
Enter 98338.2 under Operating Pressure and click OK.
Next we will specify the boundary condition for the centerline.
Boundary Conditions > centerline
Change the Type to axis and click OK. FLUENT will set the flow gradients at this boundary in accordance with
the axisymmetric assumption.
Now let's specify the boundary condition at the walls. By default, FLUENT correctly picks the Wall boundary
type for these boundaries. It will impose the no-slip condition for velocity at these boundaries. Additionally, for
the heated wall section, we need to specify the heat flux into the flow.
Boundary Conditions > heated_section > Edit...
A new Wall window will open. Click on Thermal tab and enter 5210.85 next to Heat Flux (w/m2) and click OK.

Higher Resolution Image

As discussed in the powerpoint presentation, we need to set:

velocity and temperature (plus k and epsilon for the turbulence model equations) at the inlet
pressure at the outlet

97

For incompressible flow, the flow adjusts to the pressure at the outlet (consider this as a signal you are sending
the flow about what it needs to do inside the pipe).
Select:
Boundary Conditions > inlet
Note that the boundary Type is automatically set to velocity-inlet. FLUENT has an automatic mechanism to pick
a boundary type according to the name you give and settings that you have selected previously (this could be
dangerous if FLUENT selects the wrong boundary type and a lackadaisical user doesn't change it.). In this case,
it gets it right.
Click Edit... to set up the correct inlet parameters. The Velocity Inlet window pops up. Enter 30.06 next to
Velocity Magnitude (m/s). For Turbulent Kinetic Energy (m2/s2), enter value 0.09. For Turbulent Dissipation
Rate (m2/s3), enter value 16. Note that k and epsilon are not measured and are rough guess values. The results
should not be sensitive to these inputs since most of the turbulence is generated in the boundary layers (ideally,
you should check the sensitivity of your calculation to this setting).

Higher Resolution Image

Now click on Thermal tab and enter 298.15K for Temperature. Click OK to close the window.
Finally, set up the outlet boundary condition:
Boundary Conditions > Outlet
FLUENT selects the pressure-outlet boundary type and its guess turns out to be right.
Click Edit... to specify the gauge pressure at the outlet. Enter -1112.3 for Gauge Pressure and click Ok. (From
experiment, measured outlet pressure is 97225.9 Pa. Corresponding gauge pressure = 97225.9 Pa - operating
pressure = -1112.3 Pa)

98

Higher Resolution Image

Now FLUENT knows all necessary elements of our beloved BVP (domain, governing equations and boundary
conditions). In the Solution step, we'll prod the beast to obtain an approximate numerical solution to our BVP.

Step 6: Results
Please make sure your project is saved in Workbench. Double click on Results in the Project Schematic window.
This will open CFD-Post (the program used to analyze results from FLUENT computation.)

Overview
You may have noticed in previous sections, that the pipe looks extremely long and thin on the screen. In fact, due
to the axisymmetric assumption, we have only modeled half of a 2D section through the pipe in our analysis. To
be able to make full use of the results, we must:
1) Generate the results for the parameter investigated (e.g. temperature, pressure, velocity).
2) Mirror the result to reflect the result of the full pipe section.
3) Stretch the pipe in the radial direction to better view contours.
The results shown below were obtained with a pipe length of 6.096 which is slightly different from the current
length of 6.045. So your results might be slightly different from those shown below.

Temperature Contour
Our first challenge is the temperature contour. On the top menu, click on contour
. We will be calling this
contour "Temperature Contour", OK when done. On the left hand side, Details of Temperature Contour will
allow you to select parameters relevant to the results we're looking for. In this example, the Locations is periodic
1, the Variable is Temperature. The number of contours is a personal preference, in this example, we have
selected 100. This step tells CFD-Post we are looking to plot contours of temperature.

99

The next step is to mirror the image, this will make the results more intuitive and easier to understand. From the
previous screen, select the View tab. This tab will allow us to adjust the appearance of the contour plot we have
just generated. Check Apply Reflection/Mirroring. Select ZX Plane for Method. Choosing this option reflects

100

the current model in the ZX plane and allows us to view the "full" pipe section.

Finally, we stretch the pipe in the radial direction. Select Apply Scale. Enter 30 for y-axis. This will stretch our
model in the y (radial) direction by a factor of 30. Click Apply.
After you click Apply, you will see that under Outline > User Locations and Plots, Temperature Contour is
created. You will also see that the Temperature Contour is plotted in the Graphics window on the right. Under
Outline > User Locations and Plots, uncheck Wireframe to see just the Temperature Contour in the Graphics
window.

101

You can save the image to a file using the camera icon highlighted below or using the Snipping Tool in
Windows 7 (you can search for it under Start > Programs).

In developing the experiment, it was assumed that by the end of the adiabatic mixing stage, the flow will be well
mixed. Do the results from the numerical solution simulation support this assumption?

Velocity Vectors
Our next challenge is to produce velocity vectors. This is a very similar process to creating the temperature
contours above. On the top menu, click on vector
. Name it "Velocity Vector" and click OK. Under Details
of Velocity Vector, select periodic 1 for Locations. Select Velocity for Variable. This tells CFD-post we are
looking for vector plots of velocity.
In the next step, we will specify the appearance of vector arrows. Select the Symbol tab. Enter 0.05 for Symbol
Size. This again is dependent on personal preference.

Finally click Apply. You will see that under Outline > User Locations and Plots, Velocity Vector is created.
Un-check Temperature Contour so that Graphics window shows just the Velocity Vector plot. You can mirror
the plot about the axis as before. You can translate the model to look at flow development near the entrance.
There is a toolbar option at top that puts you in translate mode. You can click on the z-axis to restore our original
view.

102

The velocity vectors are shown below:

You can zoom in and out and move the contour using the tools right above the contour:

Does the flow become fully developed at the end of the first section?

Centerline Temperature Plot


Now let's look at the temperature variation along the center-line of the pipe. To do this we need to first create a
line corresponding to the center-line:
Insert > Location > Line
Name it "Centerline" and click OK. On the lower left panel, you will see Details of Centerline. Enter the start
and end locations of the line and the sampling frequency. Click Apply.

103

You will see centerline created under User Locations and Plots.
Insert > Chart
Please name this chart "Centerline Temperature". You will see Details of Centerline Temperature appear on the
lower left.
We'll go through the tabs in the menu to specify the plot that we want. Select the General tab and name the chart
"Temperature Variation along Pipe Axis".

Select the Data Series tab. Change Name and Location.

104

We want to see the variation of temperature with the length of the pipe. Therefore, temperature will be on the "yaxis" of the chart and axial position on the "x-axis" of the chart.
Click on X Axis tab. Next to Variable, choose X.

Click on Y Axis tab. Next to Variable, choose Temperature.

105

Click Apply. You will see Centerline Temperature created under Report in the Outline tab.

Note to Cornell MAE 4272 Students:


You need to repeat the FLUENT simulation with inputs from YOUR MEASUREMENTS in the lab. To compare the
FLUENT results with experiment, you can export the FLUENT result into Excel. A sample comparison is shown below.

106

You can export the FLUENT data in Excel format by clicking on the Export button in "Details of centerline
temperature"

Wall Temperature Plot


We will now plot the temperature variation along the wall. First, create a line corresponding to the wall.
Insert > Location > Line
Name it "Wall" (with capital W; otherwise you'll get a conflict with a reserved name). On the lower left panel,
you will see Details of Wall. Enter the start and end locations of the line and the sampling frequency. Click
Apply.

107

You will see wall created under User Locations and Plots.
Insert > Chart
Name this chart "Wall Temperature". You will see Details of Wall Temperature appear on the lower left panel.
Select the General tab and name the chart "Wall Temperature".
Select Data Series tab. Change the name of the first data series to FLUENT. Under Data Source, specify Wall
as Location.
As before, specify x-axis variable to be X (i.e. axial length along the pipe).
Specify y-axis variable to be Temperature. Click Apply. You should see the following plot.

Note to Cornell MAE 4272 Students:


You need to repeat the FLUENT simulation with inputs from YOUR MEASUREMENTS in the lab and compare the
108

FLUENT results for the wall temperature with experiment. A sample comparison is shown below.

You can export the data by clicking on the Export button, as shown in the previous step.

Pressure Plot
Create a plot of the pressure variation along the centerline of the pipe. Steps for this are similar to the plot of the
centerline temperature that we did earlier.
There is no need to create a new line. We can use the "centerline" created earlier.
Insert > Chart
Follow steps from the Centerline Temperature plot above, making appropriate modifications. You should see the
following plot.

Note to Cornell MAE 4272 Students:


You need to repeat the FLUENT simulation with inputs from YOUR MEASUREMENTS in the lab and compare the
109

FLUENT results for the pressure with experiment. A sample comparison is shown below.

Axial Velocity Profiles


Let's look at the velocity profiles before and after the heated section. To do this, we need to first create lines at
x=1.83 m ((start of heated section), x=4.27 m (end of heated section) and x=6.045 m (end of mixing section).
First, create the line at x=1.83 m.
Insert > Location > Line
Name it "x183" and click OK. Enter the following coordinates (0.0294 m is the pipe radius).
Point 1 (4.27,0,0)
Point 2 (4.27,0.0294,0)
Enter 100 for Samples. Click Apply.
Similarly create lines at x=4.27 m and x=6.045 m.
Insert > Chart
Name this chart "Axial Velocity Profiles".
Select the General tab and name the chart "Axial Velocity Profiles".
Select Data Series tab. Change the name of the first data series to x=1.83 m. Under Data Source, specify x183
as Location.
Add a new data series by clicking on the "New" icon as shown below and repeat the above steps but for x=4.27
m.

110

Add a third data series by clicking on the "New" icon and repeating the steps for x=6.045 m. You should then
have three items in the Data Series tab.

Specify x-axis variable: Velocity u


Specify y-axis variable: Y
Complete the plot. Here's what we get.

We notice that the flow accelerates due to the heating. As air is heated, its density decreases. So the velocity has
to increase to maintain the same mass flow rate.

111

Temperature Profiles
Similarly, one can look at the temperature profiles before and after the heated section.
Duplicate the Axial Velocity Profiles chart by right-clicking on the plot name in the "tree" on the upper left.
Rename it as "Temperature Profiles".

Double-click on "Temperature Profiles" in the tree view to edit its properties. This should be just below "Axial
Velocity Profiles" in the list.
Change the title and x-axis variable (to Temperature). Click Apply. Here's what we get.

112

This plot shows that:

the temperature increases in the heated section


the temperature is much higher near the wall in the heated section
the temperature is nearly uniform at the end of the mixing section
All these trends are as expected.

Input Summary
You can view the input summary (model, material properties, boundary conditions, etc) by clicking on Report in
the menu on the top. A small window will pop up and you can print the selected input summary directly in
FLUENT.

Step 7: Verification & Validation


Verification and validation is a formal process for checking results. Each of these terms has a specific meaning
which we won't get into here. We'll act like high-priced consultants and do the bare minimum: we'll refine the
mesh and make sure that the results are nearly independent of the mesh.
Note to Cornell MAE 4272 Students:
Comparison with the experimental measurements is another way you'll check the FLUENT results.
Refine Mesh

Let's repeat the solution on a finer mesh with smaller cells. In workbench, under Forced Convection project,
right click on Fluid Flow (FLUENT) and click duplicate. Rename the duplicate project to Force Convection
Refined Mesh. You should have two project cells in workbench.

113

Double click on Mesh for Forced Convection Refined Mesh. The ANSYS Mesher window will open. Under
Outline, expand mesh tree and click on Edge Sizing.

Highlight "Edge Sizing". Under Details of "Edge Sizing", increase Number of Divisions to 50. This will refine
the mesh in the radial direction.
Highlight "Edge Sizing 2". Under Details of "Edge Sizing 2", decrease Element Size to be 0.02. This will refine
the mesh in the axial direction.
Click Update
to generate the new mesh. If you highlight Mesh in the tree and expand Statistics, you
will notice that the number of elements has increased to about 12,800, compared to 5508 of the original mesh.

114

Close the ANSYS Mesher and go back to Workbench window. Under Forced Convection Refined Mesh, right
click on Fluid Flow (FLUENT) and click Update. Wait for a few minutes for FLUENT to obtain a solution on
the new mesh and update all the results.
We would want to compare the solution on the two meshes. To do that, drag the Solution cell of Forced
Convection Refined Mesh to Results cell of Forced Convection.

Finally, double click on Results cell of Forced Convection to compare the results on the two meshes. Select the
Chart Viewer tab near the bottom of the graphics window. Double-click on Centerline Temperature in the Tree
view to see the updated results (pretty sweet, huh?).

The red line corresponds to the refined mesh. Similarly, one can check wall temperature variation on the two
meshes.

115

Refining the mesh doesn't change the wall temperature much but the centerline temperature changes a fair bit. So
another level of mesh refinement would be wise.

FLUENT - Flat Plate Boundary Layer


Problem Specification

Consider a fluid flowing across a flat plate, as illustrated above. Obtain the velocity and pressure distribution
when the Reynolds number based on the plate length is 10,000. This Reynolds number is obtained by using the
following settings. The plate length is 1 m. The incoming fluid is flowing in the x-direction with a velocity of 1
m/s. The density of the fluid is 1 kg/m^3 and the viscosity is 1 x 10 ^(-4) kg/(m-s). Note that these values are not
necessarily physical. They have been picked to yield the desired Reynolds number.
Check your results by comparing the velocity and pressure distribution with classical boundary layer theory.

Step 1: Pre-Analysis and Start-Up


Pre-Analysis

For an external flow like this, one needs to determine where to place the outer boundary. A rectangular domain
will be used for this simulation. The height of the rectangular domain will be determined by the expected
116

boundary layer thickness. For a flat plate boundary layer, one can use the following approximation to find the
boundary layer thickness.

When x = L,
= 0.05m. The height of the domain will be set to ten times the boundary layer thickness. Thus,
the height of the boundary will be set to 0.5m. The following figure shows the dimensions of the domain, and the
boundary labels which will be used to set the boundary conditions.

Start ANSYS FLUENT

Prior to opening ANSYS, create a folder called FlatPlateCFD in a convenient location. We'll use this as the
working folder in which files created during the session will be stored. For this simulation FLUENT will be run
within the ANSYS Workbench Interface. Start ANSYS Workbench:
Start> All Programs> Ansys 12.1> Workbench
The following figure shows the workbench window.

Higher Resolution Image

117

Management of Screen Real Estate

This tutorial is specially configured, so the user can have both the tutorial and ANSYS open at the same time as
shown below. It will be beneficial to have both ANSYS and your internet browser displayed on your monitor
simultaneously. Your internet browser should consume approximately one third of the screen width while
ANSYS should take the other two thirds as shown below.

Click Here for Higher Resolution


If the monitor you are using is insufficient in size, you can press the Alt and Tab keys simultaneously to toggle
between ANSYS and your internet browser.

Step 2: Geometry
Care to skip the geometry and meshing steps? README
If you would prefer to skip the geometry and mesh steps, then you can download the necessary files here. Download
the "zip" file, then extract the files to your working directory. In order to load the necessary files, go to the Workbench
Project Page, then (Click) File > Open > "FlatPlateFlow.wbpj". Lastly, click here to skip ahead to Step 4 of the tutorial.

Saving

It would be of best interest, to save the project at this point. Click on the "Save As.." button,
, which
is located on the top of the Workbench Project Page. Save the project as "FlatPlateFlow" in your working
directory. When you save in ANSYS a file and a folder will be created. For instance if you save as
"FlatPlateFlow", a "FlatPlateFlow" file and a folder called "FlatPlateFlow_files" will appear. In order to reopen
the ANSYS files in the future you will need both the ".wbpj" file and the folder. If you do not have BOTH, you
will NOT be able to access your project.
Fluid Flow(FLUENT) Project Selection

On the left hand side of the workbench window, you will see a toolbox full of various analysis systems. To the
right, you see an empty work space. This is the place where you will organize your project. At the bottom of the
window, you see messages from ANSYS. Left click (and hold) on Fluid Flow (FLUENT), and drag the icon
into the empty space in the Project Schematic. Your ANSYS window should now look comparable to the image
below.

118

Since we selected Fluid Flow(FLUENT), each cell of the system corresponds to a step in the process of
performing CFD analysis using FLUENT. Rename the project to "FlatPlate". We will work through each step
from top down to obtain the solution to our problem.
Analysis Type

In the Project Schematic of the Workbench window, right click on Geometry and select Properties, as shown
below.

The properties menu will then appear to the right of the Workbench window. Under Advance Geometry Options,
change the Analysis Type to 2D as shown in the image below.

119

Launch Design Modeler

In the Project Schematic, double click on Geometry to start preparing the geometry. At this point, a new
window, ANSYS Design Modeler will be opened. You will be asked to select desired length unit. Use the default
meter unit and click OK.
Creating a Sketch

Start by creating a sketch on the XYPlane. Under Tree Outline, select XYPlane, then click on Sketching right
before Details View. This will bring up the Sketching Toolboxes.
Click Here for Select Sketching Toolboxes Demo

Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look of the XY Plane.
Click Here for Select Normal View Demo

In the Sketching toolboxes, select Rectangle. In the Graphics window, create a rough rectangle by clicking once
on the origin and then by clicking once somewhere in the positive XY plane. (Make sure that you see a letter P at
the origin before you click. The P implies that the cursor is directly over a point of intersection.) At this point
you should have something comparable to the image below.

120

Dimensions

At this point the rectangle will be properly dimensioned. Under Sketching Toolboxes, select Dimensions tab,
use the default dimensioning tools. Dimension the geometry as shown in the following image.

Click Here for Higher Resolution


Under the Details View table (located in the lower left corner), set V1=0.5m and set H2=1m, as shown in the
image below.

Click Here for Higher Resolution


Surface Body Creation

In order to create the surface body, first (Click )Concept > Surface From Sketches as shown in the image below.

121

This will create a new surface SurfaceSK1. Under Details View, select Sketch1 as Base Objects. Finally, click
Generate to generate the surface.
At this point, you can close the Design Modeler and go back to Workbench Project Page. Save your work thus
far in the Workbench Project Page.

Step 3: Mesh
In this section the geometry will be meshed with 3000 elements. That is, the field will be divided into 50
elements in the x direction and 60 elements in the y direction.
Launch Mesher

In order to begin the meshing process, go to the Workbench Project Page, then (Double Click) Mesh.
Default Mesh

In this section the default mesh will be generated. In order to generate the default mesh first click on Mesh, then
click on Update as shown in the image below.

You should then obtain the following mesh.

122

Click Here for Higher Resolution


Mapped Face Meshing

For this particular problem, we are interested in creating a grid style of mesh that can be mapped to a rectangular
domain. This meshing style is called Mapped Face Meshing. In order to incorporate this meshing style (Click)
Mesh Control > Mapped Face Meshing as can be seen below.

Click Here For Higher Resolution


Now, the Mapped Face Meshing still must be applied to the geometry. In order to do so, first click on the
surface body(filled rectangle), which should then highlight green. Next, (Click) Apply in the Details of Mapped
Face Meshing table, as shown below.

Click Here For Higher Resolution


This process is shown in the link below.
Mapped Face Demo
Now, generate the mesh by clicking Update.
123

Edge Sizing

The desired mesh has a specific number of divisions in the x direction and a specific number of divisions in the y
direction. In order to obtain the specified number of divisions Edge Sizing must be used. The divisions in the x
direction will be specified first. Now, an Edge Sizing needs to be inserted. First, (Click) Mesh Control > Sizing
as shown below.

Click Here For Higher Resolution


Now, the geometry and the number of divisions need to be specified. First (Click) Edge Selection Filter,
.
Then hold down the "Control" button and then click the bottom and top edge of the rectangle. Both sides should
highlight green. Next, hit Apply under the Details of Sizing table as shown below.

Click Here For Higher Resolution


Now, set Type to Number of Divisions as shown in the image below.

Click Here For Higher Resolution


Then, set Number of Divisions to 50 as shown below.
124

Next, set the Behavior to Hard as shown in the image below. This step will disable the ANSYS Mesher from
overwriting any of our edge sizing specifications.

At this point, the edge sizing in the the y direction will be specified. Follow the same procedure as for the edge
sizing in the x direction, starting first by selecting (Click) Mesh Control > Sizing. Select only the left side
instead of the top and bottom and set the number of divisions to 60. Remember to set the Behavior to Hard.
Then, click Update to generate the mesh with the new specifications. You should obtain the following mesh.

Click Here For Higher Resolution


Your mesh should now have 3,000 elements (50x60). In order to check how many elements your mesh has,
expand Statistics under "Details of Mesh" as shown below.

125

Make sure that you also have 3,000 elements.


Edge Sizing Biasing

We would like to have more elements in the region very close to the flate plate and less elements in the far field.
In order to do this, we must bias the edge sizing. First, click on Edge Sizing 2, then click on Bias Type and set it
to the first option as shown below.

Next, set the Bias Factor to 70 as shown below. The Bias Factor is defined in this case to be the ratio of the
longest division and the shortest division. That is, the last division will be seventy times longer than the length of
the first division.

Now, the biasing needs to be specified for the right side of the geometry. In order to incorporate the biasing on
the right side a new Edge Sizing needs to be implemented. First, (Click) Mesh Control > Sizing. Then, select
and apply the left side of the geometry. Then, change Type to Number of Divisions and set Number of Divisions
to 60. Next, set Behavior to Hard and set Bias Type to the second option, as shown below.
126

Then, set the Bias Factor to 70. Lastly, click Update to generate the new mesh. You should obtain the following
mesh.

Click Here For Higher Resolution


Create Named Selections

Here, the edges of the geometry will be given names so one can assign boundary conditions in FLUENT in later
steps. The left side of the geometry will be called "inlet" and the right side will be called "outlet". The top side of
the rectangle will be called "far_field" and the bottom side of the rectangle will be called "plate" as shown in the
image below.

Click Here For Higher Resolution


In order to create a named selection first (Click) Edge Selection Filter,
. Then click on the left side of the
rectangle and it should highlight green. Next, right click the left side of the rectangle and choose Create Named
Selection as shown below.

127

Select the left edge and right click and select Create Named Selection. Enter "inlet" and click OK, as shown
below.

Now, create named selections for the remaining three sides and name them according to the diagram. Once you
have created all four named selections, expand Named Selections and you should see the four named selections,
as shown below.

Save, Exit & Update

First save the project. Next, close the Mesher window. Then, go to the Workbench Project Page and click the
Update Project button,

Step 4: Setup (Physics)


Your current Workbench Project Page should look comparable to the following image. Regardless of whether
you downloaded the mesh and geometry files or if you created them yourself, you should have checkmarks to the
128

right of Geometry and Mesh.

The question mark to the right of right of the Setup cell is normal and indicates that the Setup process has not yet
been completed.
Launch Fluent

Double click on Setup in the Workbench Project Page which will bring up the FLUENT Launcher. When the
FLUENT Launcher appears change the options to "Double Precision", and then click OK as shown below.The
Double Precision option is used to select the 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.

Click Here for Higher Resolution


Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll specify the governing
equations and boundary conditions for our boundary-value problem. On the left-hand side of the FLUENT
interface, we see various items listed under Problem Setup. We will work from top to bottom of the Problem
Setup items to setup the physics of our boundary-value problem. On the right hand side, we have the Graphics
pane and, below that, the Command pane.
Check and Display Mesh

First, the mesh will be checked to verify that it has been properly imported from Workbench. In order to obtain
the statistics about the mesh (Click) Mesh > Info > Size, as shown in the image below.

129

Then, you should obtain the following output in the Command pane.

The mesh that was created earlier has 3,000 elements(50 x 60). Note that in FLUENT elements are called cells.
The output states that there are 3,000 cells, which is a good sign. Next, FLUENT will be asked to check the mesh
for errors. In order to carry out the mesh checking procedure (Click) Mesh > Check as shown in the image
below.

You should see no errors in the Command pane. Now, that the mesh has been verified, the mesh display options
will be discussed. In order to bring up the display options (Click) General > Mesh > Display as shown in the
image below.

The previous step should cause the Mesh Display window to open, as shown below. Note that the Named
Selections created in the meshing steps now appear.

130

Click Here for Higher Resolution


You should have all the surfaces shown in the above snapshot. Clicking on a surface name in the Mesh Display
menu will toggle between select and unselect. Clicking Display will show all the currently selected surface
entities in the graphics pane. Unselect all surfaces and then select each one in turn to see which part of the
domain or boundary the particular surface entity corresponds to (you will need to zoom in/out and translate the
model as you do this). For instance, if you select far_field, inlet, and plate and then click Display you should
then obtain the following output in the graphics window.

Now, make sure all 5 items under Surfaces are selected. The button next to Surfaces selects all of the
boundaries while the button deselects all of the boundaries at once. Once, all the 5 boundaries have been
selected click Display, then close the Mesh Display window. The rectangle displayed in the graphics window
corresponds to our solution domain. Some of the operations available in the graphics window to interrogate the
geometry and mesh are:
Translation: The model 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 in and interrogate the mesh.

131

Define Solver Properties

In this section the various solver properties will be specified in order to obtain the proper solution for the flat
plate boundary layer flow. First, the Energy Model parameters will be specified. In order to open the Energy
Model Options Models > Energy-Off > Edit..., as shown in the following image.

Click Here for Higher Resolution


For incompressible flow, the energy equation is decoupled from the continuity and momentum equations. We
need to solve the energy equation only if we are interested in determining the temperature distribution. We will
not deal with temperature in this example. So leave the Energy Equation set to off and click Cancel to exit the
menu. Next, the Viscous Model parameters will be specified. In order to open the Viscous Model Options
Models > Viscous - Laminar > Edit..., as shown below.

Click Here for Higher Resolution


132

By default, the Viscous Model options are set to laminar, so no changes are needed. Click Cancel to exit the
menu.
Define Material Properties

Now, the properties of the fluid that is being modeled will be specified. The properties of the fluid were specified
in the Problem Specification section. In order to create a new fluid (Click) Materials > Fluid > Create/Edit... as
shown in the image below.

Click Here for Higher Resolution


In the Create/Edit Materials menu set the Density to 1kg/m^3 (constant) and set the Viscosity to 1e-4 kg/(ms)
(constant) as shown in the image below.

Click Here for Higher Resolution


Click Change/Create. Close the window.

133

Define Boundary Conditions

At this point the boundary conditions for the four Named Selections will be specified. The boundary condition
for the inlet will be specified first.
Inlet Boundary Condition

In order to start the process (Click) Boundary Conditions > inlet > Edit... as shown in the following image.

Click Here for Higher Resolution


Note that the Boundary Condition Type should have been automatically set to velocity-inlet. FLUENT guesses
boundary conditions based on the label of the named selections. Now, the velocity at the inlet will be specified.
In the Velocity Inlet menu set the Velocity Specification Method to Components, and set the X-Velocity (m/s) to
1 m/s, as shown below.

Click Here for Higher Resolution


Then, click OK to close the Velocity Inlet menu.
134

Outlet Boundary Condition

First, (Click) Boundary Conditions > outlet > Edit... as shown in the image below.

Click Here for Higher Resolution


Note that the Boundary Condition Type should have been automatically set to pressure-outlet. For the outlet
boundary condition the gauge pressure needs to be set to zero. The default gauge pressure is zero, thus no
changes need to be made. Close the Pressure-Outlet menu.
Plate Boundary Condition

The Boundary Condition Type should have been automatically set to wall, as shown in the image below.

135

Click Here for Higher Resolution


If the Boundary Condition Type is not set to wall, then set it to wall. We will use the default setting for the wall
boundary condition, thus no changes are needed.
Far-Field Boundary Condition

For the far_field, set the Boundary Condition Type to symmetry, as shown below.

136

Click Here for Higher Resolution


In the first dialog box click yes and in the second dialog box leave the name as is and click OK. The symmetry
boundary conditions sets the velocities normal to the boundary equal to zero.
At this point save your work in the FLUENT Window by clicking the save button,

Step 5: Solution
Second Order Scheme

A second-order discretization scheme will be used to approximate the solution. In order to implement the second
order scheme click on Solution Methods then click on Momentum and select Second Order Upwind as shown in
the image below.

137

Click Here for Higher Resolution


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. We'll iterate the solution until the residual
for each equation falls below 1e-6. In order to specify the residual criteria (Click) Monitors > Residuals >
Edit..., as shown in the image below.

Click Here for Higher Resolution


Next, change the residual under Convergence Criterion for continuity, x-velocity,and y-velocity, all to 1e-6, as
can be seen below.

138

Click Here for Higher Resolution


Lastly, click OK to close the Residual Monitors menu.
Set Initial Guess

Here, the flow field will be initialized to the values at the inlet. That is, the initial values of all the cells will be
set to 1 m/s and 0 Pa for x velocity and gauge pressure respectively. In order to carry out the initialization click
on Solution Initialization then click on Compute from and select inlet as shown below.

Click Here for Higher Resolution


Then, click the Initialize button,

. This completes the initialization process.

Alternately, you could set the Gauge Pressure to 0 and set the X Velocity to 1 m/s as shown below.

139

Then, you would need to press the Initialize button to apply the specified initial values to all the cells. Either
method will give you the same results.
Iterate Until Convergence

Prior, to running the calculation the maximum number of iterations must be set. To specify the maximum
number of iterations click on Run Calculation then set the Number of Iterations to 1000, as shown in the image
below.

140

Click Here for Higher Resolution


As a safeguard save the project now. Now, click on Calculate two times in order to run the calculation. The
residuals for each iteration are printed out as well as plotted in the graphics window as they are calculated. After
running the calculation, you should obtain the following residual plot.

Click Here for Higher Resolution


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

Click Here for Higher Resolution

At this point, save the project once again.

Step 6. Results
Post Processing
We will use CFD-Post as the primary post processing GUI. Steps for post processing in FLUENT can be found here.

Exporting Skin Friction from FLUENT into the Post-processor (CFD-Post)


FLUENT calculates the skin friction coefficient as follows (see section 34.4 of the FLUENT User's Guide which
is accessible from the "help" button on the FLUENT interface).

The wall shear in the numerator of this expression is calculated from the gradient of the velocity field. The
"reference" density and velocity used in the denominator are specified through the reference values panel.

141

Basic entities such as velocity and pressure are automatically exported from FLUENT into CFD-Post. Others
such as skin friction coefficient needs to be manually exported. To manually export the skin friction coefficient,
in FLUENT, click on File > Data File Quantities:

In Data File Quantities dialogue, select skin friction coefficient and click on OK.

142

Note
Students in MAE 6510 will need to select the Nusselt number in addition to the skin friction coefficient for your HW
assignment. For the Nusselt number, reference values used are length and temperature. Hence, you will need to
specify the appropriate reference density, velocity, length, and temperature in FLUENT before you export the skin
friction coefficient and Nusselt number into the post-processor.

143

Double click on Results from the Workbench Window to launch CFD-Post.

Velocity Vectors

Click on the z-axis,


it Velocity Vector.

to view the XY plane. Click on the vector icon to insert a vector plot. Name

A panel named "Details of Velocity Vector" will appear right below the outline window. Set the Locations to
symmetry 1. Click on Apply to display the velocity vectors.

144

The velocity vectors will be displayed in the view window.

You can use the wheel button of the mouse to zoom into the region that closely surrounds the plate, to get a
better view of the boundary layer velocities:

Pressure Contour
Insert > Contour. Name it Pressure contour.
145

In Details of Pressure contour, change the locations to symmetry 1, change the variable to Pressure, and change
the number of contours to 50.

Click on Apply to view the contour.

146

Outlet Velocity Profile


We will create a line that corresponds to the x=1 line (outlet). Then the velocity along this line can be plotted
against the Y axis. From the toolbar, insert > location > line. Name it "Outlet"

In the Details of Outlet panel, enter the following coordinates. Change the number of samples to 50. Click on
Apply to create a line at the outlet.

147

Insert a chart from the menu: insert > chart. Name the chart "Velocity Profile". Change the title to "Velocity
Profile" in the General tab. In the Data Series tab, rename Series 1 to FLUENT and select Outlet for location.
Select Velocity as the variable in the X Axis tab and select Y as the variable in the Y Axis tab. Click on Apply to
generate the chart.

The velocity profile at the outlet is shown below:

148

We would like to compare the FLUENT result to the Blasius boundary layer solution. Download the Blasius
solution here. Return to the Data Series tab and insert another data set. Rename it Blasius. Instead of specifying
the location of the data, select the Blasius solution file you have downloaded.

Click on Apply. The comparison should look like the following plot:

149

Normalized velocity profile


We will observe the normalized velocity (u/U_infinity) at the outlet. Insert a point and call it free stream. The
velocity at this point will be extracted and set to the free stream velocity (U_infinity). The velocity profile found
in the previous step will be divided by U_infinity.

Enter the following coordinates and click on Apply.

150

The location of this point can be visualized in the 3D viewer:

In the expressions tab, create a new expression and name it "Uinf". In Details of Uinf, enter the following
command and click on Apply:

151

Notice Uinf returns 1 m/s as the velocity at the point where we defined as free stream. This is the same free
stream velocity that we have set up in FLUENT.
Insert another expression and name it "u normalized". Enter the following command and notice its value is a
variable. This is because the u-velocity varies in the y direction.

152

In the Variables tab, create a new variable and name it "normalized u". Retain Expression for the Method and
change the expression to "u normalized" from the drop down list. Click on Apply. normalized u now appears as
an variable.

153

Insert a chart and name it "normalized velocity". Select Outlet for the location in Data Series. Select normalized
u for the X variable and Y for the Y variable. Click on Apply to view the chart.

Notice the scale of this profile is exactly the same as that of the outlet velocity profile. This is because the free
stream velocity, Uinf, is 1 m/s.

Mid-Section Velocity Profile


Here, we will plot the variation of the x component of the velocity along a vertical line in the middle of the
geometry. In order to create the profile, we must first create a vertical line at x=0.5m. Insert another line, same as
the previous step, and name it Mid section. Enter the following numbers to create a vertical line at x=0.5m. Set
the number of samples to 50. Remember to click on Apply to finish.

154

Insert another chart and name it Mid Section Velocity Profile. In the General tab, change the title to "Velocity
profile". Select Mid Section as the location and rename Series 1 to Mid section. We will compare the velocity
profiles at the mid section and at the outlet. Repeat the procedure in the previous step to insert the velocity
profile at the outlet. Change the variable to Velocity in the X Axis tab and change the variable to Y in the Y Axis
tab. Click on Apply to generate the chart.

The velocity profile comparison is shown below:

Skin Friction Coefficient


We can plot the skin friction coefficient imported from FLUENT as a function of distance along the plate. Insert
a line and name it "plate wall". Enter the end points of the line and the number of samples as the following:

155

Insert a chart and name it Cf along wall. Use the same name for the chart title.

156

From the Data Series tab, Select "plate wall" for the location.

157

In the X Axis tab, select X as the Variable. In the Y Axis tab, select Skin Friction Coefficient as the Variable.
The skin friction coefficient along the plate is shown below:

It is of interest to compare the numerical skin friction coefficient profile to the skin friction coefficient profile
obtained from the Blasius solution. We will compare the FLUENT result to the Blasius solution. Download the
Blasius solution here. The comparison is shown below:

158

You can export the skin friction coefficient for data manipulation.

Step 7: Verification & Validation


It is very important that you take the time to check the validity of your solution. This section leads you through
some of the steps you can take to validate your solution.
Refine Mesh

Let's repeat the solution on a finer mesh. For the finer mesh, we will increase the total number of elements(cells)
by a factor of four. In order to accomplish this, we double the number of divisions on each section. Instead of
modifying the project that was just created, we will duplicate it and modify the duplicate. In the Workbench
Project Page right click on Mesh then click Duplicate as shown below.
159

Higher Resolution Image


Rename the duplicate project to FlatPlate (mesh 2). You should have the following two projects in your
Workbench Project Page.

Next, double click on the Mesh cell of the FlatPlate (mesh 2) project. A new ANSYS Mesher window will
open. Under Outline, expand Mesh and click on Edge Sizing. Under Details of "Edge Sizing", enter 100 for
Number of Divisions. Next set the number of divisions for Edge Sizing 2 and Edge Sizing 3 to 120. Then, click
Update to create the new mesh. The new mesh should now have 12000 elements (100 x 1200). A quick glance of
the mesh statistics reveals that there is indeed 12000 elements.

Higher Resolution Image


Compute the Solution

Close the ANSYS Mesher to go back to the Workbench Project Page. Under FlatPlate (mesh 2), right click on
Fluid Flow (FLUENT) and click on Update, as shown below.

160

Now, wait a few minutes for FLUENT to obtain the solution for the refined mesh. After FLUENT obtains the
solution, save your project.
Convergence

In order to launch FLUENT double click on the Solution of the "Laminar Pipe Flow (mesh 2)" project in the
Workbench Project Page. The new mesh has significantly more cells, thus it is likely that the solution did not
converge to the tolerances we have previously set. Therefore, we will iterate the solution further, to make sure
that the solution converges. In order to do so click on Run Calculation, set Number of Iterations to 1000 and
click Calculate, as shown below.

Higher Resolution Image


Once you rerun the calculation, you will quickly see that the solution did not converge for the finer mesh within
1000 iterations. The solution should converge by the 1784th iteration as shown below.

Outlet Velocity Profile

Now, the variation of the x component of the velocity will be plotted with the results of the original mesh to
determine whether the solution is mesh converged. Set up a plot for the variation of the x component of the
velocity along the outlet as was done in the solution section. Then load the XVelOutlet.xy file into the plot and
generate the plot. You should obtain the following image.

161

Higher Resolution Image


As one can see from the image above, the numerical solution does not vary much at all between the two meshes.
Thus, it has been confirmed that the solution is mesh converged.

FLUENT 12.1 - Steady Flow Past a Cylinder


Problem Specification

Consider the steady state case of a fluid flowing past a cylinder, as illustrated above. Obtain the velocity and
pressure distributions when the Reynolds number is chosen to be 20. In order to simplify the computation, the
diameter of the cylinder is set to 1 m, the x component of the velocity is set to 1 m/s and the density of the fluid
is set to 1 kg/m^3. Thus, the dynamic viscosity must be set to 0.05 kg/m*s in order to obtain the desired
Reynolds number.

1. Pre-Analysis & Start-Up


Prior to opening FLUENT, we must answer a couple of questions. We must determine what our solution domain
is and what the boundary conditions are.
Solution Domain

For an external flow problem like this, one needs to determine where to place the outer boundary. A circular
domain will be used for this simulation. The effects that the cylinder has on the flow extend far. Thus, the outer
boundary will be set to be 64 times as large as the diameter of the cylinder. That is, the outer boundary will be a
circle with a diameter of 64 m. The solution domain discussed here is illustrated below.

162

Boundary Conditions

First, we will specify a velocity inlet boundary condition. We will set the left half of the outer boundary as a
velocity inlet with a velocity of 1 m/s in the x direction. Next, we will use a pressure outlet boundary condition
for the right half of the outer boundary with a gauge pressure of 0 Pa. Lastly, we will apply a no slip boundary
condition to the cylinder wall. The aforementioned boundary conditions are illustrated below.

2. Geometry
Strategy for Geometry Creation

In order to create the desired geometry we will first create a surface body for the cylinder. Next, we will create a
surface body for the outer boundary as a frozen, so that it doesn't merge with the first surface body. Then, we
will use a boolean operation to subtract the small surface body from the large surface body. At this point, we will
have the surface body of the outer boundary with a hole in the middle where the cylinder is. Lastly, we will
project a vertical line on to the geometry, so that radial edge sizing can be implemented in the meshing process.
Fluid Flow(FLUENT) Project Selection

Drag Fluid Flow(FLUENT) into the Project Schematic window.


Analysis Type

(Right Click) Geometry > Properties


Set Analysis Type to 2D
Launch Design Modeler

(Double Click) Geometry


163

Create Inner Circle and Dimension

Create a circle, centered around the origin in the xy plane. Set the diameter of the circle to 1m.
Inner Circle Surface Body Creation

Concept > Surfaces From Sketches.


Set the Base Object to Sketch 1 (located underneath XYPlane in the Tree). Click Generate
Create New Sketch in the XY Plane

In this step we will create a new sketch in the XY Plane. This step is required for the boolean operation that we
will carry out later in the geometry process. It allows us to create two distinguishable geometries, in the xy plane.
Click on XYPlane in the Tree Outline and it should highlight blue. Then click on the New Sketch button,
.
Create Outer Circle and Dimension

Now, create a circle centered around the origin in Sketch 2. Set the diameter of the circle to 64m.
Outer Circle Surface Body Creation

In this step the Surface Body will be created as a frozen, such that it does not merge with the inner circle surface
body.
Concept > Surfaces From Sketches.
Set the Base Object to Sketch 2 (located underneath XYPlane in the Tree). Then set Operation to Add Frozen as
shown in the image below.

\
Then, click Generate
Carry Out Boolean Operation: Subtraction

In this step, the inner circle will be subtracted from the outer circle in order to obtain the desired geometry.
Create > Boolean.
First, set Operation to Subtract. Next, use the face selection filter,
, to apply the outer circle surface body as
the Target Body. Then, use the face selection filter,
, to apply the inner circle surface body as the Tool Body.
Lastly, click Generate. At this point if you zoom into the center of the circle you should see the 1m diameter
hole, as shown below.

164

Create a Bisecting Line

The purpose of this step and the following two steps is to imprint a line onto the geometry that will, allow for
radial edge sizing in the meshing step.
Click on XYPlane in the tree and it should highlight blue. Then, click the new sketch button,
. In the new
sketch draw a line on the y axis that goes through both of the concentric circles. Make sure that it is coincident to
the y axis. Then trim the line segments that lay inside of the inner circle and the line segments that lay outside of
the outer circle. This, is carried out by using the Trim feature located in the Modify portion of Sketching.
Line Body Creation

Concept > Lines From Sketches.


Set the Base Object to Sketch 3. (located underneath XYPlane in the Tree). Click Generate
Projection

Tools > Projection.


Apply the two lines that you created to edge and apply the surface body to target. You must do these steps by
using the line selection filter and the surface selection filter. For the two lines hold down control to select them
both. Click Generate.
Save Project and Close Design Modeler

3. Mesh
In this section the geometry will be meshed with 18,432 elements. The geometry will be given 192
circumferential divisions and 96 radial divisions. Mapped face meshing will be used and biasing will be used in
order to significantly increase the number of elements located close to the cylinder.
Launch Mesher

(Double Click) Mesh

165

Mapped Face Meshing

(Right Click) Mesh > Insert > Mapped Face Meshing


Set Geometry to both portions of the surface body. You will have to hold down control in the selection process in
order to highlight both halves. Click Update.
Circumferential Edge Sizing

(Right Click) Mesh > Insert > Sizing


Set Geometry to both edges of the surface body. You will have to use the edge selection filter and you will have
to hold down control in the selection process in order to highlight both halves. Set Type to Number of Divisions,
set Number of Divisions to 96 and set Behavior to Hard. Click Update to generate the new mesh.
Radial Edge Sizing 1 (Top Half)

(Right Click) Mesh > Insert > Sizing


Set Geometry to the top half of the bisecting line. Set Type to Number of Divisions, set Number of Divisions to
96 and set Behavior to Hard. Then, set Bias Type to the first option and set Bias Factor to 460. These selections
are shown in the image below.

Radial Edge Sizing 2 (Bottom Half)

(Right Click) Mesh > Insert > Sizing


Set Geometry to the top half of the bisecting line. Set Type to Number of Divisions, set Number of Divisions to
96 and set Behavior to Hard. Then, set Bias Type to the second option and set Bias Factor to 460. These
selections are shown in the image below.

Then, click Update to generate the new mesh. You should obtain the mesh, that is shown below.
166

Click Here For Higher Resolution


Verify Mesh Size

(Click) Mesh > (Expand) Statistics


You should have 18,624 nodes and 18,432 elements.
Create Named Selections

In this section the various parts of the geometry will be named according to the image below. First create a
named selection for the left half of the outer boundary and call it "farfield1". Next, create a named selection for
the right half of the outer boundary and call it "farfield2". Lastly, create a named selection for both sides of the
inner circle(cylinder) and call it "cylinderwall". When creating the third named selection, make sure that you
included both halves of the circle. You will have to hold down control to select both edges.

Save Project

4. Setup (Physics)
Launch Fluent

(Double Click) Setup in the Workbench Project Page.


167

Double Precision

Select Double Precision.


Parallel Processing

If you are using a computer that has more than one core, it is advantageous to turn on the parallel processing
feature of FLUENT. This feature will divide the solution domain amongst the number of cores that you specify.
The maximum number of cores that you can specify is 4 for the standard FLUENT package. The Swanson Lab at
Cornell University has dual core machines. In order to use both cores, set Processing Options to Parallel (Local
Machine) and set the Number of Processes to 2. These selections are shown below.

If you have more cores set Number of Processes to the number of cores you have ( 4 is the limit). Now, when
you run your calculations in FLUENT you will have more than one core working for you, which will
significantly reduce your computation time. Lastly, click OK.
Check Mesh

(Click) Mesh > Info > Size


You should now have an output in the command pane stating that there are 18,432 cells.
(Click) Mesh > Check
You should see no errors in the command pane.
Specify Material Properties

Problem Setup > Materials > Fluid > Create/Edit....


Then set the Density to 1 kg/m^3 and set Viscosity to 0.05 kg/m*s. Click Change/Create then click Close.
Boundary Conditions
FarField1

Problem Setup > Boundary Conditions > farfield1.


Set Type to velocity-inlet. Click Edit.... Set Velocity Specification Method to Components, set X-Velocity to 1
m/s, and set Y-Velocity to 0 m/s.
168

FarField2

Problem Setup > Boundary Conditions > farfield2..


Set Type to pressure-outlet.
Cylinder Wall

Problem Setup > Boundary Conditions > cylinderwall.


Set Type to wall.
Reference Values

Problem Setup > Reference Values.


Set the Density to 1 kg/m^3. The other default values will work for the purposes of this simulation.
Save Project

5. Solution
Second Order Upwind Momentum Scheme

Solution > Solution Methods > Spatial Discretization.


Set Momentum to Second Order Upwind
Convergence Criterion

Solution > Monitors > Residuals > Edit....


Set the Absolute Criteria for , x-velocity and y-velocity all to 1e-6. Click ok
Solution > Monitors > Drag > Edit....
Then check Print to Console and Plot. Next, click cylinderwall, which is located under Wall Zones. Lastly, click
ok
Initial Guess

Solution > Solution Initialization.


Set Compute From to farfield1. Alternately, you can simply set X Velocity to 1 m/s. Then, click Initialize.
Iterate Until Convergence

Solution > Run Calculation.


Set the Number of Iterations to 2000. Then, click Calculate. (You may have to hit Calculate twice.) Now, have
a cup of coffee. The solution should converge after approximately 1647 iterations.
Save Project

6. Results
Velocity Vectors

Results > Graphics and Animations > Vectors > Set Up...
Then click Display. The Scale was set to 2 in the plot below.
169

Higher Resolution Image


Stream Lines

Results > Graphics and Animations > Contours > Set Up...
Set Contours of to Velocity.. and set the box below to Stream Function. Make sure Filled is not selected and
click Display. The plots below were created by setting levels to 40, deselecting Auto Range, setting Min (kg/s)
to 31 and setting Max (kg/s) to 33.

Higher Resolution Image


Vorticity

Results > Graphics and Animations > Contours > Set Up...
Set Contours of to Velocity.. and set the box below to Vorticity Magnitude. Then click Display. The plot below
was created by by setting levels to 60, deselecting Auto Range, setting Min (1/s) to 0.25 and setting Max (1/s) to
9.

Higher Resolution Image


Drag Coefficient

Reports > Result Reports > Forces > Setup


Then, click Print. The command pane will now display the following results: the pressure force, the viscous
force, the total force, the pressure force coefficient, the viscous force coefficient and the drag force coefficient.
As one can see from the following image link, FLUENT yields 2.04 for the value of the drag coefficient. Drag
Coefficient

170

7. Verification and Validation


As with all simulations, it is imperative to verify your results. Here, we will verify our results by comparing the
drag coefficient we obtain from FLUENT to what we obtain

FLUENT 12.1 - Unsteady Flow Past a Cylinder


Problem Specification

Consider the unsteady state case of a fluid flowing past a cylinder, as illustrated above. For this tutorial we will
use a Reynolds Number of 120. In order to simplify the computation, the diameter of the cylinder is set to 1 m,
the x component of the velocity is set to 1 m/s and the density of the fluid is set to 1 kg/m^3. Thus, the dynamic
viscosity must be set to 8.333x10^-3 kg/m*s in order to obtain the desired Reynolds number.
Compared to the steady case, the unsteady case includes an additional time-derivative term in the Navier-Stokes
equations:

The methods implemented by FLUENT to solve a time dependent system are very similar to those used in a
steady-state case. In this case, the domain and boundary conditions will be the same as the Steady Flow Past a
Cylinder. However, because this is a transient system, initial conditions at t=0 are required. To solve the
system, we need to input the desired time range and time step into FLUENT. The program will then compute a
solution for the first time step, iterating until convergence or a limit of iterations is reached, then will proceed to
the next time step, "marching" through time until the end time is reached.

2. Pre-Analysis & Start-Up


Please complete the "Steady Flow past a Cylinder tutorial before completing this tutorial. Click here to go to the
problem statement of the "Steady Flow Past a Cylinder" tutorial.
Alternatively, click here to download the completed project files for the "Steady Flow Past a Cylinder" tutorial.
The pre-analysis is the same for both steady and unsteady flow past a cylinder. Click [here] to go to the preanalysis of the "Steady Flow Past a Cylinder" tutorial.

171

To start-up, open your completed "Steady Flow Past a Cylinder" project file. (If using the completed version in
the zip file above, extract the files and open "Cylinder.wbpj".)
Right-click on Fluid Flow (FLUENT) and then click Duplicate. Enter "Unsteady Flow" in the highlighted field
to rename it. Your Project Schematic should now appear as below.

Geometry

We can skip the geometry step, because it is the same as the "Steady Flow Past a Cylinder" geometry and we
have already duplicated that project.
Mesh

We can skip the mesh step as well, because it is the same as the "Steady Flow Past a Cylinder" mesh and we
have already duplicated that project.

4. Setup (Physics)
Launch FLUENT.

(Double Click) Setup in "Unsteady Flow", the duplicate project. Select Double Precision, and if using a
computer with multiple cores, select parallel, and set the number of cores to be used.

Then click OK

172

Transient

In this step here we will, tell FLUENT to solve for the unsteady flow. As you can see, by default FLUENT will
solve for the steady flow.
Problem Setup > General. Set Time to Transient.

Specify Material Properties

To achieve a Reynolds number of 120, as required in the problem statement, we will change the material
viscosity, to 8.333*10^-3 kg/m*s.
Problem Setup > Materials > Fluid > Create/Edit.... Set the viscosity to 8.333*10^-3 kg/m*s. Click
Change/Create.

Then click Close.


Save Project

173

5. Solution
Convergence Criterion: Turn off Drag, Turn on Lift

Solution > Monitors > Drag > Edit.... Then uncheck Print to Console and uncheck Plot. Click ok.
Solution > Monitors > Lift > Edit.... Then check Print to Console, Plot and Write. Click ok. The last option
writes the lift coefficient data to a file that is buried in one of the subfolders that FLUENT creates in the working
folder. You'll have to dig around to find it.
Solution Initialization

First, let's set the initial condition in all of the cells to a velocity of 1 m/s in the X-direction. Solution > Solution
Initialization. Set Compute From to farfield1.. Click Initialize.
Next, we'll change the velocity in some of the cells to more quickly reach a sinusoidal variation of the lift
coefficient. Adapt > Region....

Then set X Min to 0.5 m, set X Max to 32 m, set Y Min to 0 m, and set Y Max to 32m.

174

Click Mark then click Close. This will select the cells bounded by these four points, so we can change the initial
condition in them.
Next, click Patch.

175

Complete the patching menu as shown below. This will change the initial Y component of velocity in the
selected region from 0 to 0.2 m/s.

Click Patch,then click close.


Setting Up Data Export to Create Animation

We would like to create an animation of the vorticity magnitude after the solution has been calculated. To do so,
we will need to export data from FLUENT to CFD-Post, the post processor used to view results. To do so, go to
Solution > Calculation Activities > Automatic Export > Create > Solution Data Export....

Next, change File Type to CFD-Post compatible, as this is the program we will use for post processing. Then,
select Vorticity Magnitude from the list of variables on the right, so we can make an animation of contours of
vorticity. Finally, click Browse, and choose a convenient file location to place the data files. Make note of this
location for later use.

176

Advance Solution in Time

Solution > Run Calculation. Set Time Step Size to 0.2 seconds and set the Number Of Time Steps to 400.

Now, click Calculate. (You may have to hit Calculate twice.) Now, have a cup of coffee. When complete, close
FLUENT to return to the main project window.
177

Save Project

Results
Open CFD-Post

We'll create a separate CFD-Post module, as this is the easiest way to load the results for this project.
On the left of the main project window, expand Component Systems and double-click Results.

Your project schematic window should now appear as below.

Double click on the Results module that was just created to open CFD-Post.
Results

Now, we need to load the results of our FLUENT simulation.


After opening CFD-Post, click the Load Results button in the upper left corner of the screen.

178

Next, browse to the location where you chose to save the FLUENT data files. Select the .cas file that is in this
folder, which should be named "FFF-1-0001.cas", or similar. In the bottom right of this window, select Load
complete history as: and Single Case. Finally, click Open.

Click OK in the popup window if one appears.


h4. Load Timesteps
Click Tools > Time Step Selector to open the Time Step Selector.

Select the first time step, and click Apply. Leave the Time Step Selector window open, but continue to the next
step.
h4. Create Vorticity Contour
Now, let's insert a contour of vorticity, in order to animate it.
179

While leaving the Time Step Selector window open, click Insert > Contour. Name it "Vorticity Contour".
Under Details of Vorticity Contour, select symmetry 1 from Locations.
Next, ensure that Variable is set to Vorticity.
Change Range to User Specified. Set the Min to 0.01 s^-1 and Max to 2 s^-1.
Enter 25 for Number of Contours. You should now see the following:

Click Apply to create the contour.


Next, let's set up the view we would like for the animation. You can see that we are currently viewing the 2D
surface from a 3D, isometric perspective. To fix this, click the Z-axis in the axes triad in the lower corner.

180

Now let's zoom in to the are of interest. Select the zoom box tool from the upper toolbar.

Using the zoom box tool, click and drag a box that roughly encompasses the area shown below to zoom in on it.

Now we're ready to animate the vorticity contour over this zoomed-in area.
h4. Create Animation
Return to the Time Step Selector Window, which should still be open. Click the Animate Timesteps button.

Select Keyframe Animation, and click the insert new keyframe button,
. Change the number of frames to
equal the number of data files we saved to animate, in this case 400. Your Animation window should look like
181

this:

Keeping the Animation window open, click back to the Time Step Selector window. Select time step #400, and
click Apply. The Vorticity Contour on the right half of your screen should now have changed. Click back to the
Animation window, and insert another new keyframe. This time, leave the number of frames set to 10.
We're now ready to set up the saving options for the animation. Click the arrow in the bottom right of the
window to expand the options.

182

Check the box labeled Save Movie, and use the folder icon to set the desired file location and type.
Next, maximize your CFD-Post window, and click the play button in the Animation window to create the
animation!
Your video should turn out similar to the one below.

ANSYS WB - Airfoil
Problem Specification
In this tutorial, we will show you how to simulate a NACA 0012 Airfoil at a 6 degree angle of attack placed in a
wind tunnel. Using FLUENT, we will create a simulation of this experiment. Afterwards, we will compare
values from the simulation and data collected from experiment.
183

Pre-Analysis & Start-Up


Boundary Conditions

One of the simple things we can think about before we set up the simulation is begin planning the boundary
conditions of the set up. One of the popular meshes for simulating a airfoil in a stream is a C-Mesh, and that is
what we will be using. At the inlet of the system, we will define the velocity as entering at a 6 degree angle of
attack (as per the problem statement), and at a total magnitude of 1. We will also define the gauge pressure at the
inlet to be 0. As for the outlet, the only thing we can assume is that the gauge pressure is 0. As for the airfoil
itself, we will treat it like a wall. Together, these boundary conditions form the picture below:

Open ANSYS Workbench

Now that we have the pre-calculations, we are ready to do a simulation in ANSYS Workbench! Open ANSYS
Workbench by going to Start > ANSYS > Workbench. This will open the start up screen seen as seen below

184

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of the start up
window, you will see the Toolbox Window. Take a look through the different selections. We will be using
FLUENT to complete the simulation. Load the Fluid Flow (FLUENT) box by dragging and dropping it into the
Project Schematic.

Once you have loaded FLUENT into the project schematic, you are ready to create the geometry for the
simulation.

Geometry
Download the Airfoil Coordinates

In this step, we will import the coordinates of the airfoil and create the geometry we will use for the simulation.
Begin by downloading this file here and saving it somewhere convenient. This file contains the points of a
NACA 0012 airfoil.
Launch Design Modeler

Before we launch the design modeler, we need to specify the problem as a 2D problem. Right click
and select Properties. In the Properties of Schematic A2: Geometry Window, select
185

Analysis Type > 2D. Now, double click


prompted, select Meters as the unit of measurement.

to launch the Design Modeler. When

Airfoil

First, we will create the geometry of the airfoil. In the menu bar, go to Concept > 3D Curve. In the Details View
window, click Coordinates File and select the ellipsis to browse to a file. Browse to and select the geometry
file you downloaded earlier. Once you have selected the desired geometry file, click
curve. Click

to create the

to get a better look at the curve.

Next, we need to create a surface from the curve we just generated. Go to Concepts > Surfaces from Edges.
Click anywhere on the curve you just created, and select Edges > Apply in the Details View Window. Click
to create the surface.

Create C-Mesh Domain

Now that the airfoil has been generated, we need to create the meshable surface we will use once we begin to
specify boundary conditions. We will begin by creating a coordinate system at the tail of the airfoil - this will

186

help us create the geometry for the C-mesh domain. Click


to create a new coordinate system. In the Details
View window, select Type > From Coordinates. For FD11, Point X, enter 1.

Click

to generate the new coordinate system. In the Tree Outline Window, select the new coordinate

system you created (defaulted to Plane 4), then click


to create a new sketch. This will create a sketching
plane on the XY plane with the tail of the airfoil as the origin. At the bottom of the Tree Outline Window, click
the Sketching tab to bring up the sketching window.
The first action we will take is create the arc of the C-Mesh domain. Click
. The first click
selects the center of the arc, and the next two clicks determine the end points of the arc. We want the center of
the arc to be at the tail of the airfoil. Click on the origin of the sketch, making sure the P symbol is showing

For the end points of the arc, first select a point on the vertical axis above the origin (a C symbol will show), then
select a point on the vertical axis below the origin. You should end up with the following:

187

To create the right side of the C-Mesh donain, click


. Click the following points to create
the rectangle in this order - where the arc meets the positive vertical axis, where the arc meets the negative
vertical axis, then anywhere in the right half plane. The final result should look like this:

Now, we need to get rid of necessary lines created by the rectangle. Select Modify in the Sketching Toolboxes
window, then select
. Click the lines of the rectangle the are collinear with the positive and negative
vertical axises. Now, select the Dimensions toolbox to dimension the C-Mesh domain. Click
,
188

followed by the arc to dimension the arc. Assign the arc a value of 12.5. Next, select
. Click the
vertical axis and the vertical portion of the rectangle in the right half plane. Also assign the horizontal dimension
a value of 12.5.

Click here to enlarge the image


Next, we need to create a surface from this sketch. To accomplish this, go to Concept > Surface From
Sketches. Click anywehere on the sketch, and select Base Objects > Apply in the Details View Window. Also,
select Operation > Add Frozen. Once you have the correct settings, click
. The final step of creating
the C-Mesh is creating a surface between the boundary and the airfoil. To do this, go to Create > Boolean. In the
Details View window, select Operation > Subtract. Next, select Target Bodies > Not selected, select the large CMesh domain surface, then click Apply. Repeat the same process to select the airfoil as the Tool Body. When you
have selected the bodies, click
Selecting the Airfoil Body
Because the C-Mesh domain and the airfoil overlap, once you click in the vicinity of the airfoil ANSYS will select the CMesh domain but give you the option of selecting multiple layers

Select the layer that corresponds to the airfoil and the airfoil will be highlighted.
Create Quadrants

In the final step of creating the geometry, we will break up the new surface into 4 quadrants; this will be useful
for when we want to mesh the geometry. To begin, select Plane 4 in the Tree Outline Window, and click

.
189

Open the sketching menu, and select


. Draw a line on the vertical axis that intersects the entire C
mesh. Trim away the lines that are beyond the C-Mesh, and you should be left with this:

Next, go to Concepts > Lines from Sketchs. Select the line you just drew and click Base Objects > Apply,
followed by
. Now that you have created a vertical line, create a new sketch and repeat the process for
a horizontal line that is collinear to horizontal axis and bisects the geometry.

Now, we need to project the lines we just created onto the surface. Go to Tools > Projection. Select Edges press
Ctrl and select on the vertical line we drew (you'll have to select both parts of it), then press Apply. Next, select
Target and select the C-Mesh surface, then click Apply.
Once you click
, you'll notice that the geometry is now composed of two surfaces split by the line we
selected. Repeat this process to create 2 more projections: one projection the line left of the origin onto the left
190

surface, and one projecting the right line on the right surface. When you're finished, the geometry should be split
into 4 parts.

The geometry is finished. Save the project and close the design modeler, as we are now we are ready to create
the mesh for the simulation.

Mesh
Mapped Face Meshing

First, we will apply a mapped face meshing control to the geometry. In the Outline window, click on Mesh to
bring up the Meshing Toolbar. In the Meshing Toolbar, select Mesh Control > Mapped Face Meshing. Making
sure the face selection filter is selected
, select all four faces by holding down the right mouse button and
dragging the mouse of all of the quadrants of the geometry. When all of the faces are highlighted green, in the
Details view Window select Geometry > Apply. Next, select
Edge Sizing

Next, we will apply edge sizing controls to all of the edges of the mesh. To begin, go to Mesh Control > Sizing.
Next, click the edge selection filter
button:

. Select the following 4 edges buy holding Ctrl and using the left mouse

191

Click here to enlarge


Once the edges are selected, in the Details View Window select Geometry > Apply. Next, select Type > Number
of Divisions. Change the Number of Divisions to 50. Select Behavior > Hard. We also want the mesh to have a
bias, so select the first bias type: Bais > ----- - -, and give the edge sizing a Bias Factor of 150. The Edge
sizing should now look like this:

Notice that the element sizes get smaller towards the airfoil. This will give us a better resolution around the
airfoil where the flow gets more complicated. Create a new edge sizing with the same parameters, but choose the
4 remaining straight edges (see figure below). The number of divisions will still be 50, but now will be selecting
a different biasing type by selecting the second Bias option: Bias > - - -----. Again, set the Bias Factor to 150

192

Edge Bias
It is important to make sure that the edge divisions to this point are biased towards the center of the mesh: otherwise
you may run into some problems later. If your mesh does not match the pictures in the tutorial, make sure to change
the parameters of the mesh to make sure that they do: this might mean choosing different edges for the different
biasing types than those outlined in this tutorial.

Finally, create a third edge sizing, and select the rounded edges as the geometry. Again, select Type > Number of
Divisions, and change Number of Divisions to 100. Select Behavior > Hard. This time, we will not bias the
edges.

Now, select Mesh > Generate to generate the mesh. It should look like this.
193

Click here to enlarge


Named Selections

Now will assign names to some of the edges to make creating boundary conditions for the mesh easier. Let's
recall the boundary conditions we planned in the Pre-Analysis Step:

The edges highlighted blue are the inlet, the edges highlighted red are the outlet, and the airfoil is highlighted
white in the middle. Now we are ready to name the sections. In the Outline window, select geometry - this will
make seeing the edges a little easier. Again make sure the edge selection tool
is selected. Now, select the two
vertical edges on the far right side of the mesh. Right click, and select Create Named Selections. Name the edges
outlet. Next, select the edges that correspond to the inlet of the flow as defined by the picture above. Again,
right click and select Create Named Selections and this time name the selection inlet. Finally, select the two
edges making up the airfoil, and name the selection airfoil.

Setup(Physics)
194

Launch the Solver

In this step, we will open fluent and define the boundary conditions of the problem. If you haven't already, close
the meshing window to return to the Project Outline window. Now, click
. This will load the
mesh into FLUENT. Now, double click Setup. The Fluent Launcher Window should open. Check the box
marked Double Precision. To make the solver run a little quicker, under Processing Options we will select
Parallel and change the Number of Processes to 2. This will allow users with a double core processor to utilize
both.

Select the Solver

Click OK to launch Fluent. The first thing we will do once Fluent launches is define the solver we are going to
use. Select Problem Setup > General. Under Solver, select Density-Based.
Models and Materials

Next, we will define the model we are going to use. We do this by going Problem Setup > Models > ViscousLaminar. Then press Edit... This will open the Viscous Model Menu Window. Select Inviscid and press OK.
Now, we will specify characteristics of the fluid. Because we specified the fluid as inviscid, we will only have to
define the density of the fluid. To make matters even simpler, we are only looking for non-dimensionalized
values like pressure coefficient, so we will define the density of our fluid to be 1 kg/m^3. To define the density,
click Problem Setup > Materials > (double click) Air. This will launch the Create/Edit Materials window.

195

Under Properties, ensure that density is set to Constant and enter 1 kg/m^3 as the density. Click Change/Create
to set the density.
Boundary Conditions
Inlet

Now that the fluid has been described, we are ready to set the boundary conditions of the simulation. Bring up
the boundary conditions menu by selecting Problem Setup > Boundary Conditions. In the Boundary Conditions
window, look under Zones. First, let's set the boundary conditions for the inlet. Select Inlet to see the details of
the boundary condition. The boundary condition type should have defaulted to velocity-inlet: if it didn't, select it.
Now, click Edit to bring up the Velocity-Inlet Window. We need to specify the magnitude and direction of the
velocity. Select Velocity Specification Method > Components. Remember, we want the flow to enter the inlet at
an angle of 6 degrees since the angle of attack of the airfoil is 6 degrees; thus, the x velocity will be

, and

the y velocity will be


. Specify X-Velocity as 0.9945 m/s and Y-Velocity as 0.1045 m/s. When you have
finished specifying the velocity as entering the inlet at 6 degrees (the same thing as having an angle of attack of 6
degrees), press OK

Outlet

In the Boundary Conditions window, look under Zones. Select Outlet to see the details of the boundary
condition. The boundary condition type should have defaulted to pressure-outlet: if it didn't, select it. Click Edit,
and ensure that the Gauge Pressure is defaulted to 0. If it is, you may close this window.
196

Airfoil

In the Boundary Conditions window, look under Zones and select airfoil. Select Type > Wall if it hasn't been
defaulted.
Reference Values

The final thing to do before we move on to solution is to acknowledge the reference values. Go to Problem
Setup > Reference Values. In the Reference Values Window, select Compute From > Inlet. Check the reference
values that appear to make sure they are as we have already set them.

Solution
Methods

First, go to Solution > Solution Methods. Everything in this section should have defaulted to what we want, but
let's make sure that under Flow the selection is Second Order Upwind. If this is the selection, we may move on.
Monitors

Now we are ready to begin solving the simulation. Before we hit solve though, we need to set up some
parameters for how Fluent will solve the simulation.
Let's begin by going to Solution > Monitors. In the Monitors Window, look under Residuals, Statistic, and
Force Monitors. Select Residuals - Print,Plot and press Edit. In the Residual Monitors Window, we want to
change all of the Absolute Criteria to 1e-6. This will give us some further trust in our solution.

Initial Guess

Now, we need to initialize the solution. Go to Solution > Solution Initialization. In the Solution Initialization
Window, select Compute From > Inlet. Ensure the values that appear are the same values we inputted in Step 5.
If the are, initialize the solution by clicking Initialize.
Solve

Once the solution has been initialized, we are ready to solve the simulation. Go to Solution > Run Calculation.
Change Number of Iterations to 3000, then double click Calculate. Sit back and twiddle your thumbs until
Fluent spits out a converged solution.

197

Results
Velocity

First, we will look at the velocity vectors of the solution to see if the make intuitive sense. To plot the velocity
vectors, go to Results > Graphics and Animations. In the Graphics and Animations Window, select Vectors and
click Set Up.... This will bring up the Vectors Menu.

Make sure the settings of the menu match the figure above: namely Vectors of > Velocity, Color by > Velocity,
and set the second box as Velocity Magnitude. To see the velocity vectors, press Display.

Pressure Contours

To view the pressure contours over the entire mesh, go to Results > Graphics and Animations again, and in the
Graphics and Animations Window, select Contours.
Click Set Up... to bring up the Contours Menu. Check the box next to Filled. Under Contours Of, ensure that the
two boxes that are selected are Pressure... and Static Pressure.

198

Once these parameters are set, press Display to see the pressure contours.
Streamlines

To view the streamlines, keep the Contours window open, and change the Contours Of box to Velocity, and the
box below to Stream Function. Change Levels to 100. Also, uncheck the box marked Auto Range, and set
Min(kg/s) to 13.11, and Max(kg/s) to 14.16

To view the streamlines, press Display


199

Pressure Coefficient

Next, we will plot the pressure coefficient along the surface of the airfoil. Click on Results > Plots to open up the
Plots Window. Under Plots, select XY Plot, and click Set Up.... In the window that pops up, change the settings
Y-Axis Function > Pressure, and change the second box to Pressure Coefficient. Ensure X-Axis Function >
Direction Vector. Under Surfaces, select airfoil. See the figure below for help.

When all the settings are correct, press Plot to plot the data to the command window. To save the data to a text
file, check the box next to Write to File. You'll notice that the Plot button has been replaced by a button marked
Write..., click it. Change the file type to All Files and save the file name as Pressure_Coefficient.txt
Coefficients of Lift and Drag

To find the Coefficients of Lift and Drag, click Results > Reports to bring up the Reports Window. In the
Reports Window, select Forces and click Set Up.... This will bring up the Force Reports menu

200

We need to set the parameters so drag across the airfoil (keep in mind, which is at an angle) will be displayed. In
the Force Reports window change the Direction Vector such that X > .9945 and Y > .1045. Click Print to print
the drag coefficient to the command window. To print the lift coefficient, in the Force Reports window change
the Direction Vector such that X > -.1045 and Y > .9945. Again, press Print.

Verification and Validation


Verification

One of the ways we can verify our data is by refining the mesh. Open up the mesh, and increase the Number of
Divisions for Edge Sizing and Edge Sizing 2 to 100. Click Mesh in the Outline window, and in the Details
window, expand statistics. The number of elements should now be 40000.

Click here to enlarge


201

Exit out of the mesher. First, right click Setup and select Reset. Then click
in the project
schematic. Open up the solver, and solve the simulation using the same solver and boundary conditions (you'll
have to input them again), but this time change the number of iterations to 5000. Again, calculate the force
coefficients and graph the pressure coefficient.
Validation

To validate our data, we will take a compare the data from actual experiment.
Unrefined Mesh Refined Mesh Experimental Data
Lift Coeffient

0.6315

0.6670

0.6630

Drag Coefficient 0.0122

0.0063

0.0090

Below is a graph displaying the comparing Coefficient of Pressure along the airfoil for the experimental data and
the CFD simulation. The data is from Gregory & O'Reilly, NASA R&M 3726, Jan 1970.

Click here to see an enlarged image


As we can see from the table and the graph, the CFD matches the data fairly well. There are inaccuracies from
factors like our assumption that the flow was inviscid, but we still managed to extract some meaningful
information from the simulation.

ANSYS WB - Supersonic Flow Over a Wedge


A uniform supersonic stream encounters a wedge with a half-angle of 15 degrees as shown in the figure below.

202

The stream is at the following conditions:

Using FLUENT, calculate the Mach Number, static and total pressure behind the oblique shock that will be
formed. Also, calculate the shock angle, pressure coefficient along the wedge and drag coefficient. Compare the
FLUENT results with the corresponding analytical results.

Pre-Analysis & Start-Up


Pre-Analysis

In order to calculate the expected results behind the shock, we recommend using a oblique shock wave calculator
(link grc.nasa.gov). At Mach 3 and an angle of 15 degrees, we find the following:

Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going to Start > ANSYS
> Workbench. This will open the start up screen seen as seen below

203

Screen Management

This tutorial is designed such that the user can have both ANSYS Workbench and the tutorial open. As shown
below, this online tutorial should fill approximately 1/3 of the screen, while ANSYS Workbench fills the
remaining 2/3 of the screen.

Setup Project

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of the start up
window, you will see the Toolbox Window. Take a look through the different selections. We will be using
FLUENT to complete the simulation. Load the Fluid Flow (FLUENT) box by dragging and dropping it into the
Project Schematic.

204

Right click the top box of the project schematic


and go to Rename, and name the project
Supersonic Flow Over a Wedge.You are ready to create the geometry for the simulation.

Geometry
Care to skip the geometry and meshing steps? README
If you would prefer to skip the geometry and mesh steps, then you can download the necessary files here. Download
the "zip" file, then extract the files to your working directory. In order to load the necessary files, go to the Workbench
Project Page, then (Click) File > Open > "Supersonic Flow Over Wedge.wbpj". Lastly, click here to skip ahead to Step 4
of the tutorial.
Set Up

First, we need to specify that the geometry is 2-dimensional. Right click the Geometry box
and
select Properties. This will open the Properties of Schematic A2: Geometry Window. Under Advance Geometry
Options change Analysis Type from 3D to 2D.

205

After the analysis type has been set, we are ready to launch Design Modeler, the geometry engine in ANSYS.
Open Design Modeler by double clicking the geometry box
. After launching Design Modeler,
you will be prompted to choose standard units. Select Meter as the standard unit, and click OK.
Sketching

We want to sketch on the XY plane. To look at the XY plane, click the positive Z-Axis on the compass in the
Graphics window.

206

To begin sketching, click on the Sketching tab in the Tree Outline window. To draw our domain, we will use the
Rectangle tool. Click on
in the Sketching Toolboxes window. In the graphics window, draw the
rectangle by first clicking on the origin (make sure the P icon is showing, meaning you are in fact selecting the
point), then select a point in the 1st quadrant.

Now, we need to draw the wedge outline in the geometry. We will use the line tool to create the wedge. Select
the line tool in the Sketching Toolboxes window.
Click on the points shown in the below figure. Make
sure the "C" is showing.

Now, we need to remove the extraneous lines that we created. In the Sketching Toolboxes window, click the
Modify tab, and select

. Next, trim the lines indicated by the figure below

207

The final sketch should look like the image below

Dimensions

Next, we need to add the dimensions for the geometry. In the Sketching Toolboxes window, select the
Dimensions tab. Next, select the general dimensioning tool
. To create a dimension, you first select a
line. This will create a dimension for that line. Next, you will need to place the dimension next to the line. See
the image below for guidance.

Next, create dimensions for the following 4 lines:

In order to add magnitudes to the dimensions, look to the Details window. You will see 4 dimensions that have
been specified. Click on a dimension magnitude, and notice that the corresponding dimension will be highlighted
in the graphics window. Use the following diagram to add the dimensions to the geometry.

208

When the dimensions have been correctly applied, the geometry should look like this:

Create Surface

Next, we need to create a surface from the sketch. In the menu tool bar, select Concept > Surface from
Sketches. In the graphics window, select any line of the geometry.
Next, in the details window, select Base Objects > Apply. Finally, press
look like the figure below.

. The geometry should now

209

Create a projection

Now, we want to project the center vertical line onto the surface body we just created. This will help us with our
mesh. In the menu bar, select New Sketch icon to create a new sketch

This will create a new sketch. In the Outline window, return to the Sketching tab. Again, select the
tool.
Draw a line from the vertex of the wedge to the top of the geometry. Make sure that when you click a vertex, a
"P" appears (meaning point, constraining the line to the vertex), a "V" appears on the line (meaning vertical,
putting a vertical constraint on the line), and a "C" appears when you click on the top line (constraining the
newly created line to the top line). Right before you make your second click to define the line, make sure it looks
like this:

The line will turn dark blue if you have done this correctly (meaning the line is fully constrained) Now, we need
to create a line body from this sketch. In the menu bar, go to Lines from Sketches. In the graphics window,
select the line you just drew. In the Outline window, select Base Objects > Apply. Finally, press

Finally, we are ready to project the line on the surface. In the menu bar, go to Tools > Projection. First, you will
need to select an edge. Select the middle vertical line we just created. In the details window, select Edges >
Apply

210

Next, we need to select the surface body for the projection. In the Details window, select Target, then select any
point on the surface body.

In Details window, select Target > Apply. Finally, press


. The line should now be projected on the
surface. Now that we have the surface and the projection, we no longer need the line body we first created. In the
Outline window, Expand 2 Parts, 2 Bodies. Right click Line Body and select Suppress Body

Now that we have completed the geometry. Save the project, and close the Design Modeler.

Mesh
Launch the Mesher

Now that we have completed creating the geometry of the domain, we are ready to mesh it. Return to the Project
Schematic Window. In the Project Schematic window, double click the Mesh box
mesher.

to launch the

211

Mapped Face Meshing

First we will apply a mapped face meshing; this will give us a regular mesh. First, in the Outline window, click
to show the Mesh menu in the menu bar. In the Meshing Menu, select Mesh Control > Mapped
Face Meshing. In the Graphics window, hold down CRTL, and select both domain faces to select it, then in the
Details window, click Geometry > Apply.
Body Sizing

Next, we will create a body sizing for the elements that will make up the domain. In the Mesh Menu, select
Mesh Control > Sizing. Next, select the body selection filter in the menu bar

Next, select the surface in the graphics window. In the Details window, select Geometry > Apply. Now, we want
to change the element size. In the Details Window, select Element Size > Default and change the value to 0.05
m.

Generate the Mesh

Now, we are ready to generate the mesh. Generate the mesh by clicking
in the menu bar or by
going to Mesh > Generate Mesh. The final mesh should resemble the one in the figure below.

212

Named Selections

Now, we need to create named selections to use when we set boundary conditions. To create a named selection,
first ensure that the edge selection filter
is selected. Next, left click on the desired edge you wish to name
(multiple edges can be selected while holding down CTRL), then right click on the edge and select Create
Named Selection.

Once you select Create Named Selection, a dialogue box will appear where you will enter the desired name of
the boundary. Use the diagram below to name all of the boundaries of the geometry.

There are 4 edges that make up the farfield, and they can all be named at once by holding down CTRL, left clicking all
of the edges while holding down CTRL, then right clicking and selecting "Create Named Selection"

Once the selections are all named and the mesh is created, you may save the project and close the mesher.

Setup (Physics)
Update the Project and Open FLUENT

Before we open FLUENT, we need to update the project the import the mesh into FLUENT. To do this, click
Update Project

. When the project updates, double click Setup

to open FLUENT.

213

Initial Settings

Before FLUENT launches, we will be prompted to set some options. In Options check the box next to Double
Precision. If you have a dual processor, you can set the option under Processing Options to Parallel, and change
the Number of Processes to 2. We don't necessarily need the parallel processes for this simulation as it is fairly
simple, but it becomes necessary later when we refine the mesh and complicate the simulation further by
changing boundary conditions.

Once the options are set, click OK.


Problem Setup - General

Now, FLUENT should open. We will begin setting up some options for the solver. In the left hand window (in
what I will call the Outline window), under Problem Setup, select General. The only option we need to change
here is the type of solver. In the Solver window, select Density-Based.
Models

In the outline window, click Models. We will need to utilize the energy equation in order to solve this
simulation. Under Models highlight Energy - Off and click Edit.... Now, the Energy window will launch. Check
the box next to Energy Equation and hit OK. We also need to change the type of viscosity model. Select
Viscous - Laminar and click Edit.... Choose the Inviscid option and press OK.

214

Materials

In the Outline window, highlight Materials. In the Materials window, highlight Fluid, and click Create/Edit....
this will launch the Create/Edit Materials window; here we can specify the properties of the fluid. Set the
Density to Ideal Gas, the Specific Heat to 1006.43, the Molecular Weight to 28.966. When you have updated
these fields, press Change/Create.

Boundary Conditions

In the Outline window, select Boundary Conditions. We will now specify each boundary condition for the
simulation.
Farfield

In the Boundary Conditions window, select farfield. Use the drop-down menu to change the Type to pressurefar-field. You will be asked to confirm the change, and do so by pressing OK. Next, a dialogue box will open
with some parameters we need to specify. Change the Gauge Pressure (Pascal) to 101325, and Mach Number
to 3.

215

Also, select the Thermal tab, and ensure that the temperature correctly defaulted to 300 K. When you are
finished, press OK.
Wedge

In the Boundary Conditions window, select wedge. Use the drop-down menu to change the Type to wall.
Symmetry

In the Boundary Conditions window, select symmetry. Use the drop-down menu to change the Type to
symmetry.
Operating Conditions

In the Boundary Conditions window, select the Operating Conditions button. Change the Gauge Pressure to 0.
Then press OK

Reference Values

In the Outline window, select Reference Values. Change the Compute From parameter to farfield. Check that
the values are accurate. The reference values are used when calculating the non-dimensional results such as the
drag coefficient.

216

Solution
Solution Methods

In the Outline window, select Solution Methods to open the Solution Methods window. Under Spatial
Discretization, ensure that the option under Flow Second Order Upwind is selected.
Solution Controls

In the Outline window, select Solution Controls to open the Solution Controls window. Ensure that the Courant
Number is set to 5.0.
Monitors

In the Outline window, click Monitors to open the Monitors window. In the Monitors window, select Residuals Print,Plot and press Edit.... This will open the Residual Monitors window. We want to change the convergence
criteria for our solution. Under Equation and to the right of Continuity, change the Absolute Criteria to 1e-6.
Repeat for x-velocity, y-velocity, and energy, then press OK.

217

Solution Initialization

In the Outline window, select Solution Initialization. We need to make an "Initial Guess" to the solution so
FLUENT can iterate to find the final solution. In the Solution Initialization window, under Compute from, select
farfield from the drop down box. Check to see that the values that generate match our inputted values, then press
Initialize
Run Calculation

In the Outline window, select Run Calculation. Change the Number of Iterations to 100. Double click
Calculate to run the calculation. It should only take about a minute to solve. After the calculation is complete,
save the project.

Results
Velocity Vectors

First, let's take a look at the velocity vectors. In the Outline window, under Results select Colors and
Animations. In the Colors and Animations window, under Graphics, select Vectors. Then press Set Up....
In the Vectors window that opens, change the Scale of the arrows to 0.25, and change the Color by parameter to
Velocity... Mach Number

218

Hit Display to view the vectors in the graphics window

Once you have plotted the velocity vectors, you may close the Vectors menu.
Mach Number Contours

Next, we will plot the contours of mach number. In the Graphics and Animations window under _Graphics,
select Contours, and press Set Up.... Change the Contours Of parameter to Velocity... Mach Number. Next,
check the box next to Filled.

219

Change the Levels to 50 and press Display

Next, click on print information icon


, and click anywhere behind the
shock. This will display a range of values. For instance, I received (2.2354529, 2.2513809). These range of
values match well with the analytic solution we received in the pre-anaysis (Mach no. = 2.254, 0.8% difference)
Pressure Coefficient/ Static Pressure Contours

Now, change the Contours Of parameter to Pressure... Pressure Coefficient and press Display.

220

Next, change the Contours Of parameter to Pressure... Static Pressure and press Display. When you have
plotted the contours of static pressure, you may close the Contours window. Again, use the print information
tool to view the pressure behind the shock. I received the range (282041.19, 286057.13). The average of this
range is about 2.803 atmospheres. From the analytical solution, we found that the pressure behind the shock is
about 2.824, a 0.7% difference.
Pressure Coefficient Along Wedge

In the Outline window under Results, select Plots. In the Plots window, select XY plot and press Set Up....
Change the Y Axis Function to Pressure... Pressure Coefficient, and select the Wedge under Surfaces.

To see the plot, press Plot

221

Measure Shock Angle

To measure the shock angle, we first need to create a line that we can plot the coefficient of pressure over. In the
Solution XY Plot window, click New Surface > Line/Rake. We will arbitrarily use the line, y = 0.35. Set the start
point of the line as (0,0.35), and the end point of the line as (1.5,0.35). Name the line y = 0.35. Now press
Create

Now, the new surface will appear in the list of surfaces. We want to plot the pressure coefficient across the
wedge and the new line we created in order to determine the shock angle. In the list of surfaces, select wedge,
symmetry, and y = 0.35. Press Plot.

We can then use the information from the plot to solve for the shock angle.

The shock angle from the analytical solution was 32.221 degrees. Because we took the value from a graph, a bit
more error is to be expected.

222

Print Drag Coefficient

Next, we will have FLUENT report the drag coefficient. Close the Solution XY Plot window. In the Outline
window, go to Reports. In the Reports window under Reports, select Forces and press Set Up.... Ensure Wedge
is selected and press Print. The drag coefficient will be printed.

Verification & Validation


Verification
Adapt the Mesh

In order to test our simulation for convergence, we will refine the mesh. Refining the mesh will allow use to
make sure that the results we are calculating are independent of the mesh. However, instead of refining the mesh
everywhere (which would be wasteful, as most of the area of the domain far away from the shock has constant
values), we will use our results to refine our mesh. Specifically, we are going to use the gradient of the pressure
to determine where to refine the mesh. First, let's take a look at our mesh. In the Outline window, select Graphics
and Animations, under _Graphics, select Mesh, then press Setup. Select all of the surfaces (except y=0.35) and
press Display. This will display the current mesh.

You may now close the Mesh Display window. In the menu bar, go to Adapt > Gradient. Under Options
uncheck Coarsen. Under Method click the radio box next to Gradient. Ensure that Gradients of > Pressure...
Static Pressure are selected. Then press Compute.

This will compute the maximum and minimum gradients of static pressure. Next, we need to pick a threshold. In
order to do this, click on Contours.... This will open the familiar Contours window. In the Contours window,
select Contours of Adaption... Existing Value, then press Compute. This will populate the Contours menu with
the values were were viewing for adaption, in this case, gradient of the static pressure. Also, make sure to
uncheck Node Values.
223

Finally, press Display to display the contours of static pressure gradient.

Our goal is to discover the areas of high gradient, and mark those areas for adaption. Using the contour graph we
can then find the areas of high pressure gradient that we want to refine. In the Contours window, uncheck Auto
Range. This will allow us to specify the range of gradients we can see in the graph. Change the Min value to
10000. Then press Display. You will see that the pressure gradients above 10000 generally mark the area of high
pressure gradient quite well. We will use 10000 as our threshold for refinement.

224

Return to the Gradient Adaption window, and enter 10000 into Refine Threshold. Then press Mark. The print
window will inform us we have marked 70 elements for refinement. Next, press Adapt. You will be asked if you
want to change the mesh. Press Yes.
It will seem like nothing has changed, but that is because we need to re-display the mesh in order to see the
adaption. The new mesh should look something like this.

Notice that the area surrounding the shock was refined. Now, re-initialize the solution, (Solution Initialization >
Compute From Farfield > Initialize), and rerun the solution (you will also need to increase the number of
iterations I recommend 150).
Now, once again, plot the contours of the mach number. Below is a comparison of the mach number results from
the original mesh and the refined mesh.

225

Original Mesh

Refined Mesh
The most striking difference between the two results is the thickness of the shock. Notice that for the refined
mesh, the shock is less thick that for the original mesh. This shows that the refined mesh is converging towards
the real case.
Comparison to Analytical Solution

In order to verify our simulation, we need to compare our results to either an analytical solution or an
experiment. Below is a table comparing the values from the simulation with the calculations from the preanalysis.
Mach Number Static Pressure (atm) Shock Angle (degrees)
Theory Value

2.254

2.824

32.22

FLUENT Solution

2.243

2.803

34.99

Percent Difference 0.8%

0.7%

8.2%

As we can see from the table, we are getting fairly good matching between the computation and analytical
approaches. From this we can build our trust in our simulation.

ANSYS WB - Compressible Flow in a Nozzle


Problem Specification
226

Consider air flowing at high-speed through a convergent-divergent nozzle having a circular cross-sectional area,
A, that varies with axial distance from the throat, x, according to the formula
A = 0.1 + x2; -0.5 < x < 0.5
where A is in square meters and x is in meters. The stagnation pressure po at the inlet is 101,325 Pa. The
stagnation temperature To at the inlet is 300 K. The static pressure p at the exit is 3,738.9 Pa. We 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.

Pre-Analysis & Start-Up


Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going to Start > ANSYS
> Workbench. This will open the start up screen seen as seen below

Screen Management

This tutorial is designed such that the user can have both ANSYS Workbench and the tutorial open. As shown
below, this online tutorial should fill approximately 1/3 of the screen, while ANSYS Workbench fills the
remaining 2/3 of the screen.

227

Setup Project

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of the start up
window, you will see the Toolbox Window. Take a look through the different selections. We will be using
FLUENT to complete the simulation. Load the Fluid Flow (FLUENT) box by dragging and dropping it into the
Project Schematic.

Right click the top box of the project schematic


and go to Rename, and name the project
Compressible Flow in a Nozzle.You are ready to create the geometry for the simulation.

Geometry
Care to skip the geometry and meshing steps? README
If you would prefer to skip the geometry and mesh steps, then you can download the necessary files here. Download
the "zip" file, then extract the files to your working directory. In order to load the necessary files, go to the Workbench
Project Page, then (Click) File > Open > "Compressible Flow in a Nozzle.wbpj". Lastly, click here to skip ahead to Step
4 of the tutorial.

You can create the 2D geometry on your own as well. Please download the coordinates file and make sure you
under stand the content before you proceed to the video.
228

download coordinates file here


We only need to model half of the nozzle because it can be solved using the axisymmetric solver in FLUENT.
The 2D nozzle has 4 edges and we will need to import a coordinate file to create the diverging-converging nozzle
wall.

Coordinates File
You should see five columns of data in the coordinates file.
The first column is the Group number. The coordinates data are assigned to groups to distinguish edges.
The second column is the Group ID. Each set of coordinate needs to be assigned an ID so they can be imported
in the correct order.
The third column is the x coordinate. It varies from -0.5 to 0.5, as shown in the problem statement.
The fourth column is the y coordinate. The y coordinate (radial coordinate) can be written as the radius of the
nozzle in terms of nozzle cross section area: A = pi*r^2.
The last column is the z coordinate. Although we are working with a 2D model, the tool we will use to import
the coordinates requires coordinates in all three directions. We can conveniently set the z coordinates to 0.
The coordinates in the text file need to be grouped in a way that the end coordinate of a group must be the start
coordinate of the next group. For instance, the end coordinate of group 1 is (0.5 0.333778669, 0) is the same as the
start coordinate of group 2.

Create the Geometry


Note that you need to suppress the line bodies before moving on, otherwise you might get an error later. Right
click on each line body and select Suppress Body as shown below. Then, save your project before moving to the
next step.

Mesh
The following video will show you how the mesh was created:

Setup (Physics)
The following video will walk you through setting up boundary conditions for our analysis.
229

Solution
The following video will walk you through setting up the solution for our analysis.

Results
Download this file
Download this file and save it somewhere convenient. It will be used in this portion of the tutorial.

The following video will walk you through looking at the results of the analysis.
In order to make plots comparing the Fluent results with the corresponding analytical results, it is recommended
that you export the data from FLUENT into Excel or MATLAB and make the plots in Excel or MATLAB. You
can export data in a FLUENT "XY Plot" into a text file using the Write to file option. The following video walks
you through the process of exporting the Mach number variation along x to a text file and reading in the Mach
number values into Excel.

ANSYS WB - Turbulent Pipe Flow (LES)


Problem Specification
Consider fluid flowing through a cylindrical pipe of diameter D = 0.0127 m and length L = 5D = 0.0635 m. The
bulk velocity at the pipe inlet is Ubulk = 6.58 m/s. Let us consider the case where the density of the fluid is
constant. Take density = 1.331 kg/ m3 _and coefficient of viscosity _ = 2.34 x 10-5 kg/(ms). The Reynolds
number Re based on the pipe diameter and the bulk velocity is

Solve the above fluid flow problem using the LES capability in FLUENT via ANSYS Workbench. Plot the mean
and the root mean square velocities versus the radial distance at a particular x/D downstream of the inlet.
Compare the mean velocity obtained from the LES simulation with the mean velocity obtained using the k-
model.

Step 1: Pre-Analysis & Start-Up


Preliminary Analysis

In Large-Eddy Simulations, the instantaneous velocity U(x,t) is decomposed into a filtered component (x,t) and
a residual component u'(x,t). The filtered velocity component represents the large scale unsteady motions. In
LES, the large scale turbulent motions are directly represented whereas the effects of small scale turbulent
motions are modeled. The filtered equations for the filtered velocity can be obtained from the Navier-Stokes
equations. The non-linear convective term in the momentum equation introduces a residual stress tensor which is
due to the residual motions. Closure is needed for this residual stress tensor and hence require modeling. There
are simple to complex models in FLUENT which we will use.

230

Since we are solving for (x,t), the LES is an unsteady simulation where we march in time. In order to collect
statistics like the mean and the root mean square (r.m.s.) velocities, we need to first reach a statistically
stationary state. In comparison, simulation using k- model solves only for the mean velocity.
More information on the LES can be found in Turbulent Flows book by Pope[2000].
Start ANSYS FLUENT

Since LES is a three-dimensional unsteady simulation, the computational domain is a full pipe.
Prior to opening ANSYS, create a folder called turbulent_pipe_LES in a convenient location. We'll use this as
the working folder in which files created during the session will be stored. For this simulation Fluent will be run
within the ANSYS Workbench Interface. Start ANSYS workbench:
Start> All Programs> Ansys 14.0> Workbench 14.0
The following figure shows the workbench window.

Step 2: Geometry
Saving

It would be of best interest, to save the project at this point. Click on the "Save As.." button,
, which
is located on the top of the Workbench Project Page. Save the project as "TurbulentPipeFlow" in your working
directory. When you save in ANSYS, a file and a folder will be created. For instance if you save as
"TurbulentPipeLES", a "TurbulentPipeLES.wbpj" file and a folder called "TurbulentPipeLES_files" will appear.
In order to reopen the ANSYS files in the future you will need both the ".wbpj" file and the folder. If you do not
have BOTH, you will not be able to access your project.
Fluid Flow (FLUENT) Project Selection

Left click (and hold) on Fluid Flow (FLUENT), and drag the icon into the empty space in the Project
Schematic. Your ANSYS window should now look comparable to the image below.

231

Higher Resolution Image


Rename the project to TurbulentPipeLES. We will work through each step from top down to obtain the solution
to the problem.
Analysis Type

As noted earlier, the computational domain for this simulation will be a full 3-dimensional pipe. In the Project
Schematic of the Workbench window, right click on Geometry and select Properties. The properties menu will
then appear to the right of the Workbench window. Under Advance Geometry Options, make sure that
the Analysis Type is 3D as shown in the image below.

Higher Resolution Image


Launch Design Modeler

In the Project Schematic, double click on Geometry to start preparing the geometry.
At this point, a new window, ANSYS Design Modeler will be opened. You will be asked to select desired length
unit. Use the default meter unit and click OK.
Creating Cylinder

From the Create menu, choose Primitives and then Cylinder.


Create> Primitives> Cylinder

232

You should see Cylinder1 in Tree Outline as shown in figure below.

Now we have to define the dimensions for the cylinder according to the problem specifications. Let us assume
that the axis of the cylinder is in x-direction.
In the Details View table, change Base Plane to YZPlane, Axis X Component to 0.0635 m and Radius (>0) to
0.00635m. Click Generate, this will create a cylinder with YZ plane as the base plane and X-axis as the axis of
the cylinder. The cylinder has a diameter of 0.0127 m and is 0.0635 m long. Inputs in the Details View table are
shown below.

.
At this point, you can close the Design Modeler and go back to Workbench Project Page. Save your work thus
far in the Workbench Project Page.

Step 3: Mesh
In this section the geometry will be meshed using inflation feature to cluster more cells near the wall of the
cylinder.
Launch Mesher

In order to begin the meshing process, go to the Workbench Project Page, then (Double Click) Mesh.

233

Inflation Feature (Mesh Control).

Right-click on the Mesh, in the Outline view, choose Insert and then choose Inflation.
Mesh> Insert> Inflation
The Outline view should look something similar to the figure below.

The parameters for the Inflation are given in the Details Pane. With Geometry highlighted, select the cylinder
using body selection tool,

, and click Apply.

With Boundary highlighted, select the lateral surface using face selection tool,

, and click Apply.

234

Finally, change Maximum Layers to 15 since we need more cells near the wall. The Details view should look
something similar to the figure below.

Click on the Mesh in the Outline View to get the mesh details in the Details View. Under Sizing,change Use
Advanced Size Function to Off, Relevance Center to Fine, element Size to 4e-04m, Smoothing to High,
Right-click Mesh and choose to Generate Mesh,
, to generate the mesh. The Details View should
look something similar to:

From the Mesh Statistics (in the figure above) we observe that we have about 0.85 million elements which
would require multiple cores to run the simulation.

235

Create Named Selections

Here, the faces of the geometry will be given names so one can assign boundary conditions in Fluent in later
steps. The left face of the pipe will be called "Inlet" and the right face will be called "Outlet". The lateral (or
curved) surface of the pipe will be called "PipeWall".
To name the left face select the face selection tool,
Click to select Create Named Selection.

, (Left) Click the appropriate face and then (Right)

Higher Resolution Image


Enter Inlet in the Selection Name Box as shown in the figure.

Repeat the same procedure for the other two faces.


Save, Exit & Update

First save the project. Next, close the Mesher window. Then, go to the Workbench Project Page and click
the Update Project button,
.
236

Step 4: Setup (Physics)


Regardless of whether you downloaded the mesh and geometry files or if you created them yourself, you should
have checkmarks to the right of Geometry and Mesh. Your current Workbench Project Page should look
comparable to the following image.

A question mark should appear to the right of the Setup cell. This indicates that the Setup process has not yet
been completed. This means that the mesh and the geometry data need to be read into FLUENT.
Launch Fluent

Double click on Setup in the Workbench Project Page which will bring up the FLUENT Launcher. When
the FLUENT Launcher appears change the Options to "Double Precision", and Processing Options to "Parallel
(Local Machine)" with Number of Processes equal to "4" or to the available number of processors at your end.
Click OK as shown below.

Higher Resolution Image


Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll specify the governing
equations and boundary conditions for our problem. On the left-hand side of the FLUENT interface, we see
various items listed under Problem Setup. and Solution. We will work from top to bottom of both these items to
setup the physics of our boundary-value problem. On the right hand side, we have the Graphics pane and, below
that, the Command pane.
Check and Display Mesh

First, the mesh will be checked to verify that it has been properly imported from Workbench. (Click) Mesh >
Check and make sure that the minimum volume is positive. It is a good practice to check if x/y/z - domain
extents are according to the dimensions given in the problem specification.
237

In order to obtain the statistics about the mesh (Click) Mesh > Info > Size, as shown in the image below.

Then, you should obtain the following output in the Command pane.

In order to bring up the display options (Click) General > Mesh > Display. Make sure you have inlet, outlet,
pipewall and interior-solid in Surfaces as shown in the figure below.

Please review the "Laminar Pipe Flow" tutorial to understand how to rotate, zoom-in and zoom-out the geometry
in the Graphics Window.
238

Define Solver Properties

In this section the various solver properties will be specified in order to obtain the proper solution. On the left
side of the window (Click) Problem Setup> General. Make sure that Pressure-Based is selected
under Type and Transient is selected under Time in the Solver section. Note: LES is a transient simulation where
the solution is marched in time.

Next, the Viscous Model parameters will be specified. In order to open the Viscous Model Options (Click)
Problem Setup > Models > Viscous - Laminar > Edit.... Click Large Eddy Simulation under
Model and WMLES under Subgrid-Scale Model. Click OK.

An Information box will appear as shown below, click OK. Basically, FLUENT switches the discretization
scheme for momentum equation to Bounded Central-Differencing. It also urges to change the order to Second
239

Order Implicit for Transient Formulation in the Solution Methods, which we will do in the later stages.

For incompressible flows, the energy equation is decoupled from the continuity and the momentum equations. So
the energy equation is not solved. Make sure that Energy is set to Off in Problem Setup > Models > Energy.
Define Material Properties

Now, the properties of the fluid that is being modeled will be specified. The properties of the fluid were specified
in the Problem Specification section. In order to create a new fluid (Click) Problem Setup > Materials > Fluid >
Create/Edit... as shown in the image below.

In the Create/Edit Materials menu set the Density to 1.331 kg/m^3 (constant) and set the Viscosity to 2.34e-05
kg/(ms) (constant) as shown in the image below.

240

Higher Resolution Image


Click Change/Create. Close the window.
Define Boundary Conditions

At this point the boundary conditions for the three Named Selections will be specified.
Inlet Boundary Condition

In order to start the process (Click) Problem Setup > Boundary Conditions > inlet > Edit... as shown in the
following image.

Inlet_BC.png
Higher resolution Image
Note that the Boundary Condition Type should have been automatically set to velocity-inlet. Now, the velocity
at the inlet will be specified. In the Velocity Inlet menu set the Velocity Specification Method to Magnitude,
Normal to Boundary, set the Velocity Magnitude (m/s) to 6.58 m/s and set the Fluctuation Velocity
Algorithm to Spectral Synthesizer (this is needed to fluctuate the velocity at the inlet). Also set the Turbulence
Specification Method to Intensity and Hydraulic Diameter. Set the value of Turbulent Intensity (%) to 10 %
and Hydraulic Diameter (m) to 0.0127 m. Finally set the Reynolds-Stress Specification Method to K or
Turbulent Intensity as shown below. Click OK to close the Velocity Inlet menu.

241

Outlet Boundary Condition

First, select outlet in the Boundary Conditions menu, as shown below.

Higher Resolution Image


As can be seen in the image above the Type should have been automatically set to pressure-outlet. If the Type is
not set to pressure-outlet, then set it to pressure-outlet. Now, no further changes are needed for
the outlet boundary condition.
Pipe Wall Boundary Condition

First, select pipewall in the Boundary Conditions menu, as shown below.


242

Higher Resolution Image


As can be seen in the image above the Type should have been automatically set to wall. If the Type is not set
to wall, then set it to wall. Now, no further changes are needed for the pipe_wall boundary condition. Also make
sure that the boundary condition Type for interior-solid is Interior.
It is a good practice to change the Reference Values now, these values can be useful when we are postprocessing
results later on. (Click)Problem Setup > Reference Values. Select Compute from as inlet.
Save

In order to save your work (Click)File > Save Project as shown in the image below.

Step 5: Solution
Solution Methods

Click on Solution Methods then click on Momentum and select Bounded Central Differencing as shown in the
image below. Also choose, Second order for Pressure and Second Order Implicit under Transient
Formulation. as
243

Click Here for Higher Resolution


Set Initial Guess

Here, the flow field will be initialized to the values at the inlet. In order to carry out the initialization click
on Solution Initialization then click on Compute from and select inlet as shown below.

Click Here for Higher Resolution


Then click initialize to initialize the domain with an initial guess. This completes the initialization.

244

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. We'll iterate the solution until the residual
for each equation falls below 1e-6. In order to specify the residual criteria (Click) Monitors > Residuals >
Edit..., as shown in the image below.

Click Here for Higher Resolution


Next, change the residual under Convergence Criterion for continuity, x-velocity,and y-velocity, all to 1e-6, as
can be seen below.

Click Here for Higher Resolution


Lastly, click OK to close the Residual Monitors menu.
Execute Calculation

Note that, we have to run the transient simulation to a statistically stationary state and then collect statistics.
Click on Run Calculation then choose the Time Step Size(s) as 1e-05 and the Number of Time Steps as 20000.
245

Also choose Extrapolate Variables option (refer to FLUENT documentation for information) and leave the Max
Iterations/Time Step as 20 (default). The corresponding image is shown below.

Click Here for Higher Resolution


As a safeguard save the project now. Now, click on Calculate in order to run the calculation. The residuals for
each iteration are printed out as well as plotted in the graphics window as they are calculated. The residuals
decrease during the inner iterations and jump again when we advance by one time step as shown in image below.
From the above inputs, it is clear that 20 inner iterations are carried out to advance the simulation by one time
step and we requested for 20,000 time steps. So, typically these simulations are very long even if we use 4
processors. To reduce the simulation time one can opt to High Performance Computing (HPC) resources. The
calculations performed for this tutorial are based on the simulations run on an HPC cluster using 48 cores.

Click Here for Higher Resolution


In this simulation, it is verified that the statistically stationary state is reached by advancing the simulation from
0s to 0.1s in physical time i.e. using only 10,000 time steps with 1e-05s time step size with 20 inner
iterations.When statistically stationary state is reached, statistics have to be collected by advancing the physical
time from 0.1s to atleast 0.15s. Use 5,000 time steps with 1e-05 time step size with 20 inner iterations. This is
246

done as shown in the figure below. Select the Data Sampling for Time Statistics to start collecting the statistics.
You will see the physical time for which the statistics have been collected across Time Sampled (s).

Click Here for Higher Resolution


Collect the statistics for 0.05s (this corresponds to marching from 0.1s to 0.15s in time) as shown in the above
figure. At this point save the project once again.

Step 6: Results
Contour plots of Axial Velocity

Note that there are two types of velocities in an LES simulation - instantaneous velocity and mean velocity. The
instantaneous velocity is the actual velocity at any time instant in the domain. When we collect the statistics, the
instantaneous velocity is time-averaged to obtain the mean velocity. Let us make a mid-plane in the domain to
look at the contour plots of instantaneous axial velocity and the mean axial velocity.
(Click) Graphics and Animation > Contours > Set Up.. as shown in the figure below.

247

Click Here for Higher Resolution


In the Contours window, click on New Surface > Plane... as shown below.

Click Here for Higher Resolution


In the Plane Surface window, click Point and Normal. Under Points, choose (x0 (m), y0 (m), z0 (m)) =
(0,0.0635,0) and under Normal choose (ix (m), iy (m), iz (m)) = (1,0,0). Name the surface as
midplane_les under New Surface Name. Click Create. The plane can be viewed using Graphics and
Animations > Mesh > Set Up....

248

Click Here for Higher Resolution


Go back to Contours window and select Velocity... and Y Velocity under Contours of and under
Surfaces choose midplane_les and click Display. The figure below shows the contour plot of instantaneous axial
velocity.

Click Here for Higher Resolution


For the contour plot of the mean axial velocity, select Unsteady Statistics... and Mean Y
Velocity under Contours of and under Surfaces choose midplane_les and click Display

Click Here for Higher Resolution


From the two plots we can clearly see the difference between the two velocities.

249

XY plot of Axial Velocity

Let us make a line across the pipe at the center of the domain to look at the mean axial velocity and compare it
with the solution from k-e model in the next section.
(Click) Plots > XY Plot > Set Up.. as shown in the figure below.

Click Here for Higher Resolution


In the Solution XY Plot window, click on New Surface > Line/Rake... as shown below.

Click Here for Higher Resolution


In the Line/Rake Surface window, under End Points choose (x0 (m), y0 (m), z0 (m)) = (0,0.03175,0) and (x1
(m), y1 (m), z1 (m)) = (0,0.03175,0.00635). Name the surface as midline_les under New Surface Name.
Click Create. The line can be viewed using Graphics and Animations > Mesh > Set Up....
250

Click Here for Higher Resolution


Go back to Solution XY Plot window and select Unsteady Statistics... and Mean Y Velocity under Y Axis
Function and under Plot Direction choose (X,Y,Z) = (0,0,1). Choose midline_les under Surfaces and click Plot.
The figure below shows the contour plot of instantaneous axial velocity.

Click Here for Higher Resolution


To save the line plot, select Write to File in the Solution XY Plot window and click Write. Select a location and
save the file as MeanYVel_LES.xy.

251

Step 7: Verification & Validation


In order to verify the LES solution to the turbulent pipe flow problem, we will compare it against the solution
obtained using standard k-e model.
Turbulent Pipe with k-e model

In the Workbench Project Page, left-click on the downward pointing arrow on the top-left corner of the
TurbulentPipeLES project and select Duplicate from the drop down menu as shown in the figure below.

Higher Resolution Image


A new project will be created. Rename this new project as TurbulentPipeRANS as shown in figure below.

Next, double click on the Solution cell of the TurbulentPipeRANS project. This will launch the FLUENT
solver. Here we will change the viscosity model to k-e model. In the FLUENT window, click on General tab on
the left hand side pane. Choose Steady for Time. Click OK for the pop-up warning.

252

Higher Resolution Image


Next click on Models>Viscous on the left hand side pane as shown below. Choose Edit....

Higher Resolution Image


In the Viscous Model window, choose k-epsilon (2 eqn) for Model. Choose Realizable for k-epsilon Model.
Choose Enhanced Wall Treatment for Near-Wall Treatment. Click OK as shown in the figure below.

253

Higher Resolution Image


Click on Boundary Conditions tab on the left hand side pane. Choose Outlet and click Edit....Change the
Turbulence Specification Method to Intensity and Hydraulic Diameter. Set Backflow Turbulent
Intensity to 10% and Backflow Hydraulic Diameter to 0.0127m. Click OK.
Next, click on Solution Methods tab on the left hand side pane. Choose Second Order Upwind for Turbulent
Kinetic Energy and Turbulent Dissipation Rate.

254

Higher Resolution Image


Click on Monitors > Residual and click Edit.... Set 1e-06 for k and epsilon. In order to get faster convergence,
choose 1e-05 for continuity and click OK.

Higher Resolution Image


Click on Solution Initialization and click Compute from and choose inlet.Click initialize as shown below.

Higher Resolution Image


Click on Run Calculation and set Number of Iterations to 1000.Click Calculate as shown below.

255

Higher Resolution Image


The solution converges in about 600 iterations.
Create Line

Click on Plots > XY Plot > Set Up... as shown below.

Higher Resolution Image


In the Solution XY Plot, choose New Surface > Line/Rake... as shown below.

Higher Resolution Image


Choose the coordinates of the two points that define the line as below and name the line as midline_ke and
click Create and Close the window.
256

The line can be viewed by clicking Graphics and Animations > Mesh > Set Up....

Higher Resolution Image


Go back to the Solution XY Plot window by clicking Plots > XY Plot > Set Up.... In this window,
choose Velocity... and Y Velocity for Y-Axis Function. Also, choose 0, 0, 1 as the Plot Direction. Finally,
choose midline_ke under Surfaces. and click Plot.

Higher Resolution Image

257

Higher Resolution Image


To compare the solution from LES simulation with that from the k-e model, click Load File... in the Solution XY
Plot and choose the saved file MeanYVel_LES.xy from the previous section as shown in the figure below.

Click Here for Higher Resolution


In the Solution XY Plot select Mean Y Velocity under File Data and click Plot. The figure below shows the
comparison of the mean Y velocity from k-e and LES simulations, both the results are very close which validates
the solution procedure for the LES simulation.

ANSYS WB - Nasal Airway Model


258

Problem Specification
Goals
1- Process the set of CT Scan images
2- Extract the Geometry of the cavity using MIMICs software
3- Mesh the created STL file in ANSYS ICEM CFD
4- Solve the model in FLUENT
5- Compare the pressure and shear stress on the nasal wall
Anatomy
Understanding the nasal anatomy is essential in determining the proper geometry for the model. The nasal airway
cavity is a very complex structure extending from the nostrils at the anterior of the head, to the nasopharynx at
the posterior of the throat. For a reference the cavity extends all the way to the uvula in the back of your throat,
so your nasal cavity extends deep inside the skull. The right and left nostril are separated by the septum, a
membrane that is mostly cartilage in the anterior of the nose but becomes a thin bone in the posterior of the
cavity. Air flow enters the nose through the nostrils, entering vertically and the flow is redirected horizontally
with the curvature of the nose. The nose itself contains flaps of cartilage that act as valves, during a deep inhale
the sides of the nose collapse controlling flow.

http://training.seer.cancer.gov/images/anatomy/respiratory/nose_nasal_cavities.jpg
The most complex section of the geometry is nasal concha or turbinates that occupy most of the cavity. These
bones are long finger-like shelves in the nasal passage, extending from the top of the exterior nose to the
nasopharynx. There are three sets of concha, inferior, middle and superior. Viewing the skull from the coronal
plane, like you are facing the patient, shows that these concha are actually curved. These concha serve to
distribute the incoming air and also warm and moisten the air before entering the lungs. Additionally there are
four sets of sinuses around nasal cavity, which for this study will be removed from the geometry. The entrance of
the sinuses into the nasal cavity is relatively small and does not impact the flow in cavity to any great extent.

http://www.teachmeanatomy.com/wp-content/uploads/2012/12/Conchae-and-Meatuses.png

259

Nasal Airway Obstructions (NAO)- The focus of this study is relieving the stress to the patient cause by nasal
airway obstructions. There are many types of obstructions but the most common is a deviated septum caused by
some trauma to the nose. This causes a change in the geometry between the right and left nasal passage, and the
patient then experiences constant discomfort when inhaling due to the differences in pressure or shear stress on
the nasal wall. Correction of these NAO is done with a 'shot-gun' surgical approach, doing as many surgeries in
one procedure in hope of alleviating the problem. Being able to quantify the various surgical procedures would
then help determine a single proper surgery for the patient.
Biological Specifications
1- A negative pressure should be placed at the nasopharynx, to simulate a normal inhale
2- From rhinometry data, the targeted flow out the nasopharynx should be 15 L/min during normal inhale
3- The provided patient has a deviated septum, so there should clear distinction between the pressure on the nasal
wall in the right and left nasal passages
4- From previous studies, the flow may be modeled as laminar
Reference studies
Rhee, J. S., Cannon, D. E., Frank, D. O., & Kimbell, J. S. Role of Virtual Surgery in Preoperative Planning:
Assessing the Individual Components of Functional Nasal Airway Surgery.
Rhee, J. S., Pawar, S. S., Garcia, G. J., & Kimbell, J. S. (2011). Toward personalized nasal surgery using
computational fluid dynamics. Archives of Facial Plastic Surgery, 13(5), 305-310.
Lee, H. P., Poh, H. J., Chong, F. H., & Wang, D. Y. (2009). Changes of airflow pattern in inferior turbinate
hypertrophy: A computational fluid dynamics model.American journal of rhinology & allergy, 23(2), 153-158.

Pre-Analysis & Start-Up


Image Processing
Attached is a set of original CT scan images, a set of edited binary images and the MATLAB code used to create
the edited images. For simplicity using the edited set of images to proceed with the tutorial will be sufficient.
Below is an explanation of how and why the images were edited.
matlab_files.rar
Binary Images.rar
CT scan images are called DICOM images, a file format that contains patient information, and require specific
programs to read. MATLAB contains a image processing toolbox that can read the images. For a CT scan, a set
of images are taken of the patient in slices across the transverse plane. Pixel size and slice thickness determine
the resolution of the images and the quality of the model created. Smaller pixels and smaller slices result in more
details, but this means more radiation to the patient and in conventional CT machines the smallest resolution is a
pixel size of (0.6 mm)^2 and a slice thickness of 0.6 mm. The value of the pixel intensity is related to the density
of the tissue, with air being black and cortical bone being white.

260

Noise removal- The included program removes the signal noise from each image in the set. Since every machine
contains some electronic noise, there is a variation in the pixel intensities of the pure air in the images. By
removing the average and one standard deviation of a large sample of air pixel from each image, it will remove
the noise and equalize most the backgrounds and air of the images to zero intensity.
Binary images- Since we want to extract the cavity and are not concerned with the different tissues scanned, it is
beneficial to create binary images. These contain only two pixel values, black for air and white for any tissue.
Since the features in the nose have small sizes compared to the pixel size, like the septum has a thickness of
about 0.8 mm, this creation of binary images will ensure that the cavity geometry stays separated. The binary
images also help ease geometry extraction process in the next step.

261

262

You might also like