You are on page 1of 10

ME 331- Thermofluid Mechanics

Computational Fluid Dynamics


Tutorial 3: Laminar flow through a pipe












Instructor: Prof. Arindam Banerjee
Presented by: Lobo Varun
Department of Mechanical & Aerospace Engineering
Missouri University of Science & Technology
Rolla, MO 65409
E-Mail: banerjeea@mst.edu






Introduction: The purpose of this tutorial is to understand the role of viscosity in
boundary layer formation with the help of computational fluid dynamics (CFD)
software, CFX, to simulate a laminar flow through a pipe. Comparisons between
the analytical and CFD results will then be made.

Theory:
There are in general three types of fluid flow in pipes
- laminar
- turbulent
- transient
Laminar flow
Laminar flow generally happens when dealing with small pipes and low flow velocities. Laminar
flow can be regarded as a series of liquid cylinders in the pipe, where the innermost parts flow
the fastest, and the cylinder touching the pipe isn't moving at all.
Shear stress depends almost only on the viscosity - - and is independent of density - .
Turbulent flow
In turbulent flow vortices, eddies and wakes make the flow unpredictable. Turbulent flow
happens in general at high flow rates and with larger pipes.
Shear stress for turbulent flow is a function of the density - .
Transitional flow
Transitional flow is a mixture of laminar and turbulent flow, with turbulence in the center of the
pipe, and laminar flow near the edges. Each of these flows behave in different manners in terms
of their frictional energy loss while flowing, and have different equations that predict their
behavior.
Turbulent or laminar flow is determined by the dimensionless Reynolds Number.
Reynolds Number
The Reynolds number is important in analyzing any type of flow when there is substantial
velocity gradient (i.e. shear.) It indicates the relative significance of the viscous effect compared
to the inertia effect. The Reynolds number is proportional to inertial force divided by viscous
force.
Tutorial 3: Laminar Pipe Flow

The flow is
- laminar when Re < 2300
- transient when 2300 < Re < 4000
- turbulent when 4000 < Re

The velocity profile in a pipe (as seen later in this tutorial) will show that the fluid
at the center of the stream will move more quickly than the fluid towards the edge
of the stream. Therefore friction will occur between layers within the fluid. Fluids
with a high viscosity will flow more slowly and will generally not support eddy
currents and therefore the internal roughness of the pipe will have no effect on the
frictional resistance. This condition is known as laminar flow.

Prerequisites: This tutorial assumes that you have completed Tutorial 1& 2 and are
somewhat familiar with the ICEM & CFX interface.

Problem description: In this tutorial we consider the flow through a pipe and
compare our flow with the analytical solution given by
|
|
.
|

\
|
=
2
2
max
1
R
r
U
u
.
Where r is the distance measured from the axis of symmetry to the walls of the
pipe. R=0.05 m is the radius of the pipe, u=0.001 m/s is the inlet velocity and
U
max
is the velocity at the centre of the pipe which is approximately twice of the
avg. velocity. The Reynolds number used in this tutorial is 1000.


Schematic diagram:







(Inlet) u=0.001 m/s (Outlet) Pr = 0 [Pa] Pipe Walls
(No slip wall)
Dia = 0.1 m
This tutorial demonstrates how to do the following:
- Create a structured O-Grid mesh in ICEM-CFD
- Define boundary conditions
- Specify solver settings and perform iterations.
- Run a steady-state analysis in ANSYS-CFX
- Determine BL thickness and compare the CFD results obtained with the
analytical solution.

Step 1: Open ICEM CFD & save project to a working directory.
Step 2: Create 2 points
Geometry > Create Points > (part name) points > enter the following co-ordinates,
A (0,0,0) & B(1,0,0) > OK/Apply
Step 3: Create a pipe
Geometry > Create/modify surface > Standard shapes > Cylinder> Change part
name to Pipe > enter 0.05 for radius 1 & 2 > select A & B as the two axis points >
Apply/Ok
Step 4: Separate Inlet and outlet surface from the pipe surface
Right click Part in the model tree > select Create Part > change part name to
INLET > Select the inlet surface > Apply/Ok
*Change view of part by selecting View> Left> to select the surface not the curve
** Repeat the same steps to create the outlet surface too by changing the view to
Right. Make sure in the model tree under Parts you have 4 branches Inlet, Outlet,
points & Pipe. Save project.
Step 5: Create structured mesh
Blocking > Create Block > (Part name) SOLID > (Type) 3D Bounding Box > Ok

Edge
Inlet
Surface

***You should see something like this, a box/block surrounding the geometry. The
edges of the blocks are shown above with the help of arrows.
Step 6: Associate Edge to curves
Blocking > Associate > Associate edge to curve > select the 4 edge (marked
above) surrounding the Inlet surface > for the curves, select the curve surrounding
the Inlet surface > Apply/Ok
*** The edges turn green to denote association with curves
Follow exactly the same procedure for the edge & curve surrounding the outlet
surface
Blocking > Associate > snap project vertices > Ok
** Till here your domain should look like this (with surface turned off obviously)

