Fluent Tutorials Cornell University

December 17, 2016 | Author: jasimned | Category: N/A
Share Embed Donate


Short Description

Fluent Tutorials / Cornell University...

Description

FLUENT TUTORIALS - Cornell University

About the FLUENT Tutorials What is FLUENT? How to use these tutorials System requirements Conventions used Please send us feedback

List of Tutorials These tutorials progress from simple to more complex. If you are unfamiliar with FLUENT, please begin with the first module.

Introduction to CFD Basics

Laminar Pipe Flow Turbulent Pipe Flow Compressible Flow in a Nozzle

Flow over an airfoil

Forced Convection over a Flat Plate

http://instruct1.cit.cornell.edu/courses/fluent/ (1 of 4)11/7/2005 6:08:21 PM

FLUENT TUTORIALS - Cornell University

About the FLUENT Tutorials This FLUENT short course consists of a set of tutorials on using FLUENT to solve problems in fluid mechanics. The tutorials lead the user through the steps involved in solving a selected set of problems using GAMBIT (the preprocessor) and FLUENT. We not only provide the solution steps but also the rationale behind them. It is worthwhile for the user to understand the underlying concepts as she goes through the tutorials in order to be able to correctly apply FLUENT to other problems. The user would be ill-served by clicking through the tutorials in zombie-mode. Each tutorial is followed by problems which are geared towards strengthening and reinforcing the knowledge and understanding gained in the tutorials. Working through the problem sets is an intrinsic part of the learning process and shouldn't be skipped. These tutorials have been developed by the Swanson Engineering Simulation Program in the Sibley School of Mechanical and Aerospace Engineering at Cornell University. The Swanson Engineering Simulation Program has been established with the goal of integrating computer-based simulations into the mechanical engineering curriculum. The development of these tutorials is being supported by a Faculty Innovation in Teaching award from Cornell University. What is FLUENT FLUENT is a computational fluid dynamics (CFD) software package to simulate fluid flow problems. It uses the finite-volume method to solve the governing equations for a fluid. It provides the capability to use different physical models such as incompressible or compressible, inviscid or viscous, laminar or turbulent, etc. Geometry and grid generation is done using GAMBIT which is the preprocessor bundled with FLUENT. How to use these tutorials These tutorials are designed to be used online and run side-by-side with the FLUENT software. After you launch the web tutorials and FLUENT, you will have to drag the browser window to the width of the largest image (about 350 pixels). To make best use of screen real estate, move the windows around and resize them so that you approximate this screen arrangement.

http://instruct1.cit.cornell.edu/courses/fluent/ (2 of 4)11/7/2005 6:08:21 PM

FLUENT TUTORIALS - Cornell University

System and software requirements ●



System: Any system that can run GAMBIT, FLUENT, and a web browser. Screen: Resolution should be at least 1280 x 1024 pixels for optimal viewing. A 17" monitor or larger is recommended.



GAMBIT version 2.0. These tutorials were created using GAMBIT 2.0.



FLUENT version 6.0. These tutorials were created using FLUENT 6.0.



Web Browser: These tutorials work best in 5.0 or higher versions of Internet Explorer and Netscape because style sheet support is needed. These tutorials can be used with Netscape 4.x but may not render correctly.

Choose a tutorial by selecting from the list at the top of this page Conventions used Each tutorial begins with a problem specification. A solution can be obtained by following these nine steps: 1. 2. 3. 4. 5. 6. 7.

Create Geometry in GAMBIT Mesh Geometry in GAMBIT Set Boundary Types in GAMBIT Set Up Problem in FLUENT Solve! Analyze Results Refine Mesh

These steps appear at the top of each page of the tutorial with the current step highlighted in red. GAMBIT and FLUENT uses cascading menus which are represented as follows: Main Menu > File > Export > Mesh... This means that in the Main Menu, click on File. Then, in the File menu that comes up, click on Export and so on. http://instruct1.cit.cornell.edu/courses/fluent/ (3 of 4)11/7/2005 6:08:21 PM

FLUENT TUTORIALS - Cornell University

Names of windows are in italics. Items and options appearing within menus and dialog boxes are purple, italic, and bold. Text and numbers that need to be entered are indicated in Courier font. Additional explanations and related discussions are enclosed in a box. Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering Feedback .

http://instruct1.cit.cornell.edu/courses/fluent/ (4 of 4)11/7/2005 6:08:21 PM

Fluent Tutorial - Introduction to CFD Basics

Introduction to CFD Basics Author: Rajesh Bhaskaran E-mail: [email protected]

Introduction to CFD Basics You can download the following tutorials in PDF format. You will need Adobe Acrobat to read these files. Introduction to CFD Basics Problem set on CFD Basics Back to: FLUENT Home Page Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/cfd/index.htm11/7/2005 6:11:18 PM

Introduction to CFD Basics Rajesh Bhaskaran Lance Collins Jan. 2003 This is a quick introduction to the basic concepts underlying CFD. The concepts are illustrated by applying them to a simple 1D example. We discuss the following topics briefly: 1. The Need for CFD 2. Applications of CFD 3. The Strategy of CFD 4. Discretization Using the Finite-Difference Method 5. Discretization Using The Finite-Volume Method 6. Assembly of Discrete System and Application of Boundary Conditions 7. Solution of Discrete System 8. Grid Convergence 9. Dealing with Nonlinearity 10. Direct and Iterative Solvers 11. Iterative Convergence 12. Numerical Stability

1

Applications of CFD CFD is useful in a wide variety of applications and here we note a few to give you an idea of its use in industry. The simulations shown below have been performed using the FLUENT software. CFD can be used to simulate the flow over a vehicle. For instance, it can be used to study the interaction of propellers or rotors with the aircraft fuselage The following figure shows the prediction of the pressure field induced by the interaction of the rotor with a helicopter fuselage in forward flight. Rotors and propellers can be represented with models of varying complexity.

The temperature distribution obtained from a CFD analysis of a mixing manifold is shown below. This mixing manifold is part of the passenger cabin ventilation system on the Boeing 767. The CFD analysis showed the effectiveness of a simpler manifold design without the need for field testing.

Bio-medical engineering is a rapidly growing field and uses CFD to study the circulatory and respiratory systems. The following figure shows pressure contours and a cutaway view that reveals velocity vectors in a blood pump that assumes the role of heart in open-heart surgery.

CFD is attractive to industry since it is more cost-effective than physical testing. However, one must note that complex flow simulations are challenging and error-prone and it takes a lot of engineering expertise to obtain validated solutions. 2

The Strategy of CFD Broadly, the strategy of CFD is to replace the continuous problem domain with a discrete domain using a grid. In the continuous domain, each flow variable is defined at every point in the domain. For instance, the pressure p in the continuous 1D domain shown in the figure below would be given as p = p(x), 0 < x < 1 In the discrete domain, each flow variable is defined only at the grid points. So, in the discrete domain shown below, the pressure would be defined only at the N grid points. pi = p(xi ), i = 1, 2, . . . , N

Continuous Domain

Discrete Domain

0≤x≤1

x = x , x , …,x

x=0

1

x

x=1

1

2

N

x

i

xN

Grid point Coupled algebraic eqs. in discrete variables

Coupled PDEs + boundary conditions in continuous variables

In a CFD solution, one would directly solve for the relevant flow variables only at the grid points. The values at other locations are determined by interpolating the values at the grid points. The governing partial differential equations and boundary conditions are defined in terms of the continuous variables p, V~ etc. One can approximate these in the discrete domain in terms of the discrete variables pi , V~i etc. The discrete system is a large set of coupled, algebraic equations in the discrete variables. Setting up the discrete system and solving it (which is a matrix inversion problem) involves a very large number of repetitive calculations and is done by the digital computer. This idea can be extended to any general problem domain. The following figure shows the grid used for solving the flow over an airfoil.

3

Discretization Using the Finite-Difference Method To keep the details simple, we will illustrate the fundamental ideas underlying CFD by applying them to the following simple 1D equation: du + um = 0; dx

0 ≤ x ≤ 1;

u(0) = 1

(1)

We’ll first consider the case where m = 1 when the equation is linear. We’ll later consider the m = 2 case when the equation is nonlinear. We’ll derive a discrete representation of the above equation with m = 1 on the following grid: ∆x=1/3 x =2/3

x2=1/3

x1=0

3

x4=1

This grid has four equally-spaced grid points with ∆x being the spacing between successive points. Since the governing equation is valid at any grid point, we have Ã

du dx

!

+ ui = 0

(2)

i

where the subscript i represents the value at grid point xi . In order to get an expression for (du/dx)i in terms of u at the grid points, we expand ui−1 in a Taylor’s series: Ã

ui−1 Rearranging gives

Ã

du = ui − ∆x dx

du dx

!

= i

!

+ O(∆x2 ) i

ui − ui−1 + O(∆x) ∆x

(3)

The error in (du/dx)i due to the neglected terms in the Taylor’s series is called the truncation error. Since the truncation error above is O(∆x), this discrete representation is termed firstorder accurate. Since the error in (du/dx)i due to the neglected terms in the Taylor’s series is of O(∆x), this representation is termed as first-order accurate. Using (3) in (2) and excluding higherorder terms in the Taylor’s series, we get the following discrete equation: ui − ui−1 + ui = 0 ∆x

(4)

Note that we have gone from a differential equation to an algebraic equation! This method of deriving the discrete equation using Taylor’s series expansions is called the finite-difference method. However, most commercial CFD codes use the finite-volume or finite-element methods which are better suited for modeling flow past complex geometries. For example, the FLUENT code uses the finite-volume method whereas ANSYS uses the finite-element method. We’ll briefly indicate the philosophy of the finite-volume method next but will keep using the finite-difference approach to illustrate the underlying concepts since they are very similar between the different approaches with the finite-difference method being easier to understand. 4

Discretization Using The Finite-Volume Method If you look closely at the airfoil grid shown earlier, you’ll see that it consists of quadrilaterals. In the finite-volume method, such a quadrilateral is commonly referred to as a “cell” and a grid point as a “node”. In 2D, one could also have triangular cells. In 3D, cells are usually hexahedrals, tetrahedrals, or prisms. In the finite-volume approach, the integral form of the conservation equations are applied to the control volume defined by a cell to get the discrete equations for the cell. For example, the integral form of the continuity equation was given earlier. For steady, incompressible flow, this equation reduces to Z S

~ ·n ˆ dS = 0 V

(5)

ˆ is the outward normal The integration is over the surface S of the control volume and n at the surface. Physically, this equation means that the net volume flow into the control volume is zero. Consider the rectangular cell shown below. ∆x (u4,v4) face 4 ∆y

face 1

face 3

(u1,v1)

(u3,v3) face 2

y

Cell center

(u2,v2) x

The velocity at face i is taken to be V~i = ui ˆi + vi ˆj. Applying the mass conservation equation (5) to the control volume defined by the cell gives −u1 ∆y − v2 ∆x + u3 ∆y + v4 ∆x = 0 This is the discrete form of the continuity equation for the cell. It is equivalent to summing up the net mass flow into the control volume and setting it to zero. So it ensures that the net mass flow into the cell is zero i.e. that mass is conserved for the cell. Usually the values at the cell centers are stored. The face values u1 , v2 , etc. are obtained by suitably interpolating the cell-center values for adjacent cells. Similarly, one can obtain discrete equations for the conservation of momentum and energy for the cell. One can readily extend these ideas to any general cell shape in 2D or 3D and any conservation equation. Take a few minutes to contrast the discretization in the finite-volume approach to that in the finite-difference method discussed earlier. Look back at the airfoil grid. When you are using FLUENT or another finite-volume code, it’s useful to remind yourself that the code is finding a solution such that mass, momentum, energy and other relevant quantities are being conserved for each cell.

5

Assembly of Discrete System and Application of Boundary Conditions Recall that the discrete equation that we obtained using the finite-difference method was ui − ui−1 + ui = 0 ∆x Rearranging, we get −ui−1 + (1 + ∆x)ui = 0 Applying this equation to the 1D grid shown earlier at grid points i = 2, 3, 4 gives −u1 + (1 + ∆x) u2 = 0

(i = 2)

(6)

−u2 + (1 + ∆x) u3 = 0

(i = 3)

(7)

−u3 + (1 + ∆x) u4 = 0

(i = 4)

(8)

The discrete equation cannot be applied at the left boundary (i=1) since ui−1 is not defined here. Instead, we use the boundary condition to get u1 = 1

(9)

Equations (6)-(9) form a system of four simultaneous algebraic equations in the four unknowns u1 , u2 , u3 and u4 . It’s convenient to write this system in matrix form:     

1 0 0 0 −1 1 + ∆x 0 0 0 −1 1 + ∆x 0 0 0 −1 1 + ∆x

    

u1 u2 u3 u4





    =  

1 0 0 0

    

(10)

In a general situation, one would apply the discrete equations to the grid points (or cells in the finite-volume method) in the interior of the domain. For grid points (or cells) at or near the boundary, one would apply a combination of the discrete equations and boundary conditions. In the end, one would obtain a system of simultaneous algebraic equations with the number of equations being equal to the number of independent discrete variables. The process is essentially the same as above with the details being much more complex. FLUENT, like other commercial CFD codes, offers a variety of boundary condition options such as velocity inlet, pressure inlet, pressure outlet, etc. It is very important that you specify the proper boundary conditions in order to have a well-defined problem. Also, read through the documentation for a boundary condition option to understand what it does before you use it (it might not be doing what you expect). A single wrong boundary condition can give you a totally wrong result.

6

Solution of Discrete System The discrete system (10) for our own humble 1D example can be easily inverted to obtain the unknowns at the grid points. Solving for u1 , u2 , u3 and u4 in turn and using ∆x = 1/3, we get u1 = 1 u2 = 3/4 u3 = 9/16 u4 = 27/64 The exact solution for the 1D example is easily calculated to be uexact = exp(−x) The figure below shows the comparison of the discrete solution obtained on the four-point grid with the exact solution. The error is largest at the right boundary where it is equal to 14.7%. 1 Numerical solution Exact solution 0.9

0.8

u

0.7

0.6

0.5

0.4

0.3 0

0.2

0.4

0.6

0.8

1

x

In a practical CFD application, one would have thousands to millions of unknowns in the discrete system and if one uses, say, a Gaussian elimination procedure naively to invert the matrix, it would be take the computer forever to perform the calculation. So a lot of work goes into optimizing the matrix inversion in order to minimize the CPU time and memory required. The matrix to be inverted is sparse i.e. most of the entries in it are zeros since the discrete equation at a grid point or cell will contain only quantities from the neighboring points or cells. A CFD code would store only the non-zero values to minimize memory usage. It would also generally use an iterative procedure to invert the matrix; the longer one iterates, the closer one gets to the true solution for the matrix inversion.

7

Grid Convergence While developing the finite-difference approximation for the 1D example, we saw that the truncation error in our discrete system is O(∆x). So one expects that as the number of grid points is increased and ∆x is reduced, the error in the numerical solution would decrease and the agreement between the numerical and exact solutions would get better. Let’s consider the effect of increasing the number of grid points N on the numerical solution of the 1D problem. We’ll consider N = 8 and N = 16 in addition to the N = 4 case solved previously. We can easily repeat the assembly and solution steps for the discrete system on each of these additional grids. The following figure compares the results obtained on the three grids with the exact solution. As expected, the numerical error decreases as the number of grid points is increased. 1 N=4 N=8 N=16 Exact solution

0.9

0.8

u

0.7

0.6

0.5

0.4

0.3 0

0.2

0.4

0.6

0.8

1

x

When the numerical solutions obtained on different grids agree to within a level of tolerance specified by the user, they are referred to as “grid converged” solutions. The concept of grid convergence applies to the finite-volume approach also where the numerical solution, if correct, becomes independent of the grid as the cell size is reduced. It is very important that you investigate the effect of grid resolution on the solution in every CFD problem you solve. Never trust a CFD solution unless you have convinced yourself that the solution is grid converged to an acceptance level of tolerance (which would be problem dependent).

8

Dealing with Nonlinearity The momentum conservation equation for a fluid is nonlinear due to the convection term (V~ · ∇)V~ . Phenomena such as turbulence and chemical reaction introduce additional nonlinearities. The highly nonlinear nature of the governing equations for a fluid makes it challenging to obtain accurate numerical solutions for complex flows of practical interest. We will demonstrate the effect of nonlinearity by setting m = 2 in our simple 1D example (1): du + u2 = 0; 0 ≤ x ≤ 1; u(0) = 1 dx A first-order finite-difference approximation to this equation, analogous to that in (4) for m = 1, is ui − ui−1 (11) + u2i = 0 ∆x This is a nonlinear algebraic equation with the u2i term being the source of the nonlinearity. The strategy that is adopted to deal with nonlinearity is to linearize the equations about a guess value of the solution and to iterate until the guess agrees with the solution to a specified tolerance level. We’ll illustrate this on the above example. Let ugi be the guess for ui . Define ∆ui = ui − ugi Rearranging and squaring this equation gives u2i = u2gi + 2ugi ∆ui + (∆ui )2 Assuming that ∆ui ¿ ugi , we can neglect the ∆u2i term to get u2i ' u2gi + 2ugi ∆ui = u2gi + 2ugi (ui − ugi ) Thus, u2i ' 2ugi ui − u2gi The finite-difference approximation (11) after linearization becomes ui − ui−1 + 2ugi ui − u2gi = 0 ∆x

(12)

Since the error due to linearization is O(∆u2 ), it tends to zero as ug → u. In order to calculate the finite-difference approximation (12), we need guess values ug at the grid points. We start with an initial guess value in the first iteration. For each subsequent iteration, the u value obtained in the previous iteration is used as the guess value. Iteration 1: u(1) g = Initial guess (1) Iteration 2: u(2) g = u .. . (l−1) Iteration l: u(l) g = u The superscript indicates the iteration level. We continue the iterations until they converge. We’ll defer the discussion on how to evaluate convergence until a little later. This is essentially the process used in CFD codes to linearize the nonlinear terms in the conservations equations, with the details varying depending on the code. The important points to remember are that the linearization is performed about a guess and that it is necessary to iterate through successive approximations until the iterations converge.

9

Direct and Iterative Solvers We saw that we need to perform iterations to deal with the nonlinear terms in the governing equations. We next discuss another factor that makes it necessary to carry out iterations in practical CFD problems. Verify that the discrete equation system resulting from the finite-difference approximation (12) on our four-point grid is     

1 0 0 0 −1 1 + 2∆x ug2 0 0 0 −1 1 + 2∆x ug3 0 0 0 −1 1 + 2∆x ug4

    

u1 u2 u3 u4





    =  

1 ∆x u2g2 ∆x u2g3 ∆x u2g4

    

(13)

In a practical problem, one would usually have millions of grid points or cells so that each dimension of the above matrix would be of the order of a million (with most of the elements being zeros). Inverting such a matrix directly would take a prohibitively large amount of memory. So instead, the matrix is inverted using an iterative scheme as discussed below. Rearrange the finite-difference approximation (12) at grid point i so that ui is expressed in terms of the values at the neighboring grid points and the guess values: ui =

ui−1 + ∆x u2gi 1 + 2 ∆x ugi

If a neighboring value at the current iteration level is not available, we use the guess value for it. Let’s say that we sweep from right to left on our grid i.e. we update u4 , then u3 and (l) finally u2 in each iteration. In the mth iteration, ui−1 is not available while updating um i and so we use the guess value u(l) for it instead: gi−1 2

(l) ui

=

(l) u(l) gi−1 + ∆x ugi (l)

1 + 2 ∆x ugi

(14)

Since we are using the guess values at neighboring points, we are effectively obtaining only an approximate solution for the matrix inversion in (13) during each iteration but in the process have greatly reduced the memory required for the inversion. This tradeoff is good strategy since it doesn’t make sense to expend a great deal of resources to do an exact matrix inversion when the matrix elements depend on guess values which are continuously being refined. In an act of cleverness, we have combined the iteration to handle nonlinear terms with the iteration for matrix inversion into a single iteration process. Most importantly, as the iterations converge and ug → u, the approximate solution for the matrix inversion tends towards the exact solution for the inversion since the error introduced by using ug instead of u in (14) also tends to zero. Thus, iteration serves two purposes: 1. It allows for efficient matrix inversion with greatly reduced memory requirements. 2. It is necessary to solve nonlinear equations. In steady problems, a common and effective strategy used in CFD codes is to solve the unsteady form of the governing equations and “march” the solution in time until the solution converges to a steady value. In this case, each time step is effectively an iteration, with the the guess value at any time level being given by the solution at the previous time level. 10

Iterative Convergence Recall that as ug → u, the linearization and matrix inversion errors tends to zero. So we continue the iteration process until some selected measure of the difference between ug and u, refered to as the residual, is “small enough”. We could, for instance, define the residual R as the RMS value of the difference between u and ug on the grid:

R≡

v u N uX u (ui − ugi )2 u t i=1

N

It’s useful to scale this residual with the average value of u in the domain. An unscaled residual of, say, 0.01 would be relatively small if the average value of u in the domain is 5000 but would be relatively large if the average value is 0.1. Scaling ensures that the residual is a relative rather than an absolute measure. Scaling the above residual by dividing by the average value of u gives v  u N uX u (ui − ugi )2  u  t i=1    R=  N    





  N   N X 

   =  

