You are on page 1of 29

University of California, Irvine

Henry Samueli School of Engineering


Department of Mechanical and Aerospace Engineering

Laminar Pipe & Channel Flow Analysis


Using ANSYS Fluent

Author:
Jaspal Sidhu

Professor:
Said Elghobashi

ID:
18107158

Class:
MAE 195

April 10, 2015

Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Flow Description . . . . . . . . . . . . . . . .
2.1 Reynolds Number . . . . . . . . . . . . . .
2.2 Laminar Flow . . . . . . . . . . . . . . . .
2.3 Mechanics of Laminar Flow Development

.
.
.
.

5
5
5
5

3 Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Continuity Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Momentum Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6
6
6

4 Analytical Solution . . . . . .
4.1 Laminar Velocity Profile . .
4.2 Laminar Flow in a Pipe . .
4.3 Laminar Flow in a Channel

.
.
.
.

6
6
7
7

5 Computational Domain & Fluid Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7 Computational Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1 Circular Pipe (Axisymmetric 2D Space) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Channel (Planar 2D Space) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10
10
11

8 Initialization of Dependent Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

9 Numerical Details . . . . . . . . . .
9.1 Pipe Flow . . . . . . . . . . . . .
9.1.1 Simulation Convergence .
9.1.2 Computational Residuals
9.2 Channel Flow . . . . . . . . . . .
9.2.1 Simulation Convergence .
9.2.2 Computational Residuals
9.3 Mesh Refinement . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

13
13
13
13
14
14
14
15

10 Results . . . . . . . . . . . . . . . . . . . . .
10.1 Pipe Flow (Nx = 100 and Ny = 20) . . .
10.1.1 Velocity Vectors . . . . . . . . .
10.1.2 Centerline Velocity . . . . . . . .
10.1.3 Coefficient of Skin Friction . . .
10.1.4 Outlet Velocity Profile . . . . . .
10.2 Channel Flow (Nx = 100 and Ny = 20)
10.2.1 Velocity Vectors . . . . . . . . .
10.2.2 Centerline Velocity . . . . . . . .
10.2.3 Coefficient of Skin Friction . . .
10.2.4 Outlet Velocity Profile . . . . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

16
16
16
17
18
18
19
19
20
21
21

11 Validations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.1 Pipe Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.2 Channel Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22
22
23

12 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

A Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 Additional Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25
25

List of Figures
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Streak-line Profile for Laminar Flow in a Pipe/Duct . . . . . . . . . . . .


