Top Banner

of 864

Fluent Tutorials

Nov 03, 2014

Download

Documents

naru_sa
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

FLUENT 6.1

Tutorial Guide

February 2003

Licensee acknowledges that use of Fluent Inc.s products can only provide an imprecise estimation of possible future performance and that additional testing and analysis, independent of the Licensors products, must be conducted before any product can be nally developed or commercially introduced. As a result, Licensee agrees that it will not rely upon the results of any usage of Fluent Inc.s products in determining the nal design, composition or structure of any product.

Copyright c 2003 by Fluent Inc. All rights reserved. No part of this document may be reproduced or otherwise used in any form without express written permission from Fluent Inc.

Airpak, FIDAP, FLUENT, GAMBIT, Icepak, MixSim, and POLYFLOW are registered trademarks of Fluent Inc. All other products or name brands are trademarks of their respective holders.

Fluent Inc. Centerra Resource Park 10 Cavendish Court Lebanon, NH 03766

Volume 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Introduction to Using Fluent Modeling Periodic Flow and Heat Transfer Modeling External Compressible Flow Modeling Unsteady Compressible Flow Modeling Radiation and Natural Convection Using a Non-Conformal Mesh Using a Single Rotating Reference Frame Using Multiple Rotating Reference Frames Using the Mixing Plane Model Using Sliding Meshes Using Dynamic Meshes Modeling Species Transport and Gaseous Combustion Using the Non-Premixed Combustion Model Modeling Surface Chemistry Modeling Evaporating Liquid Spray Using the VOF Model Modeling Cavitation Using the Mixture and Eulerian Multiphase Models Using the Eulerian Multiphase Model for Granular Flow Modeling Solidication Using the Eulerian Granular Multiphase Model with Heat Transfer Postprocessing Turbo Postprocessing Parallel Processing

Volume 2

Using This Manual

Whats In This ManualThe FLUENT Tutorial Guide contains a number of tutorials that teach you how to use FLUENT to solve dierent types of problems. In each tutorial, features related to problem setup and postprocessing are demonstrated. Tutorial 1 is a detailed tutorial designed to introduce the beginner to FLUENT. This tutorial provides explicit instructions for all steps in the problem setup, solution, and postprocessing. The remaining tutorials assume that you have read or solved Tutorial 1, or that you are already familiar with FLUENT and its interface. In these tutorials, some steps will not be shown explicitly. All of the tutorials include some postprocessing instructions, but Tutorial 22 is devoted entirely to standard postprocessing, and Tutorial 23 is devoted to turbomachinery-specic postprocessing.

Where to Find the Files Used in the TutorialsEach of the tutorials uses an existing mesh le. (Tutorials for mesh generation are provided with the mesh generator documentation.) You will nd the appropriate mesh le (and any other relevant les used in the tutorial) on the FLUENT documentation CD. The Preparation step of each tutorial will tell you where to nd the necessary les. (Note that Tutorials 22, 23, and 24 use existing case and data les.) Some of the more complex tutorials may require a signicant amount of computational time. If you want to look at the results immediately, without waiting for the calculation to nish, you can nd the case and data les associated with the tutorial on the documentation CD (in the same directory where you found the mesh le).

How To Use This ManualDepending on your familiarity with computational uid dynamics and Fluent Inc. software, you can use this tutorial guide in a variety of ways.

For the BeginnerIf you are a beginning user of FLUENT you should rst read and solve Tutorial 1, in order to familiarize yourself with the interface and with basic setup and solution procedures.

c Fluent Inc. January 28, 2003

i

Using This Manual

You may then want to try a tutorial that demonstrates features that you are going to use in your application. For example, if you are planning to solve a problem using the non-premixed combustion model, you should look at Tutorial 13. You may want to refer to other tutorials for instructions on using specic features, such as custom eld functions, grid scaling, and so on, even if the problem solved in the tutorial is not of particular interest to you. To learn about postprocessing, you can look at Tutorial 22, which is devoted entirely to postprocessing (although the other tutorials all contain some postprocessing as well). For turbomachinery-specic postprocessing, see Tutorial 23.

For the Experienced UserIf you are an experienced FLUENT user, you can read and/or solve the tutorial(s) that demonstrate features that you are going to use in your application. For example, if you are planning to solve a problem using the non-premixed combustion model, you should look at Tutorial 13. You may want to refer to other tutorials for instructions on using specic features, such as custom eld functions, grid scaling, and so on, even if the problem solved in the tutorial is not of particular interest to you. To learn about postprocessing, you can look at Tutorial 22, which is devoted entirely to postprocessing (although the other tutorials all contain some postprocessing as well). For turbomachinery-specic postprocessing, see Tutorial 23.

Typographical Conventions Used In This ManualSeveral typographical conventions are used in the text of the tutorials to facilitate your learning process. An exclamation point (!) to the left of a paragraph marks an important note or warning. Dierent type styles are used to indicate graphical user interface menu items and text interface menu items (e.g., Zone Surface panel, surface/zone-surface command). The text interface type style is also used when illustrating exactly what appears on the screen or exactly what you must type in the text window or in a panel. Instructions for performing each step in a tutorial will appear in standard type. Additional information about a step in a tutorial appears in italicized type. A mini ow chart is used to indicate the menu selections that lead you to a specic command or panel. For example,

ii

c Fluent Inc. January 28, 2003

Using This Manual

Dene Boundary Conditions... indicates that the Boundary Conditions... menu item can be selected from the Dene pull-down menu. The words surrounded by boxes invoke menus (or submenus) and the arrows point from a specic menu toward the item you should select from that menu.

c Fluent Inc. January 28, 2003

iii

Using This Manual

iv

c Fluent Inc. January 28, 2003

Contents

1 Introduction to Using FLUENT 2 Modeling Periodic Flow and Heat Transfer 3 Modeling External Compressible Flow 4 Modeling Unsteady Compressible Flow 5 Modeling Radiation and Natural Convection 6 Using a Non-Conformal Mesh 7 Using a Single Rotating Reference Frame 8 Using Multiple Rotating Reference Frames 9 Using the Mixing Plane Model 10 Using Sliding Meshes 11 Using Dynamic Meshes 12 Modeling Species Transport and Gaseous Combustion 13 Using the Non-Premixed Combustion Model 14 Modeling Surface Chemistry 15 Modeling Evaporating Liquid Spray 16 Using the VOF Model

1-1 2-1 3-1 4-1 5-1 6-1 7-1 8-1 9-1 10-1 11-1 12-1 13-1 14-1 15-1 16-1

c Fluent Inc. January 28, 2003

i

CONTENTS

17 Modeling Cavitation 18 Using the Mixture and Eulerian Multiphase Models 19 Using the Eulerian Multiphase Model for Granular Flow 20 Modeling Solidication

17-1 18-1 19-1 20-1

21 Using the Eulerian Granular Multiphase Model with Heat Transfer 21-1 22 Postprocessing 23 Turbo Postprocessing 24 Parallel Processing 22-1 23-1 24-1

ii

c Fluent Inc. January 28, 2003

Tutorial 1.

Introduction to Using FLUENT

Introduction: This tutorial illustrates the setup and solution of the two-dimensional turbulent uid ow and heat transfer in a mixing junction. The mixing elbow conguration is encountered in piping systems in power plants and process industries. It is often important to predict the ow eld and temperature eld in the neighborhood of the mixing region in order to properly design the location of inlet pipes. In this tutorial you will learn how to: Read an existing grid le into FLUENT Use mixed units to dene the geometry and uid properties Set material properties and boundary conditions for a turbulent forced convection problem Initiate the calculation with residual plotting Calculate a solution using the segregated solver Examine the ow and temperature elds using graphics Enable the second-order discretization scheme for improved prediction of temperature Adapt the grid based on the temperature gradient to further improve the prediction of temperature Prerequisites: This tutorial assumes that you have little experience with FLUENT, but that you are generally familiar with the interface. If you are not, please review the sample session in Chapter 1 of the Users Guide.

c Fluent Inc. January 28, 2003

1-1

Introduction to Using FLUENT

Problem Description: The problem to be considered is shown schematically in Figure 1.1. A cold uid at 26 C enters through the large pipe and mixes with a warmer uid at 40 C in the elbow. The pipe dimensions are in inches, and the uid properties and boundary conditions are given in SI units. The Reynolds number at the main inlet is 2.03 105 , so that a turbulent model will be necessary.

Density: Viscosity:

= 1000 kg/m = 8 x 10-4

3

Pa-s 32

Conductivity: k = 0.677 W/m-K Specic Heat: C p = 4216 J/kg-K

39.9 39.9 3

3

16

Ux= 0.2 m/s T = 26C I = 5%

16 12 32 4 Uy= 1 m/s T = 40 C I = 5%

Figure 1.1: Problem Specication

1-2

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Preparation1. Copy the le elbow/elbow.msh from the FLUENT documentation CD to your working directory. For UNIX systems, you can nd the le by inserting the CD into your CD-ROM drive and going to the following directory: /cdrom/fluent6.1/help/tutfiles/ where cdrom must be replaced by the name of your CD-ROM drive. For Windows systems, you can nd the le by inserting the CD into your CD-ROM drive and going to the following directory: cdrom:\fluent6.1\help\tutfiles\ where cdrom must be replaced by the name of your CD-ROM drive (e.g., E). 2. Start the 2D version of FLUENT.

c Fluent Inc. January 28, 2003

1-3

Introduction to Using FLUENT

Step 1: Grid1. Read the grid le elbow.msh. File Read Case...

(a) Select the le elbow.msh by clicking on it under Files and then clicking on OK. Note: As this grid is read by FLUENT, messages will appear in the console window reporting the progress of the conversion. After reading the grid le, FLUENT will report that 918 triangular uid cells have been read, along with a number of boundary faces with dierent zone identiers. 2. Check the grid. Grid Check