ui

i=1

v u N u X tN (ui − ugi )2 i=1 N X

(15) ui

i=1

For the nonlinear 1D example, we’ll take the initial guess at all grid points to be equal to the value at the left boundary i.e. u(1) = 1. In each iteration, we update ug , sweep g from right to left on the grid updating, in turn, u4 , u3 and u2 using (14) and calculate the residual using (15). We’ll terminate the iterations when the residual falls below 10−9 (which is referred to as the convergence criterion). Take a few minutes to implement this procedure in MATLAB which will help you gain some familiarity with the mechanics of the implementation. The variation of the residual with iterations obtained from MATLAB is shown below. Note that logarithmic scale is used for the ordinate. The iterative process converges to a level smaller than 10−9 in just 6 iterations. In more complex problems, a lot more iterations would be necessary for achieving convergence. 0

10

−2

10

Residual

−4

10

−6

10

−8

10

−10

10

1

2

3 4 Iteration number

11

5

6

The solution after 2,4 and 6 iterations and the exact solution are shown below in the right figure. It can easily be verified that the exact solution is given by uexact =

1 x+1

The solutions for iterations 4 and 6 are indistinguishable on the graph. This is another indication that the solution has converged. The converged solution doesn’t agree well with the exact solution because we are using a coarse grid for which the truncation error is relatively large. The iterative convergence error, which is of order 10−9 , is swamped out by the truncation error of order 10−1 . So driving the residual down to 10−9 when the truncation error is of order 10−1 is a waste of computing resources. In a good calculation, both errors would be of comparable level and less than a tolerance level chosen by the user. The agreement between the numerical and exact solutions should get much better on refining the grid as was the case for m = 1. 1 Iteration 2 Iteration 4 Iteration 6 Exact

0.95 0.9 0.85

u

0.8 0.75 0.7 0.65 0.6 0.55 0.5 0

0.2

0.4

0.6

0.8

1

x

Some points to note: 1. Different codes use slightly different definitions for the residual. Read the documentation to understand how the residual is calculated. 2. In the FLUENT code, residuals are reported for each conservation equation. A discrete conservation equation at any cell can be written in the form LHS = 0. For any iteration, if one uses the current solution to compute the LHS, it won’t be exactly equal to zero, with the deviation from zero being a mesaure of how far one is from achieving convergence. So FLUENT calculates the residual as the (scaled) mean of the absolute value of the LHS over all cells. 3. The convergence criterion you choose for each conservation equation is problem- and code-dependent. It’s a good idea to start with the default values in the code. One may then have to tweak these values.

12

Numerical Stability In our previous 1D example, the iterations converged very rapidly with the residual falling below the convergence criterion of 10−9 in just 6 iterations. In more complex problems, the iterations converge more slowly and in some instances, may even diverge. One would like to know a priori the conditions under which a given numerical scheme converges. This is determined by performing a stability analysis of the numerical scheme. A numerical method is referred to as being stable when the iterative process converges and as being unstable when it diverges. It is not possible to carry out an exact stability analysis for the Euler or Navier-Stokes equations. But a stability analysis of simpler, model equations provides useful insight and approximate conditions for stability. As mentioned earlier, a common strategy used in CFD codes for steady problems is to solve the unsteady equations and march in time until the solution converges to a steady state. A stability analysis is usually performed in the context of time-marching. While using time-marching to a steady state, we are only interested in accurately obtaining the asymptotic behavior at large times. So we would like to take as large a time-step ∆t as possible to reach the steady state in the least number of time-steps. There is usually a maximum allowable time-step ∆tmax beyond which the numerical scheme is unstable. If ∆t > ∆tmax , the numerical errors will grow exponentially in time causing the solution to diverge from the steady-state result. The value of ∆tmax depends on the numerical discretization scheme used. There are two classes of numerical shemes, explicit and implicit, with very different stability characteristics which we’ll briefly discuss next. Explicit and Implicit Schemes The difference between explicit and implicit schemes can be most easily illustrated by applying them to the wave equation ∂u ∂u +c =0 ∂t ∂x where c is the wavespeed. One possible way to discretize this equation at grid point i and time-level n is uni − un−1 un−1 − un−1 i−1 i +c i = O(∆t, ∆x) (16) ∆t ∆x The crucial thing to note here is that the spatial derivative is evaluated at the n−1 time-level. Solving for uni gives · µ ¶¸ µ ¶ c∆t c∆t n−1 n n−1 ui = 1 − ui + ui−1 (17) ∆x ∆x This is an explicit expression i.e. the value of uni at any grid point can be calculated directly from this expression without the need for any matrix inversion. The scheme in (16) is known as an explicit scheme. Since uni at each grid point can be updated independently, these schemes are easy to implement on the computer. On the downside, it turns out that this scheme is stable only when c∆t ≤1 C≡ ∆x where C is called the Courant number. This condition is refered to as the Courant-FriedrichsLewy or CFL condition. While a detailed derivation of the CFL condition through stability analysis is outside the scope of the current discussion, it can seen that the coefficient of uin−1

13

in (17) changes sign depending on whether C > 1 or C < 1 leading to very different behavior in the two cases. The CFL condition places a rather severe limitation on ∆tmax . In an implicit scheme, the spatial derivative term is evaluated at the n time-level: un − uni−1 uni − un−1 i +c i = O(∆t, ∆x) ∆t ∆x In this case, we can’t update uni at each grid point independently. We instead need to solve a system of algebraic equations in order to calculate the values at all grid points simultaneously. It can be shown that this scheme is unconditionally stable so that the numerical errors will be damped out irrespective of how large the time-step is. The stability limits discussed above apply specifically to the wave equation. In general, explicit schemes applied to the Euler or Navier-Stokes equations have the same restriction that the Courant number needs to be less than or equal to one. Implicit schemes are not unconditonally stable for the Euler or Navier-Stokes equations since the nonlinearities in the governing equations often limit stability. However, they allow a much larger Courant number than explicit schemes. The specific value of the maximum allowable Courant number is problem dependent. Some points to note: 1. CFD codes will allow you to set the Courant number (which is also referred to as the CFL number) when using time-stepping. Taking larger time-steps leads to faster convergence to the steady state, so it is advantageous to set the Courant number as large as possible within the limits of stability. 2. You may find that a lower Courant number is required during startup when changes in the solution are highly nonlinear but it can be increased as the solution progresses. 3. Under-relaxation for non-timestepping

14

Turbulence Modeling There are two radically different states of flows that are easily identified and distinguished: laminar flow and turbulent flow. Laminar flows are characterized by smoothly varying velocity fields in space and time in which individual “laminae” (sheets) move past one another without generating cross currents. These flows arise when the fluid viscosity is sufficiently large to damp out any perturbations to the flow that may occur due to boundary imperfections or other irregularities. These flows occur when at low-to-moderate values of the Reynolds number. In contrast, turbulent flows are characterized by large, nearly random fluctuations in velocity and pressure in both space and time. These fluctuations arise from instabilities that grow until nonlinear interactions cause them to break down into finer and finer whirls that eventually are dissipated (into heat) by the action of viscosity. Turbulent flows occur in the opposite limit of high Reynolds numbers. (a)

2.3

(b)

2.2

0.2

2.0

ylabel

ylabel

2.1

0.0

1.9

PSfrag replacements -0.2

1.8

PSfrag replacements u t

u t u0 100 t

1.7

0

20

40

60

80

xlabel

-0.4 0

20

40

60

80

100

xlabel

(c)

0.12

0.10

ylabel

0.08

0.06

0.04

PSfrag replacements u02 t

0.02

0.00 0

20

40

60

80

100

xlabel

Figure 1: Example of a time history of a component of a fluctuating velocity at a point in a turbulent flow. (a) Shows the velocity, (b) shows the fluctuating component of velocity u0 ≡ u − u and (c) shows the square of the fluctuating velocity. Dashed lines in (a) and (c) indicate the time averages. A typical time history of the flow variable u at a fixed point in space is shown in Fig. 1(a). The dashed line through the curve indicates the “average” velocity. We can define three types of averages: 1. Time average 15

2. Volume average 3. Ensemble average The most mathematically general average is the ensemble average, in which you repeat a given experiment a large number of times and average the quantity of interest (say velocity) at the same position and time in each experiment. For practical reasons, this is rarely done. Instead, a time or volume average (or combination of the two) is made with the assumption that they are equivalent to the ensemble average. For the sake of this discussion, let us define the time average for a stationary flow1 as 1 Zτ u(y) ≡ τlim u(y, t)dt →∞ 2τ −τ

(18)

The deviation of the velocity from the mean value is called the fluctuation and is usually defined as u0 ≡ u − u (19) Note that by definition u0 = 0 (the average of the fluctuation is zero). Consequently, a better measure of the strength of the fluctuation is the average of the square of a fluctuating variable. Figures 1(b) and 1(c) show the time evolution of the velocity fluctuation, u0 , and the square of that quantity, u02 . Notice that the latter quantity is always greater than zero as is its average. The equations governing a turbulent flow are precisely the same as for a laminar flow; however, the solution is clearly much more complicated in this regime. The approaches to solving the flow equations for a turbulent flow field can be roughly divided into two classes. Direct numerical simulations (DNS) use the speed of modern computers to numerically integrate the Navier Stokes equations, resolving all of the spatial and temporal fluctuations, without resorting to modeling. In essence, the solution procedure is the same as for laminar flow, except the numerics must contend with resolving all of the fluctuations in the velocity and pressure. DNS remains limited to very simple geometries (e.g., channel flows, jets and boundary layers) and is extremely expensive to run.2 The alternative to DNS found in most CFD packages (including FLUENT) is to solve the Reynolds Averaged Navier Stokes (RANS) equations. RANS equations govern the mean velocity and pressure. Because these quantities vary smoothly in space and time, they are much easier to solve; however, as will be shown below, they require modeling to “close” the equations and these models introduce significant error into the calculation. To demonstrate the closure problem, we consider fully developed turbulent flow in a channel of height 2H. Recall that with RANS we are interested in solving for the mean velocity u(y) only. If we formally average the Navier Stokes equations and simplify for this geometry we arrive at the following d2 u(y) du0 v 0 1 dp + =ν dy ρ dx dy 2 1

(20)

A stationary flow is defined as one whose statistics are not changing in time. An example of a stationary flow is steady flow in a channel or pipe. 2 The largest DNS to date was recently published by Kaneda et al., Phys. Fluids 15(2):L21–L24 (2003); they used 40963 grid point, which corresponds roughly to 0.5 terabytes of memory per variable!

16

subject to the boundary conditions du =0, dy y = H u=0, y = 0

(21) (22)

The quantity u0 v 0 , known as the Reynolds stress,3 is a higher-order moment that must be modeled in terms of the knowns (i.e., u(y) and its derivatives). This is referred to as the “closure” approximation. The quality of the modeling of this term will determine the reliability of the computations.4 Turbulence modeling is a rather broad discipline and an in-depth discussion is beyond the scope of this introduction. Here we simply note that the Reynolds stress is modeled in terms of two turbulence parameters, the turbulent kinetic energy k and the turbulent energy dissipation rate ² defined below ´ 1 ³ 02 u + v 02 + w02 2 Ã ! Ã ! Ã ! Ã ! Ã ! Ã ! 0 2 0 2 0 2 0 2 0 2 0 2 ∂u ∂u ∂u ∂v ∂v ∂v ² ≡ ν + + + + + ∂x ∂y ∂z ∂x ∂y ∂z

k ≡

Ã

+

∂w0 ∂x

!2

Ã

∂w0 + ∂y

!2

Ã

∂w0 + ∂z

!2  

(23)

(24)

where (u0 , v 0 , w0 ) is the fluctuating velocity vector. The kinetic energy is zero for laminar flow and can be as large as 5% of the kinetic energy of the mean flow in a highly turbulent case. The family of models is generally known as k–² and they form the basis of most CFD packages (including FLUENT). We will revisit turbulence modeling towards the end of the semester.

3

Name after the same Osborne Reynolds from which we get the Reynolds number. Notice that if we neglect the Reynolds stress the equations reduce to the equations for laminar flow; thus, the Reynolds stress is solely responsible for the difference in the mean profile for laminar (parabolic) and turbulent (blunted) flows. 4

17

Problem Set for “Intro to CFD” Notes Consider the following differential equation d2 u − 2 u3 = 0; 2 dx

0 ≤ x ≤ 9;

u(0) = 1,

u(9) = 0.1

• Apply the finite-difference method to this equation to get a linearized difference equation at grid point i away from the boundary. Note that a second-order difference approximation for the second-derivative is Ã

d2 u dx2

!

= i

³ ´ ui−1 − 2ui + ui+1 2 + O ∆x ∆x2

• Assemble the discrete system of equations for a four-point grid into a matrix system of the form [A]{u} = {b} where {u} = {u1 u2 u3 u4 }T • Develop a MATLAB program to solve the finite-difference equations on a grid with N points. Apply this code to obtain the solution on a 4-point grid (∆x = 3). For the initial guess, use a linear variation between the two boundary values. Converge your solution until the residual is below 10−6 . Plot the residuals vs. iteration number. Hint: In MATLAB, initialize all elements of [A] to zero. For row i of [A] when 2 ≤ i ≤ N − 1, you need to set only the elements Ai,i−1 , Ai,i and Ai,i+1 . • Plot the finite-difference solution obtained on the 4-point grid and compare it with the exact solution 1 uexact = x+1 • Use your MATLAB program to obtain the solution on a 7-point grid (∆x = 1.5). Plot the solution and compare it with the solution for the 4-point grid and the exact solution.

1

Fluent Tutorial - Laminar Pipe Flow

Laminar Pipe Flow Author: Rajesh Bhaskaran E-mail: [email protected] Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Problem Specification

Consider fluid flowing through a circular pipe of contant cross-section. The pipe diameter D=0.2 m and length L=8 m. The inlet velocity Vin=1 m/ s. Consider the velocity to be constant over the inlet cross-section. The fluid exhausts into the ambient atmosphere which is at a pressure of 1 atm. Take density ρ=1 kg/ m3 and coefficient of viscosity µ= 2 x 10-3 kg/(ms). The Reynolds number Re based on the pipe diameter is

where Vavg is the average velocity at the inlet, which is 1m/s in this case. Solve this problem using FLUENT. Plot the centerline velocity, wall skin-friction http://instruct1.cit.cornell.edu/courses/fluent/pipe1/index.htm (1 of 2)11/7/2005 6:32:02 PM

Fluent Tutorial - Laminar Pipe Flow

coefficient, and velocity profile at the outlet. Validate your results. Note: The values used for the inlet velocity and flow properties are chosen for convenience rather than to reflect reality. The key parameter value to focus on is the Reynolds no.

Preliminary Analysis We expect the viscous boundary layer to grow along the pipe starting at the inlet. It will eventually grow to fill the pipe completely (provided that the pipe is long enough). When this happens, the flow becomes fully-developed and there is no variation of the velocity profile in the axial direction, x (see figure below). One can obtain a closed-form solution to the governing equations in the fullydeveloped region. You should have seen this in the Introduction to Fluid Mechanics course. We will compare the numerical results in the fully-developed region with the corresponding analytical results. So it's a good idea for you to go back to your textbook in the Intro course and review the fully-developed flow analysis. What are the values of centerline velocity and friction factor you expect in the fully-developed region based on the analytical solution? What is the solution for the velocity profile?

We'll create the geometry and mesh in GAMBIT which is the preprocessor for FLUENT, and then read the mesh into FLUENT and solve for the flow solution. Go to Step 1: Create Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/index.htm (2 of 2)11/7/2005 6:32:02 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 1: Create Geometry in GAMBIT If you would prefer to skip the mesh generation steps, you can create a working directory (see below), download the mesh from here (right click and save as pipe.msh) into the working directory and go straight to step 4. Strategy for Creating Geometry In order to create the rectangle, we will first create the vertices at the four corners. We'll then join adjacent vertices by straight lines to form the "edges" of the rectangle. Lastly, we'll create a "face" corresponding to the area enclosed by the edges. In Step 2, we'll mesh the face i.e. the rectangle. Note that in 3D problems, you'll have to form a "volume" from faces. So the hierarchy of geometric objects in GAMBIT is vertices -> edges -> faces -> volumes. Create a Working Directory Create a folder called pipe in a convenient location. We'll use this as the working folder in which files created during the session will be stored. Note for ACCEL computer lab users: Each user gets his/her own 100 MB of disk space under S: at ACCEL. You can put your files in S: and it'll be accessible from any computer. This is where you should put files that you want to keep and access later on. http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (1 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

Start GAMBIT Start your command prompt. Start > Run In Windows NT/2000/XP: Type cmd and press enter. In Windows 95/98/ME: Type command and press enter. Navigate your way to your working folder. For example, if you created a folder named fluent on drive S: in Windows, type cd S:\fluent at the command prompt and press Enter. Start GAMBIT by typing gambit -id pipe at the command prompt and pressing Enter. If this doesn't work, try typing the full pathname to the GAMBIT executable: c:\fluent.inc\ntbin\ntx86\gambit -id pipe This brings up the GAMBIT interface and tells GAMBIT to use pipe as the default prefix for all files created during the session. In Windows, the Exceed X-server starts up before the GAMBIT interface comes up. Exceed is a third-party application needed to render the interface in Windows (GAMBIT was originally developed under Unix). To make best use of screen real estate, move the windows and resize them so that you approximate this screen arrangement. This way you can read instructions in the browser window and implement them in GAMBIT. You can resize the text in the browser window to your taste and comfort: In Internet Explorer: Menubar > View > Text Size, then choose the appropriate font size. In Netscape: Menubar > View > Increase Font or Menubar > View > Decrease Font. The GAMBIT Interface consists of the following: ●

