You are on page 1of 43

WS2-1

ANSYS, Inc. Proprietary


2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Introductory
FLUENT Training
Workshop 2

Transonic Flow over a
NACA 0012 Airfoil
WS2-2
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Goals
The purpose of this tutorial is to introduce the user to good
techniques for modelling flow in high speed external aerodynamic
applications.

Transonic flow will be modelled over a NACA 0012 airfoil for which
experimental data has been published, so that a comparison can be
made.

The flow to be considered is compressible and turbulent.

The solver used is the density based implicit solver, which gives
good results for high speed compressible flows.

The tutorial is carried out using FLUENT and CFD Post from within
Workbench, but it could also be completed in standalone mode.
WS2-3
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Start a workbench project
Launch Workbench and save the new project as naca0012 in your
working directory.
Double-click or drag a FLUENT module from the component systems.
Add a results module double click or drag.
Drag the mouse from cell A3 (Solution) to B2 (Results) to couple the
modules.


WS2-4
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Import a mesh that was generated in Gambit
Import the FLUENT mesh file (naca0012.msh).
Right click on cell A2 (setup) and select import FLUENT case file
Change the Files of type to FLUENT mesh file
Select the mesh file naca0012.msh
The FLUENT launcher will start.
Keep the default options.
Note that 2D has automatically been selected
WS2-5
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Mesh
FLUENT will launch in a new window.
The mesh will read in and display, and the zones will be written out
for the Workbench project.
WS2-6
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Mesh
The mesh needs scaling, since it was created with lengths in mm.
Select General > Scale and observe the current domain extents.
Select Mesh was created in mm.
Press Scale
Check that the domain extents are as expected.
Close the scale panel and select General > Check
Review the text window and check there are no errors.
Finally use Report Quality to print out cell quality statistics.


WS2-7
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Mesh
Zoom in and examine the mesh.
The maximum aspect ratio in this mesh is quite high (around 7000)
This is acceptable because these cells are close to the airfoil wall
surfaces.
This is needed for the turbulence model being used, since it ensures the
first grid point is in the viscous sublayer.
WS2-8
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solver
Select the steady-state density-based solver:
From General in the tree select Type: Density-Based
Check time is steady

Turn on the energy equation.
This is needed because the flow is compressible and we will be using the
ideal gas equation.
From Models in the tree, select Energy > Edit > and check box

Select the turbulence model to be used:
From Models in the tree, select Viscous and Edit
Choose the one-equation Spalart-Allmaras model.
Select strain/vorticity based production, then OK
This is a relatively simple turbulence model that has been shown to give
good results for boundary layers subjected to adverse pressure
gradients, particularly where there is no or only mild separation.
WS2-9
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Materials
The properties to be used for the material air need to be set.
Select Materials from the model tree
Highlight Air then Create/Edit
For Density, select Ideal Gas
For Viscosity, select Sutherland, and accept the default settings for the
3 Coefficient method.
The Sutherland law for viscosity is well suited for high-speed compressible
flow. For simplicity, we will leave Cp and Thermal Conductivity as constants.
Ideally, in high speed compressible flow modeling, these should be
temperature dependent as well.
Select Change/Create

