You are on page 1of 69

# [1 August 2011] Computational Fluid Dynamics

[2011]
[Laminar and Turbulent Internal Pipe Flow]

[This

assignment contains two section which is Part A, Laminar Flow Computation and Part B, Turbulent Flow Computation. Fluent software is used to simulate and compute both Laminar Flow and Turbulent Flow.]

## UNIVERSITI TUNKU ABDUL RAHMAN SETAPAK, KUALA LUMPUR

FACULTY OF ENGINEERING AND SCIENCE UEME3112 Fluid Mechanics II
Computational Fluid Dynamics Assignment

Group 25
No 1 2 3 Name Yuhvhendrra Shrii Kumar (kumar1120@yahoo.com) Sia Yin Chung Kumaresan A/L Thangavelu Student ID 08UEB05965 09UEB01337 08UEB06548 Course ME Y4S1 ME Y3S2 ME Y3S3

## Table Of Content Content

Summary Aim of the Project Introduction Modelling Work Main Result Conclusion Introduction Brief Description Background and Theory of CFD Objective of the Project Modelling Work Brief Description of the Software Brief Description of Methodology Result and Discussion Major Assumption and Calculation Presentation and Discussion of Data in Table and Figures Comments on Possible Errors Conclusion Summary of Findings Key Numerical Values Interpretation References 8

Page
3

## Summary Aim of the Project

Computational Fluid Dynamics (CFD) assignment contain two section which is Part A, Laminar Flow Computation and Part B, Turbulent Flow Computation. Using Fluent software, students required to compute both Laminar Flow and Turbulent Flow.

Introduction
Computational Fluid Dynamics is a powerful way of modelling fluid flow, heat transfer, and related processes for a wide range of important scientific and engineering problems. The cost of doing CFD has decreased dramatically in recent years, and will continue to do so as computers become more and more powerful.

Modelling Work
Brief Description of the Software FLUENT is a computational fluid dynamics (CFD) software package to simulate fluid flow problems. It uses the finite-volume method to solve the governing equations for a fluid. It provides the capability to use different physical models such as incompressible or compressible, inviscid or viscous, laminar or turbulent, etc. Geometry and grid generation is done using GAMBIT which is the pre-processor bundled with FLUENT.

## Introduction Brief Description Background and Theory of CFD

Computational Fluid Dynamics (CFD) is a computer-based analysis technique used for predicting various physical and chemical phenomena (fluid flow, heat transfer, mass transfer, chemical reactions, phase change, combustion, flow acoustics, to name a few). It works by numerically solving the mathematical equations governing these phenomena. CFD is fast becoming a powerful tool, used in conjunction with conventional design techniques, to analyze engineering problems. Dynamics of fluids are governed by coupled non-linear partial differential equations, which are derived from the basic physical laws of conservation of mass, momentum, and energy. Analytical solutions of such equations are possible only for very simple flow domains with certain assumptions made about the properties of the fluids involved. For conventional design of equipment, devices, and structures used for controlling fluid flow patterns, designers have to rely upon empirical formulae, rules of thumb, and experimentation. However, there are many inherent problems with these conventional design processes. Empirical formulae and rules of thumb are extremely specific to the problem at hand and are not globally usable because of the non-linearity of the governing equations. For example, a rule of thumb for designing an aircraft wing may not be applicable for designing a wing mounted on a racing car, as the upstream flow conditions are completely different for the two configurations. The above reasons make experimentation the leading conventional design technique. However, there are many limitations of experimentation techniques as well: Experimentation needs a prototype to be built. Measurement of flow variables may cause these variables themselves to change, might not be possible at all (in very small or unreachable spaces), and may be expensive. Experimentation may take a long time to set up, sometimes lasts for a very short time, and may be very expensive, as in the case of supersonic wind-tunnel runs. Experimental data has limited detail. All these limitations are overcome by CFD, since it is a numerical simulation technique which does not require a prototype to be built, is not thwarted by measurement capabilities, and can provide extremely detailed data as and when required. Using CFD, you can build a computational model that represents a system or device that you want to study. Then you apply the fluid flow physics to this virtual prototype, and the software provides a prediction of the fluid flow pattern and other physical phenomena. CFD analysis not only complements testing and experimentation, but leads to a substantial saving of time as a large number of options can be tested much before the prototyping stage.

CFD is, thus, a tool for compressing the design and development cycle. The major reasons why using CFD analysis is relevant for engineering applications are summarized below: Visualizing designs - There are many devices and systems that are very difficult to prototype. Often, CFD analysis shows you parts of the system or phenomena happening within the system that would not otherwise be visible through any other means. CFD gives you a means of visualizing and enhanced understanding of your designs. Comprehensive Information - Experiments only permit data to be extracted at a limited number of locations in the system. CFD allows the analyst to examine a large number of locations in the region of interest, and yields a comprehensive set of flow parameters for examination. Making predictions using comprehensive results - As CFD is a tool for predicting what will happen under a given set of circumstances, it can analyze numerous hypothetical options very quickly. You give it variables and it gives you related outcomes. Thus, in a short time, you can predict how your design will perform, and test many variations until you arrive at an optimal result. All of this is done before physical prototyping and testing. The foresight you gain from CFD helps you to design better and faster. Improved design ability - Better and faster design or analysis leads to shorter design cycles. This leads to huge savings in terms of cost and time and the product gets to the market faster. Equipment improvements are built and installed with minimal downtime. Low Cost - Computational simulations are relatively inexpensive when compared to testing. Speed - CFD simulations can be executed in a short period of time. Quick turnaround means engineering data can be introduced early in the design process. Ability to Simulate Real Conditions - Many flow and heat transfer processes cannot be (easily) tested - for example, hypersonic flow at Mach 20. CFD provides the ability to theoretically simulate any physical condition. Ability to Simulate Ideal Conditions - CFD allows great control over the physical process, and provides the ability to isolate specific phenomena for study. For example, a heat transfer process can be idealized with adiabatic, constant heat flux, or constant temperature boundaries.

Limitations of CFD The exactness of a CFD analysis ultimately depends on the precision of the modelled domain and the power and speed of the computer. Some errors are inevitable, for example, round-off errors introduced by computers. Other errors can be rectified by more accurate modelling of the domain. The limitations of CFD analysis are listed below: Physical models - CFD solutions rely upon physical models of real world processes (e.g. turbulence, compressibility, chemistry, multiphase flow, etc.). The solutions that are obtained through CFD can only be as accurate as the physical models on which they are based. Numerical Errors - Solving equations on a computer invariably introduces numerical errors Round-off error - errors due to finite word size available on the computer Truncation error - error due to approximations in the numerical models Round-off errors will always exist (though they should be small in most cases). Truncation errors will go to zero as the grid is refined - so mesh refinement is one way to deal with truncation error. Boundary conditions - As with physical models, the accuracy of the CFD solution is only as good as the initial/boundary conditions provided to the numerical model. For example, for a problem of flow in a duct with sudden expansion, if flow is supplied to the domain by a pipe, you should use a fully developed profile for velocity rather than assume uniform conditions

Conservation of Mass/Continuity

Newtons Law/Momentum Equations This is a vector equation. The x component in the rectangular system

Fluent Equations

Real Experiment

CFD Simulation

CFD simulation

## Objective of the Project

1. 2. 3. 4. To compute steady laminar flow (Re<2100) through piping using Fluent software. To compute steady turbulent flow (Re<2100) through piping using Fluent software. To make comparison between the laminar flow and the turbulent flow. To study how the properties like the Reynold number, change of angle of tube which affecting the plot of laminar flow. 5. To understand whether the plot observed from the software correspond to the real flow.

Modelling Work
Brief Description of the Software GAMBIT is a pre-processor for CFD Analysis. It is used to create geometry and generate meshes. It is similar to a CAD package except that nifty and glamorous features are absent so that the meshes can be better observed. It is used to create geometry and meshes for all fluent products.

Creates geometry and meshes according to ACIS standards. There are several standards for expressing the geometry and mesh used by CFD and CAE vendors. IGES is another It can import IGES files and perform cleanup and modification Creates meshes for all Fluent solvers. It is integrated with Fluent solvers Creates Structured and Unstructured hexahedral, tetrahedral, pyramid and prisms Reports on Mesh quality Defines boundaries for the regions

FLUENT is a computational fluid dynamics (CFD) software package to simulate fluid flow problems. It uses the finite-volume method to solve the governing equations for a fluid. It provides the capability to use different physical models such as incompressible or compressible, inviscid or viscous, laminar or turbulent, etc. Geometry and grid generation is done using GAMBIT which is the pre-processor bundled with FLUENT.

## Basic Programme Structure