Main Menu Bar:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (2 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

Note that the job name pipe appears after ID: in the title bar of the Utility Menu. ●

Operation Toolpad:

We'll more or less work our way across the Operation Toolpad as we go through the solution steps. Notice that as each of the top buttons is selected, a different "sub-pad" appears. The Geometry sub-pad is shown in the above snaphot. ●

Global Control Toolpad:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (3 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

The Global Control Toolpad has options such as Fit to Screen Undo creation. ●

and

that are very handy during the course of geometry and mesh

GAMBIT Graphics:

This is the window where the graphical results of operations are displayed. ●

GAMBIT Description Panel:

The Description Panel contains descriptions of buttons or objects that the mouse is pointing to. Move your mouse over some buttons and notice the corresponding text in the Description Panel. ●

GAMBIT Transcript Window:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (4 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

This is the window to which output from GAMBIT commands is written and which provides feedback on the actions taken by GAMBIT as you perform operations. If, at some point, you are not sure you clicked the right button or entered a value correctly, this is where to look to figure out what you just did. You can click on the arrow button in the upper right hand corner to make the Transcript window full-sized. You can click on the arrow again to return the window to its original size. Go ahead, give this a try.

Select Solver Specify that the mesh to be created is for use with FLUENT 6.0: Main Menu > Solver > FLUENT 5/6 Verify this has been done by looking in the Transcript Window where you should see:

The boundary types that you'll be able to select in the third step depends on the solver selected. We can assume that the flow is axisymmetric. The problem domain is:

where r and x are the radial and axial coordinates, respectively. Strategy for creating geometry We will put the origin of the coordinate system at the lower left corner of the rectangle. The coordinates of the corners are shown in the figure below: http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (5 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

We will first create four vertices at the four corners and join adjacent vertices to get the edges of the rectangle. We will then form a face that covers the area of the rectangle. Create Vertices Find the buttons described below by pointing the mouse at each of the buttons and reading the Description Window. Operation Toolpad > Geometry Command Button Button

> Vertex Command

> Create Vertex

Notice that the Create Vertex button has already been selected by default. After you select a button under a sub-pad, it becomes the default when you go to a different sub-pad and then come back to the sub-pad. Create the vertex at the lower-left corner of the rectangle: Next to x:, enter value 0. Next to y:, enter value 0. Next to z:, enter value 0 (these values should be defaults). Click Apply. This creates the vertex (0,0,0) which is displayed in the graphics window.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (6 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

In the Transcript window, GAMBIT reports that it "Created vertex: vertex.1". The vertices are numbered vertex.1, vertex.2 etc. in the order in which they are created. Repeat this process to create three more vertices: Vertex 2: (0,0.1,0) Vertex 3: (8,0.1,0) Vertex 4: (8,0,0) Note that for a 2D problem, the z-coordinate can always be left to the default value of 0. Operation Toolpad > Global Control > Fit to Window Button

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (7 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

This fits the four vertices of the rectangle we have created to the size of the Graphics Window.

(Click picture for larger image) Create Edges We'll now connect appropriate pairs of vertices to form edges. To select any entity in GAMBIT, hold down the Shift key and click on the entity. Operation Toolpad > Geometry Command Button

> Edge Command Button

> Create Edge Select two vertices that make up an edge of this rectangle by holding down the http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (8 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

Shift button and clicking on the corresponding vertices. As each vertex is picked, it will appear red in the Graphics Window. Then let go of the Shift button. We can check the selected vertices by clicking on the up-arrow next to Vertices:.

This will bring up a window containing the vertices that have been selected. Vertices can be moved from the Available and Picked lists by selecting them and then pressing the left or right arrow buttons.

After the correct vertices have been selected, click Close, then click Apply in the Create Straight Edge window. Repeat this process to create a rectangle.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (9 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

(Click picture for larger image) Create Face Operation Toolpad > Geometry Command Button

> Face Command Button

> Form Face To form a face out of the area enclosed by the four lines, we need to select the four ledges that enclose this area. This can be done by holding down the Shift key, clicking on each line (notice that the currently selected line appears red), and then releasing the Shift key after all four lines have been selected. Alternatively, an easier way to do this would be to click on the up arrow next to edges:

This will bring up the Edge List window. Click on All-> to select all of the edges at once. Click Close.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (10 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #1

Click Apply to create the face. Go to Step 2: Mesh Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step1.htm (11 of 11)11/7/2005 6:36:06 PM

Fluent Tutorial - Laminar Pipe Flow Step #2

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 2: Mesh Geometry in GAMBIT We'll now create a mesh on the rectangular face with 100 divisions in the axial direction and 5 divisions in the radial direction. We'll first mesh the four edges and then the face. The desired grid spacing is specified through the edge mesh. Mesh Edges Operation Toolpad > Mesh Command Button

> Edge Command Button

>

Mesh Edges Shift-click or bring up the Edge List window and select both the vertical lines. If this is difficult, one can zoom in on an edge by holding down the Ctrl button, clicking and dragging the mouse to specify an area to zoom in on, and releasing the Ctrl button. To return to the main view, click on the Global Control Toolpad > Fit to Window Button again. Once a vertical edge has been selected, select Interval Count from the drop down box that says Interval Size in the Mesh Edges Window. Then, in the box to the left of this combo box, enter 5 for the interval count.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step2.htm (1 of 3)11/7/2005 6:36:18 PM

Fluent Tutorial - Laminar Pipe Flow Step #2

Click Apply. Nodes appear on the edges showing that they are divided into 5.

(Click picture for larger image) Repeat the same process for the horizontal edges, but with an interval count of 100. Now that the edges are meshed, we are ready to create a 2-D mesh for the face. Mesh Face Operation Toolpad > Mesh Command Button

> Face Command Button

>

Mesh Faces Shift left-click on the face or use the up arrow next to Faces to select the face. Click Apply.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step2.htm (2 of 3)11/7/2005 6:36:18 PM

Fluent Tutorial - Laminar Pipe Flow Step #2

(Click picture for larger image) Go to Step 3: Specify Boundary Types in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step2.htm (3 of 3)11/7/2005 6:36:18 PM

Fluent Tutorial - Laminar Pipe Flow Step #3

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 3: Specify Boundary Types in GAMBIT

Create Boundary Types We'll next set the boundary types in GAMBIT. The left edge is the inlet of the pipe, the right edge the outlet, the top edge the wall, and the bottom edge the axis. Operation Toolpad > Zones Command Button

> Specify Boundary Types

Command Button This will bring up the Specify Boundary Types window on the Operation Panel. We will first specify that the left edge is the inlet. Under Entity:, pick Edges so that GAMBIT knows we want to pick an edge (face is default).

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step3.htm (1 of 4)11/7/2005 6:36:49 PM

Fluent Tutorial - Laminar Pipe Flow Step #3

Now select the left edge by Shift-clicking on it. The selected edge should appear in the yellow box next to the Edges box you just worked with as well as the Label/Type list right under the Edges box. Next to Name:, enter inlet. For Type:, select VELOCITY_INLET. Click Apply. You should see the new entry appear under Name/Type box near the top of the window.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step3.htm (2 of 4)11/7/2005 6:36:49 PM

Fluent Tutorial - Laminar Pipe Flow Step #3

Repeat this process for the other three edges according to the following table: Edge Position

Name

Type

Left

inlet

VELOCITY_INLET

Right

outlet

PRESSURE_OUTLET

Top

wall

WALL

Bottom

centerline

AXIS

You should have the following edges in the Name/Type list when finished:

Save and Export Main Menu > File > Save Main Menu > File > Export > Mesh... Type in pipe.msh for the File Name:. Select Export 2d Mesh since this is a 2 dimensional mesh. Click Accept. Check pipe.msh has been created in your working directory.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step3.htm (3 of 4)11/7/2005 6:36:49 PM

Fluent Tutorial - Laminar Pipe Flow Step #3

Go to Step 4: Set Up Problem in FLUENT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step3.htm (4 of 4)11/7/2005 6:36:49 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 4: Set Up Problem in FLUENT Launch Fluent 6.0 Start > Programs > Fluent Inc > FLUENT 6.0 Select 2ddp from the list of options and click Run. The "2ddp" option is used to select the 2-dimensional, double-precision solver. In the double-precision solver, each floating point number is represented using 64 bits in contrast to the single-precision solver which uses 32 bits. The extra bits increase not only the precision but also the range of magnitudes that can be represented. The downside of using double precision is that it requires more memory. Import Grid Main Menu > File > Read > Case... Navigate to the working directory and select the pipe.msh file. This is the mesh file that was created using the preprocessor GAMBIT in the previous step. FLUENT reports the mesh statistics as it reads in the mesh:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (1 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

Check the number of nodes, faces (of different types) and cells. There are 500 quadrilateral cells in this case. This is what we expect since we used 5 divisions in the radial direction and 100 divisions in the axial direction while generating the grid. So the total number of cells is 5*100 = 500. Also, take a look under zones. We can see the four zones inlet, outlet, wall, and centerline that we defined in GAMBIT. Check and Display Grid First, we check the grid to make sure that there are no errors. Main Menu > Grid > Check Any errors in the grid would be reported at this time. Check the output and make sure that there are no errors reported. Check the grid size: Main Menu > Grid > Info > Size The following statistics should appear:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (2 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

Display the grid: Main Menu > Display > Grid... Make sure all 5 items under Surfaces is selected. Then click Display. The graphics window opens and the grid is displayed in it. You can now click Close in the Grid Display menu to get back some desktop space. The graphics window will remain. Some of the operations available in the graphics window are: Translation: The grid can be translated in any direction by holding down the Left Mouse Button and then moving the mouse in the desired direction. Zoom In: Hold down the Middle Mouse Button and drag a box from the Upper Left Hand Corner to the Lower Right Hand Corner over the area you want to zoom in on. Zoom Out: Hold down the Middle Mouse Button and drag a box anywhere from the Lower Right Hand Corner to the Upper Left Hand Corner. Use these operations to zoom into the grid to obtain the view shown below. Note: The zooming operations cannot be performed without a middle mouse button.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (3 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

(Click picture for larger image) You can also look at specific parts of the grid by choosing the boundaries you wish to view under Surfaces (click to select and click again to deselect a specific boundary). Click Display again when you have selected your boundaries. For example, the wall, outlet, and centerline boundaries have been selected in the following view:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (4 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

These options will display the graph:

(Click picture for larger image)

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (5 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

For convenience, the while the

button next to Surfaces selects all of the boundaries

deselects all of the boundaries at once.

Close the Grid Display Window when you are done. Define Solver Properties Main Menu > Define > Models > Solver Choose Axisymmetric under Space. We'll use the defaults of segregated solver, implicit formulation, steady flow and absolute velocity formulation. Click OK.

Main Menu > Define > Models > Viscous Laminar flow is the default. So we don't need to change anything in this menu. Click Cancel. Main Menu > Define > Models > Energy For incompressible flow, the energy equation is decoupled from the continuity and momentum equations. We need to solve the energy equation only if we are http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (6 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

interested in determining the temperature distribution. We will not deal with temperature in this example. So leave the Energy Equation unselected and click Cancel to exit the menu. Define Material Properties Main Menu > Define > Materials... Change Density to 1.0 and Viscosity to 2e-3. These are the values that we specified under Problem Specification. We'll take both as constant.

Click Change/Create. Define Operating Conditions Main Menu > Define > Operating Conditions... For all flows, FLUENT uses gauge pressure internally. Any time an absolute pressure is needed, it is generated by adding the operating pressure to the gauge pressure. We'll use the default value of 1 atm (101,325 Pa) as the Operating Pressure. Click Cancel to leave the default in place.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (7 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

Define Boundary Conditions We'll now set the value of the velocity at the inlet and pressure at the outlet. Main Menu > Define > Boundary Conditions... We note here that the four types of boundaries we defined are specified as zones on the left side of the Boundary Conditions Window. The centerline zone should be selected by default. Make sure it is, then make sure the Type of this boundary is selected as axis and click Set.... Notice that there is nothing to set for the axis. Click OK. Move down the list and select inlet under Zone. Note that FLUENT indicates that the Type of this boundary is velocity-inlet. Recall that the boundary type for the "inlet" was set in GAMBIT. If necessary, we can change the boundary type set previously in GAMBIT in this menu by selecting a different type from the list on the right.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (8 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #4

Click on Set.... Enter 1 for Velocity Magnitude. Click OK. This sets the velocity of the fluid entering at the left boundary. The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the outlet gauge pressure = outlet absolute pressure - operating pressure = 0. Choose outlet under Zone. The Type of this boundary is pressure-outlet. Click on Set.... The default value of the Gauge Pressure is 0. Click Cancel to leave the default in place. Lastly, click on wall under Zones and make sure Type is set as wall. Click on each of the tabs and note that only momentum can be changed under the current conditions. This will not be so under later exercises so make a note of the location of these options. Click OK. Click Close to close the Boundary Conditions menu. Go to Step 5: Solve! Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step4.htm (9 of 9)11/7/2005 6:37:26 PM

Fluent Tutorial - Laminar Pipe Flow Step #5

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 5: Solve! We'll use a second-order discretization scheme. Main Menu > Solve > Controls > Solution... Change Momentum to Second Order Upwind.

Click OK. Set Initial Guess http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step5.htm (1 of 5)11/7/2005 6:38:25 PM

Fluent Tutorial - Laminar Pipe Flow Step #5

Initialize the flow field to the values at the inlet: Main Menu > Solve > Initialize > Initialize... In the Solution Initialization menu that comes up, choose inlet under Compute From. The Axial Velocity for all cells will be set to 1 m/s, the Radial Velocity to 0 m/s and the Gauge Pressure to 0 Pa. These values have been taken from the inlet boundary condition.

Click Init. This completes the initialization. Set Convergence Criteria FLUENT reports a residual for each governing equation being solved. The residual is a measure of how well the current solution satisfies the discrete form of each governing equation. We'll iterate the solution until the residual for each equation falls below 1e-6. Main Menu > Solve > Monitors > Residual... Change the residual under Convergence Criterion for continuity, x-velocity, and y-velocity, all to 1e-6. Also, under Options, select Plot. This will plot the residuals in the graphics window as they are calculated.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step5.htm (2 of 5)11/7/2005 6:38:25 PM

Fluent Tutorial - Laminar Pipe Flow Step #5

Click OK. This completes the problem specification. Save your work: Main Menu > File > Write > Case... Type in pipe.cas for Case File. Click OK. Check that the file has been created in your working directory. If you exit FLUENT now, you can retrieve all your work at any time by reading in this case file. Iterate Until Convergence Start the calculation by running 100 iterations: Main Menu > Solve > Iterate... In the Iterate Window that comes up, change the Number of Iterations to 100. Click Iterate. The residuals for each iteration is printed out as well as plotted in the graphics

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step5.htm (3 of 5)11/7/2005 6:38:25 PM

Fluent Tutorial - Laminar Pipe Flow Step #5

window as they are calculated.

(Click picture for larger image) The residuals fall below the specified convergence criterion of 1e-6 in 46 iterations.

Save the solution to a data file: Main Menu > File > Write > Data... Enter pipe.dat for Data File and click OK. Check that the file has been created in your working directory. You can retrieve the current solution from this data file at any time. Go to Step 6: Analyze Results

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step5.htm (4 of 5)11/7/2005 6:38:25 PM

Fluent Tutorial - Laminar Pipe Flow Step #5

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step5.htm (5 of 5)11/7/2005 6:38:25 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 6: Analyze Results Centerline Velocity We'll plot the variation of the axial velocity along the centerline. Main Menu > Plot > XY Plot... Make sure that Position on X Axis is set under Options, and X is set to 1 and Y to 0 under Plot Direction. This tells FLUENT to plot the x-coordinate value on the abscissa of the graph. Under Y Axis Function, pick Velocity... and then in the box under that, pick Axial Velocity. Please note that X Axis Function and Y Axis Function describe the x and y axes of the graph, which should not be confused with the x and y directions of the pipe. Finally, select centerline under Surfaces since we are plotting the axial velocity along the centerline. This finishes setting up the plotting parameters.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (1 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Click Plot. This brings up a plot of the axial velocity as a function of the distance along the centerline of the pipe.

(Click picture for larger image) In the graph that comes up, we can see that the velocity reaches a constant value beyond a certain distance from the inlet. This is the fully-developed flow region.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (2 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Change the axes extents: In the Solution XY Plot menu, click on Axes.... Under Options, deselect Auto Range. The boxes under Range should now be activated. Select X under Axis. Enter 1 for Minimum and 3 for Maximum under Range. We'll turn on the grid lines to help estimate where the flow becomes fully developed. Check the boxes next to Major Rules and Minor Rules under Options. Click Apply.

Now, pick Y under Axis and once again deselect Auto Range under Options, then enter 1.8 for Minimum and 2.0 for Maximum under Range. Also select Major Rules and Minor Rules to turn on the grid lines in the Y direction. We have now finished specifying the range for each axes, so click Apply and then Close. Go back to the Solution XY Plot menu and click Plot to replot the graph with the new axes extents. We can see that the fully-developed region starts at around x=3m and the centerline velocity in this region is 1.93 m/s.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (3 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

(Click picture for larger image) Saving the Plot Save the data from this plot: In the Solution XY Plot Window, check the Write to File box under Options. The Plot button should have changed to Write.... Click on Write.... Enter vel.xy as the XY File Name and click OK. Check that this file has been created in your FLUENT working directory. Now, save a picture of the plot: Leave the Solution XY Plot Window and the Graphics Window open and click on: File > Hardcopy ... Under Format, choose one of the following three options: EPS - if you have a postscript viewer, this is the best choice. EPS allows you to save the file in vector mode, which will offer the best viewable image quality. After selecting EPS, choose Vector from under File Type. TIFF - this will offer a high resolution image of your graph. However, the image file generated will be rather large, so this is not recommended if you do not have http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (4 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

a lot of room on your storage device. JPG - this is small in size and viewable from all browsers. However, the quality of the image is not particularly good. After selecting your desired image format and associated options, click on Save... Enter vel.eps, vel.tif, or vel.jpg depending on your format choice and click OK. Verify that the image file has been created in your working directory. You can now copy this file onto a disk or print it out for your records. Coefficient of Skin Friction FLUENT provides a large amount of useful information in the online help that comes with the software. Let's probe the online help for information on calculating the coefficient of skin friction. Main Menu > Help > User's Guide Index... Click on S in the links on top and scroll down to skin friction coefficient. Click on the second 965 link (normally, you would have to go through each of the links until you find what you are looking for). We can see an excerpt on the skin coefficient as well as the equation for calculating it. Click on the link for Reference Values panel, which tells us how to set the reference values used in calculating the skin coefficient.

Set the reference values: http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (5 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Main Menu > Report > Reference Values... Select inlet under Compute From to tell FLUENT to calculate the reference values from the values at inlet. Check that density is 1 kg/m3 and velocity is 1 m/ s. (Alternately, you could have just typed in the appropriate values). Click OK.

Go back to the Solution XY Plot menu. Uncheck Write to File under Options since we want to plot to the window right now. We can leave the other Options and Plot Direction as is since we are still plotting against the x distance along the pipe.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (6 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Under the Y Axis Function, pick Wall Fluxes..., and then Skin Friction Coefficient in the box under that. Under Surfaces, select wall and unselect centerline by clicking on them. Reset axes ranges: Go to Axes... and re-select Auto-Range for the Y axis. Set the range of the X axis from 1 to 8 by selecting X under Axis, entering 1 under Minimum, and 8 under Maximum in the Range box (remember to de-select Auto-Range first if it is checked). Click Apply, Close, and then Plot in the Solution XY Plot Window.

(Click picture for larger image) We can see that the fully developed region is reached at around x=3.0m and the skin friction coefficient in this region is around 1.54. Compare the numerical value of 1.54 with the theoretical, fully-developed value of 0.16. Save the data from this plot: Pick Write to File under Options and click Write.... Enter cf.xy for XY File and click OK. Velocity Profile We'll next plot the velocity at the outlet as a function of the distance from the center of the pipe. To do this, we have to set the y axis of the graph to be the y http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (7 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

axis of the pipe (the radial direction). To plot the position variable on the y axis of the graph, uncheck Position on X Axis under Options and choose Position on Y Axis instead. To make the position variable the radial distance from the centerline, under Plot Direction, change X to 0 and Y to 1. To plot the axial velocity on the x axis of the graph, for X Axis Function, pick Velocity... and Axial Velocity under that. Since we want to plot this at the outlet boundary, pick outlet under Surfaces. Change both the x and y axes to Auto-Range. Uncheck Write to File under Options so that we can see the graph. Click Plot.

(Click picture for larger image) Does this look like a parabolic profile? Save the data from this plot: Pick Write to File under Options and click Write.... Enter profile.xy for XY File and click OK. To see how the velocity profile changes in the developing region, let us add the profiles at x=0.6m (x/D=3) and x=0.12m (x/D=6) to the above plot. First, create a line at x=0.6m using the Line/Rake tool:

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (8 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Main Menu > Surface > Line/Rake We'll create a straight line from (x0,y0)=(0.6,0) to (x1,y1)=(0.6,0.1). Select Line Tool under Options. Enter x0=0.6, y0=0, x1=0.6, y1=0.1. Enter line1 under New Surface Name. Click Create.

To see the line just created, select Main Menu > Display > Grid... Note that line1 appears in the list of surfaces. Select all surfaces except defaultinterior. Click Display. This displays all surfaces but not the mesh cells. Zoom into the region near the inlet to see the line created at x=0.6m. (Click here to review the zoom functionality discussion in step 4.) line1 is the white vertical line to the right in the figure below.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (9 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

Similarly, create a vertical line called line2 at x=1.2; (x0,y0)=(1.2,0) to (x1,y1)= (1.2,0.1) in this case. Display it in the graphics window to check that it has been created correctly. Now we can plot the velocity profiles at x=0.6m (x/D=3) and x=0.12m (x/D=6) along with the outlet profile. In the Solution XY plot menu, use the same settings as above. Under Surfaces, in addition to outlet, select line1 and line2. Select Node Values under Options. Click Plot. Your symbols might be different from the ones below. You can change the symbols and line styles under the Curves... button. Click on Help in the Curves menu if you have problems figuring out how to change these settings.

The profile three diameters downstream is fairly close to the fully-developed profile at the outlet. If you redo this plot using the fine grid results in the next step, you'll see that this is not actually the case. The coarse grid used here doesn't capture the boundary layer development properly and underpredicts the development length. In FLUENT, you can choose to display the computed cell-center values or values that have been interpolated to the nodes. By default, the Node Values option is turned on, and the interpolated values are displayed. Node-averaged data curves may be somewhat smoother than curves for cell values. Velocity Vectors

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (10 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

One can plot vectors in the entire domain, or on selected surfaces. Let us plot the velocity vectors for the entire domain to see how the flow develops downstream of the inlet. Main Menu > Display > Vectors... > Display Zoom into the region near the inlet. (Click here to review the zoom functionality discussion in step 4.) The length and color of the arrows represent the velocity magnitude. The vector display is more intelligible if one makes the arrows shorter as follows: Change Scale to 0.4 in the Vectors menu and click Display. You can reflect the plot about the axis to get an expanded sectional view: Main Menu > Display > Views... Under Mirror Planes, only the axis surface is listed since that is the only symmetry boundary in the present case. Select axis and click Apply. Close the Views window.

The velocity vectors provide a picture of how the flow develops downstream of the inlet. As the boundary layer grows, the flow near the wall is retarded by viscous friction. Note the sloping arrows in the near wall region close to the inlet. This indicates that the slowing of the flow in the near-wall region results in an injection of fluid into the region away from the wall to satisfy mass conservation. Thus, the velocity outside the boundary layer increases.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (11 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #6

By default, one vector is drawn at the center of each cell. This can be seen by turning on the grid in the vector plot: Select Draw Grid in the Vectors menu and then click Display in the Grid Display as well as the Vectors menus. Velocity vectors are the default, but you can also plot other vector quantities. See section 27.1.3 of the user manual for more details about the vector plot functionality. Go to Step 7: Refine Mesh Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step6.htm (12 of 12)11/7/2005 6:39:21 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Laminar Pipe Flow Problem Specification 1. Start-up and preliminary set-up 2. Create Geometry 3. Mesh Geometry 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 7: Refine Mesh It is very important to assess the dependence of your results on the mesh used by repeating the same calculation on different meshes and comparing the results. We will re-do the previous calculation on a 100x10 mesh and compare the results with the 100x5 mesh used previously. If you prefer to skip the GAMBIT steps for modifying the mesh, download the 100x10 mesh (by rightclicking on the link) and go directly to the FLUENT analysis discussed below. Modify Mesh in GAMBIT The 100x5 mesh is saved as pipe.dbs in your working directory. Bring up the command prompt window as in step 1. To copy pipe.dbs to pipe2.dbs, at the command prompt, type copy pipe.dbs pipe2.dbs We will work with pipe2.dbs in order to retain pipe.dbs as is. Launch GAMBIT with pipe2.dbs as the input file by typing: gambit pipe2.dbs Note in the main menu bar that pipe2 is the ID of this job. So files created during this session will have that prefix. We will delete the face mesh, modify the edge meshes for the vertical edges and remesh the face. To delete the original face mesh, choose Operation Toolpad > Mesh Command Button > Face Command Button > Delete

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (1 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Face Meshes In the Delete Face Meshes Window that comes up, uncheck the Remove unused lower mesh box. This tells GAMBIT to remove the face mesh only and keep the edge meshes associated with the face mesh. Since we will be changing the mesh on only two edges of the rectangle, there is no need to redo the meshes for all four edges. Select the only face of the rectangle by shift-clicking on it and then click Apply.

Modify Edge Meshes To change the number of divisions on the vertical edges from 5 to 10, choose: Operation Toolpad > Mesh Command Button > Edge Command Button > Mesh Edges Select the two vertical edges by holding down the Shift button, clicking on each in turn, and then releasing the Shift button. Select Interval count from the box under Spacing that says Interval size. Change the number in the box next to the Interval count box from 5 to 10. Make sure that the Remove old mesh box is checked under Options. This will make sure that the old edge meshes are erased before the new edge meshes are created. Click Apply.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (2 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Remember that you can zoom in by holding down Ctrl, dragging a box across the area you want to zoom in on, and then releasing Ctrl. Do this now and make sure that the vertical edges have 10 divisions.

(Click image for larger picture) Recreate Face Mesh Operation Toolpad > Mesh Command Button > Face Command Button > Mesh Faces Shift-click on the face in the Graphics Window to select it. Click Apply.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (3 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(Click here for larger picture) Save & Export Main Menu > File > Save Main Menu > File > Export > Mesh... Type in pipe2.msh for the File Name:. Select Export 2d Mesh option. Click Accept. Finer Mesh Analysis Repeat steps 4 and 5 of this tutorial with the 100x10 mesh (a tad on the repetitious side but consider it good practice). One you obtain the solution, plot the variation of the centerline velocity along the x-direction as described in step 6. Compare this result with that obtained on the previous mesh which is stored in the vel.xy file created earlier. To do this, after centerline velocity has been plotted, click on Load File... in the Solution XY Plot window. Navigate to your working folder if necessary and click on vel.xy and OK. Click Plot. In the graphics window, we can see both of the lines plotted in the same window. Adjust the axes so that you can zoom in on the beginning of the fully developed http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (4 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

region.

(Click image for larger picture) In the centerline velocity plot above, the white and red symbols represent the results on the 100x10 mesh and 100x5 meshes, respectively. The centerline velocity in the fully-developed region for the finer mesh is 1.98 m/s. This value agrees better with the analytical value of 2 m/s that the value of 1.93 m/s obtained on the coarser mesh. Save the data for this plot as vel2.xy. The velocity result gets more accurate on refining the mesh as expected. Plot the skin friction coefficient as described in step 6. Compare the result with that obtained on the 100x5 mesh by loading it from cf.xy.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (5 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(Click here for larger image) The finer mesh provides a skin friction coefficient of 0.159 in the fully-developed region, which is much closer to the theoretical value of 0.16 than the corresponding coarser mesh value of 0.154. Save the data for this plot as cf2. xy. Similarly, plot the velcoity profile at the outlet and compare with the coarser grid result in out.xy. The two results compare well with the greatest deviation occurring near the centerline. Save the data for this plot as out2.xy.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (6 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(Click picture for larger image) If you repeat the calculation on a 100x20 mesh, you'll see that the results on the two finest meshes are grid-independent to a high level of accuracy. In the plots below, the white, red and green symbols correspond to the 100x20, 100x10 and 100x5 meshes, respectively. Velocity along centerline:

(Click picture for larger image)

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (7 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Skin Coefficient:

(Click picture for larger image) Outlet Velocity:

(Click picture for larger image) Go to Problem 1

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (8 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/step7.htm (9 of 9)11/7/2005 6:40:22 PM

Fluent Tutorial - Problem #1

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Problem 1 Problem a) Consider the problem solved in this tutorial. At the exit of the pipe, we can define the error in the calculation of the centerline velocity as:

where Uc is the centerline value from FLUENT and Uexact is the exact analytical value for fully-developed laminar pipe flow. We expect the error to take the form:

where the coefficient K and the power p depend upon the method . Consider the solutions obtained on the 100x5, 100x10, and 100x20 meshes. Using MATLAB, perform a linear least squares fit of:

to obtain the coefficients K and p. You can look up the value of Uexact from any introductory textbook in fluid mechanics such as Fluid Mechanics by F. White. Explain why your values make sense.

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/ps1.htm (1 of 2)11/7/2005 6:40:29 PM

Fluent Tutorial - Problem #1

b) Repeat the above exercise using the "first-order upwind" scheme for the momentum equation. Contrast the value of p obtained in this case with the previous one and explain your results briefly (2-3 sentences). Hints Note that the first or second order discretization applies only to the convective terms in the Navier-Stokes equations. The viscous terms are always second order accurate. Go to Problem 2 Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/ps1.htm (2 of 2)11/7/2005 6:40:29 PM

Fluent Tutorial - Problem #2

Laminar Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Problem 2 Problem On your finest mesh (100x20), rerun the FLUENT calculation for Reynolds numbers 200 and 500 using the "second-order upwind" scheme. Note: change the Reynolds number by adjusting the molecular viscosity µ. Plot the centerline velocity and skin friction as a function of axial distance for Re = 100 (previous problem), 200, and 500. Plot all three cases on the same graph for comparsion. Briefly explain the trend you observe as the Reynolds number increases. Hints If you've saved the 100x20 mesh in step 7, you can load it into FLUENT again without having to recreate it in GAMBIT. Solve for µ for each of the Reynolds number first and then think about what steps need to be changed. Solution Your solution should look something like the plots below: Centerline Velocity

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/ps2.htm (1 of 3)11/7/2005 6:41:05 PM

Fluent Tutorial - Problem #2

(Click picture for larger image) Skin Coefficient

(Click picture for larger image) Back to Problem Specification

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/ps2.htm (2 of 3)11/7/2005 6:41:05 PM

Fluent Tutorial - Problem #2

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe1/ps2.htm (3 of 3)11/7/2005 6:41:05 PM

Fluent Tutorial: Turbulent Pipe Flow

Fluent 6.0: Turbulent Pipe Flow Author: Rajesh Bhaskaran E-mail: [email protected] Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Problem Specification

Let's revisit the pipe flow example considered in the previous exercise. As before, the inlet velocity is 1 m/s, the fluid exhausts into the ambient atmosphere and density is 1 kg/m3. For µ = 2 x 10-5 kg/(ms), the Reynolds no. based on the pipe diameter and average velocity at the inlet is

At this Reynolds number, the flow is usually completely turbulent. A turbulent flow exhibits small-scale fluctuations in time. It is usually not possible to resolve these fluctuations in a CFD calculation. So the flow variables such as velocity, pressure, etc. are time-averaged. Unfortunately, the timeaveraged governing equations are not closed i.e. they contain fluctuating quantities which need to be modeled using a turbulence model. No turbulence model is currently available that is valid for all types of flows and so it is necessary to choose and fine-tune a model for particular classes of flows. In this http://instruct1.cit.cornell.edu/courses/fluent/pipe2/index.htm (1 of 2)11/7/2005 6:41:13 PM

Fluent Tutorial: Turbulent Pipe Flow

exercise, you'll be turned loose on variants of the k-ε model. But in the real world, tread with great caution: you should evaluate the validity of your calculations using a turbulence model very carefully (which, ahem, means that there is no getting away from studying fluid dynamics concepts and numerical methods very carefully). FLUENT should not be used as a black box. The k-ε models consist of two differential equations: one each for the turbulent kinetic energy k and turbulent dissipation ε. These two equations have to be solved along with the time-averaged continuity, momentum and energy equations. So turbulent flow calculations are much more difficult and time-consuming than laminar flow calculations. This is an exercise to whet your appetite for turbulent flow calculations. Go to Step 1: Create Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/index.htm (2 of 2)11/7/2005 6:41:13 PM

Compressible Flow in Nozzle - Problem Specification

Compressible Flow in a Nozzle Author: Rajesh Bhaskaran E-mail: [email protected] Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

**Under construction** Problem Specification

Consider air flowing at high-speed through a convergent-divergent nozzle having a circular cross-sectional area, A, that varies with axial distance from the throat, x, according to the formula A = 0.1 + x2; -0.5 < x < 0.5

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/index.htm (1 of 2)11/7/2005 6:41:22 PM

Compressible Flow in Nozzle - Problem Specification

where A is in square meters and x is in meters. The stagnation pressure po at the inlet is 101,325 Pa. The stagnation temperature To at the inlet is 300 K. The static pressure p at the exit is 3,738.9 Pa. We will calculate the Mach number, pressure and temperature distribution in the nozzle using FLUENT and compare the solution to quasi-1D nozzle flow results. The Reynolds number for this highspeed flow is large. So we expect viscous effects to be confined to a small region close to the wall. So it is reasonable to model the flow as inviscid. Go to Step 1: Create Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/index.htm (2 of 2)11/7/2005 6:41:22 PM

Flow over an Airfoil - Problem Specification

Flow over an Airfoil Author: Rajesh Bhaskaran E-mail: [email protected] Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Problem Specification

Consider air flowing over the given airfoil. The freestream velocity is 50 m/s and the angle of attack is 5o. Assume standard sea-level values for the freestream properties: Pressure = 101,325 Pa Density = 1.2250 kg/m3 Temperature = 288.16 K Kinematic viscosity v = 1.4607e-5 m2/s Determine the lift and drag coefficients under these conditions using FLUENT. Go to Step 1: Create Geometry in GAMBIT

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/index.htm (1 of 2)11/7/2005 6:41:32 PM

Flow over an Airfoil - Problem Specification

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/index.htm (2 of 2)11/7/2005 6:41:32 PM

Fluent Tutorial - Forced Convection on a Flat Plate

Forced Convection over a Flat Plate Author: Matthew Offerman E-mail: [email protected] Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Problem Specification

In our problem, we have a flat plate at a constant temperature of 413K. The plate is infinitely wide. The velocity profile of the fluid is uniform at the point x = 0. The free stream temperature of the fluid is 353K. The assumption of incompressible flow becomes invalid increasingly less valid for larger temperature differences between the plate and freestream. Because of this, we will treat this as a compressible flow. We will analyze a fluid flow with the following non-dimensional conditions:

http://instruct1.cit.cornell.edu/courses/fluent/plate/index.htm (1 of 3)11/7/2005 6:41:54 PM

Fluent Tutorial - Forced Convection on a Flat Plate

In order to achieve these flow conditions, we will use these free stream flow conditions:

According to the ideal gas law, this temperature and pressure result in the following freestream density:

These flow conditions do not necessarily represent a realistic fluid. Rather, they are chosen to provide the Prandtl and Reynolds numbers specified above. This will make calculations simpler throughout this tutorial. Solve this problem in FLUENT. Validate the solution by plotting the y+ values at the plate. Also plot the velocity profile at x = 1m. Then plot Reynolds Number vs. Nusselt Number. Compare the accuracy of your results from FLUENT with empirical correlations.

Preliminary Analysis We expect the turbulent boundary layer to grow along the plate. As the boundary layer grows in thickness, the rate of heat transfer (q'') and thus the heat transfer coefficient (h) will decrease.

http://instruct1.cit.cornell.edu/courses/fluent/plate/index.htm (2 of 3)11/7/2005 6:41:54 PM

Fluent Tutorial - Forced Convection on a Flat Plate

We will compare the numerical results with experimentally-derived heat transfer correlations. We will create the geometry and mesh in GAMBIT, read the mesh into FLUENT, and solve the flow problem. Go to Step 1: Create Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/index.htm (3 of 3)11/7/2005 6:41:54 PM

Fluent Tutorial - Turbulent Pipe Flow Step #1

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 1: Create Geometry in GAMBIT If you would prefer to skip the mesh creation steps, you can download the mesh here (right click and select Save As...) and go straight to step 4. Since the flow is axisymmetric, the geometry is a rectangle as in the Laminar Pipe Flow tutorial. We will first use a 100x30 mesh (i.e. 100 divisions in the axial direction and 30 divisions in the radial direction). We could create this mesh from scratch, as in the Laminar Pipe Flow tutorial, but instead, we will modify the previous 100x5 to get the 100x30 mesh. This will introduce you to the art of modifying meshes in GAMBIT. Go to Step 2: Mesh Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step1.htm11/7/2005 6:47:41 PM

Fluent Tutorial - Turbulent Pipe Flow Step #2

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 2: Mesh Geometry in GAMBIT Launch GAMBIT Create a folder called pipe2 at a convenient location to use as your working folder. Copy your pipe.dbs file containing the 100x5 mesh from the Laminar Pipe Flow tutorial to this folder. If you don't have this file, here's a copy (right-click and select Save As...). Rename this file as pipe100x30.dbs. We'll modify this file to obtain the mesh for the turbulent pipe flow simulation. Start GAMBIT in your working folder by typing gambit -id pipe100x30 at the command prompt. (Refer to step 1 of the Laminar Pipe Flow tutorial if you've forgotten how to do this.) Recall that GAMBIT will use the id pipe100x30 as the default prefix for all files created during this session. To make best use of screen real estate, resize the GAMBIT and browser windows so that you approximate this screen arrangement. This way you can read instructions in the browser window and implement them in GAMBIT. The mesh from the previous tutorial should be displayed. To fit the mesh to the size of the window, select: Global Control > Fit to Window Delete Previous Face Mesh http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step2.htm (1 of 6)11/7/2005 6:48:48 PM

Fluent Tutorial - Turbulent Pipe Flow Step #2

The first step we have to do is remove the old face mesh. Recall that the face mesh is built on top of meshed edges, thereby forming the grid. In this case, we don't want to remove the underlying edge meshes. So to delete only the face mesh, select: Operation Toolpad > Mesh Command Button

> Face Command Button

>

Delete Face Meshes Since we only have one face, shift-click any edge of the bounding rectangle to select the face mesh we want to delete. The face you have selected should become red and the name of the face listed in the Delete Face Meshes window in the drop down box. Now, because we don't want to delete the edge meshes, uncheck the Remove unused lower mesh box.

Click Apply. Check that the face mesh has been removed in the GAMBIT Graphics Window. Remesh Edges Since we are still going to use 100 divisions for the horizontal edges, we only need to remesh the vertical edges. To resolve the much higher gradient near the wall for a turbulent flow, we will use smaller grid spacing near the wall by employing grid stretching. For each vertical edge, we will specify the division length next to the wall to be 0.001 and the total number of divisions to be 30. In GAMBIT, each edge has a direction associated with it as shown by an arrow. We will set this arrow to point away from the wall. Then the division next to the wall becomes the "First Length" http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step2.htm (2 of 6)11/7/2005 6:48:48 PM

Fluent Tutorial - Turbulent Pipe Flow Step #2

and the division next to the axis becomes the "Last Length". We'll specify the "First Length" to be 0.001 and the total number of divisions to be 30 for the edge; GAMBIT will automatically calculate the appropriate value for the "Last Length". Operation Toolpad > Mesh Command Button

> Edge Command Button

Select the vertical edges by shift-clicking on each of them. Notice the red arrow that appears on the edge when it is selected. Make sure these arrows are pointing down (towards the axis and away from the wall). If both of these arrows are pointing in the wrong direction, you can reverse them by clicking Reverse next to Pick with links. However, if only one of the edges needs to be reversed, you can do that by shift-middle clicking on that edge. You'll have to zoom in to be able to do this. (Recall that you can zoom in by holding down the Ctrl key and then dragging a box with your left mouse button. Double-click with the middle mouse button to go back to the last view.) For Type in the Mesh Edges menu, select First Length from the drop down box. Next to Length, type in 0.001. We want 30 divisions on each of the vertical edges; so select Interval Count from the drop down box under Spacing and enter 30 in the text box to its left.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step2.htm (3 of 6)11/7/2005 6:48:48 PM

Fluent Tutorial - Turbulent Pipe Flow Step #2

Click Apply. If you zoom in on the right edge, you should see the following:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step2.htm (4 of 6)11/7/2005 6:48:48 PM

Fluent Tutorial - Turbulent Pipe Flow Step #2

(Click picture for larger image) Note that the mesh spacing is smaller near the wall as indicated by the blue circles on the edge. Recreate Face Mesh The next step is to recreate the face mesh on top of these edge meshes. This is the same procedure as in the previous tutorial: Operation Toolpad > Mesh Command Button

> Face Command Button

Mesh Faces Shift left-click on the face and click Apply. The meshed area should look like this after zooming in:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step2.htm (5 of 6)11/7/2005 6:48:48 PM

>

Fluent Tutorial - Turbulent Pipe Flow Step #2

(Click picture for larger image) Go to Step 3: Specify Boundary Types in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step2.htm (6 of 6)11/7/2005 6:48:48 PM

Fluent Tutorial - Turblent Pipe Flow Step #3

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 3: Specify Boundary Types in GAMBIT Recall that we created the following boundary types for the 100x5 mesh in the Laminar Pipe Flow tutorial: Edge Position

Name

Type

Left

inlet

VELOCITY_INLET

Right

outlet

PRESSURE_OUTLET

Top

wall

WALL

Bottom

centerline

AXIS

These boundary types are still retained even if the edges are remeshed since the edges themselves were not deleted. To verify this: Operation Toolpad > Zones Command Button

> Specify Boundary Types

Check that the following is in the Name/Type list:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step3.htm (1 of 2)11/7/2005 6:48:53 PM

Fluent Tutorial - Turblent Pipe Flow Step #3

Additionally, click on show labels. You should now be able to see each of the boundary names on the respective edges in the Graphics Window. Verify that the boundary types specification is correct. Save and Export As in the previous tutorial, we will now save and export the mesh. Main Menu > File > Save Main Menu > File > Export > Mesh... Type in pipe100x30.msh for the File Name:. Select Export 2d Mesh since this is a two-dimensional mesh. Click Accept. Check that pipe100x30.msh has been created in your working directory. Exit GAMBIT: Main Menu > File > Exit and save the session. Go to Step 4: Set Up Problem in Fluent Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step3.htm (2 of 2)11/7/2005 6:48:53 PM

Fluent Tutorial - Turblent Pipe Flow Step #2

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 4: Set Up Problem in FLUENT Launch FLUENT Start > Programs > Fluent Inc > FLUENT 6.0 Select 2ddp (2D, double-precision version) from the list of options and click Run. Import File Main Menu > File > Read > Case... Navigate to your working directory and select the pipe100x30.msh file. Click OK. The following should appear in the FLUENT window:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (1 of 6)11/7/2005 6:49:33 PM

Fluent Tutorial - Turblent Pipe Flow Step #2

Check the number of nodes, faces (of different types) and cells. There are 3000 quadrilateral cells in this case. This is what we'd expect since we used 30 divisions in the radial direction and 100 divisions in the axial direction while generating the grid. So the total number of cells is 30*100 = 3000. Also, take a look under zones. We can see the four zones inlet, outlet, wall, and centerline that we defined in GAMBIT. Grid First, we check the grid to make sure that there are no errors. Main Menu > Grid > Check Any errors in the grid would be reported at this time. Check the output and make sure that there are no errors reported. Then select: Main Menu > Grid > Info > Size The following summary about the grid should appear:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (2 of 6)11/7/2005 6:49:33 PM

Fluent Tutorial - Turblent Pipe Flow Step #2

Let's look at the grid: Main Menu > Display > Grid... Make sure all 5 items under Surfaces are selected. Then click Display. Remember that we can zoom in using the middle mouse button. Zoom in and admire the grid. How many divisions are there in the radial direction?

(Click picture for larger image) Recall that you can look at specific components of the grid by choosing the entities you wish to view under Surfaces (click to select and click again to deselect a specific boundary). Click Display again when you have selected your boundaries. Use this feature and make sure that the boundary labels correspond to the correct geometric entities. Close the Grid Display Window when you are done. Define Solver Properties

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (3 of 6)11/7/2005 6:49:33 PM

Fluent Tutorial - Turblent Pipe Flow Step #2

Main Menu > Define > Models > Solver Choose Axisymmetric under Space. As in the laminar pipe flow tutorial, we'll use the defaults of segregated solver, implicit formulation, steady flow and absolute velocity formulation. Click OK. Main Menu > Define > Models > Viscous... Choose k-epsilon (2eqn). Notice that the window expands and additional options are displayed on choosing the k-epsilon turbulence model. Under NearWall Treatment, pick Enhanced Wall Treatment so that we may get a more accurate result.

Click OK. Main Menu > Define > Models > Energy... The energy equation can be turned off since this is an incompressible flow and we are not interested in the temperature. Make sure no tick mark appears next to Energy Equation.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (4 of 6)11/7/2005 6:49:33 PM

Fluent Tutorial - Turblent Pipe Flow Step #2

Main Menu > Define > Materials... Change Density to 1.0 and Viscosity to 2e-5. These are the values in the Problem Specification. We'll take both as constant.

Click Change/Create. Define Operating Conditions Main Menu > Define > Operating Conditions... Recall that for all flows, FLUENT uses the gauge pressure internally. Any time an absolute pressure is needed, it is generated by adding the operating pressure to the gauge pressure. We'll use the default value of 1 atm (101,325 Pa) as the Operating Pressure. Click Cancel to leave the default in place. Define Boundary Conditions We'll now set the value of the velocity at the inlet and pressure at the outlet. Main Menu > Define > Boundary Conditions... The four types of boundaries we defined are specified as zones on the left side of the Boundary Conditions Window. Recall that we don't need to set any parameters for the centerline and wall zones. Verify this by selecting each of these two zones and clicking on Set.... Choose inlet and click on Set.... Enter 1 for Velocity Magnitude. This indicates that the fluid is coming in normal to the inlet at the rate of 1 meter per second. Select Intensity and Hydraulic Diameter next to the Turbulence Specification Method. Then enter 1 for Turbulence Intensity and 0.2 for http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (5 of 6)11/7/2005 6:49:33 PM

Fluent Tutorial - Turblent Pipe Flow Step #2

Hydraulic Diameter. Click OK to set the velocity.

The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the outlet gauge pressure = outlet absolute pressure - operating pressure = 0. Choose outlet under Zone. The Type of this boundary is pressure-outlet. Click on Set.... The default value of the Gauge Pressure is 0. Click Cancel to leave the defaults in place. Note: Backflow in the Pressure Outlet menu refers to flow entering through an outlet boundary. This is not likely to happen in this case. So we don't have to set the backflow parameters. This completes the boundary condition specification. Close the Boundary Conditions menu. Go to Step 5: Solve! Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step4.htm (6 of 6)11/7/2005 6:49:33 PM

Fluent Tutorial - Turbulent Pipe Flow Step #3

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 5: Solve! We'll use second-order discretization for the momentum equation, as in the laminar pipe flow tutorial, and also for the turbulence kinetic energy equation which is part of the k-epsilon turbulence model. Main Menu > Solve > Controls > Solution... Change Discretization for Momentum, Turbulence Kinetic Energy and Turbulence Dissipation Rate (scroll down to see it) equations to Second Order Upwind.

Click OK. http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (1 of 5)11/7/2005 6:49:57 PM

Fluent Tutorial - Turbulent Pipe Flow Step #3

The order of discretization that we just set refers to the convective terms in the equations; the discretization of the viscous terms is always second-order accurate in FLUENT. Second-order discretization generally yields better accuracy while first-order discretization yields more robust convergence. If the second-order scheme doesn't converge, you can try starting the iterations with the first-order scheme and switching to the second-order scheme after some iterations. Set Initial Guess We'll use an initial guess that is constant over the entire flow domain and equal to the values at the inlet: Main Menu > Solve > Initialize > Initialize... In the Solution Initialization menu that comes up, choose inlet under Compute From. The Axial Velocity for all cells will be set to 1 m/s, the Radial Velocity to 0 m/s and the Gauge Pressure to 0 Pa. The Turbulence Kinetic Energy and Dissipation Rate (scroll down to see it) values are set from the prescribed values for the Turbulence Intensity and Hydraulic Diameter at the inlet.

Click Init. Close the Solution Initialization window. Set Convergence Criteria http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (2 of 5)11/7/2005 6:49:57 PM

Fluent Tutorial - Turbulent Pipe Flow Step #3

Recall that FLUENT reports a residual for each governing equation being solved. The residual is a measure of how well the current solution satisfies the discrete form of each governing equation. We'll iterate the solution until the residual for each equation falls below 1e-6. Main Menu > Solve > Monitors > Residual... Notice that Convergence Criterion has to be set for the k and epsilon equations in addition to the three equations in the last tutorial. Set the Convergence Criterion to be 1e-06 for all five equations being solved. Select Print and Plot under Options. This will print as well plot the residuals as they are calculated which you will use to monitor convergence.

Click OK. This completes the problem specification. Save your work: Main Menu > File > Write > Case... Type in pipe100x30.cas for Case File. Click OK. Check that the file has been

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (3 of 5)11/7/2005 6:49:57 PM

Fluent Tutorial - Turbulent Pipe Flow Step #3

created in your working directory. Iterate Until Convergence Solve for 100 iterations first. Main Menu > Solve > Iterate... In the Iterate menu that comes up, change the Number of Iterations to 100. Click Iterate. You'll find that not all residuals have fallen below 1e-6 in 100 iterations. Solve for 200 more iterations. The solution converges in a total of 229 iterations.

(Click picture for larger image) We need a larger number of iterations for convergence than in the laminar case since we have a finer mesh and are also solving additional equations from the turbulence model. Save the solution to a data file: Main Menu > File > Write > Data...

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (4 of 5)11/7/2005 6:49:57 PM

Fluent Tutorial - Turbulent Pipe Flow Step #3

Enter pipe100x30.dat for Data File and click OK. Check that the file has been created in your working directory. Go to Step 6: Analyze Results Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step5.htm (5 of 5)11/7/2005 6:49:57 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 6: Analyze Results y+ Turbulent flows are significantly affected by the presence of walls. The k-epsilon turbulence model is primarily valid away from walls and special treatment is required to make it valid near walls. The near-wall model is sensitive to the grid resolution which is assessed in the wall unit y+ (defined in section 10.9.1 of the FLUENT user manual). We'll gloss over the details for now and use the following rule of thumb: select the near-wall resolution such that y+ > 30 or < 5 for the wall-adjacent cell. Look at section 10.9, Grid Considerations for Turbulent Flow Simulations, for details. First, we need to set the reference values needed to calculate y+. Main Menu > Report > Reference Values... Select inlet under Compute From to tell FLUENT to use values at the pipe inlet for the reference values. Check that the reference value for density is 1 kg/m3, velocity is 1 m/s, and coefficient of viscosity is 2e-5 kg/m-s as given in the Problem Specification. These reference values will be used to non-dimensionalize the distance of the cell center from the wall to obtain the corresponding y+ values. Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (1 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

Let's plot y+ values for wall-adjacent cells to check how it compares with the recommendation mentioned above. Main Menu > Plot > XY Plot... Make sure that Position on X Axis is set under Options, that 1 is the value next to X, and 0 is the value next to Y and Z under Plot Direction. Recall that this tells FLUENT to plot the x-coordinate value on the abscissa of the graph. Pick Turbulence... under Y Axis Function and select Wall Yplus from the drop down list under that. Since we want the y+ value for cells adjacent to the wall of the pipe, choose wall under Surfaces.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (2 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

Click Plot.

(Click picture for larger image) As we can see, the wall y+ value is between 1.6 and 1.9 (ignoring the anamolous at the inlet). Since this is less than 5, the near-wall grid resolution is http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (3 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

acceptable. Save Plot In the Solution XY Plot Window, check the Write to File box under Options. The Plot button should have changed to the Write... button. Click on Write.... Enter yplus.xy as the filename and click OK. Check that this file has been created in your FLUENT working directory. Centerline Velocity Under Y Axis Function, pick Velocity... and then in the box under that, pick Axial Velocity. Finally, select centerline under Surfaces since we are plotting the axial velocity along the centerline. De-select wall under Surfaces. Click on Curves... in the Solution XY Plot window. Select the solid line option under Pattern as shown below. Change Weight to 2. Select the blank option under Symbol. Click Apply and Close.

s Turn on grid lines: In the Solution XY Plot window, click on Axes.... Turn on the grid by checking the boxes Major Rules and Minor Rules under Options. Click Apply. Select Y under Axis and repeat. Click Apply and Close. Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (4 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

(Click picture for larger image) We can see that the fully developed region starts around x=5m with the centerline velocity becoming constant at a value of 1.195 m/s. This is quite a bit lower than the value of 2 m/s for the laminar case. Can you explain the difference based on the physical characteristics of laminar and turbulent flows? Save the data for this plot as vel.xy. Coefficient of Skin Friction The definition of the skin friction coefficient was discussed in the laminar pipe flow tutorial. The required reference values of density and velocity have already been set when plotting y+. Go back to the Solution XY Plot Window. Under the Y Axis Function, pick Wall Fluxes..., and then Skin Friction Coefficient in the box under that. Under Surfaces, we are plotting the friction coefficient along the wall. Uncheck centerline surface. Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (5 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

(Click picture for larger image) We can see that the fully-developed value is 0.0085. Compare this with what you'd expect from the Moody chart. Save the data for this plot as cf.xy. Velocity Profile We'll plot the axial velocity at the outlet as a function of the distance from the center of the pipe. Change the plot settings so that the radial distance from the axis is plotted as the ordinate: In the Solution XY Plot window, uncheck Position on X Axis under Options and choose Position on Y Axis instead. Under Plot Direction, change X to 0 and Y to 1. For the X Axis Function i.e. the abscissa, pick Velocity... and Axial Velocity under that. Since we want to plot this at the outlet boundary, pick only outlet under Surfaces. Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (6 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #4

(Click picture for larger image) The axial velocity is maximum at the centerline and zero at the wall to satisfy the no-slip boundary condition for viscous flow. Compare qualitatively the near-wall velocity gradient normal to the wall with the laminar case. Which is larger? From this, what can you say about the relative stregths of near-wall mixing in the laminar and turbulent cases? Save this plot as profile.xy. Go to Step 7: Refine Mesh Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step6.htm (7 of 7)11/7/2005 6:50:43 PM

Fluent Tutorial - Turbulent Pipe Flow Step #5

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Step 7: Refine Mesh In order to assess the numerical accuracy of the results obtained, it is necessary to compare results on different meshes. We'll re-do the calculation on a 100x60 mesh which has twice the number of nodes in the radial direction as the 100x30 mesh. You can download the 100x60 mesh here. File > Read > Case... Navigate to your working directory elect the pipe100x60.msh file you have created. Click OK. Display the grid. Check its size. Finer Mesh Analysis Repeat steps 4, 5, and 6 of this tutorial with the finer mesh. When you get to step 6 of the tutorial, plot each of the graphs as described. However, for each of the plots, overlay the corresponding result for the coarser mesh so that we may compare them. To do this, after the plotting the finer mesh result, in the Solution XY Plot Window, click on Load File.... Navigate to your working folder, click on the appropriate filename for the previous result, eg. vel. xy for centerline velocity, and click OK. Click Plot. You'll see both results plotted in the same the graphics window.

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (1 of 4)11/7/2005 6:50:56 PM

Fluent Tutorial - Turbulent Pipe Flow Step #5

(Click picture for larger image) In the centerline velocity plot above, the white line represents the centerline velocity of the finer mesh, while the red line represents the velocity of the coarser mesh from before. As we can see, there isn't too much of a difference between the two plots. Save this plot as velt2.xy. Now, let's take a look at the coefficient of skin friction. This time, load the cft. xy file to compare against the plot. This is the coefficient of skin friction plot:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (2 of 4)11/7/2005 6:50:56 PM

Fluent Tutorial - Turbulent Pipe Flow Step #5

(Click picture for larger image) Once again, we can see that due to the fine degree of each mesh, there isn't much difference between the two plots. Save this plot as cf2.xy. Now, study the velocity of the outlet by plotting and comparing to the graph in outt.xy.

(Click picture for larger image) Once again, the finer mesh in this case doesn't offer much more precision than http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (3 of 4)11/7/2005 6:50:56 PM

Fluent Tutorial - Turbulent Pipe Flow Step #5

the coarser mesh. Save this plot as outt2.xy. Now let's take a look at the YPlus plot.

(Click picture for larger image) As we can see, there is a significant increase in the accuracy of the plot from the finer mesh. Save this plot as yplus2.xy. You may want to experiment with meshes of other granularities and compare their plots with the plots saved from the 100x30 and 100x60 meshes. In Problem 1, we will be looking at the effect of coarse meshes with uniform granularity. Go to Problem 1 Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/step7.htm (4 of 4)11/7/2005 6:50:56 PM

Fluent Tutorial - Simple Pipe Flow

Turbulent Pipe Flow Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1

Problem 1 Problem Use FLUENT to resolve the developing flow in a pipe (same configuration as was done in the tutorial) for a pipe Reynolds number of 10,000 on the following meshes: 100x5, 100x20 with uniform spacing in the radial direction. Plot the skin friction cf as a function of axial location for each grid. Compare the exit value with the expected value for fully developed flow (e.g., see White pgs. 345-346). Recall that a key question for the integrity of the mesh is the non-dimensional value of the first nodal point:

This should be either less than 4 (so that you resolve down into the viscous sublayer) or greater than 30 (where wall functions can accurately compensate for the poorly resolved viscous sublayer). Intermediate values can lead to greater errors. Calculate the value of y1+ for each mesh; use that to help explain (briefly) the trends in the agreement that you observe. Hints If you no longer have the 100x5 or 100x20 mesh, you can download them here:

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/ps1.htm (1 of 2)11/7/2005 6:51:03 PM

Fluent Tutorial - Simple Pipe Flow

pipe100x5.msh, pipe100x20.msh Back to Problem Specification Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/pipe2/ps1.htm (2 of 2)11/7/2005 6:51:03 PM

Compressible Flow in a Nozzle - Step #1

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 1: Create Geometry in GAMBIT Since the nozzle has a circular cross-section, it's reasonable to assume that the flow is axisymmetric. So the geometry to be created is two-dimensional. Start GAMBIT Create a new directory called nozzle and start GAMBIT from that directory by typing gambit -id nozzle at the command prompt. Under Main Menu, select Solver > FLUENT 5/6 since the mesh to be created is to be used in FLUENT 6.0. Create Axis Edge We'll create the bottom edge corresponding to the nozzle axis by creating the vertices A and B shown in the above figure and joining them by a straight line. Operation Toolpad > Geometry Command Button Button

> Create Vertex

Create the following two vertices: Vertex 1: (-0.5,0,0) http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (1 of 6)11/7/2005 6:51:18 PM

> Vertex Command

Compressible Flow in a Nozzle - Step #1

Vertex 2: (0.5,0,0) Operation Toolpad > Geometry Command Button

> Edge Command Button

> Create Edge Select vertex 1 by holding down the Shift button and clicking on it. Next, select vertex 2. Click Apply in the Create Straight Edge window. Create Wall Edge We'll next create the bottom edge corresponding to the nozzle wall. This edge is curved. Since A=pi r2 where r(x) is the radius of the cross-section at x and A = 0.1 + x2 for the given nozzle geometry, we get r(x) = [(0.1 + x2)/pi]0.5; -0.5 < x < 0.5 This is the equation of the curved wall. Life would have been easier if GAMBIT allowed for this equation to be entered directly to create the curved edge. Instead, one has to create a file containing the coordinates of a series of points along the curved line and read in the file. The more number of points used along the curved edge, the smoother the resultant edge. The file vert.dat contains the point definitions for the nozzle wall. Take a look at this file. The first line is 21 1 which says that there are 21 points along the edge and we are defining only 1 edge. This is followed by x,r and z coordinates for each point along the edge. The r-value for each x was generated from the above equation for r(x). The zcoordinate is 0 for all points since we have a 2D geometry. Right-click on vert.dat and select Save As... to download the file to your http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (2 of 6)11/7/2005 6:51:18 PM

Compressible Flow in a Nozzle - Step #1

working directory. Main Menu > File > Input > ICEM Input ... Next to File Name:, enter the path to the vert.dat file that you downloaded or browse to it by clicking on the Browse button. Then, check the Verticesand Edges boxes under Geometry to Create as we want to create the vertices as well as the curved edge.

Click Accept. This should create the curved edge. Here it is in relation to the vertices we created above:

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (3 of 6)11/7/2005 6:51:18 PM

Compressible Flow in a Nozzle - Step #1

(Click picture for larger image) Create Inlet and Outlet Edges Create the vertical edge for the inlet: Operation Toolpad > Geometry Command Button

> Edge Command Button

> Create Edge Shift-click on vertex 1 and then the vertex above it to create the inlet edge. Similarly, create the vertical edge for the outlet.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (4 of 6)11/7/2005 6:51:18 PM

Compressible Flow in a Nozzle - Step #1

(Click picture for larger image) Create Face Form a face out of the area enclosed by the four edges: Operation Toolpad > Geometry Command Button

> Face Command Button

> Form Face Recall that we have to shift-click on each of the edges enclosing the face and then click Apply to create the face. Save Your Work Main Menu > File > Save This will create the nozzle.dbs file in your working directory. Check that it has been created so that you will able to resume from here if necessary. Go to Step 2: Mesh Geometry in GAMBIT

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (5 of 6)11/7/2005 6:51:18 PM

Compressible Flow in a Nozzle - Step #1

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step1.htm (6 of 6)11/7/2005 6:51:18 PM

Fluent Tutorial - Compressible Flow in a Nozzle Step #2

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 2: Mesh Geometry in GAMBIT Now that we have the basic geometry of the nozzle created, we need to mesh it. We would like to create a 50x20 grid for this geometry. Mesh Edges As in the previous tutorials, we will first start by meshing the edges. Operation Toolpad > Mesh Command Button

> Edge Command Button

Mesh Edges Like the Laminar Pipe Flow Tutorial, we are going to use even spacing between each of the mesh points. We won't be using the Grading this time, so deselect the box next to Grading that says Apply. Then, change Interval Count to 20 for the side edges and Interval Count to 50 for the top and bottom edges.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step2.htm (1 of 3)11/7/2005 6:51:31 PM

>

Fluent Tutorial - Compressible Flow in a Nozzle Step #2

(Click picture for larger image) Mesh Face Now that we have the edges meshed, we need to mesh the face. Operation Toolpad > Mesh Command Button

> Face Command Button

Mesh Faces As before, select the face and click the Apply button.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step2.htm (2 of 3)11/7/2005 6:51:31 PM

>

Fluent Tutorial - Compressible Flow in a Nozzle Step #2

(Click picture for large image) Save Your Work Main Menu > File > Save Go to Step 3: Specify Boundary Types in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step2.htm (3 of 3)11/7/2005 6:51:31 PM

Compressible Flow in a Nozzle - Step #3

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 3: Specify Boundary Types in GAMBIT Specify Boundary Types Now that we have the mesh, we would like to specify the boundary conditions here in GAMBIT. Operation Toolpad > Zones Command Button

> Specify Boundary Types

Command Button This will bring up the Specify Boundary Types window on the Operation Panel. We will first specify that the left edge is the inlet. Under Entity:, pick Edges so that GAMBIT knows we want to pick an edge (face is default).

Now select the left edge by Shift-clicking on it. The selected edge should appear in the yellow box next to the Edges box you just worked with as well as the Label/Type list right under the Edges box. Next to Name:, enter inlet.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step3.htm (1 of 3)11/7/2005 6:51:51 PM

Compressible Flow in a Nozzle - Step #3

For Type:, select VELOCITY_INLET. Click Apply. You should see the new entry appear under Name/Type box near the top of the window.

Create boundary types for each of the edges as specified in the chart below:

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step3.htm (2 of 3)11/7/2005 6:51:51 PM

Compressible Flow in a Nozzle - Step #3

Edge Position

Name

Type

Left

inlet

PRESSURE_INLET

Right

outlet

PRESSURE_OUTLET

Top

wall

WALL

Bottom

centerline

AXIS

You should have the following edges in the Name/Type list when finished:

Save and Export Main Menu > File > Save Main Menu > File > Export > Mesh... Type in nozzle.msh for the File Name:. Select Export 2d Mesh since this is a 2 dimensional mesh. Click Accept. Check nozzle.msh has been created in your working directory. Go to Step 4: Set Up Problem in FLUENT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step3.htm (3 of 3)11/7/2005 6:51:51 PM

Compressible Flow in a Nozzle - Step #4

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 4: Set Up Problem in FLUENT Launch FLUENT Start > Programs > Fluent Inc > FLUENT 6.0 Select 2ddp from the list of options and click Run. Import File Main Menu > File > Read > Case... Navigate to your working directory and select the nozzle.msh file. Click OK. The following should appear in the FLUENT window:

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step4.htm (1 of 6)11/7/2005 6:52:36 PM

Compressible Flow in a Nozzle - Step #4

Check that the displayed information is consistent with our expectations of the nozzle grid. Analyze Grid Grid > Info > Size How many cells and nodes does the grid have? Display > Grid How many nodes are there in the radial direction? Are the nodes clustered towards the wall? Why? Define Properties Define > Models > Solver... Under the Solver box, select Coupled. Under Space, choose Axisymmetric.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step4.htm (2 of 6)11/7/2005 6:52:36 PM

Compressible Flow in a Nozzle - Step #4

Click OK. Define > Models > Viscous Select Inviscid under Model.

Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step4.htm (3 of 6)11/7/2005 6:52:36 PM

Compressible Flow in a Nozzle - Step #4

Define > Models > Energy The energy equation needs to be turned on since this is a compressible flow where the energy equation is coupled to the continuity and momentum equations. Make sure there is a check box next to Energy Equation and click OK.

Define > Materials Select air under Fluid materials. Under Properties, choose Ideal Gas next to Density. You should see the window expand. This means FLUENT uses the ideal gas equation of state to relate density to the static pressure and temperature.

Click Change/Create. Define > Operating Conditions http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step4.htm (4 of 6)11/7/2005 6:52:36 PM

Compressible Flow in a Nozzle - Step #4

We'll work in terms of absolute rather than gauge pressures in this example. So set Operating Pressure in the Pressure box to 0.

Click OK. It is important that you set the operating pressure correctly in compressible flow calculations since FLUENT uses it to compute absolute pressure to use in the ideal gas law. Define > Boundary Conditions Set boundary conditions for the following surfaces: axis, default-interior, fluid, inlet, outlet, wall. Select inlet under Surface and pick pressure-inlet under Type as its boundary condition. Click Set.... The Pressure Inlet window should come up.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step4.htm (5 of 6)11/7/2005 6:52:36 PM

Compressible Flow in a Nozzle - Step #4

Set the total (i.e. stagnation) pressure (noted as Gauage Total Pressure in FLUENT) and temperature at the inlet. For a subsonic inlet, Supersonic/Initial Gauge Pressure is the initial guess value for the static pressure. Calculate this initial guess value from the 1D solution. After you have entered the values, click OK to close the window. Using the same steps as above, pick pressure-outlet as the boundary condition for the outlet surface. Then, when the Pressure Outlet window comes up, set the pressure and temperature as above. Click OK. Go to Step 5: Solve! Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step4.htm (6 of 6)11/7/2005 6:52:36 PM

Compressible Flow in a Nozzle - Step #5

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 5: Solve! Now we will set the solve settings for this problem and then iterate through and actually solve it. Solve > Control > Solution Take a look at the options available. We want Second Order Upwind for the Flow (under the Discretization box).

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step5.htm (1 of 4)11/7/2005 6:52:52 PM

Compressible Flow in a Nozzle - Step #5

Make sure that is selected and click OK. Solve > Initialize As you may recall from the previous tutorials, this is where we set the initial guess values (the base case) for the iterative solution. Once again, we'll set these values to be the ones at the inlet. Select inlet under Compute From.

Click Init. http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step5.htm (2 of 4)11/7/2005 6:52:52 PM

Compressible Flow in a Nozzle - Step #5

Solve > Monitors > Residual Now we will set the residual values (the criteria for a good enough solution). Once again, we'll set this value to 1e-06.

Click OK. Solve > Iterate What does the convergence plot look like? How many iterations does it take to converge? Save case and data after you have obtained a converged solution. Go to Step 6: Analyze Results

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step5.htm (3 of 4)11/7/2005 6:52:52 PM

Compressible Flow in a Nozzle - Step #5

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step5.htm (4 of 4)11/7/2005 6:52:52 PM

Compressible Flow in a Nozzle - Step #6

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 6: Analyze Results Mach Number Plot As in the previous tutorials, we are going to plot the velocity along the centerline. However, this time, we are going to use the dimensionless Mach quantity. Plot > XY Plot We are going plot the variation of the Mach number in the axial direction at the axis and wall. In addition, we will plot the corresponding variation from 1D theory. You can download the file here: mach_1D.xy. Do everything as we would do for plotting the centerline velocity. However, instead of selecting Axial Velocity as the Y Axis Function, select Mach Number. Also, since we are going to plot this number at both the wall and axis, select centerline and wall under Surfaces. Then, load the mach_1D.xy by clicking on Load File....

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step6.htm (1 of 5)11/7/2005 6:53:25 PM

Compressible Flow in a Nozzle - Step #6

Click Plot.

(Click picture for large image) How does the FLUENT solution compare with the 1D solution? Is the comparison better at the wall or at the axis? Can you explain this? Save this plot as machplot.xy by checking Write to File and clicking Write....

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step6.htm (2 of 5)11/7/2005 6:53:25 PM

Compressible Flow in a Nozzle - Step #6

Pressure Contour Plot Sometimes, it is very useful to see how the pressure and temperature changes throughout the object. This can be done via contour plots. Display > Contours... First, we are going to plot the pressure contours of the nozzle. Therefore, make sure that under Contours Of, Pressure... and Static Pressure is selected. We want this at a fine enough granularity so that we can see the pressure changes clearly. Under Levels, change the default 20 to 40. This increases the number of lines in the contour plot so that we can get a more accurate result.

Click Display.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step6.htm (3 of 5)11/7/2005 6:53:25 PM

Compressible Flow in a Nozzle - Step #6

(Click picture for large image) Notice that the pressure on the fluid gets smaller as it flows to the right, as is consistent with fluid going through a nozzle. Temperature Contour Plot Now we will plot the temperature contours and see how the temperature varies throughout the nozzle. Back in the Contours window, under Contours Of, select Temperature... and Static Temperature. Click Display.

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step6.htm (4 of 5)11/7/2005 6:53:25 PM

Compressible Flow in a Nozzle - Step #6

(Click picture for large image) As we can see, the temperature decreases towards the right side of the nozzle, indicating a change of internal energy to kinetic energy as the fluid speeds up. Go to Step 7: Refine Mesh Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step6.htm (5 of 5)11/7/2005 6:53:25 PM

Compressible Flow in a Nozzle - Step #7

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 7: Refine Mesh Solve the nozzle flow for the same conditions as used in class on a 80x30 grid. Recall that the static pressure p at the exit is 3,738.9 Pa. The grid for this calculation can be downloaded here. You may also download it from here. (a) Plot the variation of Mach number at the axis and the wall as a function of the axial distance x. Also, plot the corresponding results obtained on the 50x20 grid used in class and from the quasi-1D assumption. Recall that the quasi-1D result for the Mach number variation was given to you in the M_1D.xy file. Note all five curves should be plotted on the same graph so that you can compare them. You can make the plots in FLUENT, MATLAB or EXCEL. (b) Plot the variation of static pressure at the axis and the wall as a function of the axial distance x. Also, plot the corresponding results obtained on the 50x20 grid used in class and from the quasi-1D assumption. Calculate the static pressure variation for the quasi-1D case from the Mach number variation given in M_1D.xy. (c) Plot the variation of static temperature at the axis and the wall as a function of the axial distance x. Also, plot the corresponding results obtained on the 50x20 grid used in class and from the quasi-1D assumption. Calculate the static temperature variation for the quasi-1D case from the Mach number variation given in M_1D.xy. Comment very briefly on the grid dependence of your results and the comparison http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step7.htm (1 of 2)11/7/2005 6:53:49 PM

Compressible Flow in a Nozzle - Step #7

with the quasi-1D results. Go to Problem 1 Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/step7.htm (2 of 2)11/7/2005 6:53:49 PM

Compressible Flow in a Nozzle - Problem #1

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Grid Problem 1 Problem 2

Problem 1 Consider the nozzle flow problem solved using FLUENT in the tutorial. Recall that the nozzle has a circular cross-sectional area, A, that varies with axial distance from the throat, x, according to the formula: A = 0.1 + x2 where A is in square meters and x is in meters. The stagnation pressure poand stagnation temperature To at the inlet are 101,325 Pa and 300 K, respectively. Using the quasi-1D flow assumption, determine the static pressure at the nozzle inlet and outlet for the following conditions: (a) Sonic flow at the throat, and supersonic, isentropic flow in the diverging section. (b) Sonic flow at the throat, and subsonic, isentropic flow in the diverging section. (c) Sonic flow at the throat and normal shock at the exit. Go to Problem 2

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/ps1.htm (1 of 2)11/7/2005 6:54:14 PM

Compressible Flow in a Nozzle - Problem #1

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/ps1.htm (2 of 2)11/7/2005 6:54:14 PM

Compressible Flow in a Nozzle - Problem 3

Compressible Flow in a Nozzle Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Grid Problem 1 Problem 2

Problem 2 Change the exit pressure to 40,000 Pa while keeping all the other boundary conditions the same. What flow regime do you expect for this exit pressure based on the quasi-1D results in problem 1? Re-run the FLUENT calculation with this exit pressure on the 50x20 grid. (a) Plot contours of the Mach number and static pressure for this case. Is the flow regime as predicted by quasi-1D theory? Explain briefly the possible causes for any similarities or disparities. (b) Plot the static and stagnation pressures at the axis as a function of the axial distance. Also, plot the corresponding values from the case where the exit pressure is 3,738.9 Pa. (These four curves should be on the same graph.) Explain briefly the salient features of this plot. (c) Plot the static and stagnation temperatures at the axis as a function of the axial distance. Again provide a brief explanation for the salient features. Back to Problem Specification

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/ps2.htm (1 of 2)11/7/2005 6:54:37 PM

Compressible Flow in a Nozzle - Problem 3

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/nozzle/ps2.htm (2 of 2)11/7/2005 6:54:37 PM

Flow over an Airfoil - Step #1

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 1: Create Geometry in GAMBIT If you wish to skip the steps for grid creation, you can download the mesh file here (right-click and select Save As...) and go to Step 4.

This tutorial leads you through the steps for generating a mesh in GAMBIT for an airfoil geometry. This mesh can then be read into FLUENT for fluid flow http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (1 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

simulation. In an external flow such as that over an airfoil, we have to define a farfield boundary and mesh the region between the airfoil geometry and the farfield boundary. It is a good idea to place the farfield boundary well away from the airfoil since we'll use the ambient conditions to define the boundary conditions at the farfield. The farther we are from the airfoil, the less effect it has on the flow and so more accurate is the farfield boundary condition. The farfield boundary we'll use is the line ABCDEFA in the figure above. c is the chord length. Start GAMBIT Create a new directory called airfoil and start GAMBIT from that directory by typing gambit -id airfoil at the command prompt. Under Main Menu, select Solver > FLUENT 5/6 since the mesh to be created is to be used in FLUENT 6.0. Import Edge To specify the airfoil geometry, we'll import a file containing a list of vertices along the surface and have GAMBIT join these vertices to create two edges, corresponding to the upper and lower surfaces of the airfoil. We'll then split these edges into 4 distinct edges to help us control the mesh size at the surface. The file containing the vertices for the airfoil can be downloaded here: vertices. dat (right click and select Save As...) Let's take a look at the vertices.dat file:

The first line of the file represents the number of points on each edge (61) and http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (2 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

the number of edges (2). The first 61 set of vertices are connected to form the edge corresponding to the upper surface; the next 61 are connected to form the edge for the lower surface. The chord length c for the geometry in vertices.dat file is 1, so x varies between 0 and 1. If you are using a different airfoil geometry specification file, note the range of x values in the file and determine the chord length c. You'll need this later on. Main Menu > File > Import > ICEM Input ... For File Name, browse and select the vertices.dat file. Select both Vertices and Edges under Geometry to Create: since these are the geometric entities we need to create. Deselect Face. Click Accept.

(Click picture for larger image) Split Edges Next, we will split the top and bottom edges into two edges each as shown in the figure below.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (3 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

We need to do this because a non-uniform grid spacing will be used for x0.3c. To split the top edge into HI and IG, select Operation Toolpad > Geometry Command Button

> Edge Command Button

> Split/Merge Edge Make sure Point is selected next to Split With in the Split Edge window. Select the top edge of the airfoil by Shift-clicking on it. You should see something similar to the picture below:

(Click picture for larger image) We'll use the point at x=0.3c on the upper surface to split this edge into HI and IG. To do this, enter 0.3 for x: under Global. If your c is not equal to one, enter the value of 0.3*c instead of just 0.3. For instance, if c=4, enter 1.2. From here on, whenever you're asked to enter (some factor)*c, calculate the appropriate value for your c and enter it. You should see that the white circle has moved to the correct location on the edge.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (4 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

(Click picture for larger image) Click Apply. You will see a message saying ``Edge edge.1 was split, and edge edge.3 created'' in the Transcript window.

(Click picture for larger image) Note the yellow marker in place of the white circle, indicating the original edge has been split into two edges with the yellow marker as its dividing point. Repeat this procedure for the lower surface to split it into HJ and JG. Use the http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (5 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

point at x=0.3c on the lower surface to split this edge. Create Farfield Boundary Next we'll create the farfield boundary by creating vertices and joining them appropriately to form edges. Operation Toolpad > Geometry Command Button

> Vertex Command

> Create Vertex

Button

Create the following vertices by entering the coordinates under Global and the label under Label: Label

x-coordinate

y-coordinate

z-coordinate

A

c

12.5c

0

B

21c

12.5c

0

C

21c

0

0

D

21c

-12.5c

0

E

c

-12.5c

0

F

-11.5c

0

0

G

c

0

0

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (6 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

(Click picture for larger image) Click the FIT TO WINDOW button to scale the display so that you can see all the vertices. As you create the edges for the farfield boundary, keep the picture of the farfield nomenclature given at the top of this step handy. Operation Toolpad > Geometry Command Button

> Edge Command Button

> Create Edge Create the edge AB by selecting the vertex A followed by vertex B. Enter AB for Label. Click Apply. GAMBIT will create the edge. You will see a message saying something like "Created edge: AB'' in the Transcript window. Similarly, create the edges BC, CD, DE, EG, GA and CG. Note that you might have to zoom in on the airfoil to select vertex G correctly. Next we'll create the circular arc AF. Right-click on the Create Edge button and select Arc.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (7 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

In the Create Real Circular Arc menu, the box next to Center will be yellow. That means that the vertex you select will be taken as the center of the arc. Select vertex G and click Apply. Now the box next to End Points will be highlighted in yellow. This means that you can now select the two vertices that form the end points of the arc. Select vertex A and then vertex F. Enter AF under Label. Click Apply. If you did this right, the arc AF will be created. If you look in the transcript window, you'll see a message saying that an edge has been created. Similarly, create an edge corresponding to arc EF.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (8 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

(Click picture for larger image) Create Faces The edges can be joined together to form faces (which are planar surfaces in 2D). We'll create three faces: ABCGA, EDCGE and GAFEG+airfoil surface. Then we'll mesh each face. Operation Toolpad > Geometry Command Button

> Face Command Button

> Form Face This brings up the Create Face From Wireframe menu. Recall that we had selected vertices in order to create edges. Similarly, we will select edges in order to form a face. To create the face ABCGA, select the edges AB, BC, CG, and GA and click Apply. GAMBIT will tell you that it has "Created face: face.1'' in the transcript window. Similarly, create the face EDCGE. To create the face consisting of GAFEG+airfoil surface, select the edges in the following order: AG, AF, EF, EG, and JG, HJ, HI and IG (around the airfoil in the clockwise direction). Click Apply. Go to Step 2: Mesh Geometry in GAMBIT http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (9 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #1

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step1.htm (10 of 10)11/7/2005 6:54:58 PM

Flow over an Airfoil - Step #2

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 2: Mesh Geometry in GAMBIT Mesh Faces We'll mesh each of the 3 faces separately to get our final mesh. Before we mesh a face, we need to define the point distribution for each of the edges that form the face i.e. we first have to mesh the edges. We'll select the mesh stretching parameters and number of divisions for each edge based on three criteria: 1. We'd like to cluster points near the airfoil since this is where the flow is modified the most; the mesh resolution as we approach the farfield boundaries can become progressively coarser since the flow gradients approach zero. 2. Close to the surface, we need the most resolution near the leading and trailing edges since these are critical areas with the steepest gradients. 3. We want transitions in mesh size to be smooth; large, discontinuous changes in the mesh size significantly decrease the numerical accuracy. The edge mesh parameters we'll use for controlling the stretching are successive ratio, first length and last length. Each edge has a direction as indicated by the arrow in the graphics window. The successive ratio R is the ratio of the length of any two successive divisions in the arrow direction as shown below. Go to the index of the GAMBIT User Guide and look under Edge>Meshing for this figure and accompanying explanation. This help page also explains what the first and last lengths are; make sure you understand what they are.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (1 of 6)11/7/2005 6:55:22 PM

Flow over an Airfoil - Step #2

Operation Toolpad > Mesh Command Button

> Edge Command Button

>

Mesh Edges Select the edge GA. The edge will change color and an arrow and several circles will appear on the edge. This indicates that you are ready to mesh this edge. Make sure the arrow is pointing upwards. You can reverse the direction of the edge by clicking on the Reverse button in the Mesh Edges menu. Enter a ratio of 1.15. This means that each successive mesh division will be 1.15 times bigger in the direction of the arrow. Select Interval Count under Spacing. Enter 45 for Interval Count. Click Apply. GAMBIT will create 45 intervals on this edge with a successive ratio of 1.15. For edges AB and CG, we'll set the First Length (i.e. the length of the division at the start of the edge) rather than the Successive Ratio. Repeat the same steps for edges BC, AB and CG with the following specifications: Edges

Arrow Direction

Successive Ratio

Interval Count

GA and BC

Upwards

1.15

45

Edges

Arrow Direction

First Length

Interval Count

AB and CG

Left to Right

0.02c

60

Note that later we'll select the length at the trailing edge to be 0.02c so that the mesh length is continuous between IG and CG, and HG and CG. Now that the appropriate edge meshes have been specified, mesh the face ABCGA: http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (2 of 6)11/7/2005 6:55:22 PM

Flow over an Airfoil - Step #2

Operation Toolpad > Mesh Command Button

> Face Command Button

>

Mesh Faces Select the face ABCGA. The face will change color. You can use the defaults of Quad (i.e. quadrilaterals) and Map. Click Apply. The meshed face should look as follows:

(Click picture for larger image) Next mesh face EDCGE in a similar fashion. The following table shows the parameters to use for the different edges: Edges

Arrow Direction

Successive Ratio

Interval Count

EG and CD

Downwards

1.15

45

Edges

Arrow Direction

First Length

Interval Count

DE

Left to Right

0.02c

60

The resultant mesh should be symmetric about CG as shown in the figure below.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (3 of 6)11/7/2005 6:55:22 PM

Flow over an Airfoil - Step #2

(Click picture for larger image) Finally, let's mesh the face consisting of GAFEG and the airfoil surface. For edges HI and HJ on the front part of the airfoil surface, use the following parameters to create edge meshes: Edges

Arrow Direction

Last Length

Interval Count

HI

From H to I

0.02c

40

HJ

From H to J

0.02c

40

For edges IG and JG, we'll set the divisions to be uniform and equal to 0.02c. Use Interval Size rather than Interval Count and create the edge meshes: Edges

Arrow Direction

Successive Ratio

Interval Size

IG and JG

Left to Right

1

0.02c

For edge AF, the number of divisions needs to be equal to the number of divisions on the line opposite to it i.e. the upper surface of the airfoil (this is a subtle point; chew over it). To determine the number of divisions that GAMBIT has created on edge IG, select Operation Toolpad > Mesh Command Button >Summarize Edge Mesh

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (4 of 6)11/7/2005 6:55:22 PM

> Edge Command Button

Flow over an Airfoil - Step #2

Select edge IG and then Elements under Component and click Apply. This will give the total number of nodes (i.e. points) and elements (i.e. divisions) on the edge in the Transcript window. The number of divisions on edge IG is 35. (If you are using a different geometry, this number will be different; I'll refer to it as NIG). So the Interval Count for edge AF is NHI+NIG= 40+35= 75. Similarly, determine the number of divisions on edge JG. This also comes out as 35 for the current geometry. So the Interval Count for edge EF also is 75. Create the mesh for edges AF and EF with the following parameters: Edges

Arrow Direction

First Length

Interval Count

AF

From A to F

0.02c

40+NIG

EF

From E to F

0.02c

40+NJG

Mesh the face. The resultant mesh is shown below.

(Click picture for larger image) Go to Step 3: Specify Boundary Types in GAMBIT

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (5 of 6)11/7/2005 6:55:22 PM

Flow over an Airfoil - Step #2

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step2.htm (6 of 6)11/7/2005 6:55:22 PM

Flow over an Airfoil - Step #3

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 3: Specify Boundary Types in GAMBIT We'll label the boundary AFE as farfield1, ABDE as farfield2 and the airfoil surface as airfoil. Recall that these will be the names that show up under boundary zones when the mesh is read into FLUENT. Group Edges We'll create groups of edges and then create boundary entities from these groups. First, we will group AF and EF together. Operation Toolpad > Geometry Command Button

> Group Command Button

> Create Group Select Edges and enter farfield1 for Label, which is the name of the group. Select the edges AF and EF. Note that GAMBIT adds the edge to the list as it is selected in the GUI.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step3.htm (1 of 4)11/7/2005 6:55:59 PM

Flow over an Airfoil - Step #3

Click Apply. In the transcript window, you will see the message “Created group: farfield1 group”.

Similarly, create the other two farfield groups. You should have created a total of three groups: Group Name

Edges in Group

farfield1

AF,EF

farfield2

AB,DE

farfield3

BC,CD

airfoil

HI,IG,HJ,JG

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step3.htm (2 of 4)11/7/2005 6:55:59 PM

Flow over an Airfoil - Step #3

Define Boundary Types Now that we have grouped each of the edges into the desired groups, we can assign appropriate boundary types to these groups. Operation Toolpad > Zones Command Button

> Specify Boundary Types

Under Entity, select Groups. Select any edge belonging to the airfoil surface and that will select the airfoil group. Next to Name:, enter airfoil. Leave the Type as WALL.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step3.htm (3 of 4)11/7/2005 6:55:59 PM

Flow over an Airfoil - Step #3

Click Apply. In the Transcript Window, you will see a message saying "Created Boundary entity: airfoil". Similarly, create boundary entities corresponding to farfield1, farfield2 and farfield3 groups. Set the Type to Pressure Farfield in each case. Save Your Work Main Menu > File > Save Export Mesh Main Menu > File > Export > Mesh... Save the file as airfoil.msh. Make sure that the Export 2d Mesh option is selected. Check to make sure that the file is created.

Go to Step 4: Set Up Problem in FLUENT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step3.htm (4 of 4)11/7/2005 6:55:59 PM

Flow over an Airfoil - Step #4

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 4: Set Up Problem in FLUENT Launch FLUENT Start > Programs > Fluent Inc > FLUENT 6.0 Select 2ddp from the list of options and click Run. Import File Main Menu > File > Read > Case... Navigate to your working directory and select the airfoil.msh file. Click OK. The following should appear in the FLUENT window:

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step4.htm (1 of 6)11/7/2005 6:56:31 PM

Flow over an Airfoil - Step #4

Check that the displayed information is consistent with our expectations of the airfoil grid. Analyze Grid Grid > Info > Size How many cells and nodes does the grid have? Display > Grid Note what the surfaces farfield1, farfield2, etc. correspond to by selecting and plotting them in turn. Zoom into the airfoil. Where are the nodes clustered? Why? Define Properties Define > Models > Solver... Under the Solver box, select Segregated.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step4.htm (2 of 6)11/7/2005 6:56:31 PM

Flow over an Airfoil - Step #4

Click OK. Define > Models > Viscous Select Inviscid under Model.

Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step4.htm (3 of 6)11/7/2005 6:56:31 PM

Flow over an Airfoil - Step #4

Define > Models > Energy The speed of sound under SSL conditions is 340 m/s so that our freestream Mach number is around 0.15. This is low enough that we'll assume that the flow is incompressible. So the energy equation can be turned off. Make sure there is no check in the box next to Energy Equation and click OK. Define > Materials Make sure air is selected under Fluid Materials. Set Density to constant and equal to 1.225 kg/m3.

Click Change/Create. Define > Operating Conditions We'll work in terms of gauge pressures in this example. So set Operating Pressure to the ambient value of 101,325 Pa.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step4.htm (4 of 6)11/7/2005 6:56:31 PM

Flow over an Airfoil - Step #4

Click OK. Define > Boundary Conditions Set farfield1 and farfield2 to the velocity-inlet boundary type. For each, click Set.... Then, choose Components under Velocity Specification Method and set the x- and y-components to that for the freestream. For instance, the x-component is 50*cos(5o)=49.81.

Click OK. Set farfield3 to pressure-outlet boundary type, click Set... and set the Gauge Pressure at this boundary to 0.Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step4.htm (5 of 6)11/7/2005 6:56:31 PM

Flow over an Airfoil - Step #4

Go to Step 5: Solve! Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step4.htm (6 of 6)11/7/2005 6:56:31 PM

Flow over an Airfoil - Step #5

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 5: Solve! Solve > Control > Solution Take a look at the options available. Under Discretization, set Pressure to PRESTO! and Momentum to SecondOrder Upwind.

Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step5.htm (1 of 6)11/7/2005 6:56:50 PM

Flow over an Airfoil - Step #5

Solve > Initialize > Initialize... As you may recall from the previous tutorials, this is where we set the initial guess values (the base case) for the iterative solution. Once again, we'll set these values to be the ones at the inlet. Select farfield1 under Compute From.

Click Init. Solve > Monitors > Residual... Now we will set the residual values (the criteria for a good enough solution). Once again, we'll set this value to 1e-06.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step5.htm (2 of 6)11/7/2005 6:56:50 PM

Flow over an Airfoil - Step #5

Click OK. Solve > Monitors > Force... Under Coefficient, choose Lift. Under Options, select Print and Plot. Then, Choose airfoil under Wall Zones. Lastly, set the Force Vector components for the lift. The lift is the force perpendicular to the direction of the freestream. So to get the lift coefficient, set X to -sin(5°)=-0.0872 and Y to cos(5°)=0.9962.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step5.htm (3 of 6)11/7/2005 6:56:50 PM

Flow over an Airfoil - Step #5

Click Apply for these changes to take effect. Similarly, set the Force Monitor options for the Drag force. The drag is defined as the force component in the direction of the freestream. So under Force Vector, set X to cos(5°)=0.9962 and Y to sin(5°)=0.0872. Turn on only Print for it. Report > Reference Values Now, set the reference values to set the base cases for our iteration. Select farfield1 under Compute From.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step5.htm (4 of 6)11/7/2005 6:56:50 PM

Flow over an Airfoil - Step #5

Click OK. Main Menu > File > Write > Case... Save the case file before you start the iterations. Solve > Iterate What does the convergence plot look like? How many iterations does it take to converge?

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step5.htm (5 of 6)11/7/2005 6:56:50 PM

Flow over an Airfoil - Step #5

Main Menu > File > Write > Case & Data... Save case and data after you have obtained a converged solution. Go to Step 6: Analyze Results Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step5.htm (6 of 6)11/7/2005 6:56:50 PM

Flow over an Airfoil - Step #6

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 6: Analyze Results Plot Pressure Coefficient Plot > XY Plot... Change the Y Axis Function to Pressure..., followed by Pressure Coefficient. Then, select airfoil under Surfaces.

Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step6.htm (1 of 3)11/7/2005 6:57:27 PM

Flow over an Airfoil - Step #6

(Click picture for larger image) Plot Pressure Contours Plot static pressure contours. Display > Contours... Select Pressure... and Static Pressure from under Contours Of. Click Display.

(Click picture for larger image) Where are the highest and lowest pressures occurring?

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step6.htm (2 of 3)11/7/2005 6:57:27 PM

Flow over an Airfoil - Step #6

Go to Step 7: Refine Mesh Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step6.htm (3 of 3)11/7/2005 6:57:27 PM

Flow over an Airfoil - Step #7

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Step 7: Refine Mesh **Under construction** Go to Problem 1 Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/step7.htm11/7/2005 6:57:53 PM

Flow over an Airfoil - Problem #1

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Problem 1 Consider the incompressible, inviscid airfoil calculation in FLUENT presented in class. Recall that the angle of attack, α, was 5°. Repeat the calculation for the airfoil for α = 0° and α = 10°. Save your calculation for each angle of attack as a different case file. (a) Graph the pressure coefficient (Cp) distribution along the airfoil surface at α = 5° and α = 10° in the manner discussed in class (i.e., follow the aeronautical convention of letting Cp decrease with increasing ordinate (y-axis) values). What change do you see in the Cp distribution on the upper and lower surfaces as you increase the angle of attack? Which part of the airfoil surface contributes most to the increase in lift with increasing α? Hint: The area under the Cp vs. x curve is approximately equal to Cl. (b) Make a table of Cl and Cd values obtained for α = 0°, 5°, and 10°. Plot Cl vs. α for the three values of α. Make a linear least-squares fit of this data and obtain the slope. Compare your result to that obtained from inviscid, thin-airfoil theory: http://instruct1.cit.cornell.edu/courses/fluent/airfoil/ps1.htm (1 of 2)11/7/2005 6:58:21 PM

Flow over an Airfoil - Problem #1

, where α is in degrees. Go to Problem 2 Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/ps1.htm (2 of 2)11/7/2005 6:58:21 PM

Flow over an Airfoil - Problem #2

Flow over an Airfoil Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh Problem 1 Problem 2

Problem 2 Repeat the incompressible calculation at α = 5° including viscous effects. Since the Reynolds number is high, we expect the flow to be turbulent. Use the k-ε turbulence model with the enhanced wall treatment option. At the farfield boundaries, set turbulence intensity=1% and turbulent length scale=0.01. (a) Graph the pressure coefficient (Cp) distribution along the airfoil surface for this calculation and the inviscid calculation done in the previous problem at α = 5°. Comment on any differences you observe. (b) Compare the Cl and Cd values obtained with the corresponding values from the inviscid calculation. Discuss briefly the similarities and differences between the two results. Back to Problem Specification Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/ps2.htm11/7/2005 6:58:29 PM

Fluent - Forced Convection on a Flat Plate Step #1

Forced Convection over a Flat Plate Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 1: Create Geometry in GAMBIT Start GAMBIT & Select Solver Specify that the mesh to be created is for use with FLUENT 6: Main Menu > Solver > FLUENT 5/6 Verify this has been done by looking in the Transcript Window where you should see:

The boundary types that you'll be able to select in the third step depends on the solver selected. Strategy for creating flow field geometry In creating the geometry for our flow field we must consider what is necessary for our model to approximate real flow. A boundary layer grows along the plate, which must satisfy the no slip condition. The flow velocity at the plate must be zero. Continuity requires that this condition gives rise to a y-velocity. Although the y-velocity is significantly smaller in magnitude than the x-velocity, it can affect the solution significantly if not taken into consideration when creating the geometry of the flow field.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (1 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

************************************************************* We will put the origin of the coordinate system at the lower left corner of the rectangle that defines our flow field. The coordinates of the corners are shown in the figure below:

We will first create four vertices at the four corners and join adjacent vertices to get the edges of the rectangle. We will then form a face that covers the area of the rectangle. Create Vertices We will treat this problem as a 2-dimensional problem by assuming that the plate is infinitely wide. Let's begin by creating the vertices that define our flow region. Operation Toolpad > Geometry Command Button Button

> Vertex Command

> Create Vertex

Note that the Create Vertex button has already been selected by default. After you select a button under a sub-pad, it becomes the default when you go to a different sub-pad and then come back to the sub-pad. Create the vertex at the lower-left corner of the rectangle: Next to x:, enter value 0. Next to y:, enter value 0. Next to z:, enter value 0 (these values should be defaults). Click Apply.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (2 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

This creates the vertex (0,0,0) which is displayed in the graphics window.

In the Transcript window, GAMBIT reports that it "Created vertex: vertex.1". The vertices are numbered vertex.1, vertex.2 etc. in the order in which they are created. Repeat this process to create three more vertices: Vertex 2: (1,0,0) Vertex 3: (1,1,0) Vertex 4: (0,1,0) Note that for a 2D problem, the z-coordinate can always be left to the default value of 0.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (3 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

Operation Toolpad > Global Control > Fit to Window Button

This fits the four vertices of the rectangle we have created to the size of the Graphics Window.

(click picture for larger image)

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (4 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

Another useful button on the Operation Toolpad is the Orient Model button . If you click and hold the left mouse button and then move the mouse, the model will rotate 3-dimensionally. This is, of course, not usually a helpful feature when creating 2-D models in GAMBIT. Click the Orient Model button to make the zaxis normal to the page again. Create Edges An edge is created by selecting two vertices and creating a line between them. Operation Toolpad > Geometry Command Button

> Edge Command Button

> Create Edge Click the up arrow button Edge window.

next to the vertices box in the Create Straight

This brings up a list of vertices, from which vertices 1 and 2 can be selected. Select Vertex.1 and Vertex.2. Then push the right arrow button bring these vertices into the Picked column.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (5 of 10)11/7/2005 6:59:38 PM

to

Fluent - Forced Convection on a Flat Plate Step #1

Click Close. Then click Apply in the Create Straight Edge window to create this edge. Alternately, these vertices can be selected by holding down the Shift button and clicking on the corresponding vertices. As each vertex is picked, it will appear red in the Graphics Window. Then let go of the Shift button and click Apply in the Create Straight Edge window. Repeat this process to create edges between vertices 2 & 3, vertices 3 & 4, and vertices 4 & 1.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (6 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

(click picture for larger image) Create Face Operation Toolpad > Geometry Command Button

> Face Command Button

> Form Face To form a face out of the area enclosed by the four lines, we need to select the four edges that enclose this area. This is done in much the same way as when we selected the vertices. Click the up arrow button

next to the vertices box in the Create Face From

Wireframe window. Then push the All right arrow button vertices into the Picked column.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (7 of 10)11/7/2005 6:59:38 PM

to bring these

Fluent - Forced Convection on a Flat Plate Step #1

Click Close. Then click Apply in the Create Face From Wireframe window to create the face. The edges and vertices will become blue, indicating that they now form a face.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (8 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

(click picture for larger image)

Save Save your GAMBIT file in your working directory. Main Menu > File > Save As... > Browse... Find your working directory and save your GAMBIT file there. Make sure to enter the file name, plate.dbs, in the Selection box in addition to the path.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (9 of 10)11/7/2005 6:59:38 PM

Fluent - Forced Convection on a Flat Plate Step #1

Go to Step 2: Mesh Geometry in GAMBIT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step1.htm (10 of 10)11/7/2005 6:59:38 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #2

Forced Convection over a Flat Plate Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 2: Mesh Geometry in GAMBIT We'll now create a mesh on the rectangular face with 100 divisions in the vertical direction and 30 divisions in the horizontal direction. We'll first mesh the four edges and then the face. The desired grid spacing is specified through the edge mesh. Mesh Edges Operation Toolpad > Mesh Command Button

> Edge Command Button

>

Mesh Edges Mesh Strategy In creating this mesh, it is desirable to have more cells near the plate (Edge 1) because we want to resolve the turbulent boundary layer, which is very thin compared to the height of the flow field. Click the up arrow button

next to the Edges box in the Mesh Edges window.

Select edge Edge.2. Then push the right arrow button to bring this vertex into the Picked column. Notice that the arrow on the selected edge should be pointing upwards. An upwards pointing arrow indicates the direction of closely spaced nodes to widely spaced nodes. Remember, we will need more closely spaced nodes near the boundary layer in order to resolve it accurately.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step2.htm (1 of 4)11/7/2005 7:00:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #2

The proper arrow direction is necessary to ensure a proper mesh. Select Edge.4 in the Mesh Edges window. The arrow on this edge is pointing downwards, which needs to be changed. Shift + Middle-click on the selected edge to change the direction of the arrow to upward. Under Type, select Successive Ratio, if it is not already selected. Set Ratio to 1.08. Under Spacing, select Interval Count. Set Interval Count to 100 and then click Apply. Select Edge.1 and Edge.3 in the Mesh Edges Window. The direction of the arrows on these edges is irrelevant because the divisions will be the same length. Leave the Successive Ratio set to 1 and set the Interval Count to 30. Click Apply.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step2.htm (2 of 4)11/7/2005 7:00:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #2

(click picture for larger image)

Mesh Face Operation Toolpad > Mesh Command Button

> Face Command Button

>

Mesh Faces Shift left-click on the face or use the up arrow next to Faces to select the face. Click Apply.

(click picture for larger image) Go to Step 3: Specify Boundary Types in GAMBIT

http://instruct1.cit.cornell.edu/courses/fluent/plate/step2.htm (3 of 4)11/7/2005 7:00:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #2

Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step2.htm (4 of 4)11/7/2005 7:00:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #3

Forced Convection over a Flat Plate Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 3: Specify Boundary Types in GAMBIT

Create Boundary Types We'll next set the boundary types in GAMBIT. The left edge is the inflow of the flow field, the right edge the outflow, the top edge the open top of the flow field, and the bottom edge the plate. Operation Toolpad > Zones Command Button http://instruct1.cit.cornell.edu/courses/fluent/plate/step3.htm (1 of 4)11/7/2005 7:01:52 PM

> Specify Boundary Types

Fluent Tutorial - Forced Convection on a Flat Plate Step #3

Command Button This will bring up the Specify Boundary Types window on the Operation Panel. We will first specify that the left edge is the inflow. Under Entity:, pick Edges so that GAMBIT knows we want to pick an edge (face is default).

Now select the left edge by Shift-clicking on it. The selected edge should appear in the yellow box next to the Edges box as well as the Label/Type list under the Edges box. Next to Name:, enter inflow. For Type:, select VELOCITY_INLET. You may have to move the Specify Boundary Types box up in order to see the bottom of the list and select VELOCITY_INLET.

Click Apply. You should see the new entry appear under Name/Type box near the top of the window.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step3.htm (2 of 4)11/7/2005 7:01:52 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #3

Repeat this process for the other three edges according to the following table: Edge Position

Name

Type

Left

inflow

VELOCITY_INLET

Right

outflow

PRESSURE_OUTLET

http://instruct1.cit.cornell.edu/courses/fluent/plate/step3.htm (3 of 4)11/7/2005 7:01:52 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #3

Top

top

SYMMETRY

Bottom

plate

WALL

You should have the following edges in the Name/Type list when finished:

Save and Export Main Menu > File > Save Main Menu > File > Export > Mesh... Type in plate.msh for the File Name:. Select Export 2d Mesh because this is a 2 dimensional mesh. Click Accept. It is important to check that plate.msh has been created in your working directory. GAMBIT may periodically fail to write the .msh file. If this should happen, simply try writing the .msh file to another directory and then coping it into your working directory. Go to Step 4: Set Up Problem in FLUENT Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step3.htm (4 of 4)11/7/2005 7:01:52 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Forced Convection over a Flat Plate Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 4: Set Up Problem in FLUENT Launch Fluent 6.0 Start > Programs > Fluent Inc > FLUENT 6.0 Select the 2ddp version and click Run. The "2ddp" option is used to select the 2-dimensional, double-precision solver. In the doubleprecision solver, each floating point number is represented using 64 bits in contrast to the single-precision solver which uses 32 bits. The extra bits increase not only the precision but also the range of magnitudes that can be represented. The downside of using double precision is that it requires more memory. Import Grid Main Menu > File > Read > Case... Navigate to the working directory and select the plate.msh file. This is the mesh file that was created using the preprocessor GAMBIT in the previous step. FLUENT reports the mesh statistics as it reads in the mesh:

http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (1 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Check the number of nodes, faces (of different types) and cells. There are 3000 quadrilateral cells in this case. This is what we expect because we used 30 divisions in the horizontal direction and 100 divisions in the vertical direction while generating the grid. So the total number of cells is 30*100 = 3000. Also, take a look under zones. We can see the four zones inflow, outflow, top, and plate that we defined in GAMBIT. Check and Display Grid First, we check the grid to make sure that there are no errors. Main Menu > Grid > Check Any errors in the grid would be reported at this time. Check the output and make sure that there are no errors reported. Check the grid size: Main Menu > Grid > Info > Size The following statistics should appear:

Display the grid: http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (2 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Main Menu > Display > Grid... Make sure all 5 items under Surfaces are selected.

Then click Display. The graphics window opens and the grid is displayed in it. Your grid should look like this:

(click picture for larger image) Define Solver Properties Main Menu > Define > Models > Solver We'll use the defaults of 2D space, segregated solver, implicit formulation, steady flow and

http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (3 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

absolute velocity formulation. Click OK.

Main Menu > Define > Models > Energy We are interested in solving the temperature distribution, so we need to solve the energy equation. Select the Energy Equation and click OK to exit the menu.

Main Menu > Define > Models > Viscous Under Model, select the k-epsilon turbulence model. We will use the Realizable model in the k-epsilon Model box. The Realizable k-epsilon model produces more accurate results for boundary layer flows than the Standard k-epsilon model. In the Near-Wall Treatment box, observe the Enhanced Wall Treatment option, which deals with the resolution of the boundar layer in our model. There are 3 regions in the boundary layer that we are concerned with, starting at the wall: 1. Laminar sublayer (y+ < 5) http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (4 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

2. Buffer region (5 < y+ < 30) 3. Turbulent region (y+ > 30) y+ is a mesh-dependent dimensionless distance that quantifies to what degree the wall layer is resolved. After solving this problem in FLUENT, we will observe the value of y+ for each mesh we use. The Enhanced Wall Treatment option serves to more accurately resolve the boundary layer in the case when the mesh is only fine enough to resolve to the turbulent region (y+ > 30). Enhanced Wall Treatment also improves the accuracy of meshes that can only be resolved to the Buffer region (5< y+ < 30). However, solutions with y+ values in the buffer region are generally less accurate than if the solution is resolved to one of the other 2 regions. Look at FLUENT Help section 10.9, Grid Considerations for Turbulent Flow Simulations, for more details. For our mesh, FLUENT will be able to resolve the laminar sublayer, thus Enhanced Wall Treatment does not improve the accuracy of our solution with our mesh. It will however make a difference in Step 7 when we use a less refined mesh. The thickness of the boundary layer is significantly smaller than the height of our flow field. Resolving the solution to the laminar sublayer is computationally intensive, especially in high Reynolds Number flows. Resolving to the turbulent region is often the only reasonable option. Thus it is good practice to always use Enhanced Wall Treatment when dealing with a boundary layer. Although it is not necessary with the current mesh, it will be necessary for the less refined mesh later on, so go ahead and select Enhanced Wall Treatment now. Select Thermal Effects in the Enhanced Wall Treatment Options box to include the thermal terms in the Enhanced Wall Treatment equation. The values in the Model Constants box are constants used in the k-epsilon turbulence equations. These values for the Model Constants are well-accepted for a wide range of wallbounded shear flows. Leave all values in the Model Constants box set to their default values. Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (5 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Define Material Properties Main Menu > Define > Materials... Change Density to ideal gas because we are treating the flow as compressible. FLUENT will calcualte the density of the flow at each point based on the pressure and temperature it calculates at that point. Leave Cp set as the default value of 1006.43. Change Thermal Conductivity to 9.4505 e-4. Change Viscosity to 6.667e-7. Scroll down to see Molecular Weight. Leave Molecular Weight set to the default value of 28.966. These are the values that we specified under Problem Specification.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (6 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Click Change/Create. Simply clicking close without clicking Change/Create will cause these properties to revert back to their default values. Define Operating Conditions Main Menu > Define > Operating Conditions... For all flows, FLUENT uses gauge pressure internally. Any time an absolute pressure is needed, it is generated by adding the operating pressure to the gauge pressure. We'll use the default value of 1 atm (101,325 Pa) as the Operating Pressure. Click Cancel to leave the default value in place.

Define Boundary Conditions We'll now set the value of the velocity at the inflow and pressure at the outflow. http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (7 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Main Menu > Define > Boundary Conditions... We note here that the four types of boundaries we defined are specified as zones on the left side of the Boundary Conditions Window. There are also 2 zones default-interior fluid, used to define the interior of the flow field. We will not need to change any setting for these 2 zones. Move down the list and select inflow under Zone. Note that FLUENT indicates that the Type of this boundary is velocity-inlet. Recall that the boundary type for the inflow was set in GAMBIT. If necessary, we can change the boundary type set previously in GAMBIT in this menu by selecting a different type from the list on the right. Click Set.... Enter 1 for Velocity Magnitude. This sets the velocity of the fluid entering at the left boundary to a uniform velocity profile of 1m/s. Set Temperature to 353K. Change Turbulence Specification Method to Intensity and Viscosity Ratio. Set Turbulence Intensity to 1 and Turbulent Viscosity Ratio to 1. Click OK.

Choose outflow under Zone. The Type of this boundary is pressure-outlet. Click Set.... The default value of the Gauge Pressure is 0. The (absolute) pressure at the outflow is 1 atm. Since the operating pressure is set to 1 atm, the outflow gauge pressure = outflow absolute pressure - operating pressure = 0. Because we do not expect any backflow, we do not need to set any backflow conditions. Click Cancel to leave the defaults in place.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (8 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

Click on plate under Zones and make sure Type is set as wall. Click Set.... Because we have a heated isothermal plate, we need to set the temperature. On the Thermal tab, select Temperature under Thermal Conditions. Change Temperature to 413. The material selected is inconsequential because the plate has zero thickness in our model, thus the material properties of the plate do not affect the heat transfer properties of the plate. Click OK.

The last boundary condition to set is for the top of the flow field. Click on top under Zones and http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (9 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #4

make sure Type is set as symmetry. Click Set... to see that there is nothing to set for this boundary. Click OK. Click Close to close the Boundary Conditions menu. Go to Step 5: Solve! Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step4.htm (10 of 10)11/7/2005 7:04:00 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #5

Forced Convection over a Flat Plate Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 5: Solve! We'll use a second-order discretization scheme. Main Menu > Solve > Controls > Solution... Change Density, Momentum, Turbulence Kinetic Energy, Turbulence Dissipation Rate, and Energy all to Second Order Upwind. Leave Pressure and Pressure-Velocity Coupling set to the default methods (Standard and SIMPLE, respectively). The other Pressure and Pressure-Velocity Coupling methods are useful for flows with particular characteristics not present in our problem.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step5.htm (1 of 6)11/7/2005 7:05:42 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #5

Click OK. Set Initial Guess Initialize the flow field to the values at the inflow: Main Menu > Solve > Initialize > Initialize... In the Solution Initialization window that comes up, choose inflow under Compute From. The X Velocity for all cells will automatically be set to 1 m/s, the Y Velocity to 0 m/s and the Gauge Pressure to 0 Pa. These values have been taken from the inflow boundary condition.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step5.htm (2 of 6)11/7/2005 7:05:42 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #5

Click Init. This completes the initialization. Then click Close. Set Convergence Criteria FLUENT reports a residual for each governing equation being solved. The residual is a measure of how well the current solution satisfies the discrete form of each governing equation. We will iterate until the residual for each equation falls below 1e-6. Main Menu > Solve > Monitors > Residual... Change the residual under Convergence Criterion for continuity, x-velocity, and yvelocity, energy, k, and epsilon all to 1e-6. Also, under Options, select Print and Plot. This will print the residuals in the main window and plot the residuals in the graphics window as they are calculated.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step5.htm (3 of 6)11/7/2005 7:05:42 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #5

Click OK. This completes the problem specification. Save your work: Main Menu > File > Write > Case... Type in plate.cas for Case File. Click OK. Check that the file has been created in your working directory. If you exit FLUENT now, you can retrieve all your work at any time by reading in this case file. Iterate Until Convergence Start the calculation by running 10,000 iterations. The solution will converge before 10,000 iterations are performed, which will stop the iteration process. Main Menu > Solve > Iterate... In the Iterate Window, change the Number of Iterations to 10000. Click Iterate.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step5.htm (4 of 6)11/7/2005 7:05:42 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #5

The residuals for each iteration are printed out as well as plotted in the graphics window as they are calculated.

(Click picture for larger image) The residuals fall below the specified convergence criterion of 1e-6 in approximately 1623 iterations.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step5.htm (5 of 6)11/7/2005 7:05:42 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #5

Save the solution to a data file: Main Menu > File > Write > Data... Enter plate.dat for Data File and click OK. Check that the file has been created in your working directory. You can retrieve the current solution from this data file at any time. Go to Step 6: Analyze Results Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step5.htm (6 of 6)11/7/2005 7:05:42 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

Forced Convection over a Flat Plate Problem Specification 1. Create Geometry in GAMBIT 2. Mesh Geometry in GAMBIT 3. Specify Boundary Types in GAMBIT 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 6: Analyze Results y+ Turbulent flows are significantly affected by the presence of walls. The k-epsilon turbulence model's validity is grid-independent away from walls but requires verification to make sure it is valid when used near walls. The near-wall model is sensitive to the grid resolution, which is assessed in the wall unit y+, as discussed in Step 4. First, we need to set the reference values needed to calculate y+. Main Menu > Report > Reference Values... Select inflow under Compute From to tell FLUENT to use values at the inflow for the reference values. Check that the reference value for velocity is 1 m/s, temperature is 353 K, and coefficient of viscosity is 6.667e-7 kg/m-s as given in the Problem Specification. These reference values will be used to nondimensionalize the distance of the cell center from the wall to obtain the corresponding y+ values. Click OK.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (1 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

By using the following method, plot y+ values for wall-adjacent cells to check how they compare with the recommendation mentioned above. Main Menu > Plot > XY Plot... Make sure that Position on X Axis is set under Options, that 1 is the value next to X, and 0 is the value next to Y under Plot Direction. Recall that this tells FLUENT to plot the x-coordinate value on the abscissa of the graph. Select Turbulence... under Y Axis Function and select Wall Yplus from the drop down list under that. Since we want the y+ value for cells adjacent to the wall of

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (2 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

the pipe, choose plate under Surfaces.

Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (3 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

(Click picture for larger image) As we can see, the wall y+ value is between 1.0 and 1.4 (ignoring the anamolous at the inflow). Because these values are less than 5, the near-wall mesh resolution is in the laminar sublayer, which is the most accurate region to which we can resolve the boundary layer. Save Plot In the Solution XY Plot Window, check the Write to File box under Options. The Plot button should have changed to the Write... button. Click on Write.... Enter yplus.xy as the filename and click OK. Check that this file has been created in your FLUENT working directory. Velocity at x = 1m Main Menu > Plot > XY Plot... Under Options, unselect Position on X Axis and select Position on Y Axis. Under Plot Direction, enter 0 in the X box and 1 in the Y box. This tells FLUENT

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (4 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

to plot a vertical rather than horizontal profile. Under X Axis Function, pick Velocity... and then in the box under that, pick X Velocity. Finally, select outflow under Surfaces since we are plotting the velocity profile at the outflow. De-select plate under Surfaces.

Click on Axes... in the Solution XY Plot window. Select X in the Axis box. In the Options box select Major Rules to turn on the grid lines in the plot. Click Apply. Then select the Y in the Axis box, select Major Rules again, and turn off Auto Range. In the Range box enter 0.1 for the Maximum so that we may view the velocity profile in the boundary layer region more closely. Click Apply and Close.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (5 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

Uncheck Write to File. Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (6 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

(Click picture for larger image) We notice here that the x velocity reaches 1 m/s at approximately y = 0.02 m. This shows the relative thinness of the boundary layer compared to the length scale of the plate. We also notice that the velocity profile is slightly greater than 1 m/s above the boundary layer. We know this would not happen in real flow, rather it is a result of the boundary condition we have chosen for our model. We chose the Symmetry boundary condition at the top of our flow field, which is essentially a wall without the no-slip condition. Thus, no flow is permitted to escape through this boundary. In a real external flow, there is no such boundary at the top and flow is permitted to pass through freely. When we consider the inflow and outflow velocity profiles in terms of conservation of mass, the uniform velocity profile of 1 m/s at x = 0 has more mass entering the flow field than the non-uniform velocity profile at x = 1m, in which the velocity is lower near the plate. In addition, the fluid is expanding near the plate because its temperature is increasing, further increasing the y-velocity of the fluid above it. These factors require that some mass must escape through the top of our flow field in order to satisfy conservation of mass.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (7 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

Choosing a Pressure Outlet for the top boundary condition would represent real external flow more accurately. Unfortunately, this cannot be used in our flow field without encountering convergence problems, so selecting the Symmetry boundary condition was the next best option. Because we are not allowing flow to escape through the top boundary, we observe an outflow velocity profile in which outflow velocity is greater than 1 above the boundary layer in order to satisfy conservation of mass. Fortunately, the inaccuracies resulting from the model we chose have no significant effect on the heat transfer coefficients at the plate. Select Write to File and save the data for this plot as outflow_profile.xy. Plot Nusselt Number vs. Reynolds Number Recall that the Nusselt Number is a non-dimensional heat transfer coefficient that relates convective and conductive heat transfer.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (8 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

In order to obtain the Nusselt Number from FLUENT, we will begin by plotting Total Surface Heat Flux. Main Menu > Plot > XY Plot... In the Options box, change back to Position on X Axis. In the Plot Direction box, enter the default values of 1 in the X box and 0 in the Y box. Under Y-Axis Function choose Wall Fluxes. In the box below, chose Total Surface Heat Flux. Select Plate under Surfaces. Before plotting, be sure to turn on Auto Range for the Y axis under Axes....

Click Plot.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (9 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

(click picture for larger image) Now Select Write to File. Save the data for this plot as heatflux.xy. Click Write.... Open the file heatflux.xy using Wordpad or a similar application. You can simply copy and paste the data into Excel.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (10 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

If Excel does not automatically separate the data into columns, separate it by selecting the column of data and then using the Text to Columns function: Main Menu > Data > Text to Columns The first column is the x location on the plate and the second column is the total surface heat flux (q'') at the corresponding x location. We now need to determine the Nusselt number from these values at each x location. We will define positive q'' as heat transfer into the fluid. Use the following expression to convert q'' to Nusselt Number in your Excel spreadsheet.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (11 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

Reynolds Number can be defined at each x location by

Now plot Re vs. Nu in Excel. Your plot should look like this:

(click picture for larger image) Compare Results with Correlation & Experiment Validate your results form FLUENT by comparing to a correlation and http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (12 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

experimental results. The correlation we will use is derived by Reynolds [1]:

All properties in this correlation are evaluated at the free-stream static temperature of 300K.This correlation assumes the following: 1. Pr = 0.7 2. 10^5 < Re < 10^7 3. Fluid properties evaluated at free-stream conditions 4. Turbulent compressible boundary layer 5. Flat plate 6. Friction factor calculated from the following relation (implicit in Nu equation above, does not need to be calculated in your analysis):

Add the Reynolds correlation for Nusselt Number to your Excel spreadsheet. Seban & Doughty [2] performed a heated flat plate experiment for which they derived the following expression for Nusselt Number:

The Seban & Doughtyexperiment was performed with air as the fluid (Pr = 0.7) http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (13 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

and at various Reynolds Numbers in the range 1e5 < Re < 4e6. Add the this experimental relation for Nusselt Number to your Excel spreadsheet. Now plot and compare Re vs. Nu from FLUENT, the Reynolds Correlation, and Seban's experiment.

(click picture for larger image) As we can see, there is very little variation between these 3 results. The largest % error between the FLUENT results and the Reynolds correlation is only 7.5%. In turbulent flow as we have here, similar results between FLUENT and correlation are more difficult to come by than in laminar flow because a turbulent model must be used in FLUENT, which does not solve the Navier-Stokes Equations exactly. Experimental error (in experiments from which correlations are derived) also accounts for some of this 7.5% error. Each of the turbulence models that FLUENT offers produces results similar to these, although the kepsilon model is the most appropriate model to use in this case.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (14 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Forced Convection on a Flat Plate Step #6

Go to Step 7: Refine Mesh [1] Reynolds, W.C., Kays, W.M., Kline, S.J. "Heat Transfer in the Turbulent Incompressible Boundary Layer." NASA Memo 12-1-58W. December 1958. [2] Seban, R.A. and Doughty, D.L. "Heat Transfer to Turbulent Boundary Layers with Variable Freestream Velocity." Journal of Heat Transfer 78:217 (1956). Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step6.htm (15 of 15)11/7/2005 7:07:43 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Forced Convection over a Flat Plate Problem Specification 1. Start-up and preliminary set-up 2. Create Geometry 3. Mesh Geometry 4. Set Up Problem in FLUENT 5. Solve! 6. Analyze Results 7. Refine Mesh

Step 7: Refine Mesh It is very important to assess the dependence of your results on the mesh used by repeating the same calculation on different meshes and comparing the results. We will re-do the previous calculation on a 30 x 50 mesh as well as a 30 x 150 mesh and then compare the results with the 30x100 mesh used previously. Modify Mesh in GAMBIT to a 30x50 mesh The 30x100 mesh is saved as plate.dbs in your working directory. Bring up the command prompt window as in step 1. To copy plate.dbs to plate50.dbs, at the command prompt, type copy plate.dbs plate50.dbs We will work with plate50.dbs in order to retain plate.dbs as is. Launch GAMBIT with plate50.dbs as the input file by typing: gambit plate50.dbs Follow the same method as in previous tutorials to change the mesh. The face mesh will be automatically deleted when you re-mesh the edges. The top and bottom edges will remain the same. Mesh the inflow and outflow edges at a Successive Ratio of 1.095 and an Interval Count of 50.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (1 of 7)11/7/2005 7:09:12 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Remesh the face and then export this as the 2D mesh file, plate50.msh. Read the file into FLUENT and repeat step 4 and step 5 of this tutorial to set up and solve the problem in FLUENT. The solution should converge in approximately 115 iterations. Plot y+ at the plate as explained in step 6.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (2 of 7)11/7/2005 7:09:12 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(click picture for larger image) y+ ranges from 29 to 50 in this plot. This is (mostly) outside of the ill-defined Buffer region (5 < y+ < 30) and is thus acceptable. Now use the Total Surface Heat Flux plot to determine Nu(x). Plot Re vs. Nu and compare with the 30x100 mesh results.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (3 of 7)11/7/2005 7:09:12 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(click picture for larger image) We can see that the courser mesh produces slightly different results, although they are still reasonable. Some numerical error is introduced when the less-refined 30x50 mesh is used. As one would expect, resolving the boundary layer to the laminar sublayer, which we did with the orignial mesh, produces more accurate results than resolving only to the turbulent region. Resolving to the laminar sublayer is not always a reasonable thing to do, especially at high Reynolds numbers. The results from using the 30 x 50 grid show that a reasonable solution can still be obtained without resolving down to the laminar sublayer.

Modify Mesh in GAMBIT to a 30x150 mesh Create a mesh that is finer than the original mesh to see if our original solution contained inaccuracies due to the mesh. Mesh the inflow and outflow edges at a Successive Ratio of 1.065 and an Interval Count of 150.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (4 of 7)11/7/2005 7:09:12 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

Remesh the face and then export this as the 2D mesh file, plate150.msh. Read the file into FLUENT and repeat step 4 and step 5 of this tutorial to set up and solve the problem in FLUENT. The solution should converge in approximately 4550 iterations. Plot y+ at the plate.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (5 of 7)11/7/2005 7:09:12 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(click picture for larger image) y+ ranges from 0.14 to 0.25 in this plot, well within the laminar sublayer. Now use the Total Surface Heat Flux plot to determine Nu(x). Plot Re vs. Nu and compare with the 30x100 mesh results.

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (6 of 7)11/7/2005 7:09:12 PM

Fluent Tutorial - Laminar Pipe Flow Step #7

(click picture for larger image) This plot shows that the results did not change by increasing the fineness of the mesh. Thus, we can conclude that our 30x100 mesh was good enough. It is also important to verify that the solution does not change by refining the mesh in the streamwise direction. In this case, the mesh in the streamwise direction is already fine enough to eliminate mesh-dependent numerical error. Copyright 2002. Cornell University Sibley School of Mechanical and Aerospace Engineering. Fluent Short Course-Tutorial List | Feedback

http://instruct1.cit.cornell.edu/courses/fluent/plate/step7.htm (7 of 7)11/7/2005 7:09:12 PM

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/vertices.dat

61 2 0.0000000 0.0000000 0.0005000 0.0023390 0.0010000 0.0037271 0.0020000 0.0058025 0.0040000 0.0089238 0.0080000 0.0137350 0.0120000 0.0178581 0.0200000 0.0253735 0.0300000 0.0330215 0.0400000 0.0391283 0.0500000 0.0442753 0.0600000 0.0487571 0.0800000 0.0564308 0.1000000 0.0629981 0.1200000 0.0686204 0.1400000 0.0734360 0.1600000 0.0775707 0.1800000 0.0810687 0.2000000 0.0839202 0.2200000 0.0861433 0.2400000 0.0878308 0.2600000 0.0890840 0.2800000 0.0900016 0.3000000 0.0906804 0.3200000 0.0911857 0.3400000 0.0915079 0.3600000 0.0916266 0.3800000 0.0915212 0.4000000 0.0911712 0.4200000 0.0905657 0.4400000 0.0897175 0.4600000 0.0886427 0.4800000 0.0873572 0.5000000 0.0858772 0.5200000 0.0842145 0.5400000 0.0823712 0.5600000 0.0803480 0.5800000 0.0781451 0.6000000 0.0757633 0.6200000 0.0732055 0.6400000 0.0704822

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/vertices.dat (1 of 3)12/2/2005 2:52:34 PM

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/vertices.dat

0.6600000 0.0676046 0.6800000 0.0645843 0.7000000 0.0614329 0.7200000 0.0581599 0.7400000 0.0547675 0.7600000 0.0512565 0.7800000 0.0476281 0.8000000 0.0438836 0.8200000 0.0400245 0.8400000 0.0360536 0.8600000 0.0319740 0.8800000 0.0277891 0.9000000 0.0235025 0.9200000 0.0191156 0.9400000 0.0146239 0.9600000 0.0100232 0.9700000 0.0076868 0.9800000 0.0053335 0.9900000 0.0029690 1.0000000 0 0 0.0000000 0.0000000 0.0005000 -.0046700 0.0010000 -.0059418 0.0020000 -.0078113 0.0040000 -.0105126 0.0080000 -.0142862 0.0120000 -.0169733 0.0200000 -.0202723 0.0300000 -.0226056 0.0400000 -.0245211 0.0500000 -.0260452 0.0600000 -.0271277 0.0800000 -.0284595 0.1000000 -.0293786 0.1200000 -.0299633 0.1400000 -.0302404 0.1600000 -.0302546 0.1800000 -.0300490 0.2000000 -.0296656 0.2200000 -.0291445 0.2400000 -.0285181 0.2600000 -.0278164 0.2800000 -.0270696

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/vertices.dat (2 of 3)12/2/2005 2:52:34 PM

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/vertices.dat

0.3000000 -.0263079 0.3200000 -.0255565 0.3400000 -.0248176 0.3600000 -.0240870 0.3800000 -.0233606 0.4000000 -.0226341 0.4200000 -.0219042 0.4400000 -.0211708 0.4600000 -.0204353 0.4800000 -.0196986 0.5000000 -.0189619 0.5200000 -.0182262 0.5400000 -.0174914 0.5600000 -.0167572 0.5800000 -.0160232 0.6000000 -.0152893 0.6200000 -.0145551 0.6400000 -.0138207 0.6600000 -.0130862 0.6800000 -.0123515 0.7000000 -.0116169 0.7200000 -.0108823 0.7400000 -.0101478 0.7600000 -.0094133 0.7800000 -.0086788 0.8000000 -.0079443 0.8200000 -.0072098 0.8400000 -.0064753 0.8600000 -.0057408 0.8800000 -.0050063 0.9000000 -.0042718 0.9200000 -.0035373 0.9400000 -.0028028 0.9600000 -.0020683 0.9700000 -.0017011 0.9800000 -.0013339 0.9900000 -.0009666 1.0000000 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/vertices.dat (3 of 3)12/2/2005 2:52:34 PM

Farfield Boundary - Vertices and Edges

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/01farfield_edges.htm (1 of 2)12/2/2005 2:56:18 PM

Farfield Boundary - Vertices and Edges

http://instruct1.cit.cornell.edu/courses/fluent/airfoil/01farfield_edges.htm (2 of 2)12/2/2005 2:56:18 PM

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF