Vous êtes sur la page 1sur 21

Fluid Dynamics

CAx Tutorial: Boundary Layer Growth


Basic Tutorial #1

Deryl O. Snyder C. Greg Jensen


Brigham Young University Provo, UT 84602

Special thanks to: PACE, Fluent, UGS Solutions, Altair Engineering; and to the following students who assisted in the creation of the Fluid Dynamics tutorials: Leslie Tanner, Cole Yarrington, Stephen McQuay, Curtis Rands, and Curtis Memory.

Boundary Layer Growth


2D Flow
In this tutorial, Gambit is used to create and mesh the geometry. Once preprocessing is complete, FLUENT will be used to solve the flow problem. Fluent will then be used to view velocity vectors and contours. This basic 2D tutorial should prepare you to model, mesh, define and analyze more complex fluid flow problems.

The methods expressed in these tutorials represent just one approach to modeling, defining and solving 2D problems. Our goal is the education of students in the use of CAx tools for modeling, constraining and solving fluids application problems. Other techniques and methods will be used and introduced in subsequent tutorials.

Boundary Layer Growth


Creating Geometry
Begin the problem by creating geometry in Gambit. The Gambit standard display should be open. Meshes are generated in Gambit by following left to right the menu icons located in the top right of the display window. Create a rectangle as the computational domain.

Operation > Geometry > Face >Create Real Rectangular Face


Note: Icons with a red arrow have a pull down menu. To activate the pull down menu select the icon with MB3.

Set the Width to be 300 and the Height to be 400. Next to Direction, select +X +Y, to place the bottom left corner at the origin.
Note: To fit the geometry to the screen in Gambit, simply select the top left icon from the Global Control Menu on the bottom right of the display window.

If problems are encountered in creating the geometry, the geometry can be loaded from the file Wall_Geometry.dbs.

Boundary Layer Growth


Meshing Geometry
Now mesh the rectangular face. Operation > Mesh > Edge > Mesh Edges The Mesh Edges window should appear. When a field is highlighted, entities can be selected from the graphics window. To select an entity from the graphics window, hold down the Shift key, and select the entity with MB1. If the selected edge is the wrong one, different entities can be chosen if the shift key is still depressed. With the shift key still depressed, select MB2, and different entities in the graphics window will be highlighted. Releasing the Shift key will select the entity. Select the left vertical edge. (Use the shift select technique in the graphics window.) If the red arrow on the edge is not pointing up, select Reverse. There are two ways to specify node spacing, by interval size, or by interval count. Under Spacing, select Interval Count from the drop down menu. Enter 100 in the blank field under Spacing. Next to Type select First Length, and then enter .1 next to Length. Select Apply. Nodes have been clustered close to the bottom wall in order to resolve the velocity gradients that are expected next to the wall. The edge mesh should appear as it does to the right. 5

Boundary Layer Growth


Meshing Geometry
Select the right vertical edge. Repeat the previous steps to mesh the edge.
Note: Both edges can be meshed at the same time, but care must be taken to ensure that both arrows are pointing up. You must select one edge, select Reverse, and then select the other edge.

Select the Top edge and the Bottom edge. Now specify the node spacing by Interval Size. Make sure that the Apply box next to Grading is unchecked. Enter 6 next to Interval Size. Select Apply.

Boundary Layer Growth


Meshing Geometry
Now mesh the rectangular face. Operation > Mesh > Face > Mesh Faces Select the rectangular face. All fields should be left at their default values. With Quad selected in the Elements pull down menu, the domain will be meshed with quadrilateral elements. With Map selected form the Type pull down menu, the meshes will be generated parallel to the edges. Select Apply.

The mesh should resemble the one shown to the right. If problems are encountered in meshing geometry, the meshed geometry can be loaded from the file Wall_Meshed.dbs.

Boundary Layer Growth


Boundary Conditions
The next task is to specify the boundary conditions. The first step is to specify which solver will be used. Solver > Fluent 5/6 Next, bring up the Specify Boundary Types window by selecting the following icons: Operation > Zones > Specify Boundary Types From the pull down menu under Entity, select Edges. Select the left edge. Next to name type Inlet. Under Type select Velocity_Inlet. Select Apply. Select the bottom edge. Next to Name type Wall. Under Type select Wall. Select Apply.

Boundary Layer Growth


Boundary Conditions
Select the top edge. Next to Name type Top. Under Type select Symmetry. Select Apply. Select the right edge. Next to Name type Out. Select Apply. Under Type select Outflow. The Specify Boundary Types window should resemble the one shown to the right. If problems are encountered in specifying boundary conditions, the completed mesh with boundary conditions specified can be loaded from the file Wall_Complete.dbs.

Boundary Layer Growth


Exporting the Mesh
Export the mesh File > Export > Mesh Make sure the Export 2d (X-Y mesh) box is selected. Select Browse... to choose the saving directory. Export the mesh as Wall.msh.

Also save the Gambit file. File > Save as... Browse as before. Select Accept. Exit out of Gambit.

10

Boundary Layer Growth


Starting in Fluent
Open Fluent. A dialog box should appear Select 2d Select Run

The following window should appear

This is the FLUENT user interface. Most tasks are completed using the menus across the top. The menus are designed to guide you through the analysis in an orderly fashion, going from top to bottom through each menu, and left to right across the menu bar. Text commands can also be used in the command window.