The FLUENT solver has the following modeling capabilities: 2D planar, 2D axisymmetric, 2D axisymmetric with swirl (rotationally symmetric), and 3D ows Quadrilateral, triangular, hexahedral (brick), tetrahedral, prism (wedge), pyramid, polyhedral, and mixed element meshes Steady-state or transient ows Incompressible or compressible ows, including all speed regimes (low subsonic, transonic, supersonic, and hypersonic ows) Inviscid, laminar, and turbulent ows Newtonian or non-Newtonian ows Heat transfer, including forced, natural, and mixed convection, conjugate (solid/uid) heat transfer, and radiation Chemical species mixing and reaction, including homogeneous and heterogeneous combustion models and surface deposition/reaction models Free surface and multiphase models for gas-liquid, gas-solid, and liquid-solid ows Lagrangian trajectory calculation for dispersed phase (particles/droplets/bubbles), including coupling with continuous phase and spray modeling Cavitations model Phase change model for melting/solidification applications Porous media with non-isotropic permeability, inertial resistance, solid heat conduction, and porous-face pressure jump conditions Lumped parameter models for fans, pumps, radiators, and heat exchangers Acoustic models for predicting ow-induced noise Inertial (stationary) or non-inertial (rotating or accelerating) reference frames Multiple reference frame (MRF) and sliding mesh options for modeling multiple moving frames Mixing-plane model for modeling rotor-stator interactions, torque converters, and similar turbo machinery applications with options for mass conservation and swirl Dynamic mesh model for modeling domains with moving and deforming mesh Volumetric sources of mass, momentum, heat, and chemical species Material property database Extensive customization capability via user-defined functions Dynamic (two-way) coupling with GT-Power and WAVE Magnetohydrodynamics (MHD) module (documented separately) Continuous module (documented separately) Fuel cell modules (documented separately) Population balance module (documented separately)

## Brief Description of Methodology

Vertices are points defined by three coordinates. Edges (straight lines, circles, curves, etc.) are constructed by reference to Vertices. Faces (flat and curved) are constructed from Edges. Volumes are formed by stitching Faces together (but only Faces that share common Edges). Two-dimensional modelling only goes as far as a set of planar Faces. We must start with good design sketch, showing in particular the Vertices (with their coordinates) and the Edges. We also need to decide how you will split your model into Volumes, because the best meshing schemes will need special attention to the Volume structure. There is some scope for 3D modelling by Boolean operations on "primitives" built in to GAMBIT. But it may be better to design 3D problems in CAD (e.g. Solid Edge, Rhino) and SaveAs an IGES (name.igs) file. When imported into GAMBIT, it gives the Vertices, Edges and Faces. However, some cleaning up of the IGES products may be needed before the Faces can be stitched together to make Volumes. Sometimes IGES produces spurious Faces that can be easily deleted. Sometimes you may have to grapple with "Virtual Entites". You will probably have to add faces, in order to get your optimum Volume structure.

Notation: bold means select a menu item {..} means select an icon <..> means stuff to type. italics give further information GAMBIT: starting up 1. <gambit -id channel> (note "minus" character) Sessions can be saved so that you can re-start at the same state later on. Delete unwanted sessions from your file store from time to time.

2. 3. 4. 5. 6. 7.

Solver Fluent 6 {Geometry} {Vertices} - Coordinates {Geometry} {Edges} - Vertices {Geometry} {Faces} - Wireframe File - Save save the session {Mesh} - {Edge} set spacing or number of mesh points along important edges. Make sure Interval Count is selected. Set 50 intervals on the two long Edges, and 10 on the two ends Certain edges control the density of the final mesh. You can "grade" them too. Note option to delete a previous mesh. Repeat this to give a long rectangle: suggest 5 x 200 Connect the vertices together Create a face entity from the four lines

8. 9.

## check that you get a quadrilateral mesh Save the session

GAMBIT: identify boundary surfaces 10. {Zones} - {Boundary Types} Pick edges one at a time and give them names 11. 12. 13. 14. 15. Call end surfaces "inlet" & "outlet. Call walls top and bottom. Define inlet as a VELOCITY INLET, outlet as OUTFLOW, and the walls as WALL.

File - Save save the session File - Export - Mesh - <channel.msh> Accept File-Exit <fluent>; <2> when asked for version Choose the 2d mesh option in the bottom left corner of the box To free up the licence "3" means a 3D model

FLUENT: getting started File - Read - Case channel.msh Remember that Fluent doesn't carry the model geometry data. Geometry and mesh changes have to be done in Gambit By default, FLUENT assumes lengths are in metres. GAMBIT doesn't have units. You have to ensure that Fluent knows which units you were using (mm in this case). Do this from time to time. The Case file contains your fluid model and mesh. Check that it's the right model. Learn how to pan and zoom the display. Saves the active graphics window Define any planes, lines or points over which you might want to display information. Default viscous model is Laminar-note the many alternatives The default fluid is "air" By default, FLUENT assumes velocities are in m/s. (Note second chance to give a type to the bcs. But only if they are separately named.) Otherwise the computer array is full of the junk from the last user.

