KEMBAR78
CFD Task1 | PDF | Teaching Methods & Materials | Computers
0% found this document useful (0 votes)
56 views40 pages

CFD Task1

Uploaded by

Kem ChanPaly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views40 pages

CFD Task1

Uploaded by

Kem ChanPaly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

1

Flow in a Circular Pipe

1. Purpose
The Purpose of CFD Task 1 is to simulate steady laminar and turbulent pipe flow following a
step-by-step instruction. Students should analyze axial velocity profiles in different sections,
centerline velocity and pressure distributions, and friction factor. Students will compare velocity
profiles with experimental and analytical data, analyze the differences between laminar and
turbulent flows, and present results in CFD Lab report.

2. Simulation Design
The numerical simulation will be conducted for laminar and turbulent pipe flows.
For laminar mode, the Reynolds number is in the range of 250-1250 (for every student the value
is defined by teacher).
For turbulent flow, the Reynolds number equal to 1·105 is considered. The schematic of the
problem and the parameters for the simulation are shown below.

Since the flow is axisymmetric we only need to solve the flow in a single plane from the centerline
to the pipe wall. The pipe diameter and length are equal to 0.04 m and 6 m correspondingly.

Computational
Doman Uniform mesh Pipe Wall Non-uniform mesh

Inlet Outlet

Axis
2

Boundary conditions need to be specified include inlet, outlet, wall, and axis. Uniform flow is
specified at inlet, the flow will reach the fully developed regions after a certain distance
downstream (See typical flow profiles below).

No-slip boundary condition will be used on the wall and constant pressure for outlet. Symmetric
boundary condition will be applied on the pipe axis. Uniform mesh will be used for the laminar
flow whereas non-uniform mesh will be used for the turbulent flow.
Mesh characteristics are presented in Table 1.

Table 1

Number of Divisions
Flow mode Mesh Type Mesh Title
X R

Laminar Uniform Uniform Fine 450 45

Laminar Uniform Uniform Coarse 90 9

Turbulent Non-uniform Non-uniform 600 15

Simulation results will be compared with analytical and empirical data. All analytical and
empirical equations required for comparison are provided.
3

3. Project Schematic in Ansys Workbench

3.1. Start ANSYS Workbench

3.2. Toolbox -> Component Systems. Drag and drop Geometry, Mesh and Fluent
components to Project Schematic as per below.

3.3. Click on the drop down arrow and select Rename. Change the names as per below.
4

3.4. Create connections between component as per below. To make connections, click and
drag the Geometry box to the Mesh box, and the Mesh box to the Setup box as per
below.
5

File > Save As. Save the workbench file.


6

4. Geometry
4.1. Right click Geometry and select New DesignModelerGeometry….

4.2. Make sure that Unit is set to Meter (default value).


7

4.3. Select the XYPlane under the Tree Outline and click New Sketch button.

4.4. Right click XYPlane and select Look at.


8

4.5. Enable the auto constraints option to pick the exact point as below. Select Sketching >
Constraints > Auto Constraints > make sure Cursor is selected.

4.6. Select Sketching > Draw > Rectangle. Create a rectangle geometry. The cursor will show “P”
when it is on the origin point.
9

4.7. Select Sketching > 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.

4.8. Click on H1 under Details View and change it to 6 m. Click on V2 and change it t
0.02 m.

4.9. Concept > Surfaces From Sketches and select Sketch1 from the Tree Outline and hit
Apply on Base Objects under Details view.
10

4.10. Click Generate. This will create a surface.

4.11. File > Save Project. Save project and close window.
4.12. If you see the lightning sign next to Geometry in the workbench then right click
on Geometry and click Update as shown below.
11

5. Meshing
5.1. Right click on Mesh and select Edit. Start Meshing.

5.2. Right click on Mesh then select Insert > Face Meshing.
12

