You are on page 1of 37

TUTORIAL 2

Turbulent Pipe Flow

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/m 3 . For µ = 2 x 10 -5 kg/(ms),
the Reynolds no. based on the pipe diameter and average velocity at the inlet is
𝜌𝑉𝑖𝑛𝑙𝑒𝑡 𝐷
𝑅𝑒 =
µ

This will give us from a Reynolds number of 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.

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
fully-developed 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.

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.

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 theWorkbench 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.

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.

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.
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.

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.
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 divisionsEdge 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.

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 Sizingtable 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 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 Behaviorneeds 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 clickEdge 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.
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)

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?
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
Pressure-Based 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-epsilonturbulence 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.
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.

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.
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 theGauge
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).

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.

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.
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.
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:
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 theresults 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)

"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 unity+(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.


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.

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.

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.

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 toTurbulent Flow Refined Mesh . You should have three
project cells in workbench.
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 toResults 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.
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.

You might also like