16.

Grid - Scale Make sure the grid is the size you expected, and apply scale factors

17.

File - Write - Case (later, when you have results, select Case & Data) Display - Grid File - Hardcopy - select graphics format Save Surface - Lines Enter the two sets of coordinates (100,0); (100,5); to define a line half way along the pipe Define - Models - Viscous Define - Materials - pick or define a fluid Define - Boundary conditions Set "inlet" to Velocity Inlet; enter velocity of x m/s Set "outlet" to Outflow Set top and bottom to Wall Solve - Initialise - Init

24.

## 25. 26. 27. 28. 29.

Solve - Monitors - Residual - Plot Solve - Iterate - set 100 iterations Display Vectors of velocity Contours of velocity - Contours of pressure Plot-Velocity Define Boundary conditions Change inlet velocity Solve-Iterate

Displays progress of iteration. Note options available Solution stops automatically at 100 or when residuals reach 10-3. Look at results on selected planes Draws graphs of data along selected lines Adjust the inlet velocity until the velocity profile is just fully formed at the outlet. Not necessary to re-initialise before solution. Draw the graph of the velocity profile at the mid-way point and save this Change the order of the solution to 2nd order (you have been working to 1st order). Again not necessary to initialise. Compare the velocity profile at the midway point with that obtained using the 1st order solution.

30. 31.

## Plot - Velocity Solution 2nd Order -Solve

32.

Plot - Velocity

Mesh Density Now return to GAMBIT and produce two higher density meshes, doubling the number of mesh points in each case (ie 100, 10 and 50, 20). Run these simulations in Fluent and look at the output as vector plots and contour plots. Compare the half-way graphs of velocity from all the simulations. Which mesh produces the best result and why?

Mesh Grading Now return to GAMBIT and produce a further mesh at 50, 10 but grade the 10 points at the inlet and outlet to improve the mesh density at the walls. Simulate in Fluent and compare the results from this simulation with those from the previous simulations. A note on files and directories When have finished, check directory (ls). Will find that, even for this simple set of examples, the number of files is large and the space taken up by these files is growing rapidly. Will have many fluent examples by the time you finish this course. Should structure files in order to be able to keep track of these. In order to carry out good housekeeping, will need to learn a few basic unix/linux commands. I suggest the following protocol for your future work. Before run gambit or fluent <mkdir CFD5> (makes a directory called CFD5 within your home directory - you only need to do this once.) <cd CFD5> (change directory into CFD5) <mkdir channel> (each time you start a new example, give it an easily recognisable name, such as channel) <cd channel> Only now should you run gambit or fluent. This will be working directory by default and all files generated will be saved here. In future, when start up, will be able to go straight to the working directory if have already created it. <cd CFD5> (have changed directory and if ls, will see the directory channel) <cd channel> (now will be able to see files from the last time)

Useful Unix/Linux commands <pwd> which directory am I in? (literally present working directory) <rm filename> delete file (literally remove) <cd ..> moves up to the previous directory <mv filename directoryname> moves a file <ls> lists the files in present directory <ls directoryname> lists the files in a subdirectory <fluent &> stops command window hanging until exit <ps a> lists current processes <kill -9 identifier> stops any hung processes

Discussion
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 is not moving at all. Shear stress depends almost only on the viscosity- and is independent of density- . 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 - . Turbulent or laminar flow is determined by the dimensionless Reynold number. Reynold 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. Reynold number is proportional to inertial force divided by viscous force. The flow is

## laminar when Re < 2300 turbulent when 4000 < Re

Assumption for Laminar Flow: 1. Laminar flow (Re<2100) 2. Constant density (998.2 kg/m3) 3. Constant Cp (4182) 4. Constant Thermal Conductivity (0.6 w/m-k) 5. Constant Viscosity (0.001003 kg/m-s) 6. The piping where water (25C) is the working fluid 7. The bending angle in 45, 60 from the x-axis counter-clockwise 8. Inner radius 75 mm, outer radius 150.5 mm 9. Gravity in Y direction is -9.81m/s2 10. The fluid is incompressible flow

Assumption for Turbulent Flow: 11. Turbulent flow (Re>4000) 12. Constant density (998.2 kg/m3) 13. Constant Cp (4182) 14. Constant Thermal Conductivity (0.6 w/m-k) 15. Constant Viscosity (0.001003 kg/m-s) 16. The piping where water (25C) is the working fluid 17. The bending angle in 45, 60 from the x-axis counter-clockwise 18. Inner radius 75 mm, outer radius 150.5 mm 19. Gravity in Y direction is -9.81m/s2 20. The fluid is incompressible flow 21. Turbulent kinetic energy (m2/s2)