5.3. Select the pipe geometry by clicking anywhere on the pipe surface, then click the yellow
box that says “No Selection” and click Apply. (From this stage: Rotate the view to xy-
plane by clicking z-axis of 3D axis at right bottom of the screen. Drag and drop with
right mouse button to zoom in. Press F7 to restore the view.)

5.4. Click on the Edge Button. This will allow you to select edges of your geometry.

5.5. Right click on Mesh then select Insert > Sizing.


13

5.6. Hold Ctrl and select the top and bottom edge then click Apply in the Details box for
Geometry on the right. Specify details of sizing as per below depending on case.
Note that the number of divisions should be different for fine and coarse mesh created
for laminar flow and for turbulent flow.

For laminar flow. Coarse mesh.

For laminar flow. Fine mesh.

For turbulent flow


14

5.7. Repeat step 5.5. Select the left and right edge and click Apply for uniform grid flow and
change sizing parameters as per below. Change the sizing parameters separately for non-
uniform grid as per below. Make sure to select edges individually when changing sizing
parameters for non-uniform grid.

For laminar flow. Uniform coarse mesh.

For laminar flow. Uniform mesh (fine).

For turbulent flow. Non-uniform mesh. Left Edge


15

For turbulent flow. Non-uniform mesh. Right Edge

5.8. Click on Generate Mesh button and click Mesh under Outline to show mesh.
16

Uniform fine mesh

Non-uniform mesh.

5.9. Change the edge names by right clicking on the edge and selecting Create Named
Selection. Name left, right, bottom and top edges as inlet, outlet, axis and wall
respectively. Your outline should look same as the figure below.
17

5.10. File > Save Project. Save the project and close the window. Update Mesh on
Workbench if necessary. Your Project Schematic will be similar to the figure below.
18
19

6. Solving in Fluent
6.1. Right click Setup and select Edit.

6.2. Under options check Double Precision and click OK.


20

6.3. Setup > General > Check. You may ignore the warning messages. (Note: If you get and
error message you may have made a mistake while creating you mesh)

6.4. Setup > General > Solver. Choose options shown below.
21

6.5. Setup > Models >Viscous (Laminar) (double click). Select parameters as per below
and click OK.

Laminar flow

Turbulent flow
22

6.6. Setup > Materials > Fluid > air (double click). Change the Density and Viscosity as
per below and click Change/Create. Close the dialog box when finished.

6.7. Setup > Cell Zone Conditions > Zone > surface_body. Make sure air is selected and click
OK.
23

6.8. Setup > Boundary Conditions > inlet (double click). Change parameters as per below
and click OK.

Laminar flow

!!! The velocity value may be different. It should be calculated by student for a given Reynolds number.

Turbulent flow
24

6.9. Setup > Boundary Conditions > outlet (double click) or click Edit…. Change
parameters as per below and click OK. Laminar flow

Turbulent flow
25

6.10. Setup > Boundary Conditions > wall (double Click) Change parameters as per
below and click OK. No need to change for laminar cases.

Laminar flow

Turbulent flow
26

6.11. Setup > Boundary Conditions > Operating Condition…. Check the operating
pressure (it should be equal to 1atmosphere) and click OK.
27
28

6.12. Setup > Reference Values. Change parameters as per below.

Laminar flow

!!! The velocity is different for different Reynolds numbers

Turbulent flow
29

6.13. Solution > Solution Methods. Check the parameters are set as on the figure
below.

Laminar flow

Turbulent flow
30

6.14. Solution > Monitors > Residual. Change convergence criterion to 1e-6 for all
three and five equations as per below for laminar and turbulent cases respectively and
click OK.

Laminar flow

Turbulent flow
31

6.15. Solution > Solution Initialization. Change parameters as per below and click
Initialize.
Laminar flow/ Turbulent flow

6.16. Solution > Run calculation. Change number of iterations to 1000 and click
Calculate.

6.17. File > save project.


32