Step 7: Create an O-Grid
Blocking > Split Block > O-Grid Block > Select block > click on the pipe then
center click. A box inside the pipe gets highlighted.
Select faces > Click on the Inlet surface > middle click > similarly do the same for
outlet surface > Apply
Step 8: Enter number of O-Grid elements
Mesh > Part mesh set-up > enter 0.003 for max size of Inlet, Outlet and Pipe >
Apply
** To make Hexa elements even more fine, reduce the number of max size above.
Blocking > Pre-Mesh Params > Update sizes > Apply
**Tick the Pre-Mesh under Blocking in the model tree to see updated size of
elements
Blocking (model tree) > Pre-mesh (right click) > convert to unstruct mesh
In the model Tree, uncheck Volume under Mesh. Save your project.
Step 9: Smoothing of Hexahedral elements for a better finish
Edit Mesh > Smooth Hexahedral mesh orthogonal (6
th
button from left) > Ok
**Un-check Pre-mesh from the model tree under Blocking
Step 10: Select solver & save mesh
Output > Select solver > (output solver) ANSYS CFX > (common structural
solver) ANSYS > Ok
Output > write input > Save project > Done
** The extension of the mesh file created should be .cfx5
*** Advantage of Structured & Un-structured grids
1. Advantages of a structured grid
a. Very efficient numerical procedures can be implemented on structured
grids.
b. Multi-block grids allow for customization of various regions.
c. Structured boundary layers & other anisotropic regions limit
discretization errors.
d. Structured grids allow for decreased storage and less complicated data
structures.
2. Advantages of an unstructured grid
a. Unstructured grids are highly robust and simple to make
b. There is a lack of restriction as to where the nodes are placed,
increasing the automation of generation.
c. Unstructured grids allow for sub division of cells in areas requiring
increased accuracy.



Step 11: Import mesh file into CFX.
Go to: Start > Programs > ANSYS 12.0 > Fluid Dynamics > CFX > Select
working directory > CFX-Pre 12.0
File > New case > OK
File > import > mesh > select the .CFX5 file that we just created (make sure the
type of file is ICEM CFD) > Open
Step 12: Set up steady-state case definition
In the model tree, double click Analysis Type > select steady state (from drop
down box) > OK
In the model tree, (Double click) Default Domain
Basic settings (tab) > change material to water > Ref. Pressure = 1 [atm]
Fluid Models (tab) > turbulence > (none) laminar > Ok
Step 13: Define boundary conditions
In the model tree, under Simulation > Flow analysis 1 > (right click) Default
domain > Insert > Boundary > Type Inlet > Ok
Enter the following:
Basic settings (tab):
Boundary Type > Inlet
Location > Inlet
Boundary details (tab) :
Flow Regime > Subsonic
Mass & momentum > (option) Cart. Vel components > u = 0.001 m/s, v = 0 m/s &
w = 0 m/s > OK
In the model tree, under Simulation > Flow analysis 1 > (right click) Default
domain > Insert > Boundary > Type OUTLET > Ok
Enter the following:
Basic settings (tab) :
Boundary Type > Outlet
Location > OUTLET > OK
Boundary details (tab):
Mass & momentum > (option) Static Pressure > Relative Pressure > 0 [Pa] >
OK
In the model tree, under Simulation > Flow analysis 1 > (right click) Default
domain > Insert > Boundary > Type PIPE > Ok
Basic settings (tab):
Boundary Type > Wall
Location > Pipe
Boundary details (tab):
Mass & momentum > Option > No Slip Wall > Apply > Ok
Step 14: Set up solver controls
In the model tree, Simulation > Flow Analysis 1 > Solver > Solver control
(double click)
Advection Scheme > High Resolution
Minimum Iterations > 1
Maximum Iterations > 43 (this simulation takes approx 30 min to run)
Convergence criteria:
Residual type> RMS
Residual target > 1e-8 > OK
Step 15: Run the simulation
Define Run > Save > Start Run
Step 16: Post processing of results.
Once the converging criteria have reached or the number of iterations is over, a
dialogue box appears saying Solver Run Finished Normally. Click the check
box saying Post Process Results and OK.

Step 17: Creating a plane in the XY Plane
Insert > Location > Plane > (name) Plane 1 > Ok
Domain > All Domain
Method > XY Plane > Apply
Step 18: Creating a lines
Insert (menu bar) > Location > Line > keep name Line 1 > Ok
Let the 2 ends of the Line 1 be at (0.1, -0.05, 0) & (0.1, 0.05, 0) Enter these co-
ordinates
Line type > Sample > 50 > Apply
Similarly, create few other lines perpendicular to x-axis at an increment of 0.1
Step 19: Create velocity vectors
Insert > vectors > (location) Line 1 > (variable) velocity > Apply
Similarly create velocity vectors on all the lines and notice the formation of
velocity profiles along the length of the pipe.

Velocity vectors should look something similar to the above diagram.


Analytical calculation: We know
|
|
.
|

\
|
=
2
2
max
1
R
r
U
u

Where U
max
= 2U
ave
= 2*0.01=0.02 m/s, which is the max velocity seen in the
contours above at the pipe center along its axis.
Find out the values at any point and compare with the analytical solution. The
velocity will always be zero at the walls due to viscosity (no slip condition) & max
at the axis. For a laminar flow, the velocity will always be parabolic in shape (as
seen above)
Exercise:
1. Include the energy equation. Give the pipe wall a temperature higher than
the liquid temperature. Find out the amount of heat transfer from the walls to
the fluid.
2. Change the velocity of the fluid such that the flow regime is now turbulent.
Find out the velocity profile. Show that the velocity profile for turbulent
flow is given by
7
1
max
1
|
|
.
|

\
|
=
R
r
U
u







3. Find out the flow through a pipe bend or pipe with varying diameter

You might also like