Effect of Reynolds Number On Time-averaged Axial Velocity Component
Development of Laminar Flow in a Pipe . . . . . . . . . . . . . . . . . . .
Simulated Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Laminar Flow in a Pipe . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Side View of Mesh (Nx = 100 and Ny = 10) . . . . . . . . . . . . . . . . .
Preliminary Mesh Configuration For Pipe . . . . . . . . . . . . . . . . . .
Mesh Configuration Check For Pipe . . . . . . . . . . . . . . . . . . . . .
Isometric View of Mesh (Nx = 100 and Ny = 10) . . . . . . . . . . . . . .
Preliminary Mesh Configuration For Channel . . . . . . . . . . . . . . . .
Mesh Configuration Check For Channel . . . . . . . . . . . . . . . . . . .
Initialization for Second Order Discretization . . . . . . . . . . . . . . . .
Residual Convergence for Pipe Flow for 100 x 10 Mesh . . . . . . . . . . .
Scaled Residual Computation for Pipe Flow with 100 Iteration Limit . . .
Residual Convergence for Channel Flow in 100 x 10 Mesh . . . . . . . . .
Scaled Residual Computation for Channel Flow with 100 Iteration Limit .
Grid Refinement using Circular Pipe Centerline Velocity . . . . . . . . . .
Grid Refinement using Channel Centerline Velocity . . . . . . . . . . . . .
Velocity Vectors in Pipe Flow (Half) . . . . . . . . . . . . . . . . . . . . .
Velocity Vectors in Pipe Flow (Full) . . . . . . . . . . . . . . . . . . . . .
Centerline Velocity in Pipe Flow (Full Range) . . . . . . . . . . . . . . . .
Centerline Velocity in Pipe Flow (Truncated Range) . . . . . . . . . . . .
Coefficient of Skin Friction for Pipe Flow . . . . . . . . . . . . . . . . . .
Outlet Velocity Profile using ANSYS Fluent . . . . . . . . . . . . . . . . .
Velocity Vectors in Channel Flow (Half) . . . . . . . . . . . . . . . . . . .
Velocity Vectors in Channel Flow (Full) . . . . . . . . . . . . . . . . . . .
Centerline Velocity in Channel Flow (Full Range) . . . . . . . . . . . . . .
Centerline Velocity in Channel Flow (Truncated Range) . . . . . . . . . .
Coefficient of Skin Friction for Channel Flow . . . . . . . . . . . . . . . .
Outlet Velocity Profile using ANSYS Fluent . . . . . . . . . . . . . . . . .
Axial Velocity Comparison for Laminar Flow in Circular Pipe . . . . . . .
Axial Velocity Comparison for Laminar Flow in a Channel . . . . . . . . .
Contour Plots for Laminar Flow in a Circular Pipe . . . . . . . . . . . . .
Contour Plots for Laminar Flow in a Channel . . . . . . . . . . . . . . . .
Nx = 100 and Ny = 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Nx = 100 and Ny = 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inlet Velocity Contour in a Circular Pipe . . . . . . . . . . . . . . . . . .
Outlet Velocity Contour in a Circular Pipe . . . . . . . . . . . . . . . . .
Inlet Velocity Contour in a Channel . . . . . . . . . . . . . . . . . . . . .
Outlet Velocity Contour in a Channel . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

4
5
5
8
9
10
10
10
11
11
11
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
21
21
22
23
24
24
25
25
26
26
27
27

Nomenclature

Specific Heat Ratio

le

Entrance Length

Dynamic Viscosity

Ambient Pressure

Kinematic Viscosity

Volumetric Flowrate

Fluid Density

Pipe Radius

Shear Stress

Incremental Pipe Radius

Wall Shear Stress

~
V

Fluid Velocity

Re

Reynolds Number

Cross-sectional Area

Ambient Temperature

Cf

Coefficient of Skin Friction

Axial Velocity Component

Hydraulic Diameter

Vertical Velocity Component

Channel Height

Vavg

Average Axial Velocity (also Uz )

Abstract
The ANSYS Fluent tutorial presented in this report is designed to introduce the computational
methods needed to solve a Laminar Pipe and Channel Flow problem. The goal of the simulation
tutorial was to guide users through the comparison of analytical and computational results of a
well-studied, low Reyonolds Number fluid flow. The simulation analysis presented below, brings
light to the importance of using Computational Fluid Dynamics to solve Fluid Mechanic problems
that do not have analytical solutions. The following report illustrates the well known velocity
profile solutions for Laminar flow through a Circular Pipe and a Planar Channel. The computational results for the axial velocity through a Circular Pipe and a Channel compare well with
the desired analytical solutions of Umax = 2 ms and Umax = 1.5 ms , respectively. This report details
the simulation Geometry, Mesh, and Flow Physics configuration required to obtain the accurate
results. Furthermore, to verify the accuracy of the computational results, mesh refinement was
carried out and the simulation was repeated to test for grid independence.

Introduction

Computational Fluid Dynamics utilizes numerical methods to solve the governing equations of mass, momentum
and energy in order to predict flow properties in a vast variety of cases. Instead of attempting to analytically
solve the governing equations, CFD replaces the conservation equations with a mesh of discretized grid points that
cover the entire flow domain. The discretized mesh is then solved by a computer to determine the flow properties
at individual grid points.
Why does CFD matter? Prior to the introduction of super-computers, determining the flow properties in a
flow domain was done by solving the exact governing equations analytically, or through experimental techniques
that measured the local properties. With a limited number of analytical solutions, many real fluid mechanic
problems were difficult to solve. Of the limited flow problems with analytical solutions, the Laminar flow through
a pipe/duct (shown in Figure 1) is one that provides analytical results that compare well with computational
solutions.