Assign the material air to the grid cells:
Select Cell Zone Conditions
Highlight fluid then Edit
Observe air is already selected.
WS2-10
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Operating Conditions
Set the Operating Pressure to Zero:
Absolute pressure is the gauge pressure plus the operating pressure.
Setting zero operating pressure means that all pressures set in FLUENT
will be absolute. This is the most common practice for compressible
flows.
Select Cell Zone Conditions > Operating Conditions
Set the Operating Pressure to Zero, then OK
WS2-11
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Boundary Conditions
Set the upstream boundary conditions:
Select Boundary Conditions > pressure-far-field-1 > edit
The pressure-far-field boundary type is applicable only when the density is
calculated using the ideal-gas law. It is important to place the far-field boundary
far enough from the object of interest. For example, in lifting airfoil calculations, it
is not uncommon for the far-field boundary to be a circle with a radius of 20 chord
lengths.
On the Momentum tab, set the gauge static
pressure to 73048 Pa
We need to input static pressure for a far-field
boundary. We can calculate this from the total
pressure, which was atmospheric at 101325 Pa
for the wind-tunnel test.
In the case of a real external aerodynamic simulation,
rather than a wind tunnel, the static pressure (at a
given altitude) would actually be the same as the total
pressure in the far field, because the air in the far field
would be stationary.
We have already set the operating pressure to zero, so
we are now working in absolute pressure values. Hence
the gauge static pressure input will be equal to the
absolute static pressure value, which we will calculate
to be 73048 Pa.
Pa 73048
3871 . 1
7 . 0 No. Mach
air f or 4 . 1
pressure static
101325 pressure total
where
2
1
1
1
2
=
=
= =
=
=
= =
(

|
.
|

\
|
+ =

p
p
p
M
p
Pa p
M
p
p
o
o
o
WS2-12
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Boundary Conditions
Set the Mach Number to 0.7 and flow direction components as shown.
The angle of attack () in this numerical case is 1.53 deg. The x-component of
the flow is cos and the y-component is sin .
It is common practice to adjust the numerical from the experimental in order to match the lift obtained in
the wind tunnel, and then to determine the drag associated with this lift. This adjustment of is carried out to
counter the effects of the wind tunnel enclosure.
Set a reasonable boundary condition for the
far field turbulence:
In reality the far-field air would be stationary. Wind
tunnels attempt to replicate this by using filters and
grids to obtain a low turbulence intensity at the
inlet.
Select Intensity and Length Scale
Set an intensity of 0.01%
Choose a length scale proportional to
the boundary layer thickness. Based on
an estimated maximum boundary layer
thickness of 50mm*, a suitable length
scale is 0.4 x 0.05m = 0.02m
* taken from a previous simulation

WS2-13
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Boundary Conditions
Select the thermal tab.
The wind tunnel operating conditions for validation test data give the
total temperature as T
0
= 311 K
We can therefore calculate the static temperature to be 283.24 K
K 24 . 283 so and 098 . 1
7 . 0 number Mach
air for 4 . 1
e temperatur static
K 311 e temperatur total
where
2
1
1
0
0
2
0
= =
= =
=
=
= =
|
.
|

\
|
+ =
T
T
T
M
T
T
M
T
T
WS2-14
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Boundary Conditions
For both walls representing the airfoil, leave the default settings
which correspond to a no-slip condition for momentum and adiabatic
for thermal.
WS2-15
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Reference Values
Set the reference values: These are not used in the actual solution,
but are used for reporting coefficients, such as Cp.
Use the freestream conditions as a reference, so choose compute from
then select pressure-far-field-1 in the drop down list.

Note the reference values for density,
enthalpy, pressure, temperature,
etc. will update from the freestream
values you specified in the
pressure-far-field-1 boundary.

Set the reference length (which is not
updated from the far field boundary
values). In this 2D case, we will use
the airfoil chord length, of 1m.
WS2-16
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solution Methods
The CFD computation is now defined. However the solver settings need to
be modified. These dictate how fast, stable and accurate (within the mesh
and BC constraints) the solution will be.
Select Solution Methods in the LHS tree.








Keep the default settings for the implicit formulation and Roe-FDS flux type.
The explicit formulation is only normally used for cases where the characteristic
time scale is of the same order as the acoustic time scale, for example the
propagation of high Mach number shock waves.
The implicit formulation is more stable and can be driven much harder to reach a
converged solution in less time.

WS2-17
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solution Methods
Change the gradient method to Green-Gauss Node Based.
This is slightly more computationally expensive than the other methods
but is more accurate.
Select Second Order Upwind for flow and turbulence discretization.
To accurately predict drag, select the Second Order Upwind schemes.
WS2-18
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solution Controls
The Courant number (CFL) determines the internal time step and
affects the solution speed and stability.
The default CFL for the density-based implicit formulation is 5.0. It is
often possible to increase the CFL to 10, 20, 100, or even higher,
depending on the complexity of your problem. You may find that a lower
CFL is required during startup (when changes in the solution are highly
nonlinear), but it can be increased as the solution progresses.
As we will be using automatic
solution steering, the choice of CFL
at this stage is not important for this
case.

Keep the default under-relaxation
factors (URFs) for the uncoupled
parameters.
WS2-19
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solution Monitors
Set up residual monitors so the convergence can be monitored
Monitors > Residuals > Edit
Make sure plot is on
Turn off convergence checks by setting the criterion to none. This
means that the calculation will not stop based on the residual plots
convergence, but you can still see their progress.
WS2-20
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solution Monitors
Set up a monitor for the drag coefficient on the airfoil.
Select both wall zones and toggle on Print, Plot and Write.
Remember that is 1.53so we need to use the force vector as shown. -Lift and drag
are defined relative to the wind, not the airfoil.













Press OK, then follow the same process to setup a monitor for Lift.
The settings are identical except for the File Name (cl-history instead of cd-history) and the
Force Vectors defined as shown here:

You can specify
which window
FLUENT uses to
display plots. For
now, accept the
defaults.
WS2-21
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Solution Initialization
Initialize the flow field based on the far-field boundary:
Select Solution Initialization from the model tree
Compute from > pressure-far-field-1
Press Initialize.

Solution Steering enables the robust first order discretization in the
early-stages of the computation, then blends to the more accurate
second order schemes as the solution stabilizes.
Select Run Calculation, and toggle on Solution Steering
Change the flow type to transonic and keep default options
Full-Multi-Grid Initialization will compute a quick, simplified solution based on
a number of coarse sub-grids. This will then be used as a starting point for the
main calculation. FMG can help to get a stable starting point.



WS2-22
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Case Check
Check the case file and make sure there are no reported issues.
Use Run Calculation > Check Case






Any potential problems with the case setup will be raised in the case
check panel if there are no problems this panel will not appear. In this
case there is a recommendation to check the reference values for the
force monitors. Since we have already set these we can ignore this
warning.

Save the case file.
File > Save Project (if running under workbench)

WS2-23
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Run Calculation
Although the calculation is ready to compute, It is good practice (but
not strictly necessary) to run the FMG and then check the coarse
FMG solution before starting the main calculation iterations.
Set the number of requested iterations to zero, and press Calculate.
WS2-24
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Run Calculation
Check the pressure and velocity contours to make sure that no
spurious values are predicted.
Go to Graphics and Animations in the LHS tree, choose Contours
and Set Up
WS2-25
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Run Calculation
Choose Contours of Pressure > Static Pressure and Filled
Display. If you need to autoscale the display press <control> A
Zoom in as required.
Examine the min and max reported values.
Repeat for Contours of Velocity> Mach Number.
WS2-26
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Run Calculation
There are no spurious results from the FMG, so proceed to the main
calculation.
Return to Run Calculation in the LHS tree.

Change the number of windows to three (for the residual, drag and lift
monitors that we set up earlier).
Request 900 iterations.
Calculate
WS2-27
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Run Calculation
After 900 iterations the calculation has fully converged.
Note that the CFL has been updated during the calculation in a number of
stages, ramping up from 5 to 200 as we requested. This can be seen in
the CFL window and the effect on the residuals is also evident. By the
end of the calculation the residuals have converged well and are no
longer changing. The drag and lift monitors are also stable.



WS2-28
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
Select Graphics and Animations in the LHS menu
Examine the contours of static pressure.
Turn off Filled to just display the
contour lines.
Adjust the Levels to increase the
number of contour lines.

The contour will display in the active
window (click a window to activate).
Alternatively, use the drop down menu to
return the display to a single window as
shown here
WS2-29
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
Plot contours of Velocity > Mach Number and notice that the flow is
now locally supersonic.
WS2-30
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
Select Plots in the LHS menu.
Plot Pressure Coefficient along the top and bottom airfoil surfaces.


WS2-31
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
Compare experimental pressure coefficient plots which we can
import and plot here alongside the numerical prediction.
Click on Load File and browse for the files in your directory.


WS2-32
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
Once loaded, plot the CFD and experimental Cp plots together.
A good agreement can be seen.
WS2-33
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
In order to obtain a good drag prediction, and for the turbulence
model to work effectively, we need to have a mesh that is well
resolved near to the wall, such that the first grid point is in the
viscous sub-layer. Ideally we want a Y+ value of 1 or less.
Plot Turbulence > Y+, along both of the airfoil walls.
Deselect the Pressure Coefficient File Data.
We can see that this is achieved here, the max Y+ is 0.75
WS2-34
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing [FLUENT]
Compare the predicted Cl and Cd against the experimental values.

From Reference 1
Cl = 0.241 and Cd = 0.0079

From the console window, we have predicted
Cl = 0.241 and Cd = 0.0083








Again, good agreement can be seen.

WS2-35
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
Save the project from the FLUENT file menu .
Take the middle option Continue after replacing settings file)
Close FLUENT (File > Close FLUENT)
Additional post-processing will now be performed in CFD Post.
Return to the Workbench Project window.
Click on Update Project and notice the Results panel update.
Right click on cell B2 (Results) and select edit. This will launch CFD Post.



