This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

by Sergio E. Perez, Ph.D.

Copyright 2005, 2006 Sergio E. Perez. No part of this document may be reproduced without the author’s consent. This document is intended for educational use only, and is available free of charge from www.computationalfluids.com. Comments should be addressed to perezs@usmma.edu. Revised August 2006.

TABLE OF CONTENTS

Introduction 1. Finite Differences • Forward, back and central differences • Problems 2. Governing Equations • Continuity equation • Navier-Stokes equations One dimensional General Inviscid flows Boundary layers • Energy equation • Analytical solution to high-speed Couette Flow 3. CFD Solution to High-Speed Couette Flow • Discretization • Solving simultaneous equations by Gauss-Seidel iteration • Grid size issues • Unsteady couette flow solution 4. Types of partial differential equations 5. Meshing Issues • Meshing issues • Non-orthogonal grid solution to steady couette flow • Non-orthogonal grid solution to unsteady couette flow 6. Turbulence • Turbulent continuity and momentum equations- RANS • Determining Reynolds stresses Reynolds Stress models Eddy Viscosity models 7. Wall functions • Dimensional Analysis and the Buckingham Pi Theorem • Experimental results for turbulent boundary layers Closing Remarks 3 5

8

33

43 45

53

69

78

2

INTRODUCTION

This book is written for engineers and scientists who wish to learn more about the exciting field of computational fluid dynamics (CFD). It is primarily intended for users of commercially available CFD software, so that they can understand what is happening once the mouse is clicked. This book can also be a great primer on CFD, which should make advanced studies much easier. Commercial CFD software is still not “idiot-proof”, and users still need to know quite a bit of information in order to use CFD properly. It is entirely possible to achieve beautiful 3-D, color results with very impressive looking plots of velocities and temperatures that are quite inaccurate, and sometimes physically unrealistic. Running a CFD simulation is not merely a matter of pressing a button. The user must understand some of the physics of the flow in order to properly select boundary conditions, the number of cells, the most appropriate turbulence model, and to properly interpret the results of a simulation. Running a CFD simulation is not a trivial task, at least not today. Inside, readers will find basic details about the theory and practice of modern CFD, written in a language that the author has taken great lengths to make as intuitive as possible. Covered are some of the basics of how CFD works, with topics such as governing equations, discretization techniques, turbulence modeling, meshing, and actual techniques for solutions to some very simple flow cases. CFD is rapidly evolving, and becoming more and more powerful each day. The days when engineers had to write their own programs to analyze flows are rapidly passing due to the availability and power of commercial CFD software. In fact, only in very specialized flow cases should anyone even consider writing CFD code, as commercial codes are so advanced that an individual would be hard-pressed to match their quality, not to mention the time required to come up with such a program. At the time of this writing, the cost of using CFD software is still somewhat high. This is bound to decrease as competition heats up between CFD software companies. What will probably happen is that the “high-end” software with more capabilities will remain expensive, while codes with more limited power will become extremely affordable, if not free. Reading this book may be slow-going, since there are quite a few equations. But it is the author’s hope that readers will find the derivations interesting – at the very worst, understanding the derivations will make for an excellent review of fluid mechanics principles and concepts.

3

This book is available free-of-charge from computationalfluids.com. It is copyrighted material, and may not be sold or reproduced once downloaded. The author would appreciate any comments or suggestions at perezs@usmma.edu. There is some (very limited) programming required to do the homework problems in this course. A free version of the justbasic programming language may be downloaded from www.justbasic.com.

Sergio E. Perez Department of Marine Engineering U.S. Merchant Marine Academy Kings Point, NY 11024 perezs@usmma.edu

4

We are interested in finding the slope of the plot at time t. t. but the time intervals are equally spaced. For example. Principles of finite differences are also used in the finite volume technique. These are just names we give different points in time. and t+1. The finite difference approximation is used to replace derivatives with simple algebraic expressions. yielding solutions which can be very accurate. However. which is used more often than finite differences in commercial CFD codes. and that we mark three times on the plot: t-1. some of which we will look at in this book. or finite differences. The space between each time will be specified as ∆t (or delta t) – the exact value is not important now.Chapter I. As implied before. since these so-called approximation techniques can be quite accurate. and is covered in another chapter. Slope at t V ∆t t-1 t t+1 5 . or dV/dt. the term approximation is a misnomer. They can only be solved in a handful of very limited cases. the study of fluid mechanics gives rise to some very complicated partial differential equations known as the Navier-Stokes equations. Finite Differences As you will see in the next chapter. say you had a plot of velocity V as a function of time t. “approximate” methods can always be used to solve the NavierStokes equations. One technique used in commercial CFD codes to solve the formidable Navier-Stokes equations is the finite-difference approximation.

It should be stated that there are more accurate approximations to the first and second derivatives using Taylor series expansions. The second derivative is nothing but the rate of change of the first derivative. A backward difference for dV/dt is given by: dV / dt ≅ ∆V / ∆t = (Vt − Vt −1 ) / ∆t A central difference for dV/dt is given by: dV / dt ≅ ∆V / ∆t = (Vt +1 − Vt −1 ) / 2∆t We note that the central difference is most likely to give the most accurate value for the slope. You can see that by finite differences we can replace a first derivative with a simple algebraic expression. We could approximate the slope at time t in one of three ways.As shown in the figure above. our expression for the second derivative becomes more and more accurate as the time interval becomes smaller and smaller. We have done something very important: we have developed three ways to replace a first derivative by a very simple algebraic expression. although the given formulas can be extremely 6 . it does not matter which scheme we use – they can all be extremely accurate. or d(dV/dt)/dt. the slope is dV/dt. so that it may be approximated as the difference between the forward and backward differences. but as long as the time intervals are small enough. We also note that ∆t becomes small ∆V/∆t approaches the derivative dV/dt. A forward difference for the slope at t would be: dV / dt ≅ ∆ V / ∆ t = (V t + 1 − V t ) / ∆ t where the subscripts t+1 and t denote times t+1 and t. or the slope. We will now do the same with the second derivative d2V/dt2. We note that ∆V/∆t. We now have the capability to make some very nasty looking differential equations into simple algebraic equations. approximates the actual slope at t when the time interval ∆t is very small. divided by the space between them: d 2V / dt 2 ≅ (Vt +1 − Vt ) / ∆t − (Vt − Vt −1 ) / ∆t (Vt +1 − 2Vt + Vt −1 ) = ∆t ∆t 2 Like the first derivative.

-----------------------------------------------------------------------------------------------------------Exercise 1-1: Given the equation y = x3 . the result is an expression that is said to be first-order accurate. calculate the second derivative d2y/dx2 at x = 1. This is usually not the case! -----------------------------------------------------------------------------------------------------------Exercise 1-2: Given the expression y = sinx. Compare with analytical results..1 radians. approximate the first and second derivatives for y in terms of x. -----------------------------------------------------------------------------------------------------------y 0 1 8 7 . then the expression is said to be second-order-accurate.. and compare with the analytical solution. = ∂t ∆t 6 ∂t 2 ∂t You will note that the first term is exactly like our previous forward difference. For example. or 6. a Taylor series expansion for V as a function of t leads to: ∂V (Vt +1 − Vt ) ∂ 2V ∆x ∂ 3V ∆x 3 − 2 − 3 + .. at x = 0. The remaining terms can give more accuracy. using a ∆x of 1. if desired.. If only the first term of the Taylor series is used.accurate if the delta values are small enough. The expressions that we developed for the second derivative and for the central difference are both considered second-order accuracy. If the next term is included. -----------------------------------------------------------------------------------------------------------Solution 1-1: We make a table of values: x 0 1 2 The 2nd derivative is: (8 – 2(1) + 0 )/1 = 6 The analytical solution is: 6x. In this case the finite difference approximation gives an exact value even though a coarse grid is used (delta x of 1).

and w are used to denote flow in the x. Please consult the figure below. if we say v = 5 m/s. and z directions.v. one for each direction x. y. In other words. In equation form: ∆P = dP ∆x dx We will make extensive use of this type of expression for other flow properties in addition to the pressure. or dP/dx. in particular Frank White’s Viscous Fluid Flow. say you knew that the pressure was changing by 10 psi every foot. was 10 psi per foot. If this rate occurred over ½ foot. We will derive expressions for each one using as simple an approach as possible. then the pressure change would be 5 psi. and z).y. Readers desiring a more rigorous approach are directed to any of the many excellent advanced fluid mechanics textbooks available. we could then say that the rate of change of the pressure. The Governing Equations In this chapter we present the equations which govern fluid and energy flow. u = 3 m/s would be the component of the velocity in the xdirection. u.Chapter 2. it usually refers to the flow speed in the y-direction. 3) The energy equation. In the derivation of these important equations. so make sure that you understand the mathematical reasoning before proceeding. using a rate of change. 2) The Navier-Stokes equations (3 total. 8 . and w = 4 m/s would refer to the velocity in the z-direction. we will be interested in property changes over small distances. For example. Another item to note is that in fluid mechanics. There are three sets of equations: 1) The continuity equation.

1 The Continuity Equation The continuity equation is a conservation of mass statement . and that each control volume measures ∆x by ∆y by ∆z. The dimension in the z direction (into the paper) is not shown. Fluid flows into and out of this region.y v u x w z 2. the mass flow rate into an area must equal the mass flow rate out of the volume.all mass flow in and out of an area must be accounted for. as we will derive this equation only for two-dimensional flow. 9 . known as a control volume. as shown below. We can imagine the entire flow field being divided into many. We start the derivation by examining a small region in a steady flow. many similar control volumes. In steady flow.

the mass flow rate entering the control volume from the bottom is: .Flow goes in and out of control volume ∆y y ∆x x We may say that the mass flow rate into the volume from the left is: . flow in the y direction (up and down) is usually designated as v. and flow in the z-direction is designated as w.1. The mass flow rate exiting the control volume in the x-direction is the same as the mass flow rate entering plus whatever change occurred over the ∆x: .2] In a similar way. As mentioned earlier. m = ρuA [2. u is the flow speed in the x-direction. m exiting = ρuA + ∆ ( ρuA) = ρuA + d ( ρuA)∆x dx [2.1. m = ρvA and the mass flow rate exiting from the top is: [2.3] 10 .1] where ρ is the fluid density. the area is ∆y by ∆z or ∆y by 1. since we are ignoring flow in the z-direction. the flow speed in the x-direction is usually given the symbol u in fluid mechanics. For flow in the x-direction.1. and A is the area of the flow.

m = ρvA − ( ρvA + d d ( ρvA)∆y ) = − ( ρvA)∆y dy dy The net total flow is then the sum of the nets in the x and y directions.1.. The extension to three dimensions and compressible flow is straight-forward: ∂ ( ρu ) ∂ ( ρv) ∂ ( ρw) + + =0 ∂x ∂y ∂z if the flow is unsteady. incompressible flow only.6] [2. what goes in must come out.7] 11 . and for steady flow the total must be zero – that is. where density ρ is constant: ∂u ∂v + =0 ∂x ∂y [2. m = ρuA − ( ρuA + d d ( ρuA)∆x) = − ( ρuA)∆x dx dx The net flow in the y-direction is the difference between the entering mass flow and the exiting mass flow in the y-direction: . We change to partial derivatives to accommodate the fact that variables depend on both x and y : ∂ ∂ ( ρvA)∆y − ( ρuA)∆x =0 ∂y ∂x The area of each face is a constant. as are dimensions ∆x and ∆y. finally yielding for the steady state continuity equation: ∂ ∂ ( ρu ) + ( ρv ) = 0 ∂x ∂y and for incompressible flow. the equation becomes: [2.1.4] The net flow in the x-direction is the difference between the entering mass flow and the exiting mass flow in the x-direction: . m = ρvA + ∆ ( ρvA) = ρvA + d ( ρvA)∆y dy [2.1.5] The continuity equation above has been derived for 2-dimensional.1.

or close enough to constant so that the equations are greatly simplified. This means that we can easily use the expression: τ =µ du dy where τ is the shear stress. This means the density remains constant. but highly confusing to the uninitiated. vector operators. 12 . µ is the viscosity. On occasion you may see the above equations written using the more compact. for example: ∂ ( ρu ) ∂ ( ρv) ∂ ( ρw) + + = ∇ ⋅ ( ρV ) ∂x ∂z ∂y The vector operator ∇ is known as “del”. as shown in the figure below.1. The NavierStokes equations deal with a balancing of forces on a fluid region.∂ρ ∂ ( ρu ) ∂ ( ρv) ∂ ( ρw) + + + =0 ∂x ∂z ∂t ∂y [2. We will then expand on it and derive a more general equation.2 The Navier-Stokes Equations The continuity equation required a balancing of flows in and out of a region. y and z directions. 2. 4) The flow is in the x-direction only. This means that flow conditions do not vary with time. An in-depth explanation of this is given in Note 1at the end of this chapter. We will first derive the Navier-Stokes equation for a very simple and restricted flow situation. Here are the limitations we will initially impose on our flow: 1) The flow is laminar. and “del dot” any vector quantity is the sum of the rates of change of that quantity in the x. The Navier-Stokes equations are also referred to as momentum equations. 2) The flow is incompressible.8] where w denotes flow speed in the third dimension z. This is not always the case! 3) The flow is steady. and du/dy is the slope of the velocity plot with respect to y.