For flow velocity profiles, not all fluid particles travel at the same velocity within a pipe. The shape of the velocity curve(the velocity profile across any given section of the pipe) depends upon whether the flow is laminar or turbulent. If the flow in a pipe is laminar, the velocity distribution at a cross section will be parabolic in shape with the maximum velocity at the center being about twice the average velocity in the pipe. In turbulent flow, a fairly flat velocity distribution exists across the section of pipe, with the result that the entire fluid flows at a given single value. The velocity of the fluid in contact with the pipe wall is essentially zero and increases the further away from the wall.

Laminar and Turbulent Flow Velocity Profiles The velocity profile depends upon the surface condition of the pipe wall. A smoother wall results in a more uniform velocity profile than a rough pipe wall.

Inside the Fluent software, there is no term called grid, but it is called mesh. This error comes when we start scaling grid. In gambit, all the dimension is in mm. When in fluent, we convert it in meter using buttone SCALE. When we iterate about hundred iterations, this error appeared. We discovered that the mesh grid is high then we use the smaller mesh grid. Also, we used the 2d version at first but the result went wrong. We found out that we need to use 2ddp version instead of 2d which stated in the guideline paper. For turbulent flow, we choose

K-epsilon since it involves two equations only so that we define less thing and the work will be simpler. We had set a wall boundary condition instead of an axis boundary condition and then Fluent refuses to calculate telling the 'floating point error'. We then discovered that the wrong boundary condition definition might cause the floating point error. We checked the turbulence parameter and reduced the turbulence intensity.

3)a)45 degree

3)b)60 degree

4)

5)

## Figure 4.72 Gambit

Mesh

Figure 4.73 Grid Size, Memory Usage, Iteration, Flux, And Surface Integral

## Figure 4.79 Velocity vector Plot

Conclusion
In conclusion, the laminar flow for solving time, the angle 60 is the best result for this piping design for fluid flow. In x-velocity and y-velocity for angle 60 in all mesh size because the result in table is almost the same. If compared to the mass flow rate versus mesh spacing, the angle 60 getting more stable as shown in the table. For velocity magnitude in all angles by mesh size result getting is the more nearest. In static pressure, all reading getting it nearly the same in comparing a all angles and mesh sizes. In turbulent flow, time versus mesh spacing the bigger mesh size in all angles will get the less solving time in this piping design. In result for table x-velocity in all angles for all mesh size is linearly the same. In k and epsilon values in the comparing result in angle, mesh size is 0.007 getting the most stable result. For mass flow rate, angles 45 and 60 get the result in linearly proportional in mass flow rate versus mesh spacing, the less mesh spacing with the largest mass flow rate. In velocity magnitude is the angle 135 getting the most linearly result with higher mesh spacing leading with less velocity magnitude. Static pressure in this design for all angles and mesh spacing is almost the same.

References
1. CFD-Wiki http://www.cfd-online.com/Wiki/Main Page 2. J.H. Ferziger and M. Peric, Computational Methods for Fluid Dynamics. Springer, 1996. 3. C. Hirsch, Numerical Computation of Internal and External Flows. Vol. I and II. John Wiley & Sons, Chichester, 1990. 4. P. Wesseling, Principles of Computational Fluid Dynamics. Springer, 2001. 5. C. Cuvelier, A. Segal and A. A. van Steenhoven, Finite Element Methods and Navier-Stokes Equations. Kluwer, 1986. 6. S. Turek, Efficient Solvers for Incompressible Flow Problems: An Algorithmic and Computational Approach, LNCSE 6, Springer, 1999. 7. R. Lohner, Applied CFD Techniques: An Introduction Based on Finite Element Methods. John Wiley & Sons, 2001. 8. J. Donea and A. Huerta, Finite Element Methods for Flow Problems. John Wiley & Sons, 2003. 9. Reynolds, W.C., Computation of Turbulent Flows, Thermoscience Division, Dept. of Mechanical Engineering, Standford Univ., Standford Calif., Rept. TF-4, 1975. 10. Shur, M.; Strelets, M.; Travin, A.; Spalart, P., Turbulence Modeling in rotating and Curved Channels: Assessment of the Spalart-Shur Correction term, AIAA Paper 980325, 1998. 11. Shih, T.H.; Zhu, J.; Liou, W.W.; Chen, K.H.; Liu, N.S.; Lumley, J., Modeling of Turbulent Swirling Flows, NASA TM-113112, 1997.