WS2-36
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
Note that CFD Post works in 3D, so a unit thickness will be added to
the 2D airfoil, with symmetry side boundaries.
WS2-37
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
Insert a new Contour and accept the default name Contour 1
Top menu > Insert > Contour
Choose the location as symmetry-1
Choose the variable to be pressure and Apply (zoom in)

WS2-38
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
A useful feature in CFD Post is the ability to compare two different
sets of CFD data.
Verify that the file NACA0012-mach-0.5-conv.dat.gz is in your working
directory.
File > Load Results Browse to your working directory.
Under Case options make sure keep current cases loaded is checked.
Open the File NACA0012-mach-0.5-conv.dat.gz.
Click OK if an Information/Warning dialog box appears.
We now have two data sets loaded and can do a case comparison.

WS2-39
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
Make sure that two windows are open, and select the respective
cases in a different window.
Lock the views so they are synchronised.
WS2-40
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
Toggle on location Symmetry 1 in each case.
Select Contour 1 and apply. We can compare the two pressure plots.
WS2-41
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Post Processing
Finally, we can plot the difference between the two.
In the Outline view, double-click Case Comparison.
The Case Comparison details view appears.
Select Case Comparison Active and click Apply.
A third viewport opens that displays the pressure difference between
the two cases.

WS2-42
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
Summary
In this tutorial we have used FLUENT within a Workbench project to
compute the transonic, compressible flow over a naca0012 airfoil.

We have imported a mesh that was generated in Gambit.

We have used the density based solver with solution steering.

We have compared the results to published experimental data and
seen good agreement.

We have seen how FLUENT can be linked to CFD Post in a
Workbench project, and we have explored some of the features
within CFD Post.
WS2-43
ANSYS, Inc. Proprietary
2009 ANSYS, Inc. All rights reserved.
April 28, 2009
Inventory #002601
Workshop Supplement
WS2: Transonic Flow Over a NACA 0012 Airfoil
References
T.J. Coakley, Numerical Simulation of Viscous Transonic Airfoil
Flows, NASA Ames Research Center, AIAA-87-0416, 1987.

C.D. Harris, Two-Dimensional Aerodynamic Characteristics of the
NACA 0012 Airfoil in the Langley 8-foot Transonic Pressure Tunnel,
NASA Ames Research Center, NASA TM 81927, 1981.

You might also like