Y Velocity gradients only in ydirection. One possible application: the flow of lava through a large fissure in rock (not exactly an every-day need!). Notice we have also drawn a small fluid element in the flow. among others. In other words. and look at it carefully. constant properties. Please consult the figure below. This is obviously not a case that can be applied to a large number of realworld problems. We may re-draw our duct in 2-dimensions since the 3rd dimension is not being considered. In many real-world flows. Since the velocity u is not varying with x. and flow in the xdirection only. steady. below the center-line of the flow (the analysis would yield exactly the same result if the element were chosen above the center-line). the fluid is being heated or cooled. There are other elements surrounding it. That’s a large number of assumptions! Here they are again: laminar. and can experience large temperature changes leading to viscosity and density changes.5) The duct through which the fluid flows is rectangular. 6) The flow is occurring through a very wide duct. very wide duct. The significance of this is that the flow speed will not vary in the flow direction. du/dy not zero. then the flow speed would tend to increase. X Z 7) The properties of the fluid do not change. so that the side walls have negligible influence. We can then say that du/dz = 0. If the duct were to become smaller in the direction of the flow. we may say that du/dx = 0. incompressible. constant size duct. there are no velocity gradients (changes) along the z-direction. also moving with the flow. 13 . We can now begin our analysis. and has constant dimensions.

14 . ∆x ∆y We will now list all the forces on the element in the x-direction. noting that it measures a small length ∆x and height ∆y.We now look only at our element.

in a similar manner as was done with the pressure: τ upper = τ + dτ ∆y dy 15 . and that on the right face acts towards the left: Pright = P + dP ∆x dx That is. The figure below shows it: P Pright = P + dP ∆x dx Our element is being dragged forward by the element above it. plus the change in the pressure over distance ∆x. the pressure on the right face is whatever the pressure was at the left face. it experiences a pressure force on the left face and on the right face. The pressure on the left face is P and acts towards the right. The force/area on the upper face can be written in terms τ as follows. Why should the pressure be different on the right and left faces? The answer is that friction is robbing the flow of pressure – the pressure always tends to drop as a result of friction. The element below ours is exerting a force backwards. which is moving faster. The force/area on the lower face of our element is τ.As the element moves along the duct.

We can now label all of the forces on the element. as are ∆x and ∆y: − dP dτ + =0 dx dy du into the equation above. multiplying by the area of each face. which is the same for all faces: (τ + dτ ∆y ) A dy PA (P + dP ∆x) A dx τΑ By summation of forces in the x-direction: PA − ( P + dP dτ ∆ x ) A − τA + (τ + ∆y ) A = 0 dx dy If we account for the fact that all the areas are the same. and we consider that the viscosity µ dy We substitute τ = µ remains constant: d (µ du ) dy =0 dy − dP + dx For constant viscosity µ (one of our assumptions): 16 .

and on which face of the element does the friction act? ----------------------------------------------------------------------------------------------------------Problem 2. The viscosity of the fluid is . 2.0. ----------------------------------------------------------------------------------------------------------Problem 2.2 In the derivation of Eq. s/m.1 For the equation above (2.2.− dP d 2u +µ 2 =0 dx dy [2. where u is in units of m/s and y is in units of m. steady flow through a very wide duct (no gradients in the z-direction) of constant diameter. why is there no shear stress on the element face which lies on the same plane as the paper (or computer screen)? ----------------------------------------------------------------------------------------------------------Problem 2. The constant C has a value of 3 and has units of 2.0.0.01 N-s/m Incoming Flow Velocity Profile y 17 .1] This is our very simple Navier-Stokes equation in the x-direction for the restricted case of incompressible.2.3 Fluid flows over a flat plate. Calculate the total shearing force on the plate if it measures 2 2 m x 2m and the velocity profile over the plate follows the equation u = Cy .1.2.1). constant viscosity. which term accounts for friction.

with velocity gradients in any direction. sitting on the bottom of the element.2. The orientation is as if a person were riding on the element. facing in the direction of motion. and the pressure force acting on the back and front faces result in the expression below for flow in one dimension: ∑F x =− dP d 2u +µ 2 dx dy [2. and we are dealing with three dimensions.3. the duct no longer need have constant dimensions. incompressible flow in the x-direction.1] It turns out that for three dimensions. Our small fluid element looks as shown below.3 General Navier-Stokes Equation We now extend our analysis to the more general case of steady. The dotted lines indicate invisible borders: Top Face Left face Back Face Right Face Front Face Bottom Face Direction of motion Please study the diagram above indicating which face is which. as we will be looking at sets of planes individually. the sum of the forces on the element in incompressible flow is: 18 . In other words. We have already determined that the forces due to shear on the top and bottom faces.

and this is not a new term either. The last term. in the equation above then accounts for ∂x this effect. 19 . we are placing no such restrictions now. The µ 2 term is due to the shear forces acting on the top and ∂y Let’s look at each term. µ ∂ 2u . Readers wishing more detail should consult a fluid mechanics text. and you think that it’s broken up into small volumes. such as Frank White’s Fluid Mechanics. The µ ∂ 2u term is due ∂z 2 to shear of the element on the right and left faces. just like our flow is. when a fluid element is being accelerated. you can also imagine that there is a force acting on each small volume.∑F x =− dP d 2u ∂ 2u ∂ 2u +µ 2 +µ 2 +µ 2 dx dy ∂z ∂x ∂P term is due to the pressure acting on the element. The sum of all the forces on the element was then zero. and ∂x ∂ 2u we had seen it before. However. The third term. so we must now apply Newton’s 2nd law: ∑ Fx = ma = VOL ⋅ { − ∂P ∂ 2u ∂ 2u ∂ 2u + µ ( 2 + 2 + 2 )} ∂x ∂x ∂y ∂z 1 The discussion here has been somewhat intuitive. as drawn below: In the same way. The − bottom surfaces of the element.1 In our original simple case. the fluid element was moving at a steady speed since the duct diameter and the density were constant. and is due to velocity gradients in the z-direction (which we now have because of three-dimensional flow). it becomes subject to stresses ∂ 2u analogous to stretching. µ 2 . a little different from the other two derivative terms. If you ∂x 2 imagine a stretching rubber band.

