Docsity

Computational Fluid Dynamics - Fluid Flow - Lab Manual, Study notes of Fluid Dynamics

Toggle sidebar
bg1
Introduction to Computational Fluid Dynamics
Nomenclature
Symbols
A projected frontal area or planform area of an object
b span or depth of a flat plate (into the page when viewed from the edge)
CD drag coefficient: CD = 2FD /
V2A
D height (2-dimensional) or diameter (axisymmetric) of a block or other object in the flow
FD drag force
FL lift force
H height of computational domain
L length of the block in the flow direction
R radial extent of computational domain
ReD Reynolds number based on length D: ReD = VD/
(other Reynolds numbers defined similarly)
Rex Reynolds number based on axial distance x: Rex = Vx/
(other Reynolds numbers defined similarly)
u streamwise component of velocity at some location inside the boundary layer (in x-direction)
V or U freestream velocity
x flow direction
y coordinate normal to flow direction, usually normal to a wall
coefficient of dynamic viscosity (also called simply the viscosity)
coefficient of kinematic viscosity (for water, 1.0 10-6 m2/s at room temperature)
density of the fluid (for water,
998 kg/m3 at room temperature)
Educational Objectives
1. Become acquainted with the basic concepts of computational fluid dynamics (CFD).
2. Develop familiarity with operation of the Fluent family of CFD software.
3. Learn the importance of the extent of the computational domain in a CFD solution.
4. Learn that CFD solutions that use turbulence models are approximations that are not always accurate.
5. Calculate laminar boundary layer profiles on a flat plate using CFD, and compare with the Blasius solution.
Equipment
1. Fluent family of CFD computer codes (includes the grid generator, GAMBIT, the flow solver, FLUENT, and the
instructional version, FlowLab)
2. personal computer
Background
A. Fundamentals of CFD
While other labs in this course involve actual hands-on physical laboratory equipment, this lab introduces the field
of computational fluid mechanics, or CFD. As t he name implies, a com puter (rather than a w ind tunnel or other
experimental test equipment) is used in CFD to predict fluid flow. Consider the flow of a Newtonian fluid. The differential
equations of motion are the continuity equation, representing conservation of mass [from Reference 1],

0V
t

(1)
and the differential conservation of momentum equation, also known as the Navier-Stokes equation of fluid motion,

2
dV V VV Pg V
dt t







(2)
For simplicity, consider only incompressible flow (constant density) in Cartesian (x,y,z) coordinates, so that Eqs. (1) and (2)
reduce to
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Computational Fluid Dynamics - Fluid Flow - Lab Manual and more Study notes Fluid Dynamics in PDF only on Docsity!

Introduction to Computational Fluid Dynamics

Nomenclature

Symbols

A projected frontal area or planform area of an object b span or depth of a flat plate (into the page when viewed from the edge)

CD drag coefficient: CD = 2 FD /  V^2 A

D height (2-dimensional) or diameter (axisymmetric) of a block or other object in the flow FD drag force FL lift force H height of computational domain L length of the block in the flow direction R radial extent of computational domain

Re D Reynolds number based on length D : Re D = VD/  (other Reynolds numbers defined similarly)

Re x Reynolds number based on axial distance x : Re x = Vx/  (other Reynolds numbers defined similarly)

u streamwise component of velocity at some location inside the boundary layer (in x -direction) V or U  freestream velocity x flow direction y coordinate normal to flow direction, usually normal to a wall

 coefficient of dynamic viscosity (also called simply the viscosity)

 coefficient of kinematic viscosity (for water,^ ^ ^ 1.0^ ^10 -6^ m^2 /s at room temperature)

 density of the fluid (for water,   998 kg/m 3 at room temperature)

Educational Objectives

  1. Become acquainted with the basic concepts of computational fluid dynamics (CFD).
  2. Develop familiarity with operation of the Fluent family of CFD software.
  3. Learn the importance of the extent of the computational domain in a CFD solution.
  4. Learn that CFD solutions that use turbulence models are approximations that are not always accurate.
  5. Calculate laminar boundary layer profiles on a flat plate using CFD, and compare with the Blasius solution.

Equipment

  1. Fluent family of CFD computer codes (includes the grid generator, GAMBIT, the flow solver, FLUENT, and the instructional version, FlowLab)
  2. personal computer

Background

A. Fundamentals of CFD

While other labs in this course involve actual hands-on physical laboratory equipment, this lab introduces the field of computational fluid mechanics , or CFD. As t he name implies, a com puter (rather than a w ind tunnel or oth experimental test equipment) is used in CFD to predict fluid flow. Consider the flow of a Newtonian fluid. The differential equations of motion are the continuity equation , representing conservation of mass [from Reference 1],

 V  0

