You are on page 1of 22

Fluid Dynamics

CAx Tutorial: Flow over an airfoil


Guided Tutorial #7

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, Curtis Rands, Curtis Memory, and Stephen McQuay.

Flow over an airfoil


2D Flow
In this tutorial, Gambit will be used to create and mesh the geometry for the problem. Fluent will be used to solve for the flow field within the domain and calculate the inviscid lift coefficient and surface velocity profile for a NACA 632-015 airfoil. This 2D tutorial will provide more experience with 2D inviscid flows, as well as introduce an ICEM input method in Gambit. An explanation of how to report lift and drag coefficients on an object will also be given.

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, defining and solving fluids application problems. Other techniques and methods will be used and introduced in subsequent tutorials.

The normalized squared velocity for an airfoil at 0 and 1.85 degrees angle of attack is shown below. Compare the graph obtained using CFD, and calculate the coefficient of lift cL at 1.85 degrees angle of attack.

Flow over an airfoil


Creating Geometry
Begin the problem by creating geometry in Gambit.

Begin by importing the data points for the airfoil, and creating the top and bottom edges.

File > Import > ICEM Input

Locate the file NACA.63.015.dat Under Geometry to Create select vertices and edges, and deselect faces. The points will be loaded, and an edge will be placed through the vertices. Select Accept.

Flow over an airfoil


Creating Geometry
Now create verticies that will be used to define the outer flow domain. The seven are shown in the table below. Operation > Geometry > Vertex > Create Real Vertex Name each point by typing the letter next to Label. Label A B C D E F G X 1 1 -14 25 25 25 1 Y 15 -15 0 15 0 -15 0 Z 0 0 0 0 0 0 0

Flow over an airfoil


Creating Geometry
Create edges for meshing. Operation > Geometry > Edge > Create Straight Edge Create edges using the following vertices, and label them according to their vertices. GE, BF, AD, AG, BG, DE, EF

Create two arcs, CA and CB.

Operation > Geometry > Edge > Create Real Circular Arc

For the Center of the arc, select vertex G. Select vertices C and A as the end-points. Select Apply. Repeat this procedure to create arc CB.

Flow over an airfoil


Creating Geometry
Make three faces that will be meshed later. Operation > Geometry > Face > Create Face From Wireframe Create a semicircular face from the arc edges and the two center vertical edges. Create a face from the airfoil edges. Subtract the airfoil face from the semicircular face without retaining either original face. Select the following edges, and select Apply to create the final two faces. AD, AG, GE, DE BG, GE, EF, BF If problems are encountered in creating the geometry, the geometry can be loaded from the file Airfoil_Geometry.dbs.

Flow over an airfoil


Meshing Geometry
First mesh the edges. Operation > Mesh > Edge > Mesh Edges

Select the upper edge of the airfoil. Make sure the arrow is pointing from left to right. Use the following parameters Type: Last Length Length: 0.02 Interval Count: 120 Select Apply. Repeat this procedure, using the same values for the lower edge of the airfoil.

Flow over an airfoil


Meshing Geometry
Mesh the horizontal edges. Use the following values for edges AD, GE, and BF, making sure that the arrow on each edge points left to right. Type: First Length Length: 0.02 Interval Count: 50 Use these values for edges AG, and DE, with the arrow going from bottom to top. Type: Successive Ratio Ratio: 1.1 Interval Count: 50 Use the previous values to mesh edges BG and EF, with the arrow going from top to bottom. Finally, mesh the two arcs CA, and CB. With the arrow pointing right to left, use the following values: Type: First Length Length: 0.02 Interval Count: 120 Mesh the faces. Operation > Mesh > Face > Mesh Faces Select the three faces, and select Apply. If problems are encountered in meshing the geometry, the meshed geometry can be loaded from the file Airfoil_Meshed.dbs.

Flow over an airfoil


Boundary Conditions
The next task is to specify the boundary conditions. The Fluent solver should be specified by default. If not, change it now. Solver > Fluent 5/6 Boundary condition specification will be facilitated by grouping certain edges together. Operation > Geometry > Group > Create Groups Select Edges from the pull down menu. Select edges CA and CB, and name the group arc. Select Apply. Select edges AD and BF and name the group level. Select Apply. Select edges DE and EF and name the group out. Select Apply. Select the airfoil edges and name it airfoil. Select Apply.

10

Flow over an airfoil


Boundary Conditions
Now specify the specific boundary conditions. Operation > Zones > Specify Boundary Types From the Entity pull down menu, select groups. Specify the boundaries as follows: Group: Arc Type: Velocity_Inlet Name: Arc Select Apply after each group. Group: Level Type : Velocity_Inlet Name: Level Group: Airfoil Type: Wall Name: Airfoil Group: Out Type: Pressure Outlet Name: Out If problems are encountered in specifying boundary conditions, the mesh with boundary conditions specified can be loaded from the file Airfoil_Complete.dbs.

11

Flow over an airfoil


Exporting the Mesh
Export the mesh File > Export > Mesh (It is a 2-D Mesh).

Export the mesh as Airfoil.msh and save the Gambit file. Exit out of Gambit.

12

Flow over an airfoil


Defining the Problem
Open the 2D version of Fluent. Import the mesh created in Gambit. File > Read > Case Locate Airfoil.msh and select OK. Check the grid for errors. Grid > Check Define the solver parameters. Define > Models > Solver... The default 2D segregated solver will work just fine for this problem. Select OK. Now Define the viscous model for the problem. Define > Models > Viscous. Select Inviscid and OK. Confirm that the default material is air. Define > Materials...

13

Flow over an airfoil


Defining the Problem
Define the boundary conditions that were specified in Gambit. Define > Boundary Conditions...

Default values for airfoil, default-interior, fluid, and out are sufficient. Select arc from the Zone menu. It is a Velocity_Inlet Type Select Set... Select Components from the Velocity Specification Method pull down menu. Specify the X and Y velocity components according to 1.85 degrees angle of attack, using a freestream velocity of 40 m/s. X: 39.97915 from (40*cos(1.85)) Y: 1.291319 from (40*sin(1.85)) Select OK. Repeat the procedure for the level zone.
Note: For 0 degrees angle of attack, simply change the X velocity component to 40, and the Y component to 0.

14

Flow over an airfoil


Solving the Problem
Specify the solution control parameters. Solve > Controls > Solution... Make the following changes to the default entries. Discretization Pressure: Presto! Momentum: Second Order Upwind Leave all other entries at their default values as shown to the right. Select OK.

15

Flow over an airfoil


Solving the Problem
Now initialize the solution. Solve > Initialize > Initialize... Under Compute From select arc. Select Init then Close. To view a real-time plot of the residuals Solve > Monitors > Residual. Select Plot under the Options menu. Under Plotting select 1 under Window. Uncheck the three Check Convergence boxes. We will allow the iterations to continue, and the residuals should level off and approach a minimum value, indicating that the solution is converged. Select OK.

16

Flow over an airfoil


Solving the Problem
Have Fluent report the values of the lift and drag coefficients during iteration. Solve > Monitors > Force... With Drag selected under Coefficient Select Print under Options. Under Force Vector enter in the components of the drag force, namely X = .99947877 from (cos(1.85)) Y = .03228298 from (sin(1.85)) Select airfoil under Wall Zones. Select Apply. Select Lift under Coefficient. Select Print under Options. Under Force Vector enter in the components of the lift force. X = -.03228298 from (-sin(1.85)) Y = .99947877 from (cos(1.85)) Select airfoil under Wall Zones. Select Apply. Report > Reference Values... In order to properly calculate the lift and drag coefficients, fluent needs correct reference values. Next to Velocity, enter 40. During iterations, the drag and lift coefficients will print out to the command window.

17

Flow over an airfoil


Solving the Problem
Now iterate to find a solution Solve > Iterate... Under Number of Iterations enter 500. Select Iterate.

18

Flow over an airfoil


Analyzing the Results
The image which accompanies the problem statement shows that the lift coefficient, cL for the airfoil at an angle of attack of 1.85 degrees is 0.22 (found experimentally). A quick inspection of the coefficient in the main Fluent window shows that our numerical data is in good agreement. The experimental data also shows a plot of non-dimensional velocity squared vs. nondimensional airfoil location. To compare the computational results with the experimental results, a custom field function must be defined. Define > Custom Field Functions... Start by selecting the open parenthesis, (, from the calculator pad. Under Field Functions select Velocity, and then Velocity Magnitude. You must click on the Select button for it to appear in the function. Select the divide button ( / ). Select the numbers 4 then 0 (for U = 40 m/s). Select the close parenthesis, ), select y^x, then select 2 (for squared). Name the function ratio, and select Define.

19

Flow over an airfoil


Analyzing the Results
To view a plot of (u/U)^2 vs. airfoil location Plot > XY Plot... Under Y Axis Function, select Custom Field Functions, and then ratio. Leave X Axis Function as Direction Vector. Select airfoil under Surfaces. Select Plot.

The plot should resemble the one shown to the right.

If problems are encountered in setting up or analyzing this problem in Fluent, the solved problem can be read in as a Case & Data... from the file Airfoil_1.85_degrees.cas.

20

Flow over an airfoil


Solving the Problem
Finally, define the problem again for 0 degrees angle of attack. Changes need to be made in the following areas before iterating again. Define > Boundary Conditions. For the Level zone and the Arc zone, define the components of velocity to be X = 40, Y = 0. Solve > Monitors > Force... For the drag coefficient, set the X and Y components of the force to X = 1, Y = 0. Select Apply. For the lift coefficient, set the X and Y components of the force to X = 0, Y = 1. Select Apply. Again, during iterations drag and lift coefficient values will be printed to the command window. Check that the lift coefficient for the level case (0-degree angle of attack) is zero.

21

Flow over an airfoil


Analyzing the Results

1.8

Shown to the right is a comparison of the empirical data with the computational solution. The graphs are qualitatively very similar, and have quantitative values that are very similar as well. Refining the grid by about double will bring the two sets of data into excellent agreement.
(u/U)^2

1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 -0.2 0.0 0.2 0.4 0.6

Fluent Emperical

0.8

1.0

x/c

1.6 1.4 Fluent Emperical

Also shown to to the right is another comparison of the same airfoil, but at 0 degrees angle of attack. Again, the discrepancy is due to a solution that is not grid-independent. Try refining the grid by about double and repeating the solution.

1.2 1

(u/U)^2

0.8 0.6 0.4 0.2 0

0.2

0.4

0.6

0.8

x/c

22