Figure 1: Streak-line Profile for Laminar Flow in a Pipe/Duct

In this report, a Laminar flow through a circular pipe and channel are studied. These two flow cases provide
insight into the accuracy of the computational solution by simulating a Newtonian fluid in a 2D geometry that is
spacially axisymmetric for the circular pipe and planar for the channel. ANSYS Fluent will be used to carry out
the computational simulation by configuring the simulation Geometry, Mesh, and Flow Physics. After completing
the configuration of the flow simulation, the remainder of the report will cover the simulation results and result
verification.
The goal of this report is to solve this problem of Laminar Flow through a Circular Pipe and Channel using
ANSYS Fluent. We expect the viscous boundary layer to grow along the pipe starting at the inlet. It will eventually grow to fill the pipe completely. When this happens, the flow becomes fully-developed and there is no
variation of the velocity profile in the axial direction, x. Knowing this, I will obtain the plots for the centerline
velocity, wall skin-friction coefficient, and velocity profile at the outlet and validate the simulation results.

2
2.1

Flow Description
Reynolds Number

The Reynolds Number is a non-dimensionalized form of velocity that can be defined as the ratio of inertial forces
to viscous forces or more formally:
IN ERT IAL
U D
Re =
=
(1)
V ISCOU S

In the equation above, is the fluid density, U is the fluid velocity, D is the hydraulic diameter of the pipe and
is the fluid viscosity. The Reynolds Number is the primary parameter for quantifying when and whether a flow
will be Laminar (dominant viscous effects), Turbulent (dominant inertial effects) or somewhere in between.

2.2

Laminar Flow

In Laminar flow, the fluid flows smoothly down the pipe due to low Reynolds Number (Re) because viscous effects
dominate the flow. The result of the highly viscous flow causes streak-lines to be straight lines (shown below in
Figure 2) largely because momentum transfer between fluid particles is not as effective at low Re. For circular
pipes, the flow is Laminar when Re < 2300 and when the flow is fully developed for a sufficiently long pipe.

Figure 2: Effect of Reynolds Number On Time-averaged Axial Velocity Component

2.3

Mechanics of Laminar Flow Development

Figure 3: Development of Laminar Flow in a Pipe

Figure 3 illustrates the Laminar fluid flow development inside a circular pipe/duct. The fluid along the pipe wall
sticks to the wall due to surface roughness (this is known as the no-slip condition and occurs for all liquids).
This boundary layer thickness continues to grow until it reaches all parts of the pipe. Inside the inviscid core,
viscous effects can be ignored because the no-slip condition is no longer applicable. The entrance region (i.e. part
of pipe where fluid flow exhibits boundary layer growth) for Laminar flow is given by:
le
= 0.06Re
D
5

(2)

When Newtons Second Law is applied to a fluid element inside the circular pipe, we find that the shear stress
exerted on the fluid element depends only on the relative distance as a fraction of the diameter and the fluid
viscosity:
2w r
=
(3)
D
Without fluid viscosity, the wall shear stress (w ), and therefore the total shear stress ( ), would be zero. As a
result, the presence of fluid viscosity dissipates kinetic energy which forces the pressure of the flow to drop along
the axial direction where:
2l
4lw
F~
=
=
(4)
P =
A
2
D

3
3.1

Governing Equations
Continuity Equation

For 2D Steady-State Flow:


=< , > < u, v >= u + v = 0
(V)
x y
x
y

(5)

For 2D Steady-State Incompressible Flow:


=<
(V)

3.2

u v

,
> < u, v >=
+
=0
x y
x y

(6)

Momentum Equation

Navier-Stokes Equation in Planar Cylindrical for Steady-State Pipe Flow:








ur
ur
p
1
ur
2 ur
ur
ur
+ uz
=
+
r
+
2 + gr
r
z
r
r r
r
z 2
r






2
uz
p
1
uz
uz
uz
+ uz
=
+
r
+
+ gz
ur
r
z
z
r r
r
z 2
Navier-Stokes Equation in 2D Cartesian for Steady-State Channel Flow:


 2