1-4

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Grid Check Domain Extents: x-coordinate: min (m) = 0.000000e+00, max (m) = 6.400001e+01 y-coordinate: min (m) = -4.538534e+00, max (m) = 6.400000e+01 Volume statistics: minimum volume (m3): 2.782193e-01 maximum volume (m3): 3.926232e+00 total volume (m3): 1.682930e+03 Face area statistics: minimum face area (m2): 8.015718e-01 maximum face area (m2): 4.118252e+00 Checking number of nodes per cell. Checking number of faces per cell. Checking thread pointers. Checking number of cells per face. Checking face cells. Checking bridge faces. Checking right-handed cells. Checking face handedness. Checking element type consistency. Checking boundary types: Checking face pairs. Checking periodic boundaries. Checking node count. Checking nosolve cell count. Checking nosolve face count. Checking face children. Checking cell children. Checking storage. Done.

Note: The grid check lists the minimum and maximum x and y values from the grid, in the default SI units of meters, and reports on a number of other grid features that are checked. Any errors in the grid would be reported at this time. In particular, you should always make sure that the minimum volume is not negative, since FLUENT cannot begin a calculation if this is the case. To scale the grid to the correct units of inches, the Scale Grid panel will be used.

c Fluent Inc. January 28, 2003

1-5

Introduction to Using FLUENT

3. Smooth (and swap) the grid. Grid Smooth/Swap...

To ensure the best possible grid quality for the calculation, it is good practice to smooth a triangular or tetrahedral grid after you read it into FLUENT. (a) Click the Smooth button and then click Swap repeatedly until FLUENT reports that zero faces were swapped. If FLUENT cannot improve the grid by swapping, no faces will be swapped. (b) Close the panel. 4. Scale the grid. Grid Scale... (a) Under Units Conversion, select in from the drop-down list to complete the phrase Grid Was Created In in (inches). (b) Click Scale to scale the grid. The reported values of the Domain Extents will be reported in the default SI units of meters. (c) Click Change Length Units to set inches as the working units for length. Conrm that the maximum x and y values are 64 inches (see Figure 1.1).

1-6

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

(d) The grid is now sized correctly, and the working units for length have been set to inches. Close the panel. Note: Because the default SI units will be used for everything but the length, there will be no need to change any other units in this problem. The choice of inches for the unit of length has been made by the actions you have just taken. If you want to change the working units for length to something other than inches, say, mm, you would have to visit the Set Units panel in the Dene pull-down menu. 5. Display the grid (Figure 1.2). Display Grid...

(a) Make sure that all of the surfaces are selected and click Display.

c Fluent Inc. January 28, 2003

1-7

Introduction to Using FLUENT

Grid

Nov 13, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 1.2: The Triangular Grid for the Mixing Elbow

Extra: You can use the right mouse button to check which zone number corresponds to each boundary. If you click the right mouse button on one of the boundaries in the graphics window, its zone number, name, and type will be printed in the FLUENT console window. This feature is especially useful when you have several zones of the same type and you want to distinguish between them quickly.

1-8

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Step 2: Models1. Keep the default solver settings. Dene Models Solver...

2. Turn on the standard k - turbulence model. Dene Models Viscous... (a) Select k-epsilon in the Model list. The original Viscous Model panel will expand when you do so. (b) Accept the default Standard model by clicking OK.

c Fluent Inc. January 28, 2003

1-9

Introduction to Using FLUENT

3. Enable heat transfer by activating the energy equation. Dene Models Energy...

1-10

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Step 3: Materials1. Create a new material called water. Dene Materials...

(a) Type the name water in the Name text-entry box. (b) Enter the values shown in the table below under Properties: Property Value density 1000 kg/m3 cp 4216 J/kg-K thermal conductivity 0.677 W/m-K viscosity 8 104 kg/m-s (c) Click Change/Create. (d) Click No when FLUENT asks if you want to overwrite air. The material water will be added to the list of materials which originally contained only air. You can conrm that there are now two materials dened by examining the drop-down list under Fluid Materials.

c Fluent Inc. January 28, 2003

1-11

Introduction to Using FLUENT

Extra: You could have copied the material water from the materials database (accessed by clicking on the Database... button). If the properties in the database are dierent from those you wish to use, you can still edit the values under Properties and click the Change/Create button to update your local copy. (The database will not be aected.) (e) Close the Materials panel.

1-12

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Step 4: Boundary ConditionsDene Boundary Conditions...

1. Set the conditions for the uid. (a) Select uid-9 under Zone. The Type will be reported as uid. (b) Click Set... to open the Fluid panel. (c) Specify water as the uid material by selecting water in the Material Name drop-down list. Click on OK.

c Fluent Inc. January 28, 2003

1-13

Introduction to Using FLUENT

2. Set the boundary conditions at the main inlet. (a) Select velocity-inlet-5 under Zone and click Set.... Hint: If you are unsure of which inlet zone corresponds to the main inlet, you can probe the grid display with the right mouse button and the zone ID will be displayed in the FLUENT console window. In the Boundary Conditions panel, the zone that you probed will automatically be selected in the Zone list. In 2D simulations, it may be helpful to return to the Grid Display panel and deselect the display of the uid and interior zones (in this case, uid-9 and internal-3) before probing with the mouse button for zone names.

1-14

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

(b) Choose Components as the Velocity Specication Method. (c) Set an X-Velocity of 0.2 m/s. (d) Set a Temperature of 293 K. (e) Select Intensity and Hydraulic Diameter as the Turbulence Specication Method. (f) Enter a Turbulence Intensity of 5%, and a Hydraulic Diameter of 32 in. 3. Repeat this operation for velocity-inlet-6, using the values in the following table: velocity specication method y velocity temperature turbulence specication method turbulence intensity hydraulic diameter components 1.0 m/s 313 K intensity & hydraulic diameter 5% 8 in

c Fluent Inc. January 28, 2003

1-15

Introduction to Using FLUENT

4. Set the boundary conditions for pressure-outlet-7, as shown in the panel below.

These values will be used in the event that ow enters the domain through this boundary. 5. For wall-4, keep the default settings for a Heat Flux of 0.

1-16

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

6. For wall-8, you will also keep the default settings. Note: If you probe your display of the grid (without the interior cells) you will see that wall-8 is the wall on the outside of the bend just after the junction. This separate wall zone has been created for the purpose of doing certain postprocessing tasks, to be discussed later in this tutorial.

c Fluent Inc. January 28, 2003

1-17

Introduction to Using FLUENT

Step 5: Solution1. Initialize the ow eld using the boundary conditions set at velocity-inlet-5. Solve Initialize Initialize... (a) Choose velocity-inlet-5 from the Compute From list. (b) Add a Y Velocity value of 0.2 m/sec throughout the domain. Note: While an initial X Velocity is an appropriate guess for the horizontal section, the addition of a Y Velocity will give rise to a better initial guess throughout the entire elbow. (c) Click Init and Close the panel.

1-18

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

2. Enable the plotting of residuals during the calculation. Solve Monitors Residual...

(a) Select Plot under Options, and click OK. Note: By default, all variables will be monitored and checked for determining the convergence of the solution.

c Fluent Inc. January 28, 2003

1-19

Introduction to Using FLUENT

3. Save the case le (elbow1.cas). File Write Case...

Keep the Write Binary Files (default) option on so that a binary le will be written. 4. Start the calculation by requesting 100 iterations. Solve Iterate... (a) Input 100 for the Number of Iterations and click Iterate.

The solution reaches convergence after approximately 60 iterations. The residual plot is shown in Figure 1.3. Note that since the residual values are dierent for dierent computers, the plot that appears on your screen may not be exactly the same as the one shown here.

1-20

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Residuals continuity x-velocity y-velocity energy k epsilon

1e+03 1e+02 1e+01 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07 0 10 20 30 40 50 60

Iterations

Scaled Residuals

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.3: Residuals for the First 60 Iterations

5. Check for convergence. There are no universal metrics for judging convergence. Residual denitions that are useful for one class of problem are sometimes misleading for other classes of problems. Therefore it is a good idea to judge convergence not only by examining residual levels, but also by monitoring relevant integrated quantities and checking for mass and energy balances. The three methods to check for convergence are: Monitoring the residuals. Convergence will occur when the Convergence Criterion for each variable has been reached. The default criterion is that each residual will be reduced to a value of less than 103 , except the energy residual, for which the default criterion is 106 . Solution no longer changes with more iterations. Sometimes the residuals may not fall below the convergence criterion set in the case setup. However, monitoring the representative ow variables through iterations may show that the residuals have stagnated and do not change with further iterations. This could also be considered as convergence.

c Fluent Inc. January 28, 2003

1-21

Introduction to Using FLUENT

Overall mass, momentum, energy and scalar balances are obtained. Check the overall mass, momentum, energy and scalar balances in the Flux Reports panel. The net imbalance should be less than 0.1% of the net ux through the domain. Report Fluxes

6. Save the data le (elbow1.dat). Use the same prex (elbow1) that you used when you saved the case le earlier. Note that additional case and data les will be written later in this session. File Write Data...

1-22

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Step 6: Displaying the Preliminary Solution1. Display lled contours of velocity magnitude (Figure 1.4). Display Contours...

(a) Select Velocity... and then Velocity Magnitude from the drop-down lists under Contours Of. (b) Select Filled under Options. (c) Click Display. Note: Right-clicking on a point in the domain will cause the value of the corresponding contour to be displayed in the console window.

c Fluent Inc. January 28, 2003

1-23

Introduction to Using FLUENT

1.24e+00 1.18e+00 1.12e+00 1.05e+00 9.93e-01 9.31e-01 8.69e-01 8.07e-01 7.45e-01 6.82e-01 6.20e-01 5.58e-01 4.96e-01 4.34e-01 3.72e-01 3.10e-01 2.48e-01 1.86e-01 1.24e-01 6.20e-02 0.00e+00