7. Results post-processing
After solution is converged (with convergence limit 10-6) you need to do postprocesing. The
following figures and data should be included into the report. In addition, the answers on the
following questions should be given.

Pictures to be presented for laminar and turbulent flows:


 Convergence history (Residuals)
 Axial velocity profile in different sections. + Comparison with analytical/empirical data.
 Centerline pressure distribution
 Centerline velocity distribution
 Velocity vectors showing the developing region and developed regions
Data to be reported:
 Developing length. + Comparison with empirical data.
 Pressure drop along the pipe. + Comparison with empirical data.
Questions to be answered:
 Compare the results of laminar pipe flow obtained for fine and coarse mesh.
 Analyze the difference between laminar flow (obtained by using fine mesh) and turbulent
flow.
 Analyze the difference between simulation and empirical data for laminar and turbulent
flow and possible sources of errors.
This section shows how to prepare the figures and perform calculations.

7.1. Plotting and Printing Residuals


Solution > Residuals. Click on Plot button then click on OK.
33

File > Save Picture. Using option as per below save pictures.
34

7.2. Creating a File with Analytical/Empirical data


Create a text file using Notepad. The text file should have the following structure

(title "Velocity Magnitude")


(labels "Position" "Velocity Magnitude")

((xy/key/label "analytical/empirical")
0 velocity value
0.0025 velocity value
0.005 velocity value
0.0075 velocity value
0.01 velocity value
0.015 velocity value
0.016 velocity value
0.017 velocity value
0.018 velocity value
0.019 velocity value
0.02 velocity value
)

The following formulas can be used to calculate the velocity profile.

For laminar flow:

𝑣=𝑣 ∙ 1− ,𝑣 =2∙𝑣

For turbulent flow:


/
𝑣=𝑣 ∙ 1− ,𝑣 = 1.23 ∙ 𝑣

Save the file. Give a name “axial_vel_lam.xy” or “axial_vel_turb.xy”

This file will be loaded later and used for verification of numerical results.
35

Surface > Line/Rake. Change x and y values as per below click Create. Do this for all
the lines shown in the table below.

Surface
X0 Y0 X1 Y1
Name
x10d 0.4 0 0.4 0.02
x20d 0.8 0 0.8 0.02
x40d 1.6 0 1.6 0.02
x60d 2.4 0 2.4 0.02
x100d 4 0 4 0.02

7.3. Plotting Results


Velocity Profile

Results > Plots > XY Plot. Select inlet, outlet, and the lines you created and change
setting as per below then click Plot.
36

Results > XY Plot > Setup > Curves…. For Curve # 0 select the Pattern as per below
and click Apply. Repeat this for all the curves.

Download the file with empirical data.

Solution XY Plot > Load File. Select axial_vel_lam.xy or axial_vel_turb.xy and click
OK.
37

Static Pressure Profile at Centerline

Results > Plots > XY Plot > Setup. Change Y function to Pressure… and select axis
then click Plot.
38

! Compare the pressure drop with Darcy-Weisbach Equation

𝑙 𝜌𝑣
∆𝑝 = 𝑓
𝑑 2
Here f – friction factor

Velocity at Centerline

Select axis and change Plot Direction as per below. Then plot the figure.
39

Examine the graph and try to evaluate the value of entrance length. Compare the results with
empirical calculations.

For laminar flow 𝐿 ≅ 0.06 ∙ 𝑅𝑒 ∙ 𝑑


/
For turbulent flow 𝐿 ≅ 4.4 ∙ 𝑅𝑒 ∙𝑑

7.4. Plotting Vectors and Contours


Results > Graphics > Vectors (double click). Change the vector parameters as per
below and click Display.
40

! To show vectors in the entrance region choose the area near the inlet of the pipe

! To show vectors in the developed region choose the area near the end of the pipe

Results > Graphics > Contours (double click). Change the vector parameters as per
below and click Display.

Close window and save workbench file.

You might also like