Not doing this would have resulted in force/volume on the right side. flow in the xdirection.4] This is the Navier-Stokes equation for incompressible. and substitute density times volume for the mass m of the element: ∑F x = ma = ρ ⋅ VOL ⋅ ( ∂u ∂u ∂u ∂u +u +v +w ) ∂t ∂x ∂y ∂z We now set this equal to the forces on the element to complete F= ma.3. y. We recall that written as: ∑F x = ma may be ∑F x =m du dt where du/dt is the acceleration. Since velocity u is a function of four variables (t. is velocity v. we can use the chain rule to write: du ∂u ∂u dx ∂u dy ∂u dz = + + + dt ∂t ∂x dt ∂y dt ∂z dt [2. z).Please note that we multiplied the terms on the right side by the volume of the element. such as magnetic or 20 .2] We note that say: dx dy dz is flow velocity u.3. We can then dt dt dt du ∂u ∂u ∂u ∂u = +u +v +w dt ∂t ∂z ∂x ∂y [2. since we had divided through by A ⋅ ∆ (or volume of the element). We now consider the acceleration terms in F = ma. constant viscosity. canceling the volume terms: ρ( ∂u ∂u ∂u ∂u ∂P ∂ 2u ∂ 2u ∂ 2u +u +v +w )=− + µ( 2 + 2 + 2 ) ∂t ∂x ∂y ∂z ∂x ∂x ∂y ∂z [2.3. x. Congratulations! You will sometimes see this equation with an additional term to account for so-called body forces. and is velocity w.3] We combine this with Newton’s law. These are forces acting on the entire volume.

but in the y-direction it should be. If the flow is inviscid and compressible.4 dP d 2u +µ 2 =0 Derive − dx dy -----------------------------------------------------------------------------------------------------------Inviscid Flows Flows may sometimes be considered inviscid. You will notice the similarity of the equation (2.5] There are two more very similar sets of equations in the y and z directions. considering flow to occur only in the x direction. -----------------------------------------------------------------------------------------------------------∂ 2u Problem 2. and steady. and friction. or frictionless.1). Identify which term is due to which factor. acceleration of the fluid. and also identify any directions involved. with no body forces. gravity would not be considered.3. airfoil coefficient of lift calculations do quite well with the inviscid assumption. dx dy ----------------------------------------------------------------------------------------------------------Problem 2-1 Beginning with equation (2.3.3. the flow through a nozzle may also be considered inviscid. The terms can be due to one of several possible factors: unsteadiness. try to finish with equation (2. steady flow. with constant velocity.3. For example. greatly simplifying calculations. as long as there is not a great deal of separation of flow. body forces.3 Prove that the shear along the z-y plane is µ 2 ∂z -----------------------------------------------------------------------------------------------------------Problem 2.5).3. as can flows outside of the boundary layer. ∂u ∂u ∂u ∂u ∂P ∂ 2u ∂ 2u ∂ 2u + µ( 2 + 2 + 2 ) ρ ( + u + v + w ) = Fx − ∂t ∂x ∂y ∂z ∂x ∂x ∂y ∂z [2. the Navier-Stokes equation for compressible flow in the x direction is : 21 . In some cases. pressure drop.5) to our simplified Navier-Stokes dP d 2u equation 0 = − + µ 2 for one-dimensional.5) has 9 terms in it.gravitational forces. ----------------------------------------------------------------------------------------------------------Problem 2-2 Equation (2. For flow moving in the x-direction. The equation below shows the additional term.

Outside of the boundary layer the gradients are small. and the flow may at times be considered frictionless. while the rate of change slows as one moves further and further from the body.3.5): 22 . Boundary Layer Flows The Navier-Stokes equations may sometimes be simplified in the boundary layer. The edge of the boundary layer is where the velocity stops changing appreciably. The equation above is one of three for all directions.∂ ( ρu ) ∂ ( ρu ) ∂ ( ρu ) ∂ ( ρu ) ∂P +u +v +w =− + Fx ∂t ∂x ∂y ∂z ∂x [2. A plot of the velocity in the boundary layer might look as drawn below: Body You can see that the velocity changes rapidly close to the body. The boundary layer is the area close to a body where the flow speed is experiencing large gradients perpendicular to the body. we may say: • • • velocity components in main direction of flow are much greater than components in other directions pressure gradients across the flow are much smaller than pressure gradients along the flow velocity gradients are greatest in a direction perpendicular to the flow The incompressible boundary layer momentum equation in the x-direction is then obtained by eliminating the appropriate terms from equation (2. the Navier-Stokes equations can be simplified. In this case. If there is no significant flow separation (see figure 1 in the introduction for a good illustration of separating flow) and geometry changes are gradual. and that the derivatives now include the density of the fluid ρ to account for compressibility of the fluid.6] You will notice that the viscous terms have dropped out from equation [6].3. The three inviscid equations are known as the Euler equations.

For example. for a 1 m diameter pipe with a center flow speed of 5 m/s. because they account for the effect of forces on moving masses.5). explain how the inviscid flow equation (6) (the Euler equation) would result. explain how the boundary layer equation (2. and why is shear generally so much smaller outside of the boundary layer? ------------------------------------------------------------------------------------------------------------ 23 . equation(2. Note that you may use du τ =F/A=µ to calculate the shear stress. -----------------------------------------------------------------------------------------------------------Problem 2-7 The velocity profile for laminar flow is known to follow the relation: u = u max (1 − r 2 / R 2 ) [2. -----------------------------------------------------------------------------------------------------------Problem 2-5 Beginning with momentum equation in the x-direction. the velocity at a spot 0.1 m from the centerline is: u = 5(1 − 0.5 2 ) a) Show that equation (2.5).8] where umax is the flow speed at the center of the pipe. sometimes the Navier-Stokes equations are referred to as momentum equations.3.3.8) above satisfies the no slip condition (just make small r equal to the radius R).7) would result. Why is most of the shear happening in the boundary layer.3.12 / 0. if the dynamic viscosity of the fluid flowing is 0. b) Calculate the force per unit area being exerted by the fluid on the pipe wall.7] As a final note.3.∂u ∂u ∂u ∂P µ∂ 2 u +u +v =− + ρ∂x ρ∂y 2 ∂t ∂x ∂y [2. -----------------------------------------------------------------------------------------------------------Problem 2-6 Beginning with momentum equation in the x-direction. R is the radius of the pipe.001 kg/m-s.3. equation(2. and r is the distance from the pipe center at which speed u is desired. dr -----------------------------------------------------------------------------------------------------------Problem 2-8 Explain what the boundary layer is.3.

and power is force multiplied by speed. and by heat conduction with adjoining fluid elements (note we are not considering any radiation heat transfer here for simplicity). such as the simplified flow case we have been using. The rate at which work is done is power. An element above ours is putting work into our element. and any element below ours is moving slower. the energy equation must be satisfied. pushing ours along.4 The Energy Equation We have so far considered the continuity and Navier-Stokes equations. pushing it along. The power lost from our element to the element below is then (considering our element to be the point of reference for speed): Power out = Force × Speed = τAu 24 . The energy equation accounts for the flow of energy from and to a fluid element. The NavierStokes equations deal with the forces on a fluid element.2. The continuity equation accounted for the flow of mass in and out an area. Consider a fluid element in a flow moving in the x-direction. Energy can flow from and to a fluid element in two ways: by friction. In addition. Recall any element above our element is moving faster than our element. and our element is putting work into the element below it. which must be satisfied at every point in the flow.

and T is temperature. for the heat flow out of our element from above: 25 . If the equation above expresses the heat flow into our element from below. we may write. A is the area of contact. and u is the speed of the element below. using a similar scheme as was done with the pressure and the shear stress: Power in = τAu + d (τAu ) ∆y dy If we consider that the power being put into our element is positive. and applying the product rule for differentiation: µ Net power due to friction / A = d du ( u) d 2u du dy dy ∆y = µ{u 2 + ( ) 2 }∆y dy dy dy We now consider the flow of energy in and out of our element by heat conduction in the y-direction (we will only consider the flow of heat along an axis perpendicular to the flow). considering energy flow per unit area. Fourier’s Law of Conduction for heat flow per unit area in the y direction is: q = −k dT dy where k is the thermal conductivity of the fluid. The power into our element may be written as follows.where τ is the shear stress at the interface between the two elements. and the power flowing out of our element is negative: Net power flow = τAu + d (τAu ) d (τAu ) ∆y − τAu = ∆y dy dy Recalling that we may say τ=µdu/dy if the flow is laminar: d (µ du Au ) dy ∆y dy Net power due to friction = d (τAu ) ∆y = dy For constant viscosity.

y. and will be zero for steady state operation: Net power flow / A = µ{u d 2u du d 2T + ( ) 2 }∆y + k 2 ∆y = 0 dy dy 2 dy which may be simplified by considering that the dimension ∆y is constant: µ{u d 2u du d 2T + ( )2} + k 2 = 0 dy dy 2 dy [2. In some simple cases the equations become identical. For the simple flow cases we will consider. and the energy equation. just like the more complete version. a fixed control volume in the flow is used. In the Lagrangian system.1] This is an extremely simplified version of the full-blown energy equation that considers the flow of energy in three dimensions using over 20 terms. a moving fluid element is considered the frame of reference. the Navier-Stokes equations in the x. while in the Eulerian. our equation in 1dimension gives the big picture in that it shows that there is a flow of energy due to friction and due to any temperature differences. A special note before proceeding: The equations derived above may be derived using Lagrangian or Eulerian coordinate systems. and z directions. However.4. we will use the equations as derived here. and it is possible to convert from one system to the other. Some types of flow problems are easier solved using one or the other form. To summarize up to now: at any point in the flow there are three sets of equations that must be satisfied: the continuity equation.q = −k dT + dy d (−k dT ) dy ∆y dy The net heat flow due to conduction will be the difference between the two expressions: d (−k dT dT ) d (k ) dy dy ∆y} = ∆y dy dy q cond / net = − k dT dT − {−k + dy dy If we assume the thermal conductivity k to be constant: q cond / net = k d 2T ∆y dy 2 The net flow of energy will be the sum of the conduction and power terms. 26 .

As stated earlier.001983 kg/(m-s).02624 W/(mK).5 Analytical Solution of the Navier-Stokes equations We will now analytically solve high speed Couette flow between two parallel plates at different temperatures. u = 0 The plates are infinitely long and wide. The top plate is at a temperature of 100 degrees C. steady. incompressible. The upper plate moves at 100 m/s. Realworld problems amenable to analytical solutions are almost non-existent due to the complexity of the governing equations. We will later solve this very same problem using computational fluid dynamics – we perform the analysis now in order to verify our CFD results. 100 m/s T=100 C y Stationary Plate T = 0. and the bottom plate at 0 degrees C. and the bottom plate is stationary. approximate methods of solution must then be used in CFD. and the space between them is filled with a fluid with viscosity µ of . the flow is steady and the fluid incompressible with constant properties.2. The thermal conductivity of the fluid is 0. The plates are separated by a distance of 2 cm. We are able to solve the problem analytically using calculus because of the problem’s relative simplicity. The governing equations for 1-D. We want to calculate the flow speed and temperature at any point in the flow. constant property flow: Continuity: ∂v ∂u + =0 ∂y ∂x − dP d 2u +µ 2 =0 dx dy d 2u du d 2T + ( )2} + k 2 = 0 dy dy 2 dy Navier-Stokes/Momentum: Energy: µ{u 27 .

1): 0 + c1(0) + c 2 = 0 c2 = 0 We apply the second boundary condition to equation (2. that is. u = 0.1) and solve for u: u = 5000 y This is obviously a linear plot.The continuity equation is eliminated from the start since both terms are zero.02) = 0 c1 = −5000 We now substitute back into equation (2. 28 .02 m). We note that we are not considering the energy equation at all since the properties of the fluid are remaining constant.02. they are independent of each other. This would complicate things considerably! The energy and momentum equations are said to be uncoupled. At y=0. We know that the flow speed u is zero at the lower boundary (at y = 0).5.5. u = 100.5. Normally flow experiences a pressure drop due to friction. We note that the result checks with the boundary conditions: at y = 0. We are then left with: d 2u =0 dy 2 We integrate this with respect to y: du + c1 = 0 dy and we integrate again: u + c1 y + c 2 = 0 [2.1): 100 + c1(0. in the case of Couette flow this is not the case since the moving upper plate continuously re-supplies energy to the flow.5. We address the Navier-Stokes equation next.1] We need to find constants c1 and c2. and u is 100 m/s at the upper boundary (y = 0. Hence the dP/dx term is zero. We apply the zero speed boundary condition to equation (2. However.

which then yields: T= µ 2k (5000) 2 (− y 2 + y (. T = 0.02)) + 5000 y [2.3] We can now make a plot for temperature as a function of location y: 29 . We know that at y = 0.5.We now consider the energy equation: d 2u du 2 d 2T µ{u 2 + ( ) } + k 2 = 0 dy dy dy We integrate this twice: [2.02.2a] µ( du 2 y 2 ) + kT + c3 y + c 4 = 0 dy 2 We note that the Navier-Stokes equation showed that the second derivative of the velocity with respect to y was zero. T = 100.5. At y = 0. We now use our boundary conditions to solve for c3 and c4. and du/dy = -c1 = 5000 per second. so c4 must be zero.

If the temperature changes are moderate or non-existent. the calculations are repeated using an adjusted viscosity based on the newly calculated temperatures. then it would not make much sense to run a coupled simulation. One way of coupling the equations is by first using a fixed viscosity. Clearly this would require additional computation time. 30 . unheated gas flows. This procedure might be repeated until there is no further change in the temperature and velocity profiles.This is a very curious result in that the temperature between the plates is higher than the temperature of the upper plate. then once the temperature and velocity profiles are known. -------------------------------------------------------------------------------------------------------Question 2-9 Give one example each of a real-world situation where you might want to couple the equations. The reason this point is being stressed is that when you run a CFD simulation using commercial packages. such as in the flow of unheated liquids or low speed. ------------------------------------------------------------------------------------------------------Question 2-10 Describe the ways in which energy flows in and out of a fluid element. The reason is that friction is causing heating. and one where you might not want to. We again note that the momentum and energy equations were uncoupled – the temperature of the fluid is assumed to not affect the viscosity. you will be given the option to run the simulation with coupled or uncoupled equations.

5. and compare your results with the previous results. with the viscosity being doubled and the top plate moving at 150 m/s.What happened to the 2nd derivative of u in equation 2.2a? ------------------------------------------------------------------------------------------------------Question 2-11 Rework the problem covered in Section 2.5 above. Make a plot of temperature as a function of distance between the plates. What do you conclude? ------------------------------------------------------------------------------------------------------- 31 .

Please see the figure below. by virtue of the difference in speeds between layers of fluid. This shearing gives rise to friction between layers. and is an extremely important concept in fluid mechanics. This is similar to what flow might be like inside a bearing. due to velocity differences between layers of flow.Note 1: Explanation of τ = µ du dy Real flows experience shear stress. and that the fluid in contact with the stationary plate will have a speed of zero. Returning to the flow above. with one surface spinning relative to another. You can also envision that between the plates the flow speed u will vary between 10 m/s and 0 m/s. you can envision that fluid layers are being sheared. is known as a velocity profile. The plot of the speed as a function of location. We note that a linear velocity profile is the exception in nature – typical velocity profiles have a more complex curved shape. 10 m/s y Stationary Plate Note that the length of the arrows indicate the speed at that location ‘y’. the flow through a pipe will exhibit a parabolic velocity profile. with lubricating oil in-between. For example. and we can make a plot of the flow speed as a function of location “y”. The fact that fluid takes the velocity of the boundary it’s in contact with is called the no-slip condition. as shown above. We are now interested in finding what is the shear force per unit area between layers. You can envision that the fluid in contact with the moving plate will be moving at the same speed as the plate. Say the top plate moves at u =10 m/s. and the slope du/dy is not constant. with one plate moving and the other stationary. In fact the relationship is linear (a fact we will prove later). Experiments show that most fluids (Newtonian fluids) follow the relation: 32 . The velocity profile above has a slope du/dy which is constant. Consider a fluid such as air or water between two flat plates.

τ =µ du dy In other words. there is nothing magical about the letters u and y! Shear stresses may be present in other planes and directions. du applies strictly to one dimensional flow. For example. This issue will be addressed in more detail in the section on turbulence.001 N-s/m2. the slope du/dy is then 10/0. one that has yet to be fully resolved in a practical sense. the stress required to pull the top plate is then: τ =µ du N = 0. The lack of a compact expression such as τ = µ As mentioned earlier. which will be discussed in the section on turbulence modeling). the shear stress (or frictional force per unit area) is a function of the viscosity and the slope of the velocity profile. or smoothly flowing (as opposed to turbulent or chaotic flow. dv/dz would indicate the rate of change of the flow in the y-direction (v) with respect to the z-direction. the shear stress depends on the velocity gradients in two directions. For example. In the example above. The problem is that with turbulent flow there is no constant velocity u. In addition. as in the example above. The big restriction is that the expression τ = µ du is the greatest complicating factor in dy modeling turbulent flows.01 m. the velocity profile does not have to be linear.001 × 1000 2 dy m du can be used as long as the flow is dy laminar. In fact the velocity profile will almost never be linear. with a speed of zero at the wall. a plot of the velocity at a pipe cross-section would show the velocity to have a parabolic profile. if the distance between the plates 0. the shear stress in the xy plane in three dimensions is given by: We should note that τ = µ τ = µ( ∂u ∂v + ) ∂y ∂x 33 . For flow in three dy dimensions. If the viscosity is 0.01 per second. For example. The velocity is changing constantly .the exact flow speed and direction would have to be known at nearly all times and locations – a task that is practical (due to computer limits) only in simple cases with extremely powerful computers. increasing to some maximum value at the centerline.

so we may write: d 2u =0 dy 2 We now apply the finite difference approximation to the equation above: u y +1 − 2u y + u y −1 d 2u =0= dy 2 ∆y 2 and solving for u: u y = (u y +1 + u y −1 ) / 2 [3. dP/dx is zero. as shown below. This is our grid.1] We next divide the flow geometry into 6 nodes. The Navier-Stokes equation must hold at each node: 100 m/s T=100 C 1 2 y 3 4 5 6 Stationary Plate T = 0. Discretization We will now put together all we’ve learned and solve the previous problem by CFD and finite differences.1. which is the whole point of performing CFD. u = 0 34 . The starting point is the Navier-Stokes equation in the x-direction: − dP d 2u +µ 2 =0 dx dy and again. We will use the analytical solution as a check against our CFD solution.1. Most real-world flows will not have an analytical solution. CFD Solution of Couette Flow 3.Chapter 3.

to a problem where algebraic expressions hold at discrete points in the flow is known as discretization. Most CFD programs use iterative schemes similar to the Gauss-Seidel technique. The scheme first assigns initial guesses to the unknowns. This technique is almost mysterious in how simply it works. requiring a relatively small number of grid points.2) above. Iterative techniques tend to be less sensitive that matrix techniques. Loop 1 is then: u5 = (0+1)/2 = 0. u4. We must solve these simultaneously.1. } [3.2] The Gauss-Seidel technique.5 + 1)/2 = . Let’s give initial values of 1 to all unknown velocities: u2. and are easy to apply. u3. The procedure is repeated in a series of loops until there is no further change in the unknowns. You can see that the number of simultaneous equations to be solved could go up astronomically if we consider more complex geometries – our grid is one-dimensional. A three dimensional grid or mesh can result in hundreds of thousands or even millions of grid points and simultaneous equations to be solved! You may also note something which is nothing short of miraculous: we started with a rather ugly looking partial differential equation. There are two general ways to solve simultaneous equations. and using finite differences we were able to transform it into an algebraic expression with requiring only the most basic of mathematical operations! The conversion of a problem with differential equations describing the flow physics. which works as shown below. then updates the guesses using equation set(3.1.We then have the following 6 equations.75 “(we now have a new value for u5)” “(new u4)” 35 . u5. by matrices and by iteration. The best way to show this is by example. one Navier-Stokes equation for each grid node in our grid: u6 = 0 u 5 = (u 6 + u 4 ) / 2 u 4 = (u 5 + u 3 ) / 2 u 3 = (u 4 + u 2 ) / 2 u 2 = (u 6 + u 4 ) / 2 u1 = 100 The result is 4 unknowns with 4 equations.5 u4 = (0.

875)/2 = .93 which is approaching the exact result calculated by the analytical solution.27 Loop 10: u5 = 18.92 Loop 5: u5 = 11.625)/2= 25.59 u3 = 58.08 u4 = 28.86 u2 = 79.75 + 1)/2 = .53 u2 = (25.75)/2 = .875+100)/2 = 50.84+100)/2 = 68.86 u2 = 79.92 u4 = 38. After about 40 loops we achieve the exact (using single precision) result: u5 = 20 36 .44 Loop 15: u5 = 19.44+.77)/2 = 37.92+62.875 u2 = (.375+.84 u2 = (37.31 u3 = 50.44 “(new u3)” “(new u2)” We cycle again through the equations.83 u3 = 59.u3 = (.625/2 = .53+100)/2 = 62.53+. using the values computed in the previous loop to update all values: Loop 2: u5 = (0 + .87 u4 = 39.3125)/2 = 12.54 u2 = 75.92 u3 = (12.3125 u4 = (25.77 Loop 3: u5 = .625 u3 = (50.375 u4 = (.

Here is some pseudo-code (a generalized computer code) to solve the problem above by computer. 37 . but in reality will almost never do so. as the equations can be easily rearranged algebraically into a proper format. Obviously. The sum of these left-side values is known as the residual or residuals. the left-side of each equation should be zero. it will be difficult for the aggregate of all of the left-side values to be zero. In practice. Once the residuals bottom out and stop changing. If you run a commercially available CFD package. This is not normally a problem. to get down to the correct answer). Comments are in quotation marks: u(1) = 100 u(6) = 0 for i = 1 to 50 for j = 2 to 5 u(j) = (u(j-1) + u(j+1))/2 next j next i “50 Gauss-Seidel loops should be enough!” “loop through the nodes” “find the speed” This small program solves what appears to be a complicated problem! We selected 50 Gauss-Seidel loops as enough in order to achieve convergence (that is. given a very large number of equations. the equations above can be re-arranged as shown below: u 5 − (u 6 + u 4 ) / 2 = 0 u 4 − (u 5 + u 3 ) / 2 = 0 u 3 − (u 4 + u 2 ) / 2 = 0 u 2 − (u 3 + u1 ) / 2 = 0 If a solution has been reached. Please see the appendix for more details on the Scarborough criterion. For this reason. The residuals should approach zero.u4 = 40 u3 = 60 u2 = 80 Gauss-Seidel iteration is guaranteed to work if the simultaneous equations satisfy the Scarborough criterion. Or alternately you will probably be able to specify the residuals as a criterion for convergence and stopping the execution of the program. you can be sure you’re not making any further progress and can stop the program at that point. For example. the smaller the value of the residuals the better the solution. CFD packages will tell you what the residuals are as the program runs. you can specify the number of iterations after which the program will stop.

If the solution changes appreciably. The rate of change could have been used to leap-frog to values closer to the final result. and calculate the residuals at the end. The issue of computation time is an important one – running CFD programs on modest 3D grids with about 300. but how small is small enough? In the previous problem we had the luxury of knowing what the final answer should be.1 Calculate the velocity profile for flow between parallel plates (no energy equation) as specified in Section 2. A relaxation factor governs the magnitude of the extrapolation.5.2 Write a program that uses finite differences with Gauss-Seidel iteration to calculate the temperature distribution in the problem above. but by about the 5th loop we had a rough idea of the trend. In this case. so we knew that the 5 control volumes we used were appropriate. At times. you know that the grid size is not an issue. and that rate is then used to extrapolate a value of that unknown. ---------------------------------------------------------------------------------------------------------Problem 3. This topic will be discussed in more detail in the second part of this book. and there is an optimal value for each problem. In this technique.000 control volumes can take over-night on desktop computers with processors of about 1 GHz speed. If the solution is the same or very close. Convergence may be sped up (the number of loops reduced) by applying a procedure known as successive over-relaxation or SOR. then your solution is suspect. ---------------------------------------------------------------------------------------------------------Problem 3. underrelaxation may be used to slow down the speed of convergence and eliminate the fluctuations. The result is that convergence is sped up by eliminating the need to cycle through intermediate iterations. It took about 15 loops to get close to the solution. Grid size issues A good question to ask is: how does one know if the grid is small enough? From the section on finite differences we learned that the smaller the grid the more accurate the solution. the rate at which an unknown is changing per loop is calculated. ---------------------------------------------------------------------------------------------------------- 38 . Consider the problem we were solving before. then you have to go smaller. The best way to know if the grid is small enough is to repeat the problem using a smaller grid. Compare your result with the analytical result derived earlier.5. the solution in intermediate iterations may be fluctuating. Use 50 loops of Gauss-Seidel iteration. as specified in Section 2.If the residuals remain large.

the result will be the steady solution. considering that the flow is only in the x-direction. We begin our analysis with the unsteady Navier-Stokes equation in the x-direction: ρ( ∂u ∂u ∂u ∂u ∂P ∂ 2u ∂ 2u ∂ 2u +u +v + w ) = Fx − + µ( 2 + 2 + 2 ) ∂t ∂x ∂y ∂z ∂x ∂x ∂y ∂z We eliminate all unnecessary terms. for example a space capsule re-entering the atmosphere at high speed in inviscid flow. and the right-side is in terms of length coordinate y. In other words. We again note that the final solution (after some time has elapsed) to this problem will be the same as the steady flow problem. we 39 . Notice that the left-side expression is in terms of time t.2 Unsteady flow problems Consider the Couette flow case discussed before. The velocity profiles might look as sketched below: t=0 t=1 s t=2 s t=3 s (steady flow) We wish now to know what the velocity of the flow is at different locations as time elapses. but let’s suppose that both plates are initially at rest. there is no pressure drop nor body force. using a forward difference for the time derivative: ρ u y +1 − 2u y + u y −1 u t +1 − u t =µ ∆t ∆y 2 There’s just one small detail to work out now. There are situations where it is desirable to solve a steady flow problem as an unsteady problem. At time t = 0.3. We also wish to know the final velocity profile. and flow occurs in a constant diameter duct: ρ ∂u ∂ 2u =µ 2 ∂t ∂y We now apply the finite difference approximation to the equation above. and that after some time. You can envision that the disturbance will take some time to work its way down towards the lower plate. This will be discussed in more detail in the next section. the top plate is given an instantaneous velocity of 100 m/s.

1(0 – 0 + 100) + 0 = 10 u3 = 0 u4 = 0 u5 = 0 t = 0. which we ρ∆y 2 will call C for convenience.t +1 = u y +1.t + u y −1.t + u y −1.1 and ∆y is 0.02 m). we hold one of the independent variables constant. All velocity u values are zero at time t = 0.1 s u1 = 100 (note the top node’s speed is constant) u2 = 0.1(0 – 2(10) + 100) + 10 = 18 40 .t ∆t =µ u y +1. When a derivative is taken of a partial differential equation with respect to one of the independent variables.2.t − 2u y .1] By solving for uy. We now illustrate how to proceed.t ρ∆y 2 [ [3. and account for this in our equation: ρ u y .t ] + u y .2 s u1 = 100 u2 = 0.are dealing with a partial differential equation where u is varying with both time and location y.t +1 − u y .t+1 we have an expression for the flow speed u that depends on u at a previous time step.005 m (resulting in 4 control volumes over the entire height of 0. allowing us to march forward in time from our known initial conditions! ∆tµ is a constant. We then hold y constant for the left-side of the equation. we track u as a function of y and t: t=0 u1 = 100 (top plate starts moving) u2 = 0 u3 = 0 u4 = 0 u5 = 0 t = 0. We note that the first term on the right-side of the equation Assuming that ∆t is 0.1.t − 2u y . and t constant for the right-side.t+1: ∆tµ u y .t ∆y 2 We now solve the equation above for uy. assuming for the sake of argument that C is 0.

t) Print u(i.994 u3 = 49.993 u4 = 24.1(1 – 2(18) + 100)) + 18 = 24. using the 41 .3 s u1 = 100 u2 = 0. We were able to solve all of the equations by simply marching forward in time. t)) + u(i.1.1 * (u(i + 1. t) = 0 Next t “March forward in time 150 time steps” For t = 0 To 150 “Loop through the control volumes” For i = 2 To 4 u(i.1(0 – 2(0) + 1) + 0 = 0.1(0 – 2(1) + 18) + 1 = 2. t) . t + 1) = 0.6 u4 = 0.1 u5 = 0 After 150 iterations we obtain the linear velocity profile obtained with the steady solution: u1 = 100 u2 = 74. t) = 100 u(5.1(0 – 2(0) + 10) + 0 = 1 u4 = 0 u5 = 0 t = 0.5 u3 = 0. t). t) + u(i .995 u5 = 0 Below is some pseudo-code showing how to program this process: “Set all velocities to zero at t=0” For i = 1 To 5 u(i.u3 = 0. 0) = 0 Next i “Set boundary values to 0 or 100 at all times” For t = 1 To 200 u(1. t Next i Next t Notice that we did not have to solve simultaneous equations for the unsteady solution.2 * u(i.

4375 0 42. In our simple case. and 3: 1st time step: 75 0 0 2nd time step 37.75 for the Courant number results in the following velocities at nodes 1.25 0 3rd time step 98.46875 -21.1. ∆tµ and it was defined as .2109375 -49.5 56.09375 5th time step 141. and it can be a major one. while solutions in which we solve the equations simultaneously are known as implicit solutions.previous time step’s velocity values to calculate the next time step’s velocities. Solutions in which we march forward in time are known as explicit solutions.6484375 42 . It turns out that if C (a number very similar like it occurs in ρ∆y 2 the more complicated version of the Navier-Stokes equations. We have stressed the fact that it is possible to solve a steady flow problem (requiring an implicit solution that requires solving simultaneous equations) as if it were an unsteady problem (allowing an explicit solution in which solving simultaneous equations is avoided by marching forward in time). Do you recall the constant C in the equations above? We arbitrarily gave it a value of 0.21875 89.1875 4th time step 25. making one wonder why anyone bothers with implicit solutions at all for steady problems.78125 105. there is a catch. the explicit technique does not converge. using a value of 0.2. However. and is known as the Courant number) is greater than a certain value. It certainly appears simpler to march forward in time.

01. Do you think that steady state has been achieved after 10 seconds? -----------------------------------------------------------------------------------------------------------As a closing note: most commercial codes use an explicit scheme – they treat steady flow problems as if they were unsteady.75390625 -81. For example. You should run your program using smaller steps in order to determine if your current steps are small enough. and do a time-marching solution.05.1 m between the plates. The result may be impracticably long computational times.51953125 197. You may consider the energy and momentum equation to be uncoupled (solve only the momentum equation). 43 . t = 0.6th time step -32.73828125 Cleary this solution is going nowhere good! The problem with having an upper limit on the size of the Courant number is that you may have to use impossibly or impracticably small time steps. Look closely at our Courant number: ∆tµ ρ∆y 2 Suppose that you had a mesh that was very small (which you need in cases where there are large gradients).4: Determine the velocity profile as a function of time for air in Couette flow. at t = 0.2 kg/m 2 and the viscosity 1. The density of air is 1. Divide the flow into 5 control volumes. This would tend to drive the Courant number up.1. -----------------------------------------------------------------------------------------------------------Problem 3. then allowing the flow speed to settle to steady state values (which will be different from 30 m/s around the object) as time progresses. an object in a wind tunnel with a known inlet speed of 30 m/s could be simulated by setting the speed everywhere to 30 m/s at t = 0. which might require extremely small time steps in order to maintain the Courant number below its maximum allowable value. This is done by assigning some initial values to all of the velocities. with the upper plate at 10 m/s and a gap of 0.82x10-5 N-s/m . t 3 = 1.3: Run the code above and determine the limit on the size of the Courant number. It is very important to check that your time step and space steps are small enough – recall that finite differences require small steps for accuracy. and t = 10 s. t = 0. then allowing the program to march forward in time towards the real solution. -----------------------------------------------------------------------------------------------------------Problem 3.

Imagine that you could connect ten computers together. 44 . Since in an explicit scheme each grid point requires only the velocities at the previous time step. this can be a very attractive feature. Since computing time can become such a crucial issue.One very good reason for using a time-marching solution is that it allows parallel processing. each computer could work independently of the others (at each time step) in calculating velocities at assigned grid points.

b = 0. Parabolic and hyperbolic equations cam be solved with marching solutions (explicitly) while elliptic equations require solution of simultaneous equations. Each type exhibits different behavior. 1986): a ∂ 2u ∂ 2u ∂ 2u ∂u ∂u + 2b +c 2 +d +e =F 2 ∂x ∂y ∂x ∂xdy ∂y 2 An equation of this form may be classified on the basis of the discriminant b -4ac: b -4ac>0 2 b -4ac = 0 2 b -4ac<0 2 hyperbolic PDE parabolic PDE elliptic PDE For example. As alluded to in the section on the governing equations. the Navier-Stokes and energy equations can be simplified depending on the problem being solved. and parabolic. and flows below a Mach number of about 0. Given a 2nd order (with 2nd power derivatives as highest derivative in equation) linear partial differential equation in 2 variables of the form (Partial Differential Equations.Chapter 4. the time-dependent simplified Navier-Stokes equation we used: ρ ∂ 2u ∂u =µ 2 ∂t ∂y a = µ . making the equation parabolic. For example.3 may at times be considered incompressible. Duchateau and Zachmann. Following is a list of some flows and the resulting types of governing equations: 45 . The discriminant is zero. Types of Differential equations We now consider the different types of partial differential equations (PDE) you may encounter: hyperbolic. Types of Flows and their Governing Equations. flows outside the boundary layer may at times be considered inviscid. elliptic. McGraw-Hill. The boundary layer equation: ∂u ∂u ∂u ∂P µ∂ 2 u +u +v =− + ρ∂x ρ∂y 2 ∂t ∂x ∂y is also seen to be parabolic (note we consider only the higher order terms). and c = 0.

a time-marching solution works well – most of the existing CFD solutions to the full Navier-Stokes equations use a time-marching solution (Anderson). allowing a time-marching solution. the technique of treating steady problems as unsteady is widely used in CFD. This has been an example illustrating how the use of a time-marching solution can be advantageous. unsteady heat conduction. We wish to know the location of the shock as well as the pressures and velocities. the flow may be considered inviscid in both areas. and the classification scheme described above does not apply directly to them (Ferzinger). inviscid flow. one type can be solved explicitly. Elliptic: steady. subsonic. However. 46 . parabolized viscous flows (thick boundary layers with small streamwise gradients). the other implicitly. Unsteady inviscid flow (whether supersonic on subsonic) is hyperbolic.• • • Hyperbolic: Steady. that is. As you can see above. the solution after some time will be the steady flow solution. As an approximation. incompressible inviscid flow. Hence. starting the flow at some initial speed and increasing the speed to supersonic. and hyperbolic equations where the flow is supersonic. The full Navier-Stokes equations (as opposed to simplified forms as mentioned above) are a system of non-linear second order differential equations in four independent variables. Consider the case of a blunt-body entering the earth’s atmosphere at supersonic speeds. resulting in elliptic equations in the subsonic region. Parabolic: steady boundary layer flow. The flow field involves subsonic flow directly behind the normal shock as well as supersonic flow in areas where the shock is more oblique. which leads to problems since it is not initially known where the flow is subsonic and supersonic. inviscid supersonic flow. unsteady inviscid flow. The blunt-body problem can be more easily solved by treating it as an unsteady flow problem. time step issues may arise even though the problem to be solved is a steady-flow problem. and as mentioned. Other advantages were covered in the previous chapter.

000 grid points could run over-night on a modern PC. Consider that a relatively small problem with 300. Meshing Issues 5. In other words. meaning that the lines connecting grid points must be perpendicular. but this would require an extremely fine a mesh that could take too long to run. is known as the mesh. the body being analyzed becomes a reference axis.Chapter 5. The requirement that the mesh be uniform is no problem for analyzing rectangular shapes. or sometimes the grid. Such a grid might look as shown below. the grid must be orthogonal. as shown in the figure below: By using a small enough grid. the ∆x values between grid points must be the same throughout the mesh. the finite difference technique is used with boundary fitted coordinate systems. In a boundary fitted coordinate system. ∆y values must be the same. and a non-uniform grid is wrapped around the object. the grid points automatically fall on the surface being analyzed. and ∆z values must be the same. You may recall that the finite-difference approximation requires that the mesh be uniform. but what happens when we are dealing with curved shapes? The use of the finite difference approximation would then require a curved shape to be approximated by rectangular steps.1 The set of points defining the body and surrounding fluid. you will later get a feeling for how big an issue this can be. To get around this problem. that is. Hence. 47 . one could more closely approximate the shape of the object. on which the finite difference equations are solved.

The transformed equation must then be approximated using finite differences. you can imagine that using a boundary-fitted coordinate system is not a trivial task. If you consider the large number of terms in the conservation equations. so that the non-orthogonal grid in effect becomes orthogonal in a so-called computational plane. By using irregular spacing between grid points the grid can acquire a shape more closely matching a body surface. as opposed to the two above. consider the Laplace equation below: ∂ 2φ ∂ 2φ + =0 ∂x 2 ∂y 2 The transformation of this equation would result in a partial differential equation with 17 terms.Grid Points Reference axis Body Clearly. beyond the scope of this book (readers wishing to learn more about transformations of coordinate systems are referred to Anderson). popular for CFD software. and energy equations must be modified. based on the local grid size. For example. momentum. or transformed. If we allow the grid to be irregular. There is an easier approach. This is a very complicated task. this grid in not uniform and non-orthogonal! The continuity. and write the finite difference approximation at each point. One technique that does this is the finite volume technique. 48 . we can apply finite differences to an irregular grid without using a boundary-fitted coordinate system.

The 1st derivative finite difference equations used were: • • • Forward: dV / dt ≅ ∆ V / ∆ t = (V t + 1 − V t ) / ∆ t Backward: dV / dt ≅ ∆V / ∆t = (Vt − Vt −1 ) / ∆t Central: dV / dt ≅ ∆V / ∆t = (Vt +1 − Vt −1 ) / 2∆t The second derivative finite difference equation used was: • d 2V / dt 2 ≅ (Vt +1 − Vt ) / ∆t − (Vt − Vt −1 ) / ∆t (Vt +1 − 2Vt + Vt −1 ) = ∆t ∆t 2 You can see that there is only one delta t. but in real flows the grid would have to be three-dimensional. Different delta t values could be used at different points. In the cases we solved. or delta y. although not much more. The second derivative requires a little more thought. These equations applied to discrete points in the flow field. the grid was one-dimensional since the flow was also onedimensional.2 Irregular Grids We saw how the finite difference technique was applied to the Navier-Stokes equations. But we could write finite differences equations at each point based on the local values of delta t. or delta x. For example. Consider the plot below.5. The result was a series of algebraic equations that had to be solved either simultaneously or by marching forward in time. 49 . showing V plot as a function of t. the forward difference above could be written using the delta t used between V(t+1) and V(t).

Then: d 2V / dt 2 ≅ (Vt +1 − Vt ) / ∆t1 − (Vt − Vt −1 ) / ∆t 2 ∆t1 / 2 + ∆t 2 / 2 [5.Backward Difference V ∆t1 ∆t2 Forward Difference t-1 t t+1 The green backward difference line connects the curve between t and t-1. through which the properties are constant. 10 m/s at the top. and the same as at the node. incompressible. 50 . at the midpoint between t and t-1. divided by the space between them. The points can be considered to be inside control volumes. at the midpoint between t+1 and t. It most accurately represents the slope in-between t and t-1. It most accurately represents the slope in-between t+1 and t. steady. You will recall that the 2nd derivative is the rate of change of the first derivative. we break up the flow into five points. and that we can approximate the 2nd derivative as the difference between the forward and backwards slopes. subject to the same restrictions as before: zero-velocity at the bottom. As shown in the figure below. laminar.1] Consider Couette flow again. Note that the space between the two midpoints has to be ∆t1/2 + ∆t2/2. The red forward difference line connects the curve between t+1 and t-1. and with no gradients except in the y-direction. constant diameter flow.

1 Prove that the finite volume technique gives the same result as finite differences for the second derivative.3] ∆y back ∆y forward d 2u = 2 ∆y forward + ∆y back dy 2 We note that if the ∆y values are all equal we achieve exactly the same equations as before. it looks the same as before: ∂ 2u =0 ∂y 2 We apply equation 5. and achieve the result ( u y +1 − u y − u y − u y −1 ) [5. The governing momentum equation is: 51 . Since the same physical laws still apply. and point 5 is on the lower plate surface. -----------------------------------------------------------------------------------------------------------Problem 5.1. if the ∆ values are uniform -----------------------------------------------------------------------------------------------------------As an example.u = 10 m/s 1 2 3 4 5 Point 1 is on the upper plate surface. we now analyze unsteady Couette flow using an irregular grid. and eliminate all of the unnecessary terms. we write the x-direction momentum equation. Of course.

t +1 − u y .1.3 meters (top plate). We recall that we are dealing with partial derivatives.t +1 .t − u y −1.2 Solve the equation above for u y .t +1 we will be able to march forward in time explicitly.t ∆t ∆y forward ∆y back ∆y forward + ∆y back 2 If we now solve for u y . 0.ρ ∂u ∂ 2u =µ 2 ∂t ∂y The left side of the equation becomes. we specify that changes are occurring at constant time t.2. if one variable is allowed to change the other must remain constant. -----------------------------------------------------------------------------------------------------------52 . and on the right side. Break up the flow into 5 points measuring.4 (previously solved using symmetrical finite differences).t ) [5.t − u y . and when performing them.1.01 s. We do this by indicating with subscripts at which location y and time step t the velocity u is being calculated: ( =µ u y +1. while on the right side the velocity is taken with respect to location y. and manually solve problem 3.t − u y . using a forward difference in time: ρ ∂u u t +1 − u t = ∂t ∆t The right side becomes. starting from the bottom:0 (bottom plate) . On the left side.9] ρ u y . -----------------------------------------------------------------------------------------------------------Problem 5. 0. 0. we then specify that changes are occurring at constant location y. 0. as done a few paragraphs above: ( u y +1 − u y − u y − u y −1 ) ∆y forward ∆y back d u = ∆y forward + ∆y back dy 2 2 2 We put the pieces together into the momentum equation: u y +1 − u y u y − u y −1 ( − ) ∆y forward ∆y back u t +1 − u t ρ =µ ∆y forward + ∆yback ∆t 2 We note that on the left side the velocity is taken with respect to time t. for 3 time steps of 0.

where changes may be happening less drastically). we see that we can apply finite differences to an irregularly shaped grid. and a large grid would not solve the problem properly – a grid that varies is the solution. In this case it might be inefficient to use a uniformly small grid. 53 . and a fine grid may not be necessary at others (such as outside of the boundary layer. allowing better fidelity to the shape of the object being modeled. We point out that the remaining governing equations (continuity and energy) must also be treated in the same way as the x-direction momentum equation. as well as more efficient modeling.There is another reason why an irregularly shaped grid may be desirable: you may need a very fine grid in some spots of the flow (the boundary layer is one example. where big changes can occur over small distances). In conclusion.

v. although not as badly as DNS. In LES.Chapter 6. Turbulence Up to now we have been dealing only with laminar flow. Mean Velocity u Time The obvious question is. is Large Eddy Simulation or LES. “Why not use du ? ”. only larger scale eddies are directly 54 .v. dy The answer is that it does not work. The plot below shows what the velocity might look like at any fixed location in steady. there is an average u. and most practical engineering flows are turbulent. with flow speeds fluctuating about the average. physics based expression for the shear stress like the equation above for turbulent flow. or w at any point. The shear stress in turbulent flow depends on many factors that are not fully understood or too difficult to predict. Rather. where u represents the mean velocity. The problem is that when the flow is turbulent there is no one velocity u. We could use du τ = µ if we know the velocity at every instant at every spot. but is currently not workable for practical applications. An alternative that is also still not practical. which allowed us to have an expression for the shear stress at any spot in the flow: τ =µ du dy Unfortunately things quickly get complicated once the flow becomes turbulent. This technique is known dy as Direct Numerical Simulation. such as the magnitude of the fluctuations about the mean. turbulent flow. The bottom line is that there is no simple. or DNS. requiring very small grids and impossibly long computation times with current computers. and w.

allowing the use of a coarser mesh. and w at any point at any time could be given by: u = u + u′ v = v + v′ w = w + w′ where u ′ is the fluctuation at that time. u ′ = v ′ = w′ = 0 2 [6. we still rely on experimental results to predict flows. is averaged over time. The limitations are the speed and storage capacity of state-of-the-art computers.1] You can reason that if the velocity u.RANS In the previous paragraphs we described turbulent flow as being composed of an average or mean property (such as velocity or pressure) with fluctuations about the mean value. since squaring will eliminate all values below zero that compensate for values greater than zero. or RANS. The bar over any expression denotes the average value. RANS uses an averaged form of the Navier-Stokes equations. The truly amazing thing is that given the advanced state of technology today. 6. it uses a variety of user-selected. and u is the mean or average value of the velocity. The advantages and features of each will be discussed shortly.1 Turbulent Continuity and Momentum equations . The most widely used approach for modeling turbulent flows is Reynolds-Averaged Navier-Stokes. and include the κ − ε (K-epsilon) model. experimentally obtained equations to obtain the shear stress τ. v. the flow speeds u. the Realizable κ − ε (RKE) model. and some less than the mean). we can conclude that the average value of a fluctuation over and above the mean is zero (since some fluctuations will be greater then the mean.2] We note however. [6. the Spalart-Allmaras model. or any other property of the flow. that quantities such as (u ′ ) are non-zero. such as u ′v ′ . In addition.solved using the Navier-Stokes equations. These experimentally obtained relations are the result of years of research. For example. rather than on first principles. all average properties of products are non-zero. In general. while eddies smaller than the mesh size are approximated using experimental data. to name the most popular in use today. Other averaging rules we will need to use for the coming derivations: u =u 55 . Thus. and the RNGκ − ε models. which will be covered below.

and we average the equation above over time.u+v =u+v u ⋅v = u ⋅v } [6. v and w into the equation above: ∂ (u ′ + u ) ∂ (v ′ + v) ∂ ( w′ + w) + + =0 ∂x ∂y ∂w If we recognize that the derivative of a sum may be performed by splitting the sum into two separate derivatives. If the fluid flowing through a fluid exits with a different momentum than it entered with. The general approach we will take is to set all of the forces acting on a fluid element to zero. the flow is through a constant diameter duct in the x-direction. we obtain the following (remembering that the average of a primed quantity is zero): ∂ (u ) ∂ (v) ∂ ( w) + + =0 ∂x ∂y ∂z [6.3] ∂u ∂u = ∂x ∂x RANS Continuity equation Let’s now take our continuity equation for incompressible. and looks pretty much like the laminar flow equation. We will now also consider the forces associated with fluid fluctuations flowing through a control volume. these force included only the shear and pressure forces acting on the faces of an element. that is. RANS MOMENTUM (NAVIER-STOKES) EQUATION The previous procedure was simple – a great warm-up for deriving the RANS NavierStokes equation! We will do so only for turbulent flow in the x-direction with no average component in the y or z directions. steady flow: ∂u ∂v ∂w + + =0 ∂x ∂y ∂z We substitute the turbulence equations for u. There will be fluctuations in the y and z directions due to turbulence.4] This is the time-averaged continuity equation for turbulent flow. then there will be a force on the element. 56 . as well as fluctuations and average motion in the x direction. In the laminar flow case.

then there will be a force associated with this change. that is. momentum rate = m u . is given by: . where ρ is the fluid density and A is the cross-sectional area of the flow. If there is a change in the momentum flow rate. We recall that the & mass flow rate m in the x-direction is given by the relation: & m = ρuA . For example. where m is the mass flow rate and u is the speed of the fluid. since m = ρuA . moving at 2 m/s is: & m = ρuA = 1000 kg m 2 kg 2 π 1 / 4m 2 = 1571 3 s s m & For flow flowing into a fluid element in the x-direction.. 2kg 10m 2kg 1m kg − m − = 18 = 18 N s s s s s2 OK. Say water enters a nozzle held by a fireman at 1 m/s. One example of this is a fire hose.5] 57 . Changes in Momentum The momentum rate of a moving fluid. the rate at which momentum flows. In fact Newton’s 2nd law for a moving fluid is: . we have established that the difference between the entering and exiting momentum & rates results in a force. The force generated by the accelerating water is: & F = ∆mu = . ∑ Fx = ∆ m u In words. and that the x-direction momentum rate is mu . the x-direction force generated by an accelerating fluid through a control volume will be equal to the change in the momentum rate of the fluid in the x-direction. with a mass flow rate of 2 kg/s. and leaves at 10 m/s. we can say: & Momentum rate in x-direction = mu = ρuAu = ρu 2 A [6. the mass flow rate of water through a 1 m wide duct.

Let’s remember that formula.6] The difference between the entering and exiting x-momentum rates due to flow in the ydirection gives rise to another force in the x-direction. where u is the x direction component of the entering flow.7] Consider an area of the flow. y and z-directions (z-direction not shown on figure). It is possible that fluid entering along the bottom face has a component in the x-direction as well. And. y-component flow direction x-component The mass flow rate into the element via the bottom face is: & m = ρvA The rate at which x-momentum enters via flow in the y-direction is then: & mu = ρvAu. Again. [6. we are concerned only with changes in the momentum flow rate in the x-direction. it represents the momentum rate. As before. as shown by the figure below. The momentum rate in the zdirection is: & mu = ρwAu. without straining our imaginations too hard we can envision x-direction momentum entering the control volume by flow in the z-direction. X-momentum enters/leaves in the x. 58 . and the difference between the entering and exiting momentum rates will equal the force associated with that momentum change. as shown in the figure below. [6.

The difference between d d the entering and exiting momentum rates is − ( ρuAu )∆x = − ( ρu 2 A)∆x dx dx x-momentum from fluctuations leaves x-momentum enters at rate of ρuAu x-momentum leaves x-momentum enters due to fluctuations Momentum in the x-direction enters and leaves via the top and bottom faces due to turbulent fluctuations in the y-direction. We first consider the flow in the x-direction. In other words. is ρuAu. The rate at which momentum enters the volume is ρv ′Au . x-direction momentum enters and leaves via the face in the plane of the paper via turbulent fluctuations in the z-direction. This momentum rate. as shown earlier in the derivation of the Navier-Stokes equations. The difference between the exiting and d entering momentum rates in the z-direction is − ( ρw′Au )∆z . and the difference between the exiting and entering momentum rates d is − ( ρv ′Au )∆y dy In the same way.Momentum in the x-direction enters and leaves the left and right faces of the volume below by virtue of the flow moving from left-to-right. which resulted in a difference is momentum flow rate of 59 . fluctuations in the y-direction can have components in the x-direction. x-direction flow. dz Further analysis.

so the time average must also be zero: ρ d 2 (u ) = 0 dx We now address the second term in equation(6. According to the averaging rules: ρ d d (2uu ′) = ρ 2u v ′ = 0 dx dx We recall that the average of any fluctuation is zero.9] The equation above is now averaged over time. We substitute the previous expression for turbulence: u = u + u ′ into equation (6.9). making the entire term disappear. we note that. y and z direction flow.8] As before.9).8). the last term of equation(6.10] This is the only term that remains for force generated in the x-direction in turbulent flow. Considering the first term in the parentheses of equation(6.9) is addressed: −ρ du ′ 2 d = −ρ u′2 dx dx [6. we will consider the fluid element to be symmetrical. the rate of change of u must be zero. Finally. A similar analysis for flow into the control volume in the y and z directions yields: 60 . and take advantage of the fact that the density and dimensions are constant to obtain: − ρ∆x d (u + u ′) 2 dx The quantity in parentheses is multiplied out: − ρ∆x d 2 (u + 2uu ′ + u ′ 2 ) dx [6. due to flow into our control volume from the x-direction. since the average speed in the x-direction is not changing (constant diameter duct). This means the force calculated will be force per unit area.− d ( ρu 2 A)∆x dx [6. so that the “A” terms may be divided out.

14] RANS Continued: Putting it all together. we can then say that the total forces equal the total changes in momentum rates: ∑F x due to momentum changes = − ρ ( d 2 d d u ′ + (u ′v ′) + (u ′w′)) dx dy dz [6.10-6. a fluid element is being sheared only by the elements below and above it. You will recall from the derivation of the Navier-Stokes equation that we were interested in the net value of the shear force on a fluid volume. RANS Continued: Forces due to shear. We now consider the shear or viscous forces.flow in y direction force per unit area: − ρ d (u ′v ′) dy d (u ′w′) dz [6.11).13] All that remains is to calculate the forces due to shear and we will be finished. which will be added to the terms calculated above.11] flow in z-direction force per unit area: − ρ [6. as before. The shear acts in only one way for flow through a constant diameter duct: since velocity gradients are only present in the y-direction. In the previous section we found the change in momentum rate on our fluid volume. τ= d 2u Force d du = ( µ )∆y = µ 2 Area dy dy dy where we have assumed constant viscosity. We now substitute the expression for turbulent flow into the above equation to obtain: d 2u d 2 (u + u ′) =µ dy 2 dy 2 We average this over time to obtain: µ τ =µ d 2u d du = (µ ) 2 dy dy dy [6.12] Combining equations(6. 61 .

so that we could write: d dP (τ la min ar + τ turbulent ) − =0 dy dx [6. In our present case we use the average pressure.17] This last manipulation gives us a very interesting way to look at turbulence.13) to yield our RANS equation for incompressible one-dimensional flow through a constant diameter duct. we can typically say that fluctuations in the direction perpendicular to the flow (y-direction) are much greater than fluctuations in the direction of flow (x-direction). − ρ u ′v′ . and the shear forces are acting opposing the direction of motion: d d d d du d P . This result is then: −ρ d d d u dP (u ′v ′) + ( µ )− =0 dy dy dy dx The equation above can be re-written as: d du dP (µ − ρ (u ′v ′)) − =0 dy dy dx [6. and the term − ρ (u ′v ′) can be thought dy of as a turbulent shear stress. and also much greater than those in the z-direction.ρ ( u ′ 2 + (u ′v ′) + (u ′w′)) = 0 (µ )− dx dy dz dy dy dx Please note that we have added a pressure drop term. and − ρ u ′w′ are known as turbulent or Reynolds stresses. (6. The term du µ can be thought of as a laminar shear stress. one-dimensional analysis. How to handle these terms is the single biggest problem in modeling turbulent flows. remembering that the acceleration (convective) forces are acting on fluid elements in the direction of motion.18] 62 . We re-write the equation above as: d d d d du d P + ρ (− u ′ 2 − (u ′v ′) − (u ′w′)) = 0 (µ )− dx dy dz dy dy dx [6. For flow in the x-direction in a constant diameter duct.14) and (6. The terms − ρ u′2 .15] .We now combine the shear and momentum expressions. which was also included in the original laminar.

and z directions. the laminar term dominates. y. Let’s look at the full-blown incompressible RANS equation for flow in the x-direction: ρ ∂u ∂P ∂ ∂u ∂ ∂u ∂ ∂u = ρg x − + (µ − ρ u ′ 2 ) + (µ − ρ u ′v ′) + ( µ − ρ u ′w′) ∂y ∂y ∂z ∂z ∂t ∂x ∂x ∂x It looks nasty. If we were to plot the values of these shear stresses through the boundary layer. it must add a negative component to the layer below it (since it is moving down). both types of shear are important. but it pays to stop and look at it one second. Similar reasoning can be applied to a particle moving up into faster moving flow. In-between the two layers. We will look at this more closely in the section dealing with turbulence modeling. making v ' negative.where τ turbulent = − ρ (u ′v ′) and τ la min ar = µ du dy It should be noted that the turbulent stresses − ρ (u ′v ′) are positive. known as the overlap layer. that is. they have the same sign as the laminar shear stress term. we would find that in the area very close to the wall (known as the wall layer). Many of the terms are nearly identical between the two equations. This can be explained by the following argument: consider a fluid particle in turbulent pipe flow moving at flow speed u. If the particle moves down to a lower level due to turbulent fluctuations. u ′ will tend to be positive at the new layer. These come as a result of x-velocity being carried into fluid elements by fluctuations in the x. But since on average its speed u is greater than the speed u of the layer it moves to. In the area close to the outer edge of the boundary layer (known as the outer layer). − ρ u ′v′ . save for the use of average values of pressure P and velocity u. the turbulent stresses dominate. • 63 . hence the average product of u ′v ′ will be negative at the new layer. and compare it with the Navier-Stokes equation derived earlier (non-RANS): ∂u ∂u ∂u ∂u ∂P ∂ 2u ∂ 2u ∂ 2u ρ ( + u + v + w ) = ρg x − + µ( 2 + 2 + 2 ) ∂t ∂x ∂y ∂z ∂x ∂x ∂y ∂z We note some important things: • The same turbulent stresses are added as we added to our simple RANS equation: − ρ u′2 . and − ρ u ′w′ . and that the particle is below the flow center-line.

6 Beginning with equation(6. beginning with ( ρv ′Au )∆y dy -----------------------------------------------------------------------------------------------------------Problem 6. and − ρ u ′w′ are known the turbulent stresses. the terms − ρ u′2 . derive equation(6.11).19a). and − ρ u ′w′ represent? Are they really shear stresses? -----------------------------------------------------------------------------------------------------------Problem 6.Again.1 d Derive equation(6. ----------------------------------------------------------------------------------------------------------Problem 6. v. the Navier-Stokes equations may be simplified in the boundary layer. ∂x The turbulent stresses are unknown at the onset of a CFD calculation.2 Show that the average u ′v ′ is negative.19). the result is the RANS equation for 2-dimensional boundary layer flow: ∂u ∂u ∂u ∂P d ∂u +u +v =− + (µ − ρ u ′v ′) ρ∂x ρdy ∂y ∂t ∂x ∂y [6.3 What is the momentum rate. represent the major problem in performing CFD. As mentioned in an earlier section. and P.18). -----------------------------------------------------------------------------------------------------------64 . and what is its significance? -----------------------------------------------------------------------------------------------------------Problem 6.19] By substituting the turbulent flow expressions for u. − ρ u ′v′ . − ρ u ′v′ . etc. and as mentioned before. and we note that they appear right next to the laminar shear stresses: µ ∂u . -----------------------------------------------------------------------------------------------------------Problem 6. You may recall the two-dimensional boundary layer equation in the xdirection was: ∂u ∂u ∂u ∂P µ∂ 2 u +u +v =− + ρ∂x ρ∂y 2 ∂t ∂x ∂y [6.17) to equation(6.19a] -----------------------------------------------------------------------------------------------------------Problem 6.5 What do the quantities − ρ u′2 . These turbulent stresses are determined from experimentally derived equations.4 Show how to go from equation(6. and averaging over time. for a fluid particle moving up into faster moving flow.

65 .

in the turbulent Navier-Stokes equation. EVM are based on the calculation of a turbulent or eddy viscosity. Eddy Viscosity Models. particularly for complex 3-D flows with strong curvature. The turbulent stresses can be determined by Reynolds-Stress Models (RSM). The Reynolds-Stress Models solve directly for the Reynolds stresses − ρ u′2 . If we can determine some way to calculate an eddy viscosity.Determining the Reynolds Stresses/Various Turbulence Models The determination of the turbulent stresses is the chief problem of CFD. the RANS equations can be “closed” when an expression for the Reynolds stresses is known. or by Eddy-Viscosity Models (EVM). using very complicated equations with experimentally derived constants. which refers to the fact that the RANS equations themselves have no way of determining the turbulent stresses. so that we can rewrite the equation above: ∂ ∂u ∂ ∂u ∂u (µ − ρ u ′v ′) = ( µ + ρµ t ) ∂y ∂y ∂y ∂y ∂y where µt is the turbulent or eddy viscosity. At times you may hear the term “The Closure Problem”. We are considering only the d/dy term from equation(6.17): ∂ ∂u (µ − ρ u ′v ′) ∂y ∂y Note that the µ ∂u term looks just like a laminar flow shear stress. As mentioned earlier. − ρ u ′v′ . can be considered a turbulent shear stress. and − ρ u ′w′ . For these reasons. However RSM require more computation time and can be very difficult to converge. We can then say that ∂y the ρ u ′v′ term. There are two general ways to proceed at this point. consider the d/dy terms from equation(6. the turbulent stresses occur alongside the laminar stresses. and µ is the normal dynamic viscosity. and is sometimes known as turbulence modeling. Some CFD software packages. we will be on our way to solving turbulent flow 66 . allow you to choose between the two methods.17) for the purpose of illustration – there are other similar terms!The point is that the turbulent shear stresses can be replaced by an expression similar to the shear stress for laminar flow. For example. which arose from turbulence. like Star-CCM+. The result is a more accurate and more physically sound model than EVM. Eddy Viscosity Models are used more often than Reynolds Stress Models.

would also be a problem. in the sense that EVM assume turbulence is isotropic (the same in all directions at a point). Some methods use algebraic expressions or a combination of algebraic expressions and differential equations to determine µt . and high pressure gradients. where there may be strong curvature. For example. This has given rise to the terms zero-equation. but currently. Which model to use: Which model to use when? It depends on the application. a non-streamlined object. Economical for large meshes (runs relatively quickly).problems using the Navier-Stokes equations. such as a truck. Reynolds Stress Models: Instead of solving for the turbulent viscosity µt . and twoequation models. one-equation. Reynolds-Stress Models (or RSM) solve directly for the Reynolds stresses − ρ u′2 . or SKE) Has been the most widely used turbulence model for engineering applications. κ = (u ′ 2 + v ′ 2 + w′ 2 ) . and is best suited for flows with mild separation. The result is a more accurate and more physically sound model than EVM. The various popular turbulence models are outlined below: • Spalart-Allmaras Model This one equation model was designed for aerospace applications. while one and two-equation models use one and two differential equations. Another differential equation is used to 2 67 . You will run into this terminology frequently. • κ−ε model (k-Epsilon. may be a poor choice for analysis given the large amount of separation that may be experienced at the rear. However RSM require more computation time and can be very difficult to converge. but can perform poorly for 3-D flows. most users prefer the realizable κ−ε model. Zero equation models use only algebraic expressions for µt (no differential equations). large streamline curvature. A differential equation is used at each point to calculate κ . If large amounts of swirl/rotation are expected. sometimes known as the Standard κ−ε model. Reynolds Stress models are then more accurate than EVM. particularly for complex 3-D flows with strong curvature. Flow through a cyclone. and − ρ u ′w′ . using very complicated equations with experimentally derived constants. A twoequation model that is robust (will run without crashing). but can give some very poor results when there is strong flow separation. Reynolds Stress models may be the best choice. − ρ u ′v′ . This is the point of EVM: the determination of an eddy or turbulent viscosity µt . The eddy viscosity µt can be calculated many ways. which is the turbulent 1 kinetic energy.

Would you use it to calculate drag force on a sphere moving through a fluid at high speed? -----------------------------------------------------------------------------------------------------------Problem 6. which is the turbulent dissipation rate (the rate at which turbulence is getting destroyed. • RNG κ−ε model Modified to give better performance than the standard κ−ε model. Performs better with the types of flows that give SKE models difficulty. Most widely accepted in the aerospace and turbomachinery fields. you will often be asked for the turbulence intensity at the inlet. it is quite logical that the incoming turbulence will affect the outcome of a simulation. and fluid properties.calculate ε. • Realizable κ−ε model Offers the same advantages as RNG. but require longer running times and memory. This is the default choice for Star-CCM+ if the κ−ε model is selected.9 Discuss the pros and cons of RSM and EVM. inlet dimensions. or used up). but is generally believed to be more accurate and easier to run than RNG. In the absence of known turbulence intensity value. Accurate and robust for large range of boundary layer flows with pressure gradients. This refers to the average fluctuation about the mean flow speed. Combines the standard κ−ω model for use near walls with the SKE model. -----------------------------------------------------------------------------------------------------------Problem 6. commercial CFD packages will automatically assign a turbulence intensity value to your simulation. If you think about this.10 68 . based on the flow speed. as well as for low Reynolds number flows. • SST κ−ω model A variation of the standard κ−ω model with similar benefits. See section below for more detail. -----------------------------------------------------------------------------------------------------------Problem 6. Good for flows with a strong curvature/swirl.8 Why are turbulence models needed? -----------------------------------------------------------------------------------------------------------Problem 6. When running CFD codes. and should be measured experimentally.7 Discuss under what situations it might be appropriate to use the κ−ε model. • Reynolds Stress Models: More physically sound than eddy viscosity methods. • Standard κ−ω model Another two-equation model.

Define κ and ε -----------------------------------------------------------------------------------------------------------Problem 6.11 Define the turbulence intensity. Why might you need to know it experimentally? ------------------------------------------------------------------------------------------------------------ 69 .

Why bother to make dimensionless groups? The answer is that experimental results can be made much more general by expressing the results using dimensionless groups. Some dimensionless numbers that readers may be VDρ V ) and the Mach number ( Ma = .1 meter. The techniques or stratagems used to calculate flows in these areas are known as wall functions.Wall Functions Most turbulence models are not good in the boundary layer. The units in these numbers cancel – hence they are referred to as dimensionless groups of numbers. with a pipe diameter of . using water at flow speeds ranging from 1 m/s to 10 m/s. an extremely clever technique based on some pretty universal properties of flow boundary layers. Let’s say that we run experiments on head loss over a length of pipe. Your results might look as shown below. The line through the points is estimated: Head Loss Flow Speed 70 . the circles representing your experimental points. hence a strategy must be adopted for dealing with near-wall flows. Dimensionless Analysis and the Buckingham Pi Theorem First we must speak very briefly about the advantages of using dimensionless groups in expressing experimental results. The simplest way to deal with boundary layers is using the logarithmic overlap law.Chapter 7 . The proper construction of dimensionless groups is known as dimensional analysis. familiar with are the Reynolds number ( Re = µ a where a is the speed of sound). or dimensionless groups.

For example. obtained using water in a 0. D = pipe diameter and hL = head loss .75 m diameter pipes? And what if. where µ LV µ = vis cos ity.05 m and . in addition. it turns out that the original 5 data pairs. if the original data are expressed instead in terms of two dimensionless h D2 g VDρ groups. ρ = density . But what if you wanted the same information for 0. the Reynolds number ( Re = ) and the friction factor ( f = L 2 ). L = pipe length . you wanted data for air and oil? You can imagine that you would have to spend a lot of time in the lab – 45 experimental runs would be required! Head Loss Flow Speed But. ONE PLOT for many diameters and many different fluids! 71 . then the results apply to nearly all fluids at nearly all pipe diameters! The plot would then become as shown below.You had to perform 5 runs to generate that plot. g = gravitational const .1 meter pipe could be used for other pipe diameters and for other fluids if the results are expressed using dimensionless groups! This is nothing short of astounding.

f

Re

To estimate a pressure drop from the plot above (a simplified version of the Moody Diagram), one would first calculate the Reynolds number using a known flow velocity, viscosity, density and pipe diameter, and read the value of “f” from the plot above. The equation for friction factor f is then used to get the head loss hl. Amazing - a small number of experimental results can be extended to conditions very different from those used during the original experiment. And it’s used all of the time to express experimental results in order to make the results much more general. Any engineer has been exposed to additional dimensionless groups like drag coefficient Cd, relative roughness e/D, Weber number We, and Nusselt number Nu, to name a few. But how could anyone possibly know which dimensionless groups to use, and how many of them to use (for example, perhaps only the Reynolds number Re would have been required above)? A lot of it is intuition and experience, but the Buckingham Pi theorem is used to determine the number of dimensionless groups. One begins with a series of experimental results, and a desired output. In the example above, the desired output is some way to determine the head loss through a pipe. We then list the desired result, and the variables which might affect it. For the example above:

hL = f (V , D, L, ρ , µ )

The equation above means the head loss hl depends on (or is a function of in mathematical language) the terms inside the parentheses. To make this statement requires experience and perhaps some trial-and error!

72

One then counts all of the factors we are keeping track of, counting the one we are interested in. In the example above there are 6. The Buckingham Pi theorem, very coarsely stated, says that the number of dimensionless groups required to express experimental results is the number of factors minus the number of fundamental units involved. In the example above, the fundamental units involved are m, kg, and s. Then, the number of dimensionless groups involved is 6-3 = 3. Once the number of groups is determined, one sets about trying to make three dimensionless groups out of the factors involved, again through trial-and-error. In this case the groups are: Re =

VDρ

µ

, f =

hL D 2 g LV 2

We note that D/L is the third dimensionless group inside the expression for friction factor f. We again stress that experience and trial-and-error are required. One might try one set of dimensionless groups and see if the data collapse onto one plot, and if not, perhaps consider other groups including factors not considered. It turns out that dimensional analysis is used for developing universal velocity profiles through the boundary layer, in order to solve the problem of the boundary layer not being applicable to turbulent models.

**Experimental results for turbulent boundary layers
**

You may recall that for turbulent flow we cast our momentum equation so that we could identify turbulent and laminar shear stresses :

shear stress = d (τ la min ar + τ turbulent ) dy

[6.18]

where τ turbulent = − ρ (u ′v ′) and τ la min ar = µ

du dy

Experiments performed on turbulent boundary layers show that the boundary layer can be divided into three general regions: • • • the inner layer, where the laminar shear term dominates (that is viscous forces are greatest by far) an outer layer, where turbulent shear dominates, and an overlap layer where both viscous and turbulent shears are important.

73

Experiments also show that velocity through the boundary layer looks something like the plot below:

Pressure Gradients:

Strong, Favorable Mild Adverse Strong Adverse Very Strong Adverse Separating Flow

Velocity

Figure 7.1

Distance from Wall

The plots are for varying pressure gradients. A favorable pressure gradient refers to pressure dropping in the direction of flow – similar to having the wind at one’s back. For example, this is the situation encountered a flow moves around the forward portion of a sphere. An adverse or unfavorable pressure gradient refers to rising pressure in the direction of flow – fighting a head-wind, if you will. Flow moving around the aft portion of a sphere experiences an adverse pressure gradient, and it’s the adverse pressure gradient that causes the flow to separate, or detach from the body of the sphere in the aft portion – the flow does not have the energy to fight the rising pressure, and leaves the contour of the sphere. All blunt objects in other than creeping flow experience separation, and it’s the cause of much drag force resisting motion. Why should the pressure drop in the forward portion of a sphere, and rise in the aft portion? The answer is that the flow is speeding up in the forward portion of the sphere, and when speed goes up, pressure drops. If you imagine an island in the middle of a channel, you can imagine that the flow will speed up around the island since the same amount of water must pass through a decreased area, as shown below.

74

Increasing flow speed

Decreasing flow speed

Any object in a flow, it does not have to be in a channel, will experience a similar effect. Where the area of the object is increasing, the flow velocity is increasing, and the pressure is dropping (a favorable pressure gradient). Where the area of the object is decreasing (as in the aft portion), the velocity is decreasing and the pressure increasing (an adverse pressure gradient). It’s interesting to note that at low speeds, the boundary layer in the forward portion of an object in flow can be laminar. When the boundary layer becomes turbulent (due to a higher speed or perhaps some roughness on the surface of the object), it becomes thicker and has more energy than the laminar layer, and can punch through further into the adverse gradient in the aft portion of the object. The result is that the point of separation moves aft, and the drag on the object drops! The drag drops because the vortices/wake at the back of the object become smaller. This phenomenon only applies to non-streamlined, or blunt objects. Streamlined objects do not experience significant separation. Golf balls have dimples on them to make the boundary layer turbulent and reduce the amount of separation on the ball, resulting in longer flight distances. It’s important to note that if a golfer could hit a smooth golf ball hard enough, the dimples would be unnecessary (and would in fact slow down the ball) since the transition to turbulence would occur anyway at the faster speed. However, humans cannot make the ball go fast enough to reach the point where the boundary layer becomes turbulent using a smooth ball, hence dimples are used. Now back to Figure 7.1 and the real point of this discussion (the information above dealing with separation is useful to know when analyzing CFD results – expect flow separation if a body is blunt!). The real point of this section is that there appears to be no

75

universal velocity profile through the boundary layer. as will be shown below. If the experimental results of Figure 7.1 fall nicely onto one curve. while the overlap layer ranges from about y+ = 35 to about y+ = 350 (corresponding to about 20% of the boundary layer). at least for a good portion of the plot. y is the distance from the wall. If the following dimensionless groups are made: u + = u . then some very nice results can be obtained. 76 . not shown in the plot above does not fall onto one curve. Please see Figure 7. u* u* = τw yρu * and y + = µ ρ 1/ 2 where τ w is the shear stress at the wall. ρ is the fluid density. and µ is the fluid viscosity. The shape of the profile seems to depend on the pressure gradient.1 again! Enter dimensional analysis. The turbulent core. but the figure above is a great success anyway. then the many curves of figure 7. as shown by the figure below: Turbulent Boundary Layer Profile 20 18 16 14 12 u+ 10 8 6 4 2 0 0 50 100 150 200 y+ 250 300 350 400 The inner layer ranges from about y+ = 0 to y+ = 10.1 are re-plot using these dimensionless groups.

1 A turbulent boundary layer flow has an average speed of 5 m/s.The overlap layer. or to select more complicated wall functions.41 The equation above is known as the logarithmic overlap law. The viscosity is 1. also known as the logarithmic overlap layer. guess values of u* until the equation is satisfied. the following equation holds: u+ = y+ And. There is then no need to make a grid fine enough to capture the area closest to the wall. -----------------------------------------------------------------------------------------------------------Problem 7.4 Why are wall functions necessary? 77 . is very well fit by the equation: u+ = u 1 1 yρu * = ln y + +5 = ln( )+5 0. then the shear at the wall is known (which is very important to know in order to calculate drag forces or pressure drops). nor to go down any lower than the original point in the overlap layer. Solution: u* = .41 µ u * 0. and 315. -----------------------------------------------------------------------------------------------------------Problem 7. and the density is 1.2 kg/m^3. Very close to the wall (up to about y+ = 5) . Some commercial CFD packages give you the option to use the logarithmic overlap law. Make the plot in terms of y vs speed u. 100. Hint: This problem can easily be solved by iteration – that is. if a velocity is known in the overlap layer. Calculate y+ to check the assumption that we were within the overlap zone. The method presented above is a “simple” way to determine the profile and shear at the wall for turbulent boundary layers. using points at y+ = 35. Assuming this is within the overlap layer. shear at the wall = . What this all means is that.0E-5 m^2/s. another equation exists for y+ between 5 and 35. Is this necessarily a good idea? -----------------------------------------------------------------------------------------------------------Problem 7.2627. and in fact the entire velocity profile is known down to the wall.2 Sketch the velocity profile above in the overlap layer. y+ = 315 (within the proper range). at a point . One point in the overlap layer is sufficient. -----------------------------------------------------------------------------------------------------------Problem 7.01 m from the edge of a wall.0828 N/m^2.3 An engineer with the goal of reducing gas consumption decides to place dimples on the roof of a truck with a blunt shape. calculate the shear at the wall.

------------------------------------------------------------------------------------------------------------ 78 .6 What are adverse and favorable pressure gradients.-----------------------------------------------------------------------------------------------------------Problem 7.5 What is flow separation.7 The velocity in a turbulent boundary layer is a function of which factors? -----------------------------------------------------------------------------------------------------------Problem 7.8 Discuss the benefits of using dimensionless groups to express experimental results. and what is its effect? -----------------------------------------------------------------------------------------------------------Problem 7. and what geometries cause them? -----------------------------------------------------------------------------------------------------------Problem 7.

CFD has become a very valuable design tool that can either reduce or completely eliminate the number of physical experiments required. the time required to run a complicated analysis. However. Engineers can get around the modeling problem using a CFD technique known as Direct Numerical Simulation (or DNS). Turbulence modeling based on experimental results suffers from the same weakness – when flows are different from the exact conditions for which equations were developed. While advances have been and are being made continuously. This is analogous to determining an automobile’s speed based on the intensity of the sound that the tires are making as they roll over the pavement. would be in the hundreds of thousands of years (White. Even the best commercial codes may not give perfect solutions.Closing Remarks There is still a lot of progress to be made in CFD. Users should ask themselves: are the results reasonable? Many users still perform experiments to verify CFD solutions. rather than determining speed by measuring the time it takes the automobile to cover a certain distance. 79 . However. there is still a near-total reliance on parametric equations based on experimental results. The technique may give accurate results some of the time. but during inclement weather or changing road surfaces the speed predictions may be inaccurate. which involves determining the flow characteristics of even very small eddies in the flow – typically CFD results do not give such fine resolution everywhere. and at times they may give results that are clearly inaccurate. In the last few chapters you may have gotten an appreciation for how fragile some of the turbulence modeling equations can be. Viscous Fluid Flow)! It appears that turbulence will continue to be a problem for the foreseeable future. results may be inaccurate. even -9 with a hypothetical computer capable of performing a calculation every nano(10 ) second. despite the user’s best efforts. Running any CFD simulation should always be done with some skepticism. rather than on physical laws. in general.

Peric Partial Differential Equations. by Frank White Computational Fluid Dynamics. by J. WMalalasekera Fluent Training Notes Star-CCM+ Training Notes 80 .K. Ferzinger and M. by Hermann Schlichting Viscous Fluid Flow. by John Anderson Computational Methods for Fluid Dynamics. by Frank White Fluid Mechanics .Sources: Boundary Layer Theory.H. Versteeg and W. by Paul Duchateau and David Zachmann An Introduction to Computational Fluid Dynamics – the Finite Volume Method. by H.

81 .

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd