Vous êtes sur la page 1sur 59

Modeling Tutorial: Laminar Pipe Flow

1
Laminar Pipe Flow
Problem Specification

Consider fluid flowing through a circular pipe of contant cross-section. The pipe diameter D=0.2 m
and length L=8 m. The inlet velocity Vin=1 m/s. Consider the velocity to be constant over the inlet
cross-section. The fluid exhausts into the ambient atmosphere which is at a pressure of 1 atm. Take
density =1 kg/ m3 and coefficient of viscosity = 2 x 10-3 kg/(ms). The Reynolds number Re based
on the pipe diameter is

where Vavg is the average velocity at the inlet, which is 1m/s in this case.

Solve this problem using FLUENT. Plot the centerline velocity, wall skin-friction coefficient, and
velocity profile at the outlet. Validate your results.

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

3
Strategy for creating geometry

Create Vertices

Repeat this process to create three more


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

4
This fits the four vertices of the rectangle we
have created to the size of the Graphics
Window.
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.

5
Display line 1

Repeat create edge steps for line 2,3 and 4

Line 1,2,3 and 4

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

7
Step 2: Mesh Geometry in GAMBIT
We'll now create a mesh on the rectangular face with 100 divisions in the
axial direction and 5 divisions in the radial direction. We'll first mesh the
four edges and then the face. The desired grid spacing is specified through
the edge mesh.
Mesh Edges

1. First mesh 5 divisions in the radial (2 vertical egde)


direction

Click Apply. Nodes appear on the edges


showing that they are divided into 5.

2. Repeat the same process for the horizontal edges,


but with an interval count of 100.

Now that the edges are meshed, we are ready to


create a 2-D mesh for the face.

8
Mesh Face

Shift left-click on the face or use the up arrow


next to Faces to select the face. Click Apply.

Zoom

9
Step 3: Specify Boundary Types in GAMBIT

Create Boundary Types

We will first specify that the left edge is the inlet. Under Entity:, pick
Edges so that GAMBIT knows we want to pick an edge.

10
Next to Name:, enter inlet.
For Type:, select VELOCITY_INLET.
Click Apply. You should see the new entry
appear under Name/Type box near the top
of the window.

Repeat this process for the other three


edges according to the following table:

11
Save and Export

Main Menu > File > Save

Main Menu > File > Export > Mesh...

Type in pipe.msh for the File Name:. Select Export


2d Mesh since this is a 2 dimensional mesh.

12
Step 4: Set Up Problem in FLUENT

Launch Fluent 6.2

Start > Programs > Fluent Inc > FLUENT 6.2

Select 2ddp from the list of options and click Run.

Import Grid

Main Menu > File > Read > Case... laminar pipe 5 x 100.msh

13
Check and Display Grid

First, we check the grid to make sure that there are no errors.

Main Menu > Grid > Check

Check the grid size:

Main Menu > Grid > Info > Size

The following statistics should appear:

14
Display the grid:

1. Make sure all 5 items under Surfaces is selected. Then click


Display.

2. The wall, outlet, and centerline


boundaries have been selected in
the following view:

15
Define Solver Properties
Main Menu > Define > Models > Solver

Main Menu > Define > Models > Viscous

Laminar flow is the default. So we don't need to change anything in this


menu. Click Cancel.

16
Main Menu > Define > Models > Energy

We need to solve the energy equation only if we are interested in


determining the temperature distribution. We will not deal with
temperature in this example. So leave the Energy Equation unselected
and click Cancel to exit the menu.

Define Material Properties

Change Density to 1.0


and Viscosity to 2e-3.

Click Change/Create.

17
Define Operating Conditions

Main Menu > Define > Operating Conditions...

For all flows, FLUENT uses 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.

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

Click on Set.... Enter 1 for Velocity


Magnitude. Click OK. This sets
the velocity of the fluid entering at
the left boundary.

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 Set.... The default value of the Gauge
Pressure is 0. Click Cancel to leave the default in place.
Lastly, click on wall under Zones and make sure Type is set as wall.

Click Close to close the Boundary Conditions menu.

19
Step 5: Solve!

We'll use a second-order discretization scheme.

Main Menu > Solve > Controls > Solution...


Change Momentum to Second Order Upwind.

20
Set Initial Guess
Initialize the flow field to the values at the inlet:

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. These values
have been taken from the inlet
boundary condition.

Click Init. This completes the initialization.

21
Set Convergence Criteria
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-3.
Main Menu > Solve > Monitors > Residual...

Change the residual under Convergence


Criterion for continuity, x-velocity, and y-
velocity, all to 1e-3.

Also, under Options, select Plot. This will


plot the residuals in the graphics window
as they are calculated.

This completes the problem


specification. Save your work:
Main Menu > File > Write > Case...
laminar pipe 5 x 100.cas

22
Iterate Until Convergence
Start the calculation by running 100 iterations:
Main Menu > Solve > Iterate...
In the Iterate Window that comes up,
change the Number of Iterations to 100.
The residuals fall below the specified
convergence criterion of 1e-3 in 24
iterations.

Save the solution to a data file:


Main Menu > File > Write > Data... laminar pipe 5 x 100.dat

23
Step 6: Analyze Results