Contours of Velocity Magnitude (m/s)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.4: Predicted Velocity Distribution After the Initial Calculation

1-24

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

2. Display lled contours of temperature (Figure 1.5).

(a) Select Temperature... and Static Temperature in the drop-down lists under Contours Of. (b) Click Display.

c Fluent Inc. January 28, 2003

1-25

Introduction to Using FLUENT

3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.09e+02 3.08e+02 3.07e+02 3.06e+02 3.05e+02 3.04e+02 3.03e+02 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02

Contours of Static Temperature (k)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.5: Predicted Temperature Distribution After the Initial Calculation

1-26

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

3. Display velocity vectors (Figure 1.6). Display Vectors... (a) Click Display to plot the velocity vectors. Note: The Auto Scale button is on by default under Options. This scaling sometimes creates vectors that are too small or too large in the majority of the domain. (b) Resize the vectors by increasing the Scale factor to 3.

(c) Display the vectors once again. (d) Use the middle mouse button to zoom the view. To do this, hold down the button and drag your mouse to the right and either up or down to construct a rectangle on the screen. The rectangle should be a frame around the region that you wish to enlarge. Let go of the mouse button and the image will be redisplayed (Figure 1.7). (e) Un-zoom the view by holding down the middle mouse button and dragging it to the left to create a rectangle. When you let go, the image will be redrawn. If the resulting image is not centered, you can use the left mouse button to translate it on your screen.

c Fluent Inc. January 28, 2003

1-27

Introduction to Using FLUENT

1.40e+00 1.33e+00 1.27e+00 1.20e+00 1.13e+00 1.06e+00 9.96e-01 9.28e-01 8.61e-01 7.93e-01 7.26e-01 6.59e-01 5.91e-01 5.24e-01 4.56e-01 3.89e-01 3.21e-01 2.54e-01 1.86e-01 1.19e-01 5.16e-02

Velocity Vectors Colored By Velocity Magnitude (m/s)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.6: Resized Velocity Vectors

1.40e+00 1.33e+00 1.27e+00 1.20e+00 1.13e+00 1.06e+00 9.96e-01 9.28e-01 8.61e-01 7.93e-01 7.26e-01 6.59e-01 5.91e-01 5.24e-01 4.56e-01 3.89e-01 3.21e-01 2.54e-01 1.86e-01 1.19e-01 5.16e-02

Velocity Vectors Colored By Velocity Magnitude (m/s)

Nov 13, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.7: Magnied View of Velocity Vectors

1-28

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

4. Create an XY plot of temperature across the exit (Figure 1.8). Plot XY Plot...

(a) Select Temperature... and Static Temperature in the drop-down lists under the Y Axis Function. (b) Select pressure-outlet-7 from the Surfaces list. (c) Click Plot.

c Fluent Inc. January 28, 2003

1-29

Introduction to Using FLUENT

pressure-outlet-73.10e+02

3.08e+02

3.06e+02

3.04e+02

Static Temperature (k)

3.02e+02

3.00e+02

2.98e+02

2.96e+02 48 50 52 54 56 58 60 62 64

Position (in)

Static Temperature

Nov 13, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.8: Temperature Distribution at the Outlet

1-30

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

5. Make an XY plot of the static pressure on the outer wall of the large pipe, wall-8 (Figure 1.9).

(a) Choose Pressure... and Static Pressure from the Y Axis Function drop-down lists. (b) Deselect pressure-outlet-7 and select wall-8 from the Surfaces list. (c) Change the Plot Direction for X to 0, and the Plot Direction for Y to 1. With a Plot Direction vector of (0,1), FLUENT will plot static pressure at the cells of wall-8 as a function of y . (d) Click Plot.

c Fluent Inc. January 28, 2003

1-31

Introduction to Using FLUENT

wall-81.00e+02

0.00e+00

-1.00e+02

-2.00e+02

Static Pressure (pascal)

-3.00e+02

-4.00e+02

-5.00e+02

-6.00e+02 10 20 30 40 50 60 70

Position (in)

Static Pressure

Nov 13, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.9: Pressure Distribution along the Outside Wall of the Bend

1-32

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

6. Dene a custom eld function for the dynamic head formula (|V |2 /2). Dene Custom Field Functions...

(a) In the Field Functions drop-down list, select Density and click the Select button. (b) Click the multiplication button, X. (c) In the Field Functions drop-down list, select Velocity and Velocity Magnitude and click Select. (d) Click y^x to raise the last entry to a power, and click 2 for the power. (e) Click the divide button, /, and then click 2. (f) Enter the name dynam-head in the New Function Name text entry box. (g) Click Dene, and then Close the panel.

c Fluent Inc. January 28, 2003

1-33

Introduction to Using FLUENT

7. Display lled contours of the custom eld function (Figure 1.10). Display Contours...

(a) Select Custom Field Functions... in the drop-down list under Contours Of. The function you created, dynam-head, will be shown in the lower drop-down list. (b) Click Display, and then Close the panel. Note: You may need to un-zoom your view after the last vector display, if you have not already done so.

1-34

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

7.69e+02 7.30e+02 6.92e+02 6.53e+02 6.15e+02 5.76e+02 5.38e+02 5.00e+02 4.61e+02 4.23e+02 3.84e+02 3.46e+02 3.07e+02 2.69e+02 2.31e+02 1.92e+02 1.54e+02 1.15e+02 7.69e+01 3.84e+01 0.00e+00

Contours of dynam-head

Nov 13, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.10: Contours of the Custom Field Function, Dynamic Head

c Fluent Inc. January 28, 2003

1-35

Introduction to Using FLUENT

Step 7: Enabling Second-Order DiscretizationThe elbow solution computed in the rst part of this tutorial uses rst-order discretization. The resulting solution is very diusive; mixing is overpredicted, as can be seen in the contour plots of temperature and velocity distribution. You will now change to second-order discretization for the energy equation in order to improve the accuracy of the solution. With the second-order discretization, you will need to use a less aggressive (lower) value for the energy under-relaxation to ensure convergence. 1. Enable the second-order scheme for the calculation of energy and decrease the energy under-relaxation factor. Solve Controls Solution...

(a) Under Discretization, select Second Order Upwind for Energy. (b) Under Under-Relaxation Factors, set the Energy under-relaxation factor to 0.8. Note: You will have to scroll down both the Discretization and Under-Relaxation Factors lists to see the Energy options.

1-36

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

2. Continue the calculation by requesting 100 more iterations. Solve Iterate...

The solution converges in approximately 35 additional iterations.Residuals continuity x-velocity y-velocity energy k epsilon

1e+03 1e+02 1e+01 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07 0 10 20 30 40 50 60 70 80 90

Iterations

Scaled Residuals

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.11: Residuals for the Second-Order Energy Calculation

Note: Whenever you change the solution control parameters, it is natural to see the residuals jump.

c Fluent Inc. January 28, 2003

1-37

Introduction to Using FLUENT

3. Write the case and data les for the second-order solution (elbow2.cas and elbow2.dat). File Write Case & Data... (a) Enter the name elbow2 in the Case/Data File box. (b) Click OK. The les elbow2.cas and elbow2.dat will be created in your directory. 4. Examine the revised temperature distribution (Figure 1.12). Display Contours...

The thermal spreading after the elbow has been reduced from the earlier prediction (Figure 1.5).

1-38

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.09e+02 3.08e+02 3.07e+02 3.06e+02 3.04e+02 3.03e+02 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 2.92e+02

Contours of Static Temperature (k)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.12: Temperature Contours for the Second-Order Solution

c Fluent Inc. January 28, 2003

1-39

Introduction to Using FLUENT

Step 8: Adapting the GridThe elbow solution can be improved further by rening the grid to better resolve the ow details. In this step, you will adapt the grid based on the temperature gradients in the current solution. Before adapting the grid, you will rst determine an acceptable range of temperature gradients over which to adapt. Once the grid has been rened, you will continue the calculation. 1. Plot lled contours of temperature on a cell-by-cell basis (Figure 1.13). Display Contours...

(a) Select Temperature... and Static Temperature in the Contours Of drop-down lists. (b) Deselect Node Values under Options and click Display. Note: When the contours are displayed you will see the cell values of temperature instead of the smooth-looking node values. Node values are obtained by averaging the values at all of the cells that share the node. Cell values are the values that are stored at each cell center and are displayed throughout the cell. Examining the cell-by-cell values is helpful when you are preparing to do an adaption of the grid because it indicates the region(s) where the adaption will take place.

1-40

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

2. Plot the temperature gradients that will be used for adaption (Figure 1.14).

(a) Select Adaption... and Adaption Function in the Contours Of drop-down lists. (b) Click Display to see the gradients of temperature, displayed on a cell-by-cell basis.

3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.08e+02 3.07e+02 3.06e+02 3.05e+02 3.04e+02 3.03e+02 3.02e+02 3.01e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 2.91e+02 2.90e+02

Contours of Static Temperature (k)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.13: Temperature Contours for the Second-Order Solution: Cell Values

c Fluent Inc. January 28, 2003

1-41

Introduction to Using FLUENT

1.30e-01 1.23e-01 1.17e-01 1.10e-01 1.04e-01 9.74e-02 9.09e-02 8.44e-02 7.79e-02 7.14e-02 6.49e-02 5.84e-02 5.20e-02 4.55e-02 3.90e-02 3.25e-02 2.60e-02 1.95e-02 1.30e-02 6.49e-03 1.42e-14

Contours of Adaption Function

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.14: Contours of Adaption Function: Temperature Gradient Note: The quantity Adaption Function defaults to the gradient of the variable whose Max and Min were most recently computed in the Contours panel. In this example, the static temperature is the most recent variable to have its Max and Min computed, since this occurs when the Display button is pushed. Note that for other applications, gradients of another variable might be more appropriate for performing the adaption. 3. Plot temperature gradients over a limited range in order to mark cells for adaption (Figure 1.15). (a) Under Options, deselect Auto Range so that you can change the minimum temperature gradient value to be plotted. The Min temperature gradient is 0 K/m, as shown in the Contours panel. (b) Enter a new Min value of 0.02. (c) Click Display. The colored cells in the gure are in the high gradient range, so they will be the ones targeted for adaption. 4. Adapt the grid in the regions of high temperature gradient. Adapt Gradient... (a) Select Temperature... and Static Temperature in the Gradients Of drop-down lists. (b) Deselect Coarsen under Options, so that only a renement of the grid will be performed.

1-42

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

1.30e-01 1.24e-01 1.19e-01 1.13e-01 1.08e-01 1.02e-01 9.69e-02 9.14e-02 8.59e-02 8.04e-02 7.49e-02 6.94e-02 6.40e-02 5.85e-02 5.30e-02 4.75e-02 4.20e-02 3.65e-02 3.10e-02 2.55e-02 2.00e-02

Contours of Adaption Function

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.15: Contours of Temperature Gradient Over a Limited Range

(c) Click Compute. FLUENT will update the Min and Max values. (d) Enter the value of 0.02 for the Rene Threshold.

c Fluent Inc. January 28, 2003

1-43

Introduction to Using FLUENT

(e) Click Mark. FLUENT will report the number of cells marked for adaption in the console window. (f) Click Manage... to display the marked cells. This will open the Manage Adaption Registers panel.

(g) Click Display. FLUENT will display the cells marked for adaption (Figure 1.16). (h) Click Adapt. Click Yes when you are asked for conrmation.

Note: There are two dierent ways to adapt. You can click on Adapt in the Manage Adaption Registers panel as was just done, or Close this panel and do the adaption in the Gradient Adaption panel. If you use the Adapt button in the Gradient Adaption panel, FLUENT will recreate an adaption register. Therefore, once you have the Manage Adaption Registers panel open, it saves time to use the Adapt button there. (i) Close the Manage Adaption Registers and Gradient Adaption panels.

1-44

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Adaption Markings (gradient-r0)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.16: Cells Marked for Adaption

c Fluent Inc. January 28, 2003

1-45

Introduction to Using FLUENT

5. Display the adapted grid (Figure 1.17). Display Grid...

Grid

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.17: The Adapted Grid

6. Request an additional 100 iterations. Solve Iterate...

The solution converges after approximately 40 additional iterations. 7. Write the nal case and data les (elbow3.cas and elbow3.dat) using the prex elbow3. File Write Case & Data...

1-46

c Fluent Inc. January 28, 2003

Introduction to Using FLUENT

Residuals continuity x-velocity y-velocity energy k epsilon

1e+03 1e+02 1e+01 1e+00 1e-01 1e-02 1e-03 1e-04 1e-05 1e-06 1e-07 0 20 40 60 80 100 120 140

Iterations

Scaled Residuals

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.18: The Complete Residual History

8. Examine the lled temperature distribution (using node values) on the revised grid (Figure 1.19). Display Contours... Summary: Comparison of the lled temperature contours for the rst solution (using the original grid and rst-order discretization) and the last solution (using an adapted grid and second-order discretization) clearly indicate that the latter is much less diusive. While rst-order discretization is the default scheme in FLUENT, it is good practice to use your rst-order solution as a starting guess for a calculation that uses a higher-order discretization scheme and, optionally, an adapted grid. Note that in this problem, the ow eld is decoupled from temperature since all properties are constant. For such cases, it is more ecient to compute the ow-eld solution rst (i.e., without solving the energy equation) and then solve for energy (i.e., without solving the ow equations). You will use the Solution Controls panel to turn solution of the equations on and o during this procedure.

c Fluent Inc. January 28, 2003

1-47

Introduction to Using FLUENT

3.13e+02 3.12e+02 3.11e+02 3.10e+02 3.09e+02 3.08e+02 3.07e+02 3.06e+02 3.05e+02 3.04e+02 3.02e+02 3.01e+02 3.00e+02 2.99e+02 2.98e+02 2.97e+02 2.96e+02 2.95e+02 2.94e+02 2.93e+02 2.92e+02

Contours of Static Temperature (k)

Nov 12, 2002 FLUENT 6.1 (2d, segregated, ske)

Figure 1.19: Filled Contours of Temperature Using the Adapted Grid

1-48

c Fluent Inc. January 28, 2003

Tutorial 2. Modeling Periodic Flow and Heat TransferIntroduction: Many industrial applications, such as steam generation in a boiler or air cooling in the coil of an air conditioner, can be modeled as two-dimensional periodic heat ow. This tutorial illustrates how to set up and solve a periodic heat transfer problem, given a pregenerated mesh. The system that is modeled is a bank of tubes containing a owing uid at one temperature that is immersed in a second uid in cross-ow at a dierent temperature. Both uids are water, and the ow is classied as laminar and steady, with a Reynolds number of approximately 100. The mass ow rate of the cross-ow is known, and the model is used to predict the ow and temperature elds that result from convective heat transfer. Due to symmetry of the tube bank, and the periodicity of the ow inherent in the tube bank geometry, only a portion of the geometry will be modeled in FLUENT, with symmetry applied to the outer boundaries. The resulting mesh consists of a periodic module with symmetry. In the tutorial, the inow boundary will be redened as a periodic zone, and the outow boundary dened as its shadow. In this tutorial you will learn how to: Create periodic zones Dene a specied periodic mass ow rate Model periodic heat transfer with specied temperature boundary conditions Calculate a solution using the segregated solver Plot temperature proles on specied isosurfaces Prerequisites: This tutorial assumes that you are familiar with the menu structure in FLUENT and that you have solved or read Tutorial 1. Some steps will not be shown explicitly.

c Fluent Inc. January 28, 2003

2-1

Modeling Periodic Flow and Heat Transfer

Problem Description: This problem considers a 2D section of a tube bank. A schematic of the problem is shown in Figure 2.1. The bank consists of uniformly spaced tubes with a diameter of 1 cm, that are staggered in the direction of cross-uid ow. Their centers are separated by a distance of 2 cm in the x direction, and 1 cm in the y direction. The bank has a depth of 1 m. Because of the symmetry of the tube bank geometry, only a portion of the domain needs to be modeled. The computational domain is shown in outline in Figure 2.1. A mass ow rate of 0.05 kg/s is applied to the inow boundary of the periodic module. The temperature of the tube wall (Twall ) is 400 K and the bulk temperature of the cross-ow water (T ) is 300 K. The properties of water that are used in the model are shown in Figure 2.1.

Preparation1. Copy the le tubebank/tubebank.msh from the FLUENT documentation CD to your working directory (as described in Tutorial 1). 2. Start the 2D version of FLUENT.

Step 1: Grid1. Read in the mesh le tubebank.msh. File Read Case... 2. Check the grid. Grid Check FLUENT will perform various checks on the mesh and will report the progress in the console window. Pay particular attention to the reported minimum volume. Make sure this is a positive number. 3. Scale the grid. Grid Scale...

2-2

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

4 cm

= 300 K

m = 0.05 kg/s