t

and the differential conservation of momentum equation, also known as the Navier-Stokes equation of fluid motion,

dV V (^) V V P g (^2) V dt t

For simplicity, consider only incompressible flow (constant density) in Cartesian ( x , y , z ) coordinates, so that Eqs. (1) and (2) reduce to

0 or 0

u v w V x y z

and 2 2 2 2 2 2

V V V V V V V

u v w P g t x y z x y z

 ^ ^ ^   ^ ^ ^  ^  

 ^ ^ ^ ^   ^ ^  

Solving these equations with a com puter requires a reasonably fast computer and fa irly sophisticated software. There are several software companies who sell comm ercial CFD codes. The Mechanical Engineering Department at Penn State has a site license for one fam ily of commercial codes, namely the Fluent family of CFD codes, produced by Fluent, Inc. In this lab, Fluent CFD codes are used to solve the above set of equations for two flows:

 turbulent flow over a rectangular block  laminar flow over a flat plate

In the first flow, Fluent’s instructional software program called FlowLab is used. In the second flow, Fluent’s grid generation software contained within the software package called ANSYS is used, along with the CFD solver FLUENT.

Co mputational domain

Cell

Boundaries

Co mputational domain

Boundaries

Cell

A(a) (b) Figure 1. A computational domain is the region in space in which the equations of motion are solved by CFD; a cell is a small subset of the computational domain. Shown are (a) a two-dimensional domain and quadrilateral cell, and (b) a three-dimensional domain and hexahedral cell. The boundaries of a 2-D domain are called edges , while those of a 3-D domain are called faces.

The various steps in the ocesspr of a CFD calculation a re discussed below. For simplicity, only steady-state incompressible flows are considered. To solve Eqs. (3) and (4) numerically, the following steps are performed. Note that the order of some of the steps (particularly Steps 2 through 5) is irrelevant.

  1. A computational domain is chosen and a grid (also called a mesh ) is generated; the domain is d ivided into many small elements called cells. For 2-D domains, the cells are areas , while for 3-D domains the cells are volumes (Figure 1). You can think of each cell as a tiny control volume in which discretized versions of the conservation equations are so lved. The quality of a CFD solution is highly dependent on the quality of the grid. Therefore, you are adv ised to make sure th at your grid is of high quality before proceeding to the next step (Figure 2).
  2. Boundary conditions are specified on each edge of the computational domain (2-D flows) or on each face of the domain (3-D flows).
  3. The type of fluid (water, air, gasoline, etc.) is specified, along with fluid properties (temperature, density, viscosity, etc.). If th e flow is laminar , Eqs. (3) and (4) are sufficient, and CFD solutions can be made as accurate as desired, limited only by the resolution of the mesh and the appropriateness of the imposed boundary conditions. However, a turbulent flow is un steady, three-dimensional, and random, and involves turbulent eddies spanning several orders of magnitude in both length scale and time scale. Eq s. (3) and (4) are still sufficient, but mesh requirements, computer speed and memory

NOTICE:

Do not proceed with

CFD calculations

until you have

generated a high

quality grid.

Figure 2. A quality grid is essential to a quality CFD simulation.

Generation of a good grid is often tedious and time-consuming; engineers who use CFD on a regular basis will agree that grid ge neration usually takes m ore of their tim e thandoes the CFD solution itself (eng ineer’s time, not CPU ti me). However, time spent generating a good grid is time well spent , since the CFD results will be more reliable, and may converge more rapidly (Figure 5). A high quality grid is critical to an accurate CFD solution; a poorly resolved or low quality grid may even lead to an incorrect solution. It is important, therefore, for users of CFD to test if their solution is grid independent. The standard method to test for grid independence is to inc rease the resolution (by a factorof 2 in all directions if feasible) and repeat the simulation. If the results do not change appreciably, the original grid is probably adequate. If, on the other hand, there are significant differences between the two solutions, the original grid is likely of inadequate resolution. In such a case, an even finer grid should be tried until the grid is adequately resolved. This method of testing for grid independence is tim e consuming and unfortunately not always feasible, especially for large enginee ring problems in which the solution pushescomputer resources to their limits. In a two-dimensional simulation, if one doubles the number of intervals on each edge, the number of cells increases by a factor of 2^2 = 4; the required computation time for t he CFD solutionalso increases by approximately a factor of 4. For three-dimensional flows, doubling the number of intervals in each direction increases the cell count by a factor of 2^3 = 8. You can see how grid independence studies caneasily get beyond the range of a computer’s memory capacity and/orCPU availability. If you cannot double the num ber of intervals because of com puter limitations, a good rule of thumb is that y ou should increase the num ber of intervals by at least 20% in all directions to test for grid independence.

C. Boundary Conditions

While the equations of motion, the computational domain, and even the grid may be the same for two CFD calculations, the type of flow that is modeled is determined by the imposed boundary conditions. Appropriate boundary conditions are required in order to obtain an accurate CFD solution. There are several types of boundary conditions available; the boundary conditions most relevant to the present lab are listed and briefly described below.

Wall Boundary Condition  The simplest boundary condition is that o f a wall. Since fluid cannot pass through a wall, the normal component of velocity is set to zero relative to the wall along a face on which the wall boundary condition is prescribed. In addition, because of the no-slip condition, we usually set the tange ntial component of velocity at a stationary wall to zero as well.  Velocity Inlet Boundary Condition – Flo w enters the computational domain through aface along a portion of t he domain. At a velocity inlet , we specify a constant velocity of the incoming flow along t he inlet face.If energy and/or turbulence equations are being solved, thetemperature and/or turbulence properties of the incoming flow need to be specified as well.  Pressure Outlet Boundary Condition – Flow leaves the computational domain through aface along a portion of t he domain. At a pressure outlet , fluid flows out of the computational domain. We specify a co nstant static pres sure along the outlet face; in m any cases this is atm ospheric pressure (zero gage pressure). For example, the pressure is atmospheric at the outlet of an exhaust pipe open to ambient air (Figure 6). Flow properties such as tem perature and t urbulence properties are als o specified at pressure inlets and pressureoutlets. However, these properties are not used unless the solution demands reverse flow across the outlet. Reverse flow at a pressure outlet is usually an indication that the computational domain is not large enough. If reverse flow warnings persist as e thCFD solution iterates, the computational domain should be extended.  Symmetry Boundary Condition – Oftentimes an edge (2-D) or face (3-D) of a c omputational domain divides the flow field into two symmetric halves. The symmetry boundary condition forces flow field variables to be mirror- imaged across a symmetry plane. Mathematically, gradients of most flow field variables in the direction normal to the symmetry plane are set to zero across the plane of symmetry. For physical flows with one or more symmetry planes, this boundary condition enables us to model a portion of the physical flow domain, thereby conserving computer resources.

Figure 5. Time spent generating a good grid is time well spent.

Pressure outlet

P out = P atm

Figure 6. When modeling an incompressible flow field, if a pipe or duct is exposed to ambient air, the proper boundary condition is a pressure outlet with P out = P atm. Shown here is the tail pipe of an automobile. Photo by Abel Po-Ya Chuang.

The first flow to be calculated here isflow over a rectangular bl ock. Figure7 illustrates how t heabove four boundary conditions are applied to this flow field. Flow enters the computational domain through the left face, which is specified as a velocity inlet. Flow lea ves the com putational domain through the right face, which isspecified as a pressure outlet. (T he shape of these faces is not critical; in the present calculations, we use circular arcs of radius R for convenience.) The left, top, and right faces of the rectangular block are specified as walls, of course. Finally, the t wo bottom faces of the computational domain are specified as symmetry boundary conditions; the solved flow is mirror-imaged about these faces.

Block^ F^ D D

L

V

V

R

R

V

V

V

Velocity inlet

Pressure outlet

Wall

Symmetry Symmetry

Computational Domain

(a) (b) Figure 7. When using CFD to calculate flow ove r a two-dimensional rectangular block, we may take advantage of the top-bottom symmetry: (a) the p hysical geometry with dimensions and drag force shown, and (b) the computational domain(blue shaded area), with boundary conditions and extent R of the computational domain shown.

Consider a two-dimensional rectangular block whose length L is 1.5 times its height D (Figure 7a). In this lab, you will use CFD to calculate the drag coefficient CD on the block. In particular, you will examine how CD is affected by the extent of the computational domain by varying R / D. You will also examine how CD is affected by the choice of turbulence model.

References

  1. Çengel, Y. A. and Cimbala, J. M., Fluid Mechanics – Fundamentals and Applications , McGraw-Hill, NY, 2006.
  2. White, F. M., Fluid Mechanics , Ed. 5, McGraw-Hill, NY, 2003.
  3. FLUENT Reference Manuals (in the bookcase in the Fluids Lab; also on-line).