Simulation and Validation of Turbulent Pipe Flows: 1. Purpose
Simulation and Validation of Turbulent Pipe Flows: 1. Purpose
1. Purpose
The Purpose of CFD Lab 1 is to teach students how to use ANSYS, practice more options in each step
of CFD Process, and relate simulation results to EFD and AFD concepts. Students will simulate
turbulent pipe flow following the “CFD process” by an interactive step-by-step approach. The flow
conditions will be the same as they used in EFD Lab2. Students will have “hands-on” experiences using
ANSYS to compute axial velocity profile, centerline velocity, centerline pressure, and wall shear stress.
Students will compare simulation results with their own EFD data, analyze the differences and possible
numerical/experimental errors, and present results in a CFD Lab report.
Reference Values
(ANSYS Fluent -
Setup)
Solution
Initialization
(ANSYS Fluent -
Solution)
1
2. Simulation Design
In EFD Lab 2, you have conducted experimental study for turbulent pipe flow. The data you have
measured include centerline pressure distribution and fully developed axial velocity profile. These data
will be used in this Lab for comparisons with CFD predictions.
The problem to be solved is that of turbulent flows through a circular pipe. Reynolds number based on
pipe diameter and inlet velocity should be computed from your own EFD data and is much higher
than the Reynolds number used in CFD Prelab1.
Figure 1 - Geometry
The problem formulation is similar to that in CFD PreLab1 and will not be repeated here. The Reynolds
number is much higher and students need specify turbulence model, and thus more variables need to be
specified in boundary conditions, as will be discussed in details later.
Navigation Tips
To zoom in and out use the magnifying glass with a plus sign in it and drag, from top left to
bottom right over the are you wish to zoom.
To look at a view plane, simply click on the arrow in the coordinate system identifier in the
bottom right of the screen. i.e if you wish to look at the XYplane, click on the Z Arrow.
2
3. Open ANSYS Workbench
3.1. Start > All Programs > ANSYS 17.1 > Workbench 17.1
(Note: You may ignore the firewall warnings by closing the pop-up window)
3.2. From the ANSYS Workbench home screen (Project Schematic), drag and drop the Geometry
component for the Component Systems in the Toolbox into the Project Schematic. Rename the
geometry “Pipe” by right clicking on the down arrow of the Geometry component and selecting
Rename.
3
3.3. Drag and drop a Mesh component and a Fluent component into the Project Schematic as shown
below. Rename the components as “non-uniform” and “turbulent” for Mesh and Fluent components
respectively.
3.4. Create connection as per below by dragging and dropping each component to the corresponding
component.
3.5. Create a Folder on the network drive called “CFD Lab 1”.
3.6. Save the project file by clicking File > Save As…
3.7. Save the project onto the network drive in the folder you just created and name it “CFD Lab 1
Turbulent Flow”.
4
4. Geometry
4.1. Right click on Geometry and from the drop down menu select New DesignModeler Geometry…
5
4.3. Select the XYPlane under the Tree Outline and click New Sketch button.
4.5. Select Sketching > Constraints > Auto Constraints. Enable the auto constraints option to pick
the exact point as below.
6
4.6. Select Sketching > Draw > Rectangle. Create a rectangle geometry as per below. Make sure to
start from the origin. The mouse arrow should change to a “P” when on the origin.
4.7. Select Dimensions > General. Click on top edge then click anywhere. Repeat the same thing for
one of the vertical edges. You should have a similar figure as per below.
7
4.8. Click on H1 under Details View and change it to 6.096m. Click on V2 and change it to 0.02619m.
NOTE: The actual length of the pipe is 30 feet (9.144m), However, in CFD simulation, we need to
specify “outlet pressure”, and we don’t have a pressure transducer at the pipe outlet. So we choose the
outlet of the pipe we will simulate to be the location of the last pressure transducer, which is 6.096 meters
from the pipe inlet.
4.9. Concept > Surface From Sketches, select the sketch by left clicking on Sketch1 in the Tree
Outline and hit Apply in the Detatils View under Base Objects.
8
4.10. Click Generate. This will create a surface.
9
5. Mesh Generation
5.1. From the Project Schematic right click on Mesh component and select Edit…
5.2. Right click on Mesh then select Insert > Face Meshing.
10
5.3. Select your geometry by clicking on the yellow box which says No Selection, then select the
geometry surface and click Apply. (Note: You can change orientation of your view by clicking the
axis figure on the lower right corner. Press “F7” on your keyboard to restore to the “whole view”.
Zoom in by holding the right mouse button and selecting a region.)
5.4. Click on the Edge button. This will allow you to select edges of your geometry.
11
5.5. Right click on Mesh then select Insert > Sizing.
5.6. Hold Ctrl button and select the top and bottom edge then click Apply. Specify details of sizing as
per below in the Details of “Edge Sizing” – Sizing window.
12
5.7. Repeat step 5.5. Select the left edge then click Apply and change the parameters as per below.
5.8. Repeat Step 5.5. Select the right edge then click Apply and change the parameters as per below.
5.9. Click on Generate Mesh button and then select Mesh under Outline. The mesh should look like
the mesh below.
13
5.10. Change the edge names by selecting the edge, then right clicking on the edge and selecting Create
Named Selection from the drop down menu. Name left, right, bottom and top edges as inlet, outlet,
axis and wall respectively then click OK. Your outline should look same as the figure below.
14
5.11. File > Save Project. Save the project and close the window. Update mesh on Project Schematic
by right clicking on Mesh and selecting Update.
15
6. Setup (Physics)
6.1. Right click Setup and select Edit…
16
6.3. Tree > Setup > General > Check. (Note: If you get and error message you may have made a
mistake while creating you mesh. Review steps in mesh generation and make changes.)
6.4. Tree > Setup > General. Choose Axisymmetric option shown below.
17
6.5. Tree > Setup > Models > Viscous (right click) > Model. Select Standard k-epsilon.
18
6.6. Tree > Setup > Materials > air > Create/Edit. Change the Density and Viscosity as per your
experimental data. Click Change/Create then close the window. Use the flow property values in
your EFD Lab2. If you only know the room temperature when you conducted EFD Lab 2, you can
use the following website to easily get the corresponding density and dynamic viscosity for air:
http://www.mhtl.uwaterloo.ca/old/onlinetools/airprop/airprop.html. Close the dialog box when
finished.
If the room temperature is 24°, the density and viscosity are the values shown in the above panel.
NOTE: viscosity used in ANSYS is the dynamic viscosity ( kg m s ), NOT kinematic viscosity (
m2 s )
19
6.7. Tree > Setup > Cell Zone Conditions > Zone > surface_body. Change type to fluid and click
OK. Select Material Name as air and click OK.
6.8. Tree > Setup > Boundary Conditions > inlet > Edit… Change velocity magnitude as per your
experimental data. Change other parameters as below and click OK. You must calculate the inlet
velocity u, which is uniform, based on the flow rate Q (m3/s) you computed in EFD Lab2, and cross
section area of the pipe D 2 4 , i.e. u 4Q D2 .
20
6.9. Tree > Setup > Boundary Conditions > outlet > Edit… Change gauge pressure as per
experimental data. Change other parameters as below and click OK. You need to transform the four
pressure tap pressure values from “feet water” to “Pascal” and input pressure tap #4 value as the
“outlet pressure”. For example, if the pressure tap #4 has value of 0.2502 feet water, you need input
747 Pascal.
6.10. Tree > Setup > Boundary Conditions > wall > Edit… Change roughness height as per
experimental data. Change other parameters as below and click OK. Input the pipe roughness of the
pipe you used in EFD Lab2. For example, user inputs 0.000025 m for smooth pipe.
21
6.11. Tree > Setup > Boundary Conditions > Operating Condition. Change parameters as per
below and click OK.
6.12. Tree > Setup > Boundary Conditions > axis. Make sure that axis is selected as per below.
22
6.13. Tree > Setup > Reference Values. Change parameters as per experimental data. Parameters in
blue are constant and should be entered as seen below. Parameters in red are from experimental
data.
23
6.14. Tree > Solution > Solution Methods. Change parameters as per below.
24
6.15. Tree > Solution > Monitors > Residuals. Right click Residual and select Edit… Change
convergence criterion to 1e-06 for all five equations as per below and click OK.
25
6.16. Tree > Solution > Solution Initialization. Change gauge pressure and axial velocity as per
experimental data and click Initialize. Parameters in blue are constant and should be entered as seen
below. Parameters in red are from experimental data.
26
6.17. Tree > Solution > Run calculation. Change Number of Iterations to 1000 and click Calculate.
6.18. Once the solution converges, click OK. (The residuals should be comparable to the ones below.)
27
7. Results
To save a picture of the screen, select File > Save Picture… Make sure all the parameters are set similar
to the ones below and click Save… (To preview the picture, before you save click Preview in the Save
Picture window)
28
7.2. Displaying Mesh
Setting Up Domain > Display. Select all Surfaces you wish to be visible and select Display then click
Close.
Zoom in to the inlet by using the magnifying glass with a plus sign in the middle of it. The mesh should
look like the one below.
Name the File as “CFD Lab 1 Mesh”, navigate to the CFD Lab 1 file you created and save it in that file.
Close the Save Picture window.
29
7.3. Displaying and Saving Residual History
To display the residuals click Tree > Solution > Monitors. Right click Residuals select Edit…, click
Plot then click Cancel.
You can save this picture the same way you saved the mesh. Name it “CFD Lab 1 Residuals” and save
it to the folder you created on the network drive.
30
7.4. Plotting Centerline Pressure Distribution
To plot results, click Results > Plots. Right click XY Plot, then click edit… To plot the Centerline
Pressure Distribution, copy the parameters as per below. Next click Load File…, select the file named
“pressure-EFD-turbulent-pipe.xy” and click OK. Then click Plot. This .xy file can be downloaded
from the class website below. The plot should look similar to the one below.
http://www.engineering.uiowa.edu/~fluids/
You can save this picture the same way you saved the mesh. Name it “CFD Lab 1 Center Line Pressure
with EFD” and save it to the folder you created on the network drive.
31
7.5. Plotting Centerline Velocity Distribution
To plot results, click Results > Plots. Right click XY Plot, then click edit… To plot Centerline
Velocity Distribution, copy the parameters as per below and click Plot.
Save the picture as you did for the mesh and call it “CFD Lab 1 Centerline Velocity Distribution” and
save it in the folder you created.
32
7.6. Plotting Wall Shear Stress Distribution
To plot results, click Results > Plots. Right click XY Plot, then click edit… To plot the Wall Shear
Stress Distribution, copy the parameters as per below and click Plot.
Save the picture as you did for the mesh and call it “CFD Lab 1 Wall Shear Stress Distribution” and
save it in the folder you created.
33
7.7. Plotting Profiles of Axial Velocity at All Axial Locations (3 pages long)
To plot Profiles of Axial Velocity at All Axial Locations with EFD Data, click Setting Up Domain >
Surface > Create > Line/Rake…
Change x and y values as per below, name the surface, and click Create. Repeat this for all the lines
shown in the table below.
34
Surface Name X0 Y0 X1 Y1
x=10d 0.5238 0 0.5238 0.02619
x=20d 1.0476 0 1.0476 0.02619
x=40d 2.0952 0 2.0952 0.02619
x=60d 3.1428 0 3.1428 0.02619
x=100d 5.238 0 5.238 0.02619
Go back to XY plot. Click Load File… and select “axialvelocityEFD-turbulent-pipe.xy”, which is the
file you just modified, and click OK. Change Parameters as per below. Make sure to select inlet as well.
Click Curves… > Change the Pattern to the pattern seen below and click Apply. Incriment the Curve
# by one and repeat. Do this for curves 0 through 7 then click Close.
35
Click Plot.
Save the picture as you did for the mesh and call it “CFD Lab 1 Axial Velocity at All Axial Locations
with EFD Data” and save it in the folder you created.
36
7.8. Plotting Velocity Vectors
Click Results > Graphics > Vectors > Set Up… To plot the velocity vectors at the region flow begin
to become fully developed, copy the parameters as per below and click Display. Zoom into the region
where the flow is almost fully developed.
Save the picture as you did for the mesh and call it “CFD Lab 1 Velocity Vectors at The Region Flow
Begin to Become Fully Developed” and save it in the folder you created. Close the Vectors window.
37
7.9. Plotting Axial Velocity Contours
Click Results > Graphics > Contours > Set Up… To plot the Contours of Axial Velocity, copy the
parameters as per below and click Display. Zoom into the region where the flow is almost fully
developed.
Save the picture as you did for the mesh and call it “CFD Lab 1 Contours of Axial Velocity” and save
it in the folder you created.
38
7.10. Exporting Axial Velocity Profile at x=100d
To export Results, click Results > Plots > XY Plot > Set Up… To export the Developed Axial
Velocity Profile at x=100d, copy the parameters as per below and click Write…
Name the file “CFD Lab 1 Developed Axial Velocity Profile” and leave the Files of Type: as XY Files.
39
7.11. Exporting Wall Shear Stress Distribution
To export the wall shear stress distribution, copy the parameters as per below and click Write…
Name the file “CFD Lab 1 Wall Shear Stress Distribution” and leave the Files of Type: as XY Files.
40
7.12. Normalizing Velocity Profile
Open the Excel sheet you created in CFD Pre-Lab 1 from your folder on the network drive.
Open the “CFD Lab 1 Developed Axial Velocity Profile.xy” file you just created in a text editor
program.
Copy the velocity and position data from the text program and paste it into the Excel sheet, make
sure to label it accordingly.
Normalize the velocity profile by dividing every velocity by the Centerline Velocity (Max Velocity).
Edit the plot to include only AFD Velocity Profile (Laminar) and CFD Velocity Profile (Turbulent).
File > Save As, name the file “CFD Lab 1 Developed Axial Velocity Profile.xlsx” and save it into
your CFD Lab 1 folder on the network drive.
41
8. Exercises
You need to complete the following assignments and present results in your lab reports following the lab
report instructions
Figures need to be saved: (1) residual history, (2) centerline pressure with EFD, (3) profiles of axial
velocity at all axial locations (x/d=10, 20, 40, 60, 100) with EFD data, (4) centerline velocity distribution,
(5) wall shear stress distribution, (6) contour of axial velocity and (7) velocity vectors (pick up the region
where flow begins to become fully developed).
Data need to be saved: (1) wall friction factor in the developed region, (2) developing Length
42