Vous êtes sur la page 1sur 52

Modeling Tutorial: Turbulent Pipe Flow

Turbulent Pipe Flow

Problem Specification

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

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

Step 1: Create Geometry in GAMBIT

Select Solver

Main Menu > Solver > FLUENT 5/6

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

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

Strategy for creating geometry

Create Vertices

Repeat this process to create three more

Vertex 1: (0,0,0)
Vertex 2: (0,0.1,0)
Vertex 3: (8,0.1,0)
Vertex 4: (8,0,0)

This fits the four vertices of the rectangle we
have created to the size of the Graphics
Create Edges

We'll now connect appropriate pairs of

vertices to form edges. To select any
entity in GAMBIT, hold down the Shift
key and click on the entity.

Repeat create edge steps for line 4

Create Face

To form a face out of the area

enclosed by the four lines, we need to
select the four ledges that enclose this

Step 2: Mesh Geometry in GAMBIT
Mesh Edges

We use 100 divisions for the horizontal edges.

First mesh 100 divisions in the horizontal (2 horizontal egde)


Click Apply. Nodes appear on the edges

showing that they are divided into 100.

Mesh Edges

We use 30 divisions for the vertical edges.

To resolve the much higher gradient near the wall for a turbulent flow,
we will use smaller grid spacing near the wall by employing grid

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

We want 30 divisions on each of the vertical edges; so select Interval

Count from the drop down box under Spacing and enter 30 in the text
box to its left.

If you zoom in on the right edge, you
should see the following:

Note that the mesh spacing is smaller near

the wall as indicated by the blue circles on
the edge.

Recreate Face Mesh

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

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

Step 3: Specify Boundary Types in GAMBIT

These boundary types are still

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

Check that the following is in the

Name/Type list:

Save and Export

As in the previous tutorial, we will now Select Export 2d Mesh since this
save and export the mesh. is a two-dimensional mesh
Main Menu > File > Save
Main Menu > File > Export > Mesh...

Exit GAMBIT: Main Menu > File > Exit and save the session.
Step 4: Set Up Problem in FLUENT
Start > Programs > Fluent Inc > FLUENT 6.2
Select 2ddp (2D, double-precision version) from the list of options and click Run.
Import File
Main Menu > File > Read > Case...

First, we check the grid to make sure that there are no errors.
Main Menu > Grid > Check
Any errors in the grid would be reported at this time. Check the output
and make sure that there are no errors reported. Then select:

Main Menu > Grid > Info > Size

The following summary about the grid should appear:

Main Menu > Display > Grid...
Make sure all 5 items under Surfaces are selected. Then click Display.

Recall that you can look at specific

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

Close the Grid Display Window when you are done.

Define Solver Properties
Main Menu > Define > Models > Solver

Choose Axisymmetric under Space. As in the laminar pipe flow tutorial,

we'll use the defaults of segregated solver, implicit formulation, steady
flow and absolute velocity formulation. Click OK.

Main Menu > Define > Models > Viscous...

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 so
that we may get a more accurate

Main Menu > Define > 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.

Main Menu > Define > Materials...

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.

Define Operating Conditions

Main Menu > Define > 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.
Define Boundary Conditions
We'll now set the value of the velocity at the inlet and pressure at the outlet.
Main Menu > Define > Boundary Conditions...

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

Choose inlet and click on Set....

Enter 1 for Velocity Magnitude. This
indicates that the fluid is coming in
normal to the inlet at the rate of 1
meter per second. Select Intensity
and Hydraulic Diameter next to the
Turbulence Specification Method.
Then enter 1 for Turbulence
Intensity and 0.2 for Hydraulic The (absolute) pressure at the
Diameter. Click OK to set the outlet is 1 atm.
Step 5: Solve!
Main Menu > Solve > Controls > Solution...
Change Discretization for Momentum,
Turbulence Kinetic Energy and
Turbulence Dissipation Rate (scroll
down to see it) equations to Second
Order Upwind.

Set Initial Guess