{

wall = 400 K 0.5 cm

1 cm

3 = 998.2 kg/m = 0.001003 kg/m-s

c p = 4182 J/kg-Kk = 0.6 W/m-K

Figure 2.1: Schematic of the Problem

c Fluent Inc. January 28, 2003

2-3

Modeling Periodic Flow and Heat Transfer

(a) In the Units Conversion drop-down list, select cm to complete the phrase Grid Was Created In cm (centimeters). (b) Click on Scale to scale the grid. The nal Domain Extents should appear as in the panel above. 4. Display the mesh (Figure 2.2). Display Grid...

In Figure 2.2 you can see that quadrilateral cells are used in the regions surrounding the tube walls, and triangular cells are used for the rest of the domain, resulting in a hybrid mesh. The quadrilateral cells provide better resolution of the viscous gradients near the tube walls. The remainder of the computational domain is conveniently lled with triangular cells.

2-4

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

Grid

Nov 13, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 2.2: Mesh for the Periodic Tube Bank

Extra: You can use the right mouse button to check which zone number corresponds to each boundary. If you click the right mouse button on one of the boundaries in the graphics window, its zone number, name, and type will be printed in the FLUENT console window. This feature is especially useful when you have several zones of the same type and you want to distinguish between them quickly. 5. Create the periodic zone. wall-9 and wall-12, the inow and outow boundaries, respectively, are currently dened as wall zones and need to be redened as periodic. wall-9 will be made into a translationally periodic zone, and wall-12 will be deleted and redened as wall-9s periodic shadow. (a) In the console window, type the commands shown in boxes in the dialog below. Hint: You may need to enter press the key to get the > prompt.

c Fluent Inc. January 28, 2003

2-5

Modeling Periodic Flow and Heat Transfer

grid/modify-zones/make-periodic Periodic zone [()] 9 Shadow zone [()] 12 Rotational periodic? (if no, translational) [yes] no Create periodic zones? [yes] yes Auto detect translation vector? [yes] yes computed translation deltas: 0.040000 0.000000 all 26 faces matched for zones 9 and 12. zone 12 deleted created periodic zones.

2-6

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

Step 2: Models1. Keep the default solver settings. Dene Models Solver...

2. Enable heat transfer by activating the energy equation. Dene Models Energy...

c Fluent Inc. January 28, 2003

2-7

Modeling Periodic Flow and Heat Transfer

3. Set the periodic ow conditions. Dene Periodic Conditions...

(a) Select Specify Mass Flow under Type. This will allow you to specify the Mass Flow Rate. (b) Enter a Mass Flow Rate of 0.05 kg/s. (c) Click OK.

2-8

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

Step 3: MaterialsYou will need to add liquid water to the list of uid materials by copying it from the materials database. 1. Copy the properties of liquid water from the database. Dene Materials... (a) Click on the Database... button. This will open the Database Materials panel.

c Fluent Inc. January 28, 2003

2-9

Modeling Periodic Flow and Heat Transfer

(b) Scroll down the Fluid Materials list to the bottom, and select water-liquid (h2o). This will display the default settings for water-liquid as shown in the panel above. (c) Click Copy, and Close the Database Materials panel. The Materials panel will now display the copied information for water.

2-10

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

Step 4: Boundary ConditionsDene Boundary Conditions... 1. Set the conditions for uid-16.

(a) Select water-liquid in the Material Name drop-down list.

c Fluent Inc. January 28, 2003

2-11

Modeling Periodic Flow and Heat Transfer

2. Set the boundary conditions for wall-21. wall-21 is the bottom wall of the left tube in the periodic module shown in Figure 2.1.

(a) Change the Zone Name from wall-21 to wall-bottom. (b) Select Temperature under Thermal Conditions. (c) Change the Temperature to 400 K.

2-12

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

3. Set the boundary conditions for wall-3. wall-3 is the top wall of the right tube in the periodic module shown in Figure 2.1.

(a) Change the Zone Name from wall-3 to wall-top. (b) Select Temperature under Thermal Conditions. (c) Change the Temperature to 400 K.

c Fluent Inc. January 28, 2003

2-13

Modeling Periodic Flow and Heat Transfer

Step 5: Solution1. Set the solution parameters. Solve Controls Solution...

(a) Change the Under-Relaxation Factor for Energy to 0.9. Hint: You will need to scroll down the Under-Relaxation Factors list to see Energy. (b) Under Discretization, select Second Order Upwind for Momentum and Energy.

2-14

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

2. Enable the plotting of residuals. Solve Monitors Residual...

(a) Under Options, select Plot. (b) Click the OK button.

c Fluent Inc. January 28, 2003

2-15

Modeling Periodic Flow and Heat Transfer

3. Initialize the solution. Solve Initialize Initialize...

(a) Under Initial Values, check that the value for Temperature is set to 300 K. (b) Click Init, and Close the panel. 4. Save the case le (tubebank.cas). File Write Case... 5. Start the calculation by requesting 350 iterations. Solve Iterate...

(a) Set the Number of Iterations to 350. (b) Click Iterate.

2-16

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

The energy residual curve begins to atten out after about 350 iterations. In order for the solution to converge, the relaxation factor for energy will have to be further reduced. 6. Change the Under-Relaxation Factor for Energy to 0.6. Solve Controls Solution... 7. Continue the calculation by requesting another 300 iterations. Solve Iterate... After restarting the calculation, you will see an initial dip in the plot of the energy residual, resulting from a reduction in the under-relaxation factor. The solution will converge in a total of approximately 580 iterations. 8. Save the case and data les (tubebank.cas and tubebank.dat). File Write Case & Data...

c Fluent Inc. January 28, 2003

2-17

Modeling Periodic Flow and Heat Transfer

Step 6: Postprocessing1. Display lled contours of static pressure (Figure 2.3). Display Contours...

(a) Select Filled under Options. (b) Select Pressure... and Static Pressure in the Contours Of drop-down list. (c) Click Display.

2-18

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

8.20e-02 7.56e-02 6.93e-02 6.29e-02 5.66e-02 5.02e-02 4.39e-02 3.75e-02 3.12e-02 2.48e-02 1.85e-02 1.21e-02 5.78e-03 -5.66e-04 -6.91e-03 -1.33e-02 -1.96e-02 -2.60e-02 -3.23e-02 -3.87e-02 -4.50e-02

Contours of Static Pressure (pascal)

Dec 17, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 2.3: Contours of Static Pressure

2. Change the view to mirror the display across the symmetry planes (Figure 2.4). Display Views...

(a) Select all of the symmetry zones by clicking the shaded icon to the right of Mirror Planes. Note: There are four symmetry zones in the Mirror Planes list because the top and bottom symmetry planes in the domain are each comprised of two symmetry zones, one on each side of the tube. It is also possible to generate the same display shown in Figure 2.4 by selecting just one of the symmetry zones on the top symmetry plane, and one on the bottom.

c Fluent Inc. January 28, 2003

2-19

Modeling Periodic Flow and Heat Transfer

(b) Click Apply, and Close the panel. (c) Using the left button of your mouse, translate the view so that it is centered in the window.

8.20e-02 7.56e-02 6.93e-02 6.29e-02 5.66e-02 5.02e-02 4.39e-02 3.75e-02 3.12e-02 2.48e-02 1.85e-02 1.21e-02 5.78e-03 -5.66e-04 -6.91e-03 -1.33e-02 -1.96e-02 -2.60e-02 -3.23e-02 -3.87e-02 -4.50e-02

Contours of Static Pressure (pascal)

Dec 17, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 2.4: Contours of Static Pressure with Symmetry

Note: The pressure contours displayed in Figure 2.4 do not include the linear pressure gradient computed by the solver; thus the contours are periodic at the inow and outow boundaries.

2-20

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

3. Display lled contours of static temperature (Figure 2.5). Display Contours...

(a) Select Temperature... and Static Temperature in the Contours Of drop-down list. (b) Click Display.

c Fluent Inc. January 28, 2003

2-21

Modeling Periodic Flow and Heat Transfer

4.00e+02 3.94e+02 3.88e+02 3.82e+02 3.75e+02 3.69e+02 3.63e+02 3.57e+02 3.51e+02 3.45e+02 3.39e+02 3.32e+02 3.26e+02 3.20e+02 3.14e+02 3.08e+02 3.02e+02 2.96e+02 2.90e+02 2.83e+02 2.77e+02

Contours of Static Temperature (k)

Dec 17, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 2.5: Contours of Static Temperature

The contours reveal the temperature increase in the uid due to heat transfer from the tubes. The hotter uid is conned to the near-wall and wake regions, while a narrow stream of cooler uid is convected through the tube bank.

2-22

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

4. Display the velocity vectors (Figure 2.6). Display Vectors...

(a) Select Velocity... and Velocity Magnitude in the Color By drop-down list. (b) Change the Scale to 2. This will enlarge the vectors that are displayed, making it easier to view the ow patterns. (c) Click Display. (d) Zoom in on the upper right portion of the left tube using your middle mouse button, to get the display shown in Figure 2.6. This zoomed-in view of the velocity vector plot clearly shows the recirculating ow behind the tube and the boundary layer development along the tube surface.

c Fluent Inc. January 28, 2003

2-23

Modeling Periodic Flow and Heat Transfer

1.31e-02 1.25e-02 1.18e-02 1.12e-02 1.05e-02 9.85e-03 9.19e-03 8.53e-03 7.88e-03 7.22e-03 6.57e-03 5.91e-03 5.25e-03 4.60e-03 3.94e-03 3.28e-03 2.63e-03 1.97e-03 1.32e-03 6.59e-04 2.53e-06

Velocity Vectors Colored By Velocity Magnitude (m/s)

Nov 13, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 2.6: Velocity Vectors

2-24

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

5. Plot the temperature proles at three cross-sections of the tube bank. (a) Create an isosurface on the periodic tube bank at x = 0.01 m (through the rst tube). You will rst need to create a surface of constant x coordinate for each crosssection: x = 0.01, 0.02, and 0.03 m. These isosurfaces correspond to the vertical cross-sections through the rst tube, halfway between the two tubes, and through the second tube. Surface Iso-Surface...

i. In the Surface of Constant drop-down lists, select Grid... and X-Coordinate. ii. Enter x=0.01m under New Surface Name. iii. Enter 0.01 for Iso-Values. iv. Click Create. (b) Follow the same procedure to create surfaces at: x = 0.02 m (halfway between the two tubes) x = 0.03 m (through the middle of the second tube)

c Fluent Inc. January 28, 2003

2-25

Modeling Periodic Flow and Heat Transfer

(c) Create an XY plot of static temperature on the three isosurfaces. Plot XY Plot...

i. Change the Plot Direction for X to 0, and the Plot Direction for Y to 1. With a Plot Direction vector of (0,1), FLUENT will plot the selected variable as a function of y . Since you are plotting the temperature prole on cross-sections of constant x, the y direction is the one in which the temperature varies. ii. Select Temperature... and Static Temperature in the Y-Axis Function dropdown lists. iii. Scroll down the Surfaces list and select x=0.01m, x=0.02m, and x=0.03m. iv. Click Curves... to dene dierent styles for the dierent plot curves. This will open the Curves - Solution XY Plot panel.

2-26

c Fluent Inc. January 28, 2003

Modeling Periodic Flow and Heat Transfer

v. Select + in the Symbol drop-down list. vi. Click Apply. This assigns the + symbol to the x = 0.01 m curve. vii. Increase the Curve # to 1 to dene the style for the x = 0.02 m curve. viii. Select x in the Symbol drop-down list. ix. Change the Size to 0.5. x. Click Apply, and Close the panel. Since you did not change the curve style for the x = 0.03 m curve, the default symbol will be used. xi. In the Solution XY Plot panel, click Plot. Summary: In this tutorial, periodic ow and heat transfer in a staggered tube bank were modeled in FLUENT. The model was set up assuming a known mass ow through the tube bank and constant wall temperatures. Due to the periodic nature of the ow and symmetry of the geometry, only a small piece of the full geometry was modeled. In addition, the tube bank conguration lent itself to the use of a hybrid mesh with quadrilateral cells around the tubes and triangles elsewhere. The Periodicity Conditions panel makes it easy to run this type of model over a variety of operating conditions. For example, dierent ow rates (and hence dierent Reynolds numbers) can be studied, or a dierent inlet bulk temperature can be imposed. The resulting solution can then be examined to extract the pressure drop per tube row and overall Nusselt number for a range of Reynolds numbers.

c Fluent Inc. January 28, 2003

2-27

Modeling Periodic Flow and Heat Transfer

x=0.01m x=0.02m x=0.03m

4.00e+02

3.80e+02

3.60e+02

3.40e+02

Static Temperature (k)

3.20e+02

3.00e+02

2.80e+02

2.60e+02 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

Position (m)

Static Temperature

Nov 13, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 2.7: Static Temperature at x=0.01, 0.02, and 0.03 m

2-28

c Fluent Inc. January 28, 2003

Tutorial 3. Flow

Modeling External Compressible

Introduction: The purpose of this tutorial is to compute the turbulent ow past a transonic airfoil at a non-zero angle of attack. You will use the Spalart-Allmaras turbulence model. In this tutorial you will learn how to: Model compressible ow (using the ideal gas law for density) Set boundary conditions for external aerodynamics Use the Spalart-Allmaras turbulence model Calculate a solution using the coupled implicit solver Use force and surface monitors to check solution convergence Check the grid by plotting the distribution of y + Prerequisites: This tutorial assumes that you are familiar with the menu structure in FLUENT and that you have solved or read Tutorial 1. Some steps in the setup and solution procedure will not be shown explicitly.

c Fluent Inc. January 28, 2003

3-1

Modeling External Compressible Flow

Problem Description: The problem considers the ow around an airfoil at an incidence angle of = 4 and a free stream Mach number of 0.8 (M = 0.8). This ow is transonic, and has a fairly strong shock near the mid-chord (x/c = 0.45) on the upper (suction) side. The chord length is 1 m. The geometry of the airfoil is shown in Figure 3.1. = 4

M = 0.8 1m

Figure 3.1: Problem Specication

Preparation1. Copy the le airfoil/airfoil.msh from the FLUENT documentation CD to your working directory (as described in Tutorial 1). 2. Start the 2D version of FLUENT.

3-2

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

Step 1: Grid1. Read the grid le airfoil.msh. File Read Case... As FLUENT reads the grid le, it will report its progress in the console window. 2. Check the grid. Grid Check FLUENT will perform various checks on the mesh and will report the progress in the console window. Pay particular attention to the reported minimum volume. Make sure this is a positive number. 3. Display the grid. Display Grid...

(a) Display the grid with the default settings (Figure 3.2). (b) Use the middle mouse button to zoom in on the image so you can see the mesh near the airfoil (Figure 3.3). Quadrilateral cells were used for this simple geometry because they can be stretched easily to account for dierent size gradients in dierent directions. In the present case, the gradients normal to the airfoil wall are much greater than those tangent to the airfoil, except near the leading and trailing edges and in the vicinity of the shock expected on the upper surface. Consequently, the cells nearest the surface have very high aspect ratios. For geometries that are

c Fluent Inc. January 28, 2003

3-3

Modeling External Compressible Flow

Grid

Nov 14, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 3.2: The Grid Around the Airfoil

Grid

Nov 14, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 3.3: The Grid After Zooming In on the Airfoil

3-4

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

more dicult to mesh, it may be easier to create a hybrid mesh comprised of quadrilateral and triangular cells. A parabola was chosen to represent the far-eld boundary because it has no discontinuities in slope, enabling the construction of a smooth mesh in the interior of the domain. Extra: You can use the right mouse button to check which zone number corresponds to each boundary. If you click the right mouse button on one of the boundaries in the graphics window, its zone number, name, and type will be printed in the FLUENT console window. This feature is especially useful when you have several zones of the same type and you want to distinguish between them quickly.

c Fluent Inc. January 28, 2003

3-5

Modeling External Compressible Flow

Step 2: Models1. Select the Coupled, Implicit solver. Dene Models Solver... The coupled solver is recommended when dealing with applications involving highspeed aerodynamics. The implicit solver will generally converge much faster than the explicit solver, but will use more memory. For this 2D case, memory is not an issue.

2. Enable heat transfer by turning on the energy equation. Dene Models Energy...

3-6

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

3. Turn on the Spalart-Allmaras turbulence model. Dene Models Viscous...

(a) Select the Spalart-Allmaras model and retain the default options and constants. The Spalart-Allmaras model is a relatively simple one-equation model that solves a modeled transport equation for the kinematic eddy (turbulent) viscosity. This embodies a relatively new class of one-equation models in which it is not necessary to calculate a length scale related to the local shear layer thickness. The Spalart-Allmaras model was designed specically for aerospace applications involving wall-bounded ows and has been shown to give good results for boundary layers subjected to adverse pressure gradients.

c Fluent Inc. January 28, 2003

3-7

Modeling External Compressible Flow

Step 3: MaterialsThe default Fluid Material is air, which is the working uid in this problem. The default settings need to be modied to account for compressibility and variations of the thermophysical properties with temperature. Dene Materials...

1. Select ideal-gas in the Density drop-down list. 2. Select sutherland in the drop-down list for Viscosity. This will open the Sutherland Law panel.

3-8

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

(a) Click OK to accept the default Three Coecient Method and parameters. The Sutherland law for viscosity is well suited for high-speed compressible ows. 3. Click Change/Create in the Materials panel to save these settings, and then close the panel. Note: While Density and Viscosity have been made temperature-dependent, Cp and Thermal Conductivity have been left constant. For high-speed compressible ows, thermal dependency of the physical properties is generally recommended. In this case, however, the temperature gradients are suciently small that the model is accurate with Cp and Thermal Conductivity constant.

c Fluent Inc. January 28, 2003

3-9

Modeling External Compressible Flow

Step 4: Operating ConditionsSet the operating pressure to 0 Pa. Dene Operating Conditions...

For ows with Mach numbers greater than 0.1, an operating pressure of 0 is recommended. For more information on how to set the operating pressure, see the FLUENT Users Guide.

3-10

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

Step 5: Boundary ConditionsSet the boundary conditions for pressure-far-eld-1 as shown in the panel. Dene Boundary Conditions...

For external ows, you should choose a viscosity ratio between 1 and 10. Note: The X- and Y-Component of Flow Direction are set as above because of the 4 angle of attack: cos 4 0.997564 and sin 4 0.069756.

c Fluent Inc. January 28, 2003

3-11

Modeling External Compressible Flow

Step 6: Solution1. Set the solution controls. Solve Controls Solution...

(a) Set the Under-Relaxation Factor for Modied Turbulent Viscosity to 0.9. Larger (i.e., closer to 1) under-relaxation factors will generally result in faster convergence. However, instability can arise that may need to be eliminated by decreasing the under-relaxation factors. (b) Under Solver Parameters, set the Courant Number to 5. (c) Under Discretization, select Second Order Upwind for Modied Turbulent Viscosity. The second-order scheme will resolve the boundary layer and shock more accurately than the rst-order scheme.

3-12

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

2. Turn on residual plotting during the calculation. Solve Monitors Residual... 3. Initialize the solution. Solve Initialize Initialize...

(a) Select pressure-far-eld-1 in the Compute From drop-down list. (b) Click Init to initialize the solution. To monitor the convergence of the solution, you are going to enable the plotting of the drag, lift, and moment coecients. You will need to iterate until all of these forces have converged in order to be certain that the overall solution has converged. For the rst few iterations of the calculation, when the solution is uctuating, the values of these coecients will behave erratically. This can cause the scale of the y axis for the plot to be set too wide, and this will make variations in the value of the coecients less evident. To avoid this problem, you will have FLUENT perform a small number of iterations, and then you will set up the monitors. Since the drag, lift, and moment coecients are global variables, indicating certain overall conditions, they may converge while conditions at specic points are still varying from one iteration to the next. To monitor this, you will create a point monitor at a point where there is likely to be signicant variation, just upstream of the shock wave, and monitor the value of the skin friction coecient. A small number of iterations will be sucient to roughly determine the location of the shock. After setting up the monitors, you will continue the calculation. 4. Request 100 iterations. Solve Iterate...

c Fluent Inc. January 28, 2003

3-13

Modeling External Compressible Flow

This will be sucient to see where the shock wave is, and the uctuations of the solution will have diminished signicantly. 5. Increase the Courant number. Solve Controls Solution... Under Solver Parameters, set the Courant Number to 20. The solution will generally converge faster for larger Courant numbers, unless the integration scheme becomes unstable. Since you have performed some initial iterations, and the solution is stable, you can try increasing the Courant number to speed up convergence. If the residuals increase without bound, or you get a oating point exception, you will need to decrease the Courant number, read in the previous data le, and try again. 6. Turn on monitors for lift, drag, and moment coecients. Solve Monitors Force...

(a) In the drop-down list under Coecient, select Drag. (b) Select wall-bottom and wall-top in the Wall Zones list. (c) Under Force Vector, enter 0.9976 for X and 0.06976 for Y. These magnitudes ensure that the drag and lift coecients are calculated normal and parallel to the ow, which is 4 o of the global coordinates. (d) Select Plot under Options to enable plotting of the drag coecient. (e) Select Write under Options to save the monitor history to a le, and specify cd-history as the le name. If you do not select the Write option, the history information will be lost when you exit FLUENT.

3-14

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

(f) Click Apply. (g) Repeat the above steps for Lift, using values of 0.06976 for X and 0.9976 for Y under Force Vector. (h) Repeat the above steps for Moment, using values of 0.25 m for X and 0 m for Y under Moment Center. 7. Set the reference values that are used to compute the lift, drag, and moment coefcients. The reference values are used to non-dimensionalize the forces and moments acting on the airfoil. The dimensionless forces and moments are the lift, drag, and moment coecients. Report Reference Values... (a) In the Compute From drop-down list, select pressure-far-eld-1. FLUENT will update the Reference Values based on the boundary conditions at the far-eld boundary.

c Fluent Inc. January 28, 2003

3-15

Modeling External Compressible Flow

8. Dene a monitor for tracking the skin friction coecient value just upstream of the shock wave. (a) Display lled contours of pressure overlaid with the grid. Display Contours... i. Turn on Filled. ii. Select Draw Grid. This will open the Grid Display panel. iii. Close the Grid Display panel, since there are no changes to be made here. iv. Click Display in the Contours panel. v. Zoom in on the airfoil (Figure 3.4).

1.54e+05 1.49e+05 1.44e+05 1.38e+05 1.33e+05 1.28e+05 1.23e+05 1.17e+05 1.12e+05 1.07e+05 1.02e+05 9.63e+04 9.11e+04 8.58e+04 8.05e+04 7.53e+04 7.00e+04 6.47e+04 5.95e+04 5.42e+04 4.89e+04

Contours of Static Pressure (pascal)

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.4: Pressure Contours After 100 Iterations The shock wave is clearly visible on the upper surface of the airfoil, where the pressure rst jumps to a higher value. vi. Zoom in on the shock wave, until individual cells adjacent to the upper surface (wall-top boundary) are visible (Figure 3.5).

3-16

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

1.54e+05 1.49e+05 1.44e+05 1.38e+05 1.33e+05 1.28e+05 1.23e+05 1.17e+05 1.12e+05 1.07e+05 1.02e+05 9.63e+04 9.11e+04 8.58e+04 8.05e+04 7.53e+04 7.00e+04 6.47e+04 5.95e+04 5.42e+04 4.89e+04

Contours of Static Pressure (pascal)

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.5: Magnied View of Pressure Contours Showing Wall-Adjacent Cells The zoomed-in region contains cells just upstream of the shock wave that are adjacent to the upper surface of the airfoil. In the following step, you will create a point surface inside a wall-adjacent cell, to be used for the skin friction coecient monitor. (b) Create a point surface just upstream of the shock wave. Surface Point...

i. Under Coordinates, enter 0.53 for x0, and 0.051 for y0. ii. Click on Create to create the point surface (point-4).

c Fluent Inc. January 28, 2003

3-17

Modeling External Compressible Flow

1.54e+05 1.49e+05 1.44e+05 1.38e+05 1.33e+05 1.28e+05 1.23e+05 1.17e+05 1.12e+05 1.07e+05 1.02e+05 9.63e+04 9.11e+04 8.58e+04 8.05e+04 7.53e+04 7.00e+04 6.47e+04 5.95e+04 5.42e+04 4.89e+04

Contours of Static Pressure (pascal)

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.6: Pressure Contours With Point Surface Note: Here, you have entered the exact coordinates of the point surface so that your convergence history will match the plots and description in this tutorial. In general, however, you will not know the exact coordinates in advance, so you will need to select the desired location in the graphics window as follows: i. Click Select Point With Mouse. ii. Move the mouse to a point located anywhere inside one of the cells adjacent to the upper surface (wall-top boundary), in the vicinity of the shock wave. (See Figure 3.6.) iii. Click the right mouse button. iv. Click Create to create the point surface.

3-18

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

(c) Create a surface monitor for the point surface. Solve Monitors Surface...

i. Increase Surface Monitors to 1. ii. To the right of monitor-1, turn on the Plot and Write options and click Dene.... This will open the Dene Surface Monitor panel.

iii. Select Wall Fluxes... and Skin Friction Coecient under Report Of. iv. Select point-4 in the Surfaces list. v. In the Report Type drop-down list, select Vertex Average.

c Fluent Inc. January 28, 2003

3-19

Modeling External Compressible Flow

vi. Increase the Plot Window to 4. vii. Specify monitor-1.out as the File Name, and click OK in the Dene Surface Monitor panel. viii. Click OK in the Surface Monitors panel. 9. Save the case le (airfoil.cas). File Write Case... 10. Continue the calculation by requesting 200 iterations. Solve Iterate...

2.00e-03 1.80e-03 1.60e-03 1.40e-03 1.20e-03

Vertex Average Skin Friction Coefficient

1.00e-03 8.00e-04 6.00e-04 4.00e-04 2.00e-04 100 110 120 130 140 150 160 170 180 190 200

Iteration

Convergence history of Skin Friction Coefficient on point-4 (in SI units) Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.7: Skin Friction Convergence History for the Initial Calculation

Note: After about 90 iterations, the residual criteria are satised and FLUENT stops iterating. Since the skin friction monitor indicates that the skin friction coecient at point-4 has not converged (Figure 3.7), you will need to decrease the convergence criterion for the modied turbulent viscosity and continue iterating.

3-20

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

11. Reduce the convergence criterion for the modied turbulent viscosity equation. Solve Monitors Residual...

(a) Set the Convergence Criterion for nut to 1e-7 and click OK. nut stands for t . This is the residual for the modied turbulent viscosity that the Spalart-Allmaras model solves for. 12. Continue the calculation for another 600 iterations. After 600 additional iterations, the force monitors and the skin friction coecient monitor (Figures 3.83.11), indicate that the solution has converged. 13. Save the data le (airfoil.dat). File Write Data...

c Fluent Inc. January 28, 2003

3-21

Modeling External Compressible Flow

2.00e-03 1.80e-03 1.60e-03 1.40e-03 1.20e-03

Vertex Average Skin Friction Coefficient

1.00e-03 8.00e-04 6.00e-04 4.00e-04 2.00e-04 100 200 300 400 500 600 700 800

Iteration

Convergence history of Skin Friction Coefficient on point-4 (in SI units) Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.8: Skin Friction Coecient History

8.00e-02

7.50e-02

7.00e-02

Cd

6.50e-02

6.00e-02

5.50e-02

5.00e-02 100 200 300 400 500 600 700 800

Iterations

Drag Convergence

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.9: Drag Coecient Convergence History

3-22

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

6.00e-01 5.75e-01 5.50e-01 5.25e-01 5.00e-01 4.75e-01

Cl

4.50e-01 4.25e-01 4.00e-01 3.75e-01 3.50e-01 3.25e-01 100 200 300 400 500 600 700 800

Iterations

Lift Convergence

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.10: Lift Coecient Convergence History

7.00e-02 6.00e-02 5.00e-02 4.00e-02 3.00e-02

Cm2.00e-02 1.00e-02 0.00e+00 -1.00e-02 -2.00e-02 100 200 300 400 500 600 700 800

Iterations

Moment Convergence

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.11: Moment Coecient Convergence History

c Fluent Inc. January 28, 2003

3-23

Modeling External Compressible Flow

Step 7: Postprocessing1. Plot the y + distribution on the airfoil. Plot XY Plot...

(a) Under Y Axis Function, select Turbulence... and Wall Yplus. (b) In the Surfaces list, select wall-bottom and wall-top. (c) Deselect Node Values and click Plot. Wall Yplus is available only for cell values. The values of y + are dependent on the resolution of the grid and the Reynolds number of the ow, and are meaningful only in boundary layers. The value of y + in the wall-adjacent cells dictates how wall shear stress is calculated. When you use the Spalart-Allmaras model, you should check that y + of the wall-adjacent cells is either very small (on the order of y + = 1), or approximately 30 or greater. Otherwise, you will need to modify your grid. The equation for y + is y+ = y w

where y is the distance from the wall to the cell center, is the molecular viscosity, is the density of the air, and w is the wall shear stress. Figure 3.12 indicates that, except for a few small regions (notably at the shock and the trailing edge), y + > 30 and for much of these regions it does not drop signicantly below 30. Therefore, you can conclude that the grid resolution is acceptable.

3-24

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

wall-bottom wall-top8.00e+01 7.00e+01 6.00e+01 5.00e+01

Wall Yplus

4.00e+01 3.00e+01 2.00e+01 1.00e+01 0.00e+00 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Position (m)

Wall Yplus

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.12: XY Plot of y + Distribution

2. Display lled contours of Mach number (Figure 3.13). Display Contours... (a) Select Velocity... and Mach Number under Contours Of. (b) Turn o the Draw Grid option. (c) Click Display. Note the discontinuity, in this case a shock, on the upper surface at about x/c 0.45. 3. Plot the pressure distribution on the airfoil (Figure 3.14). Plot XY Plot... (a) Under Y Axis Function, choose Pressure... and Pressure Coecient from the drop-down lists. (b) Click Plot. Notice the eect of the shock wave on the upper surface. 4. Plot the x component of wall shear stress on the airfoil surface (Figure 3.15). Plot XY Plot... (a) Under Y Axis Function, choose Wall Fluxes... and X-Wall Shear Stress from the drop-down lists. (b) Click Plot.

c Fluent Inc. January 28, 2003

3-25

Modeling External Compressible Flow

1.44e+00 1.37e+00 1.30e+00 1.22e+00 1.15e+00 1.08e+00 1.01e+00 9.39e-01 8.68e-01 7.96e-01 7.25e-01 6.53e-01 5.82e-01 5.10e-01 4.39e-01 3.67e-01 2.96e-01 2.25e-01 1.53e-01 8.17e-02 1.02e-02

Contours of Mach Number

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.13: Contour Plot of Mach Number

wall-bottom wall-top1.25e+00 1.00e+00 7.50e-01 5.00e-01 2.50e-01

Pressure Coefficient

0.00e+00 -2.50e-01 -5.00e-01 -7.50e-01 -1.00e+00 -1.25e+00 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Position (m)

Pressure Coefficient

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.14: XY Plot of Pressure

3-26

c Fluent Inc. January 28, 2003

Modeling External Compressible Flow

wall-bottom wall-top2.25e+02 2.00e+02 1.75e+02 1.50e+02 1.25e+02

X-Wall Shear Stress (pascal)

1.00e+02 7.50e+01 5.00e+01 2.50e+01 0.00e+00 -2.50e+01 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Position (m)

X-Wall Shear Stress

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.15: XY Plot of x Wall Shear Stress

The large, adverse pressure gradient induced by the shock causes the boundary layer to separate. The point of separation is where the wall shear stress vanishes. Flow reversal is indicated here by negative values of the x component of the wall shear stress. 5. Display lled contours of the x component of velocity (Figure 3.16). Display Contours... (a) Select Velocity... and X Velocity under Contours Of. (b) Click Display. Note the ow reversal behind the shock. 6. Plot velocity vectors (Figure 3.17). Display Vectors... (a) Increase Scale to 15, and click Display. Zooming in on the upper surface, behind the shock, will produce a display similar to Figure 3.17. Flow reversal is clearly visible. Summary: This tutorial demonstrated how to set up and solve an external aerodynamics problem using the Spalart-Allmaras turbulence model. It showed how to monitor convergence using residual, force, and surface monitors, and demonstrated the use of several postprocessing tools to examine the ow phenomena associated with a shock wave.

c Fluent Inc. January 28, 2003

3-27

Modeling External Compressible Flow

4.46e+02 4.20e+02 3.94e+02 3.68e+02 3.42e+02 3.16e+02 2.90e+02 2.64e+02 2.38e+02 2.12e+02 1.86e+02 1.60e+02 1.34e+02 1.08e+02 8.17e+01 5.56e+01 2.96e+01 3.60e+00 -2.24e+01 -4.85e+01 -7.45e+01

Contours of X Velocity (m/s)

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.16: Contour Plot of x Component of Velocity

4.48e+02 4.25e+02 4.03e+02 3.81e+02 3.58e+02 3.36e+02 3.14e+02 2.91e+02 2.69e+02 2.47e+02 2.24e+02 2.02e+02 1.80e+02 1.57e+02 1.35e+02 1.13e+02 9.05e+01 6.82e+01 4.58e+01 2.35e+01 1.21e+00

Velocity Vectors Colored By Velocity Magnitude (m/s)

Nov 14, 2002 FLUENT 6.1 (2d, coupled imp, S-A)

Figure 3.17: Plot of Velocity Vectors Near Upper Wall, Behind Shock

3-28

c Fluent Inc. January 28, 2003

Tutorial 4. Modeling Unsteady Compressible FlowIntroduction: In this tutorial, FLUENTs coupled implicit solver is used to predict the time-dependent ow through a two-dimensional nozzle. As an initial condition for the transient problem, a steady-state solution is generated to provide the initial values for the mass ow rate at the nozzle exit. In this tutorial you will learn how to: Calculate a steady-state solution (using the coupled implicit solver) as an initial condition for a transient ow prediction Dene an unsteady boundary condition using a user-dened function (UDF) Use dynamic mesh adaption for both steady-state and transient ows Calculate a transient solution using the second-order implicit unsteady formulation and the coupled implicit solver Create an animation of the unsteady ow using FLUENTs unsteady solution animation feature Prerequisites: This tutorial assumes that you are familiar with the menu structure in FLUENT and that you have solved or read Tutorial 1. Some steps in the setup and solution procedure will not be shown explicitly. Problem Description: The geometry to be considered in this tutorial is shown in Figure 4.1. Flow through a simple nozzle is simulated as a 2D planar model. The nozzle has an inlet height of 0.2 m, and the nozzle contours have a sinusoidal shape that produces a 10% reduction in ow area. Due to symmetry, only half of the nozzle is modeled.

Preparation1. Copy the les nozzle/nozzle.msh and nozzle/pexit.c from the FLUENT documentation CD to your working directory (as described in Tutorial 1). 2. Start the 2D version of FLUENT.

c Fluent Inc. January 28, 2003

4-1

Modeling Unsteady Compressible Flow

plane of symmetry

0.2 m

p (t )exit

p = 0.9 atminlet

p = 0.7369 atmexit

Figure 4.1: Problem Specication

4-2

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

Step 1: Grid1. Read in the mesh le nozzle.msh. File Read Case... 2. Check the grid. Grid Check FLUENT will perform various checks on the mesh and will report the progress in the console window. Pay particular attention to the reported minimum volume. Make sure this is a positive number. 3. Display the grid. Display Grid...

To make the view more realistic, you will need to mirror it across the centerline.

c Fluent Inc. January 28, 2003

4-3

Modeling Unsteady Compressible Flow

4. Mirror the view across the centerline. Display Views...

(a) Select symmetry under Mirror Planes. (b) Click Apply. The grid for the nozzle is shown in Figure 4.2.

Grid

Nov 27, 2002 FLUENT 6.1 (2d, segregated, lam)

Figure 4.2: 2D Nozzle Mesh Display

4-4

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

Step 2: Units1. For convenience, dene new units for pressure. The pressure for this problem is specied in atm, which is not the default unit. You will need to redene the pressure unit as atm. Dene Units...

(a) Select pressure under Quantities, and atm under Units. Hint: Use the scroll bar to access pressure, which is not initially visible in the list. (b) Close the panel.

c Fluent Inc. January 28, 2003

4-5

Modeling Unsteady Compressible Flow

Step 3: Models1. Select the coupled implicit solver. The coupled implicit solver is the solver of choice for compressible, transonic ows. Dene Models Solver...

Note: Initially, you will solve for the steady ow through the nozzle. Later, after obtaining the steady ow as a starting point, you will revisit this panel to enable an unsteady calculation.

4-6

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

2. Enable the Spalart-Allmaras turbulence model. Dene Models Viscous...

The Spalart-Allmaras model is a relatively simple one-equation model that solves a modeled transport equation for the kinematic eddy (turbulent) viscosity. This embodies a class of one-equation models in which it is not necessary to calculate a length scale related to the local shear layer thickness. The Spalart-Allmaras model was designed specically for aerospace applications involving wall-bounded ows and has been shown to give good results for boundary layers subjected to adverse pressure gradients.

c Fluent Inc. January 28, 2003

4-7

Modeling Unsteady Compressible Flow

Step 4: Materials1. Set the properties for air, the default uid material. Dene Materials...

(a) Select the ideal-gas law to compute Density. Note: FLUENT will automatically enable solution of the energy equation when the ideal gas law is used. You do not need to visit the Energy panel to turn it on. (b) Retain the default values for all other properties. ! Dont forget to click the Change/Create button to save your change.

4-8

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

Step 5: Operating Conditions1. Set the operating pressure to 0 atm. Dene Operating Conditions...

Here, the operating pressure is set to zero and boundary condition inputs for pressure will be dened in terms of absolute pressures. Boundary condition inputs should always be relative to the value used for operating pressure.

c Fluent Inc. January 28, 2003

4-9

Modeling Unsteady Compressible Flow

Step 6: Boundary ConditionsDene Boundary Conditions... 1. Set the conditions for the nozzle inlet (inlet).

(a) Set the Gauge Total Pressure to 0.9 atm. (b) Set the Supersonic/Initial Gauge Pressure to 0.7369 atm. The inlet static pressure estimate is the mean pressure at the nozzle exit. This value will be used during the solution initialization phase to provide a guess for the nozzle velocity. (c) In the Turbulence Specication Method drop-down list, select Turbulent Viscosity Ratio. (d) Set the Turbulent Viscosity Ratio to 1. For low to moderate inlet turbulence, a viscosity ratio of 1 is recommended.

4-10

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

2. Set the conditions for the nozzle exit (outlet).

(a) Set the Gauge Pressure to 0.7369 atm. (b) In the Turbulence Specication Method drop-down list, select Turbulent Viscosity Ratio. (c) Accept the default value of 10 for Backow Turbulent Viscosity Ratio. If substantial backow occurs at the outlet, you may need to adjust the backow values to levels close to the actual exit conditions.

c Fluent Inc. January 28, 2003

4-11

Modeling Unsteady Compressible Flow

Step 7: Solution: Steady Flow1. Initialize the solution. Solve Initialize Initialize...

(a) Select inlet in the Compute From drop-down list. (b) Click Init, and Close the panel.

4-12

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

2. Set the solution parameters. Solve Controls Solution...

(a) Under Discretization, select Second Order Upwind for Modied Turbulent Viscosity. Second-order discretization provides optimum accuracy.

c Fluent Inc. January 28, 2003

4-13

Modeling Unsteady Compressible Flow

3. Perform gradient adaption to rene the mesh. Adapt Gradient

(a) Under Method, select Gradient. The mesh adaption criterion can either be the gradient or the curvature (second gradient). Because strong shocks occur inside the nozzle, the gradient is used as the adaption criterion. (b) Under Gradients Of, make sure that Pressure... and Static Pressure are selected. (c) Under Normalization, select Scale. Mesh adaption can be controlled by the raw (or standard) value of the gradient, the scaled value (by its average in the domain), or the normalized value (by its maximum in the domain). For dynamic mesh adaption, it is recommended to use either the scaled or normalized value because the raw values will probably change strongly during the computation, which would necessitate a readjustment of the coarsen and rene thresholds. In this case, the scaled gradient is used. (d) Set the Coarsen Threshold to 0.3. (e) Set Rene Threshold to 0.7. As the rened regions of the mesh get larger, the coarsen and rene thresholds should get smaller. A coarsen threshold of 0.3 and a rene threshold of 0.7 result in a medium to strong mesh renement in combination with the scaled gradient.

4-14

c Fluent Inc. January 28, 2003

Modeling Unsteady Compressible Flow

(f) Turn on the Dynamic option under Dynamic and set the Interval to 100. For steady-state ows, it is sucient to only seldomly adapt the meshin this case an interval of 100 iterations is chosen. For time-dependent ows, a considerably smaller interval must be used. (g) Click Compute and