Centerline Velocity
Main Menu > Plot > XY Plot...

Make sure that Position on X Axis is set under Options, and X is set to 1
and Y to 0 under Plot Direction. This tells FLUENT to plot the x-
coordinate value on the abscissa of the graph.

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

24
This brings up a plot of the axial velocity as a function of the distance
along the centerline of the pipe.
In the graph that comes up, we
can see that the velocity reaches
a constant value beyond a certain
distance from the inlet. This is the
fully-developed flow region.
We'll turn on the grid lines to help
estimate where the flow becomes
fully developed. Check the boxes
next to Major Rules and Minor
Rules under Options. Click Apply.
Change the axes extents: In the
Solution XY Plot menu, click on
Axes.... Under Options, deselect
Auto Range. The boxes under
Range should now be activated.
Select X under Axis. Enter 1 for
Minimum and 3 for Maximum under
Range.

25
Now, pick Y under Axis and once again
deselect Auto Range under Options,
then enter 1.8 for Minimum and 2.0 for
Maximum under Range. Also select
Major Rules and Minor Rules to turn on
the grid lines in the Y direction. We have
now finished specifying the range for
each axes, so click Apply and then
Close.

Go back to the Solution XY Plot menu and click Plot to replot the graph with
the new axes extents. We can see that the fully-developed region starts at
around x=3m and the centerline velocity in this region is 1.93 m/s.

26
Saving the Plot
Save the data from this plot:

In the Solution XY Plot Window, check the Write to File box under Options.
The Plot button should have changed to Write.... Click on Write.... Enter
Axial Velocity 5 x 100.xy as the XY File Name and click OK.
27
Name for previous data Axial Velocity 5 x 100

28
Coefficient of Skin Friction
Main Menu > Report > Reference Values...

Select inlet under Compute From to tell


FLUENT to calculate the reference values
from the values at inlet. Check that density is
1 kg/m3 and velocity is 1 m/s. (Alternately,
you could have just typed in the appropriate
values). Click OK.

Go back to the Solution XY Plot menu.


Uncheck Write to File under Options since
we want to plot to the window right now.
We can leave the other Options and Plot
Direction as is since we are still plotting
against the x distance along the pipe.

29
Under the Y Axis Function, pick Wall Click Apply, Close, and then Plot
Fluxes..., and then Skin Friction in the Solution XY Plot Window.
Coefficient in the box under that.
Under Surfaces, select wall and
unselect centerline by clicking on them.

Reset axes ranges: Go to Axes... and re-


select Auto-Range for the Y axis. Set the
range of the X axis from 1 to 8 by
selecting X under Axis, entering 1 under
Minimum, and 8 under Maximum in the
Range box (remember to de-select Auto-
Range first if it is checked).

30
We can see that the fully developed region is reached at around x=3.0m and
the skin friction coefficient in this region is around 1.54. Compare the
numerical value of 1.54 with the theoretical, fully-developed value of 0.16.
Save the data from this plot: Pick Write to File under Options and click
Write.... Enter skin friction coefficient 5 x 100.xy for XY File and click OK.

31
Velocity Profile
To plot the position variable on the y axis of the graph, uncheck Position on X
Axis under Options and choose Position on Y Axis instead. To make the
position variable the radial distance from the centerline, under Plot Direction,
change X to 0 and Y to 1. To plot the axial velocity on the x axis of the graph,
for X Axis Function, pick Velocity... and Axial Velocity under that.
Since we want to plot this at the outlet boundary, pick outlet under Surfaces.
Change both the x and y axes to Auto-Range.
Uncheck Write to File under Options so that we can see the graph. Click Plot.

32
Does this look like a parabolic profile?

Save the data from this plot: Pick Write to File under Options and
click Write.... Enter profile velocity 5 x 100.xy for XY File and click
OK.

33
To see how the velocity profile changes in the developing region, let us
add the profiles at x=0.6m (x/D=3) and x=0.12m (x/D=6) to the above plot.
First, create a line at x=0.6m using the Line/Rake tool:
Main Menu > Surface > Line/Rake
We'll create a straight line from (x0,y0)=(0.6,0) to (x1,y1)=(0.6,0.1).
Select Line Tool under Options. Enter x0=0.6, y0=0, x1=0.6, y1=0.1.
Enter line1 under New Surface Name. Click Create.
To see the line just created, select
Main Menu > Display > Grid...

Similarly, create a vertical line called line2


at x=1.2; (x0,y0)=(1.2,0) to (x1,y1)=(1.2,0.1)
in this case. Display it in the graphics
window to check that it has been created
correctly.
34
Now we can plot the velocity profiles
at x=0.6m (x/D=3) and x=1.2m
(x/D=6) along with the outlet profile.
Under Surfaces, in addition to outlet,
select line1 and line2. Select Node
Values under Options. Click Plot.

Velocity Vectors
Main Menu > Display > Vectors... > Display
Change Scale to 0.4 in the Vectors menu and click Display.

35
Main Menu > Display > Views...

Under Mirror Planes, only the axis


surface is listed since that is the
only symmetry boundary in the
present case. Select axis and click
Apply.

36
Result display vector velocity

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

Vous aimerez peut-être aussi