ux
ux
p
ux 2 ux
ux
+ uy
=
+
+
+ gx
x
y
x
x2
y 2


 2

uy
uy
uy
2 uy
p
ux
+ uy
=
+
+
+ gy
x
y
y
x2
y 2

(7)
(8)

(9)
(10)

Compact Form for Steady-State Incompressible Navier-Stokes Equation:


(u )u 2 u = w + g.

4
4.1

(11)

Analytical Solution
Laminar Velocity Profile

In order to find the velocity profile of a Laminar Flow, the fluid must be assumed to be a Newtonian Fluid. By
definition, a Newtonian Fluid is a fluid in which the viscous stresses arising from its flow, at every point, are
linearly proportional to the local strain ratethe rate of change of its deformation over time [2, p. 31]. More
formally, a Newtonian Fluid can be defined as:
=

u
y

(12)

4.2

Laminar Flow in a Pipe

Using Equation 10, and the definition shear stress exerted on the fluid, we can obtain a differential equation in
the form:
du
P
1
dP
=
r u(r) =
(
) + C1 ln(r) + C2
dr
2l
4 dx
The wall shear stress (w ) is proportional to P , thus we can define the friction factor in terms of P :
f=

P D
1
2
2 DU L

64
|w |
16
cf = 1 2 =
Re
Re
2 U

By applying the boundary conditions where u


r = 0 at r = 0 because of symmetry about the centerline and
u(r = R) = 0 at the the wall because of the no-slip condition, therefore:
u(r) =

R2 dP
r
(
)[1 ( )2 ]
4 dx
R

(13)