Main Menu > Solve > Initialize > Initialize...
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 Click Init. Close the Solution
Hydraulic Diameter at the inlet. Initialization window.
Set Convergence Criteria
We'll iterate the solution until the residual for each equation falls below 1e-6.
Main Menu > Solve > Monitors > Residual...
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
Select Print and Plot under Options.
This will print as well plot the residuals
as they are calculated which you will
use to monitor convergence.

Main Menu > File > Write > Case...

Type in pipe100x30.cas for Case File.

Iterate Until Convergence
Solve for 100 iterations first.
Main Menu > Solve > Iterate...
In the Iterate menu that comes
up,change the Number of Iterations to
100. Click Iterate.

You'll find that not all residuals have

fallen below 1e-6 in 100 iterations. Solve
for 200 more iterations.

Save the solution to a data file:

Main Menu > File > Write > Data...

Enter pipe100x30.dat for Data File and click OK.

Step 6: Analyze Results

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.

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.
Click Apply. Select Y under Axis and
repeat. Click Apply and Close.

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

Save the data for this plot as vel.xy.

Coefficient of Skin Friction
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.
We can see that the fully-developed
value is 0.0085. Compare this with
what you'd expect from the Moody

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 0 and Y to 1. For the X Axis
Function i.e. the abscissa, pick Velocity... and Axial Velocity under that.
Since we want to plot this at the outlet boundary, pick only outlet under
Uncheck Write to File. Click Plot.
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 stregths of near-wall
mixing in the laminar and turbulent

Save this plot as profile.xy.

Velocity Vector display

Modeling Tutorial: Mixing Elbow

Mixing elbow modeling
Problem Specification
The problem to be considered is shown schematically in Figure below. A cold
fluid at 26oC enters through the large pipe and mixes with a warmer fluid at 40oC
in the elbow. The pipe dimensions are in inches, and the fluid properties and
boundary conditions are given in SI units. The Reynolds number at the main inlet
is 2.03x105 , so that a turbulent model will be necessary.

Display contour pressure, velocity,

turbulent kinetik energy for this elbow

Set Up Problem in FLUENT

Launch Fluent 6.2

Start > Programs > Fluent Inc > FLUENT 6.2
Select 2d from the list of options and click Run.

Step 1: Grid
Read the grid file mixing elbow 2d.msh.
File Read Case...

Check the grid.
Grid Check

Scale the grid.
Grid Scale...

Display the grid
Display Grid...

Step 2: Models
1.Keep the default solver settings. 2.Turn on the standard - turbulence model.
Define Models Solver... Define Models Viscous...

3. Enable heat transfer by activating the energy equation.
Define Models Energy...

Step 3: Materials
1. Create a new material
called water.
Define Materials...

Step 4: Boundary Conditions
Define Boundary Conditions...
1. Set the conditions for the fluid.

2. Set the boundary conditions at the main inlet.
Select inlet-1 under Zone and click Set....

3. Repeat previous operation for inlet-2, using the values in the following table:

4. Set the boundary conditions for outlet, as shown in the panel below

5. For wall-4, keep the default settings for a Heat Flux of 0.

Step 5: Solution
1. Initialize the flow field using the boundary conditions set at inlet-1.
Solve Initialize Initialize...
Add a Y Velocity value of 0.2 m/sec throughout the domain

2. Enable the plotting of residuals during the calculation.
Solve Monitors Residual...

3. Define a surface monitor.
Solve Monitors Surface...

4. Save the case file
File Write Case...

5. Start the calculation by requesting 100 iterations.

Solve Iterate...

6. Save the data file
File Write Data...

Step 6: Displaying the Preliminary Solution
1. Display filled contours of velocity magnitude
Display Contours...

2. Display filled contours of temperature

3. Display velocity vectors
Display Vectors...

Use the middle mouse button to zoom the view

4. Create an XY plot of temperature across the exit
Plot XY Plot...

5. Define a custom field function for the dynamic head formula ( ).
Define Custom Field Functions...

6. Display filled contours of the custom field function
Display Contours...

7. Write the case and data files to save the settings for the custom field function.

File Write Case & Data...