11

Boundary Layer Growth


Defining the Problem
Start by importing the mesh created in Gambit. File > Read > Case... A browse window should appear. Locate Wall.msh and select OK. FLUENT will read in the geometry and mesh you created. If there are problems reading the mesh, return to the beginning of the tutorial and make sure you follow the steps carefully. If there are no problems the command window should state Done. Now check the grid for errors. Grid > Check Any errors will be listed, otherwise the command window should again state Done.

Set the scale of the grid. To do this Grid > Scale... The scale grid window should appear. From the pull down menu next to Grid Was Created In select mm. Select Scale The values of Xmax and Ymax should change to .3 and .4, respectively. Select Close.

12

Boundary Layer Growth


Defining the Problem
Display the grid. Display > Grid...

The Grid Display window should appear.

Select Display

The display window should open and the model should appear similar as shown to the right. To zoom in on a particular area select MB2 on the upper left and then drag to the lower right. This will create a rectangle that encloses the area to be zoomed in on. To zoom out, perform the same actions, but drag from lower right to upper left. The geometry can be rotated with MB1. Notice the different colors on the boundaries. These are the default boundary condition colors in fluent. White - Wall Blue - Velocity_Inlet Red - Outflow Yellow - Symmetry

13

Boundary Layer Growth


Defining the Problem
Define the type of solver as shown to the right. Define > Models > Solver... The default implicit segregated solver is appropriate for this laminar, incompressible flow problem. Verify that the default options are selected as shown on the right Select OK Next we need to set up the viscous model. Define > Models > Viscous... Select Laminar Select OK Now specify a viscous fluid for the problem. To do this: Define > Materials...

The Materials window should appear

14

Boundary Layer Growth


Defining the Problem
Choose a viscous fluid by selecting Database... Under Fluid Materials select glycerin (c3h8o3). Select Copy then Close. Selecting Copy brings the fluid into the working database, and allows us to change the properties, and assign the fluid as the working fluid. In the following steps the glycerin will be specified as the working fluid. In the Materials window select Change/Create then Close.

15

Boundary Layer Growth


Defining the Problem
Set the Boundary Condition parameters for the problem. Define > Boundary Conditions... The default values are sufficient for all boundaries except for fluid and Inlet. Select fluid from the Zone list, then fluid under Type. Select Set... Select glycerin from the Material Name drop down menu. Select OK. In the Boundary Conditions Window, select inlet under Zone, and velocity_inlet under Type. Select Set... Next to Velocity Magnitude enter 0.5. Select OK. Select Close on the Boundary Conditions Window.

16

Boundary Layer Growth


Defining the Problem
Next set the solution control parameters. Solve > Controls > Solution... Change the Under-Relaxation Factor for Pressure from 0.3 to 0.9
Note: This change above can be done because the SIMPLEC discretization method will be used for the pressure-velocity coupling.

Under Discretization change the switch next to Pressure to Second Order. Change the switch next to PressureVelocity Coupling to SIMPLEC. Change the switch next to Momentum to Second Order Upwind. Select OK

17

Boundary Layer Growth


Defining the Problem
Now solve the problem by first initializing the solution. Solve > Initialize > Initialize... The Solution Initialization window should appear. From the drop down menu below Compute From select Inlet. Select Init then close Now set the monitors to plot the residuals. To do this Solve > Monitors > Residual... The Residual Monitors window should appear. Put a check next to Plot. Uncheck the 3 boxes under Check Convergence. If the Check Convergence boxes are checked, iterations will halt once all of the convergence criteria are met. Leaving them unchecked allows the operator to monitor them manually, and stop iterating when the solution is converged. Select OK The model is now ready to be solved.

18

Boundary Layer Growth


Solving the Problem
To solve the model: Solve > Iterate... The Iterate window should appear. In the Number of Iterations text box, enter 600. Select Iterate Fluent solves the problem and the residual plot should appear. Check the plot to see if the solution is converged. Since we unchecked the Check Convergence, to tell if the solution is converging we look for the residuals to taper off to a slope of zero. After 600 iterations, the solution is not yet fully converged, but it is sufficient to view velocity vectors and contours. If problems are encountered in setting up this problem in fluent, the solved problem can be read in as a Case and Data from the file Wall.cas.

19

Boundary Layer Growth


Analyzing the Results
Now view the results. Display > Vectors The Vectors window should appear Under Vectors Of select Velocity Select Display The model should be displayed with vectors representing the velocities. The boundary layer can be seen to grow from the left side to the right as is expected. In subsequent tutorials, numerical solutions will be compared to analytical solutions. In this tutorial, viewing the results is the main focus.

20

Boundary Layer Growth


Analyzing the Results
Contours are viewed the same way as velocity vectors. Display > Contours... Contours can displayed for many different values. The default is set to pressure. From the Contours Of drop down menu select Velocity... Under Options, select Filled, to see filled in contours, otherwise only the contour lines will be displayed. The Number of Contour levels can also be specified. For smoother transitions between contours, select a large number. The range is from 1 to 100. Under Levels enter 100. Select Display. The image should resemble the one shown to the right. In both the vector and contour displays values for specific locations can be obtained by selecting the location with MB3. When selecting a location with MB3, the value is shown on the scale to the left of the display, and also in the command window.

21