In order to non-dimensionalize the axial velocity for the flow in a pipe, the average flow velocity must be defined
as the following:
Z R
2
R2 dP
Vavg = 2
)
(14)
u(r)rdr = (
R 0
8 dx
So by combining, Equations 11 and 12, we get that:
u(r) = 2Vavg [1

r2
]
R2

(15)

Which ultimately shows that:


Umax = u(0) = 2Vavg

(16)

For the pipe flow simulation, the average velocity was given as 1
within the flow is expected to be 2 ms .

4.3

m
s

therefore, the maximum velocity

Laminar Flow in a Channel

By applying the definition of volumetric flow rate, and the aforementioned axial velocity equation, we can derive
the non-dimensionalized form of velocity for the channel flow. Know that:
Z h
Z h
1
dP
1 dP h3
udy =
Q=
(
)
[h2 y 2 ]dy = (
)[ ]
(17)
2 dx 0
dx 3
0
We also know that Q = u h therefore:
Q
1
dP
=
(
)
u=
h
2h dx

[h2 y 2 ]dy =

1
dP 2
y3
(
)[h y ]h0
2h dx
3

(18)

To solve for the non-dimensionalized velocity of a channel flow, average (y = 0 h) and maximum (y=0) axial
velocity need to be determined therefore:
Uavg =

1
dP 2
y3
1 dP h2
(
)[h y ]h0 = (
)[ ]
2h dx
3
dx 3

(19)

1
dP 2
(
)[h ]
2 dx

(20)

Umax =
Which ultimately shows that:
Umax
=
Uavg

1
dP
2
2 ( dx )[h ]
1
dP h2
( dx )[ 3 ]

3
2

(21)

For the channel flow simulation, the average velocity was given as 1 ms therefore, the maximum
velocity within the flow is expected to be 1.5 ms .
7

Computational Domain & Fluid Properties

Figure 4: Simulated Geometry

We are considering a fluid flowing through a circular pipe of constant radius and through a planar channel of
constant height. The pipe diameter and channel height is 0.2 m and the length is 10 m.
Geometry Dimensions:
Horizontal Length=10 m

Vertical Height (from centerline)=0.1 m

Fluid Properties:
kg
Viscosity: = 2e3 ms

Newtonian Fluid
kg
Density: = 1 m
3

Reynolds Number: Re =

U D

= 100

Boundary Conditions

The edges of the geometry will be given names in order to assign boundary conditions in ANSYS Fluent. 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 below in Figure
5.

Figure 5: Laminar Flow in a Pipe

1. For fully developed flow at the pipe/channel exit:


u
=0
x

therefore from the Continuity Equation

2. From symmetry of plane, we get that:


y=0 v=0

and

u
=0
y

3. From the no-slip condition at the wall, we get that:


u=0
4. Since

v
y

and v = 0

= 0 therefore v = 0 everywhere

v
=0
y

7
7.1

Computational Mesh
Circular Pipe (Axisymmetric 2D Space)

Figure 6: Side View of Mesh (Nx = 100 and Ny = 10)

Figure 7: Preliminary Mesh Configuration For Pipe

Figure 8: Mesh Configuration Check For Pipe

10

7.2

Channel (Planar 2D Space)

Figure 9: Isometric View of Mesh (Nx = 100 and Ny = 10)

Figure 10: Preliminary Mesh Configuration For Channel

Figure 11: Mesh Configuration Check For Channel

11

Initialization of Dependent Variables

For this simulation tutorial, a second order discretization was used to to approximate the computational solution.
In particular, the second order scheme was implemented by using the Solution Methods option in ANSYS Fluent
and selecting the Second Order Upwind feature under the Momentum section.

Figure 12: Initialization for Second Order Discretization

Carrying out these steps will allow the flow field to be initialized to the values at the inlet of the Pipe and Channel.

12

Numerical Details

Before running the flow simulation, we checked to make sure the residual of the governing equations converged
at approximately 1e6. ANSYS Fluent reports a residual for each of the governing equations being solved. The
computational residual is a measure of how well the current solution satisfies the discrete form of each governing
equation. Fluent will iterate the solution until the residual for each equation falls below 1e6.

9.1
9.1.1

Pipe Flow
Simulation Convergence

Figure 13 (below) shows that the residuals for the Pipe flow converged after 64 iterations. As expected, our
flow simulation took a greater number of iterations for the residual to converge when compared to the simulation
tutorial, largely because we used a finer mesh.

Figure 13: Residual Convergence for Pipe Flow for 100 x 10 Mesh

9.1.2

Computational Residuals

Using the XY-Plot feature in ANSYS Fluent, I was able to produce the graphs shown in Figure 14 of the pipe
flows residual convergence as a function of the number of computational iterations for the governing equations.

(a) First Iteration Set

(b) Second Iteration Set

Figure 14: Scaled Residual Computation for Pipe Flow with 100 Iteration Limit

13

9.2
9.2.1

Channel Flow
Simulation Convergence

Similar to the previous section, Figure 15 (below) shows that the residuals for the Channel flow converged after
77 iterations. As expected, our flow simulation took a greater number of iterations for the residual to converge
when compared to the simulation tutorial, largely because we used a finer mesh.

Figure 15: Residual Convergence for Channel Flow in 100 x 10 Mesh

9.2.2

Computational Residuals

Using the XY-Plot feature in ANSYS Fluent, I was able to produce the graphs shown in Figure 16 of the channel
flows residual convergence as a function of the number of computational iterations for the governing equations.

(a) First Iteration Set

(b) Second Iteration Set

Figure 16: Scaled Residual Computation for Channel Flow with 100 Iteration Limit

14

9.3

Mesh Refinement

Shown below in Figures 17 and 18 are the Mesh refinement comparisons for the circular pipe and channel flow.
Mesh refinement was carried out in an increasing order (Nx and Ny ): 100 x 5 (red), 100 x 10 (green), 100 x 20
(blue) and 100 x 40 (white). For both simulations, the coarse mesh (red) deviates significantly from the analytical
solutions of the flow. Comparing the 100 x 20 and 100 x 40 meshes, the solution convergence takes much longer
for the finer mesh with minimal improvements in centerline velocity accuracy. Therefore for the remainder of the
report, I will be using the 100 x 20 mesh configuration for the pipe and channel flow simulations.

Figure 17: Grid Refinement using Circular Pipe Centerline Velocity

Figure 18: Grid Refinement using Channel Centerline Velocity

15

10
10.1
10.1.1

Results
Pipe Flow (Nx = 100 and Ny = 20)
Velocity Vectors

Half and Full Velocity vectors plots are shown to prove that the flow is indeed symmetric about the pipe centerline.

Figure 19: Velocity Vectors in Pipe Flow (Half)

Figure 20: Velocity Vectors in Pipe Flow (Full)

16

10.1.2

Centerline Velocity

Figure 21: Centerline Velocity in Pipe Flow (Full Range)

Figure 22: Centerline Velocity in Pipe Flow (Truncated Range)

17

10.1.3

Coefficient of Skin Friction

Figure 23: Coefficient of Skin Friction for Pipe Flow

10.1.4

Outlet Velocity Profile

Figure 24: Outlet Velocity Profile using ANSYS Fluent

18

10.2
10.2.1

Channel Flow (Nx = 100 and Ny = 20)


Velocity Vectors

Half and Full Velocity vectors plots are shown to prove that the flow is indeed symmetric about the channel
centerline.

Figure 25: Velocity Vectors in Channel Flow (Half)

Figure 26: Velocity Vectors in Channel Flow (Full)

19

10.2.2

Centerline Velocity

Figure 27: Centerline Velocity in Channel Flow (Full Range)

Figure 28: Centerline Velocity in Channel Flow (Truncated Range)

20

10.2.3

Coefficient of Skin Friction

Figure 29: Coefficient of Skin Friction for Channel Flow

10.2.4

Outlet Velocity Profile

Figure 30: Outlet Velocity Profile using ANSYS Fluent

21

11
11.1

Validations
Pipe Flow

To verify the accuracy of the computational solution for the radial velocity in a laminar flow, I wrote a MATLAB
script to compute the analytical solution for radial velocity. Shown below is the output of my MATLAB code
which contains the radial increment, r, and the associated radial velocity component, u(r):
>> u = 2.0000 1.9950 1.9800 1.9550 1.9200 1.8750 1.8200 1.7550 1.6800 1.5950 1.5000 1.3950 1.2800 1.1550 1.0200
0.8750 0.7200 0.5550 0.3800 0.1950 0.0000
>> r = 0.0000 0.0050 0.0100 0.0150 0.0200 0.0250 0.0300 0.0350 0.0400 0.0450 0.0500 0.0550 0.0600 0.0650 0.0700
0.0750 0.0800 0.0850 0.0900 0.0950 0.1000

The MATLAB output above was saved as a .xy file and uploaded into ANSYS Fluent and plotted against the
computational solution. Shown below are the results of this comparison.

(a) Full Graph of Axial Velocity Comparison

(b) Truncated Graph of Axial Velocity Comparison

Figure 31: Axial Velocity Comparison for Laminar Flow in Circular Pipe

Figure 31a shows the entire radial velocity range comparison as a function of radial pipe position and proves the
computational accuracy of the simulation. Figure 29b depicts the truncated range of radial velocity where the
computational solutions begin to deviate from the analytical solution.
In Figure 31b, the green dots correspond to the analytical solution, the red dots correspond to the coarse mesh
(10 x 100), and the white dots correspond to the refined mesh (20 x 100). The truncated plot shows that the
computational solutions improve in accuracy with grid refinement with minor deviations from the analytical solution. For the 20 X 100 mesh, the computational solution for velocity yields a value of 1.98 ms which is 1% less than
the analytical value of 2 ms , therefore any further mesh refinement (as shown in Section 7.3) would be wasted effort.
Lastly, when comparing the computational solution for the skin friction coefficient (cf = 0.158) in Figure 21
to the analytical solution we get that:
(cf )analytical =

16
16
=
= 0.160
Re
100

22

(cf )computational
= 0.9875
(cf )analytical

11.2

Channel Flow

To verify the accuracy of the computational solution for the axial velocity in a laminar flow, I wrote a MATLAB
script to compute the analytical solution for channel flow velocity. Shown below is the output of my MATLAB
code which contains the axial increment, h, and the associated lateral velocity component, u(h):
>> u = 1.5000
1.0463

1.4963
0.9600

1.4850
0.8662

1.4663
0.7650

1.4400
0.6562

1.4063
0.5400

1.3650
0.4163

1.3162
0.2850

1.2600
0.1463

1.1963
0.0000

1.1250

>> h = 0.0000
0.0550

0.0050
0.0600

0.0100
0.0650

0.0150
0.0700

0.0200
0.0750

0.0250
0.0800

0.0300
0.0850

0.0350
0.0900

0.0400
0.0950

0.0450
0.1000

0.0500

The MATLAB output above was saved as a .xy file and uploaded into ANSYS Fluent and plotted against the
computational solution. Shown below are the results of this comparison.

(a) Full Graph of Axial Velocity Comparison

(b) Truncated Graph of Axial Velocity Comparison

Figure 32: Axial Velocity Comparison for Laminar Flow in a Channel

Figure 32a shows the full axial velocity range comparison as a function of channel position and proves the computational accuracy of the simulation. Figure 32b depicts the truncated range of axial velocity where the computational
solutions begin to deviate from the analytical solution.

In Figure 32b, the green dots correspond to the analytical solution, the red dots correspond to the coarse mesh
(10 x 100), and the white dots correspond to the refined mesh (20 x 100). The truncated plot shows that
the computational solutions improve in accuracy with grid refinement with minor deviations from the analytical
solution. For the 20 X 100 mesh, the computational solution for velocity yields a value of 1.49255 ms which is 0.5%
less than the analytical value of 1.5 ms , therefore any further mesh refinement (as shown in Section 7.3) would be
wasted effort.

23

12

Conclusions

In summary, we expected the viscous boundary layer to grow along the distance of the pipe and channel starting
from the inlet. In doing so, we also expected the boundary layer to fill the pipe and channel completely until the
flow became fully-developed and there was no longer any variation of the velocity profile in the axial direction.
Additionally, my computational results were expected to satisfy the analytical solutions for the Laminar Flow in
a Pipe and Channel.
The graphs shown below in Figures 33 and 34 illustrate the expected boundary layer growth (through the increase in axial velocity) and span-wise drop in static pressure. Figure 33a shows that the computational model for
the Laminar Flow in a Pipe achieves the analytical axial velocity value of 2 ms . Likewise, Figure 34a illustrates the
growth of the boundary layer where maximum axial velocity is approximately 1.5 ms . Furthermore, as mentioned
in class, both simulations for circular pipe and channel exhibit the static pressure drop along the axial direction
of the pipe (shown in Figures 33b and 34b), which is the flows driving force.

(a) Inlet Axial Velocity Contour Plot

(b) Static Pressure Contour Plot

Figure 33: Contour Plots for Laminar Flow in a Circular Pipe

(b) Static Pressure Contour Plot

(a) Inlet Axial Velocity Contour Plot

Figure 34: Contour Plots for Laminar Flow in a Channel

Detailed in Section 7.3 and Section 11 are verifications showing that ample grid refinement helps increase the accuracy of the flow simulation by making sure the governing equations are properly discretized over the geometry.
Additionally, further verifications such as comparing the skin friction coefficient between analytical and computational solutions, provides conclusive evidence for the accuracy of the computational simulations of a Laminar
Flow through a Circular Pipe and Channel.

24

A
A.1

Appendices
Additional Figures

Figure 35: Nx = 100 and Ny = 10

Figure 36: Nx = 100 and Ny = 20

25

Figure 37: Inlet Velocity Contour in a Circular Pipe

Figure 38: Outlet Velocity Contour in a Circular Pipe

26

Figure 39: Inlet Velocity Contour in a Channel

Figure 40: Outlet Velocity Contour in a Channel

27

References
[1] Fox, Robert W., Robert W. Fox, Philip J. Pritchard, and Alan T. McDonald. Fox and McDonalds Introduction
to Fluid Mechanics. Hoboken, NJ: John Wiley & Sons, 2011. Print.
[2] Munson, Bruce Roy, T. H. Okiishi, Wade W. Huebsch, and Alric P. Rothmayer. Fundamentals of Fluid Mechanics. Hoboken, NJ: John Wiley & Sons, 2013. Print.

28

You might also like