You are on page 1of 18

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

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


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

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

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. 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. To do
this, we will change the bias factor to 10, and the bias type to one that goes from
smaller on the top to bigger on the bottom. You want to make sure that the bias is
the same on each side, and not opposite ways (which is what the program will do
by default). We are able to do this by changing the bias one edge at a time. Be
sure that the biased types are the same for both sides, and then click Update. A
mesh will be generated.
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)


If you have skipped the previous mesh generation steps 1-3, you can download the
mesh by right-clicking on this link. Save the file as pipe100x30.msh. You can
then proceed with the flow solution steps below.
Launch FLUENT
We will be working within the ANSYS 12.1 workbench. To launch FLUENT, double
click on setup from the workbench.
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 no tick mark appears next to
Energy Equation.
Problem Setup > Models > Viscous...
Choose k-epsilon (2eqn). Notice that the window expands and additional
options are displayed on choosing the k-epsilon turbulence model. Under NearWall Treatment, pick Enhanced Wall Treatment so that we may get a more
accurate result.

Click OK.
Problem Setup > Materials
Double click on air and change Density to 1.0 and Viscosity to 2e-5. These are
the values in the Problem Specification. 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 set the value of the velocity at the inlet and pressure at the outlet. Now
under
Problem Setup > Boundary conditions
The four types of boundaries we defined are specified in a window as zones.
Recall that we don't need to set any parameters for the centerline and wall
zones. Verify this by selecting each of these two zones and looking at their types in
the drop down menu below the Zones.
Choose inlet and click on Edit.... Change the Velocity Specification Method
to Magnitude, Normal to Boundary. Enter 1for 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.2 for
Hydraulic Diameter. Click OK to set the velocity.

The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set
to 1 atm, the outlet gauge pressure = outlet absolute pressure - operating pressure
= 0. Choose outlet under Zone. The Type of this boundary is pressureoutlet. 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.

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 firstorder 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. 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
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 completes the problem specification. Save your work:
Main Menu > File > Write > Case...
Type in {{pipe100x30.cas }}as the name of the Case File. Click OK. Check that
the file has been created in your working directory.
Iterate Until Convergence
Solve for 100 iterations first.
Solution > Run Calculation
In the Iterate menu that comes up, change the Number of Iterations to 100.
Click Calculate.
You'll find that not all residuals have fallen below 1e-6 in 100 iterations. Solve for
200 more iterations. The solution converges in a total of about 210 iterations.

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.
Save the solution to a data file:
Main Menu > File > Write > Data...
Enter pipe100x30.dat for Data File and click OK. Check that the file has been
created in your working directory.

Step 6: Results
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+ > 30or < 5 for the walladjacent cell. Look at section 10.9, Grid Considerations for Turbulent Flow
Simulations, for details.
First, we need to set the reference values needed to calculate y+.
Problem Setup > Reference Values
Select inletunder Compute Fromto tell FLUENT to use values at the pipe inlet
for the reference values. Check that the reference value for density is 1 kg/m 3,
velocity is 1 m/s, and coefficient of viscosity is 2e-5 kg/m-s as given in the
Problem Specification.These reference values will be used to non-dimensionalize
the distance of the cell center from the wall to obtain the corresponding y+ values.
Let's plot y+ values for wall-adjacent cells to check how it compares with the
recommendation mentioned above.
Results > Plots > XY Plot > Set Up...
Make sure that Position on X Axis is set under Options. Also, make sure that
1 is the value next to X, and 0 is the value next to Y and Z under Plot Direction.
Recall that this tells FLUENT to plot the x-coordinate value on the abscissa of the
graph. Pick Turbulence...under Y Axis Function and select Wall Yplus from
the drop down list under that. Since we want the y+ value for cells adjacent to the
wall of the pipe, choose wall under Surfaces.

Click Plot.

Click here to see a higher resolution image.


As we can see, the wall _y+_value is between 1.6 and 1.9 (ignoring the anomalous
at the inlet). Since this is less than 5, the near-wall grid resolution is acceptable.
Save Plot
In the Solution XY Plot Window, check the Write to File box under Options.
The Plot button should have changed to the Write... button. Click on Write....
Enter yplus.xy as the file name and click OK. Check that this file has been created
in your FLUENT working directory.
Centerline Velocity
Under Y Axis Function, pick Velocity... and then in the box under that, pick
Axial Velocity. Finally, select centerline under Surfaces since we are
plotting the axial velocity along the centerline. De-select wall under Surfaces.
Click on Curves... in the Solution XY Plot window. Select the solid line option
under Pattern as shown below. Change Weight to 2. Select the blank option
under Symbol. Click Apply and Close.

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

Click here to see a higher resolution image.


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

Save the data for this plot as vel.xy.


Coefficient of Skin Friction
The definition of the skin friction coefficient was discussed in the laminar pipe flow
tutorial. The required reference values of density and velocity have already been
set when plotting y+.
Go back to the Solution XY Plot Window. Under the Y Axis Function, pick
Wall Fluxes..., and then Skin Friction Coefficient in the box under that.
Under Surfaces, we are plotting the friction coefficient along the wall. Uncheck
centerline surface.
Uncheck Write to File. Click Plot.

Click here to see a higher resolution image.


We can see that the fully-developed value is 0.0085. Compare this with what
you'd expect from the Moody chart.
Save the data for this plot as cf.xy.
Velocity Profile
We'll plot the axial velocity at the outlet as a function of the distance from the
center of the pipe.

Change the plot settings so that the radial distance from the axis is plotted as the
ordinate: In the Solution XY Plot window, uncheck Position on X Axis under
Options and choose Position on Y Axis instead. Under Plot Direction,
change X to 0and Y to1. For the X Axis Function i.e. the abscissa, pick
Velocity... and Axial Velocity under that.
Since we want to plot this at the outlet boundary, pick only outlet under
Surfaces.
Uncheck Write to File. Click Plot.

Click here to see a higher resolution image.

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

Step 7: Verification & Validation


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.
You can download the 100x60 mesh here.
File > Read > Case...
Navigate to your working directory elect the pipe100x60.msh file you have created.
Click OK. Display the grid. Check its size.
Finer Mesh Analysis
Repeat steps 4, 5, and 6 of this tutorial with the finer mesh.
When you get to step 6 of the tutorial, plot each of the graphs as described.
However, for each of the plots, overlay the corresponding result for the coarser
mesh so that we may compare them. To do this, after the plotting the finer mesh
result, in the Solution XY Plot Window, click on Load File.... Navigate to your
working folder, click on the appropriate filename for the previous result, eg. vel.xy
for centerline velocity, and click OK. Click Plot. You'll see both results plotted in
the same the graphics window.

Higher Resolution Image

In the centerline velocity plot above, the white line represents the centerline
velocity of the finer mesh, while the red line represents the velocity of the coarser
mesh from before. As we can see, there isn't too much of a difference between the
two plots. Save this plot as vel2.xy.
Now, let's take a look at the coefficient of skin friction. This time, load the cf.xy file
to compare against the plot. This is the coefficient of skin friction plot:

Higher Resolution Image

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

Higher Resolution Image

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

Higher Resolution Image

As we can see, there is a significant increase in the accuracy of the plot from the
finer mesh. Save this plot as yplus2.xy.
You may want to experiment with meshes of other granularities and compare their
plots with the plots saved from the 100x30 and 100x60 meshes.
In Problem 1, we will be looking at the effect of coarse meshes with uniform
granularity.

You might also like