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.53°so 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.

WS2: Transonic Flow Over a NACA 0012 Airfoil

Goals

Workshop Supplement

• 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.
ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved.

WS2-2

April 28, 2009 Inventory #002601

WS2: Transonic Flow Over a NACA 0012 Airfoil

Start a workbench project

Workshop Supplement

• 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.

ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved.

WS2-3

April 28, 2009 Inventory #002601

WS2: Transonic Flow Over a NACA 0012 Airfoil

Import a mesh that was generated in Gambit
• Import the FLUENT mesh file (naca0012.msh).

Workshop Supplement

– 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

ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved.

WS2-4

April 28, 2009 Inventory #002601

ANSYS. WS2-5 April 28. Inc. All rights reserved. • The mesh will read in and display. Inc. 2009 Inventory #002601 . Proprietary © 2009 ANSYS. and the zones will be written out for the Workbench project.WS2: Transonic Flow Over a NACA 0012 Airfoil Mesh Workshop Supplement • FLUENT will launch in a new window.

– – – – Select „Mesh was created in mm‟. • Finally use „Report Quality‟ to print out cell quality statistics. All rights reserved. Inc.WS2: Transonic Flow Over a NACA 0012 Airfoil Mesh Workshop Supplement • The mesh needs scaling. Close the scale panel and select General > Check • Review the text window and check there are no errors. ANSYS. WS2-6 April 28. Inc. since it was created with lengths in mm. 2009 Inventory #002601 . • Select General > Scale and observe the current domain extents. Press „Scale‟ Check that the domain extents are as expected. Proprietary © 2009 ANSYS.

Workshop Supplement • 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. Proprietary © 2009 ANSYS. 2009 Inventory #002601 . WS2-7 April 28. Inc.WS2: Transonic Flow Over a NACA 0012 Airfoil Mesh • Zoom in and examine the mesh. Inc. All rights reserved. • This is needed for the turbulence model being used. ANSYS. since it ensures the first grid point is in the viscous sublayer.

Select strain/vorticity based production. Inc. . Inc. All rights reserved.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 Workshop Supplement • Turn on the energy equation. select „Viscous‟ and Edit Choose the one-equation Spalart-Allmaras model. WS2-8 April 28. – This is needed because the flow is compressible and we will be using the ideal gas equation. Proprietary © 2009 ANSYS. select „Energy‟ > Edit > and check box • Select the turbulence model to be used: • • • • From „Models‟ in the tree. 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. – From „Models‟ in the tree. 2009 Inventory #002601 ANSYS.

WS2-9 April 28. select “Sutherland”. select „Ideal Gas‟ For Viscosity. and accept the default settings for the 3 Coefficient method. Proprietary © 2009 ANSYS. Ideally. ANSYS. Select „Materials‟ from the model tree Highlight „Air‟ then Create/Edit For Density. • The Sutherland law for viscosity is well suited for high-speed compressible flow. we will leave Cp and Thermal Conductivity as constants. 2009 Inventory #002601 . All rights reserved.WS2: Transonic Flow Over a NACA 0012 Airfoil Materials – – – – Workshop Supplement • The properties to be used for the material „air‟ need to be set. Inc. – Select Change/Create • Assign the material „air‟ to the grid cells: – Select „Cell Zone Conditions‟ – Highlight „fluid‟ then „Edit‟ – Observe „air‟ is already selected. For simplicity. Inc. in high speed compressible flow modeling. these should be temperature dependent as well.

2009 Inventory #002601 . then „OK‟ ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Operating Conditions • Set the Operating Pressure to Zero: Workshop Supplement – Absolute pressure is the gauge pressure plus the operating pressure. Inc. This is the most common practice for compressible flows. Inc. All rights reserved. WS2-10 April 28. – Setting zero operating pressure means that all pressures set in FLUENT will be absolute. Proprietary © 2009 ANSYS. – Select „Cell Zone Conditions > Operating Conditions – Set the Operating Pressure to Zero.

it is not uncommon for the far-field boundary to be a circle with a radius of 20 chord lengths. 2009 Inventory #002601 . po  total pressure  101325 Pa – In the case of a real external aerodynamic simulation. which was atmospheric at 101325 Pa w here for the wind-tunnel test.WS2: Transonic Flow Over a NACA 0012 Airfoil Boundary Conditions • Set the upstream boundary conditions: Workshop Supplement – 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. in lifting airfoil calculations. ANSYS. All rights reserved. the static pressure (at a p  static pressure given altitude) would actually be the same as the total   1. – On the „Momentum‟ tab. so  po  1. Hence p the gauge static pressure input will be equal to the p  73048 Pa absolute static pressure value.3871 we are now working in absolute pressure values. It is important to place the far-field boundary far enough from the object of interest. For example.7 would be stationary. because the air in the far field M  Mach No.  0. which we will calculate to be 73048 Pa. set the gauge static  pressure to 73048 Pa po     1  2   1  1   M  – We need to input static pressure for a far-field p   2   boundary. Proprietary © 2009 ANSYS. Inc. Inc.4 for air pressure in the far field. rather than a wind tunnel. We can calculate this from the total pressure. WS2-11 April 28. – We have already set the operating pressure to zero.

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

4 for air M  Mach number  0. 2009 Inventory #002601 WS2-13 .24 K T ANSYS. Inc. All rights reserved.24 K T0    1 2  1  M T  2  where T0  total temperature  311K T  static temperature   1.WS2: Transonic Flow Over a NACA 0012 Airfoil Boundary Conditions • Select the thermal tab. Workshop Supplement – The wind tunnel operating conditions for validation test data give the total temperature as T0 = 311 K – We can therefore calculate the static temperature to be 283.098 and so T  283. Proprietary © 2009 ANSYS. April 28.7 T  0  1. Inc.

Proprietary © 2009 ANSYS. All rights reserved. WS2-14 April 28. Inc.WS2: Transonic Flow Over a NACA 0012 Airfoil Boundary Conditions Workshop Supplement • For both walls representing the airfoil. 2009 Inventory #002601 . Inc. ANSYS. leave the default settings which correspond to a no-slip condition for momentum and adiabatic for thermal.

Proprietary © 2009 ANSYS. such as Cp. temperature. but are used for reporting coefficients. WS2-15 April 28. Inc. 2009 Inventory #002601 . etc. – Use the freestream conditions as a reference. enthalpy. will update from the freestream values you specified in the pressure-far-field-1 boundary. In this 2D case. All rights reserved. pressure. Note the reference values for density.WS2: Transonic Flow Over a NACA 0012 Airfoil Reference Values Workshop Supplement • Set the reference values: These are not used in the actual solution. we will use the airfoil chord length. so choose „compute from‟ then select „pressure-far-field-1‟ in the drop down list. of 1m. Inc. – Set the reference length (which is not updated from the far field boundary values). ANSYS.

for example the propagation of high Mach number shock waves. WS2-16 April 28. 2009 Inventory #002601 . All rights reserved.WS2: Transonic Flow Over a NACA 0012 Airfoil Solution Methods Workshop Supplement • The CFD computation is now defined. • Keep the default settings for the implicit formulation and Roe-FDS flux type. These dictate how fast. Inc. However the solver settings need to be modified. • Select Solution Methods in the LHS tree. – The explicit formulation is only normally used for cases where the characteristic time scale is of the same order as the acoustic time scale. stable and accurate (within the mesh and BC constraints) the solution will be. ANSYS. – The implicit formulation is more stable and can be driven much harder to reach a converged solution in less time. Inc. Proprietary © 2009 ANSYS.

Proprietary © 2009 ANSYS. ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Solution Methods • Change the gradient method to Green-Gauss Node Based. Inc. Inc. • Select Second Order Upwind for flow and turbulence discretization. 2009 Inventory #002601 . select the „Second Order Upwind‟ schemes. WS2-17 April 28. – To accurately predict drag. Workshop Supplement – This is slightly more computationally expensive than the other methods but is more accurate. All rights reserved.

20. – The default CFL for the density-based implicit formulation is 5. Proprietary © 2009 ANSYS. depending on the complexity of your problem.WS2: Transonic Flow Over a NACA 0012 Airfoil Solution Controls Workshop Supplement • The Courant number (CFL) determines the internal time step and affects the solution speed and stability. the choice of CFL at this stage is not important for this case. Inc. WS2-18 April 28. As we will be using automatic ‘solution steering’. Keep the default under-relaxation factors (URFs) for the uncoupled parameters. All rights reserved. but it can be increased as the solution progresses. 2009 Inventory #002601 . 100. It is often possible to increase the CFL to 10. Inc. or even higher.0. You may find that a lower CFL is required during startup (when changes in the solution are highly nonlinear). ANSYS.

This means that the calculation will not stop based on the residual plots convergence. Inc. ANSYS. All rights reserved. 2009 Inventory #002601 . but you can still see their progress. Inc. WS2-19 April 28.WS2: Transonic Flow Over a NACA 0012 Airfoil Solution Monitors Workshop Supplement • 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‟. Proprietary © 2009 ANSYS.

not the airfoil. • Press OK. You can specify which window FLUENT uses to display plots. Inc. For now. Inc. All rights reserved. – The settings are identical except for the File Name (cl-history instead of cd-history) and the Force Vectors defined as shown here: ANSYS. • Select both wall zones and toggle on „Print‟. -Lift and drag are defined relative to the wind. WS2-20 April 28. accept the defaults.53° so we need to use the force vector as shown. • Remember that α is 1. „Plot‟ and „Write‟. Proprietary © 2009 ANSYS. then follow the same process to setup a monitor for Lift. 2009 Inventory #002601 .WS2: Transonic Flow Over a NACA 0012 Airfoil Solution Monitors Workshop Supplement • Set up a monitor for the drag coefficient on the airfoil.

All rights reserved. Inc.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‟. This will then be used as a starting point for the main calculation. 2009 Inventory #002601 . FMG can help to get a stable starting point. – Select Run Calculation. Workshop Supplement • Solution Steering enables the robust first order discretization in the early-stages of the computation. and toggle on Solution Steering – Change the flow type to transonic and keep default options • Full-Multi-Grid Initialization will compute a quick. Inc. then blends to the more accurate second order schemes as the solution stabilizes. WS2-21 April 28. ANSYS. Proprietary © 2009 ANSYS. simplified solution based on a number of coarse sub-grids.

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. – 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. Proprietary © 2009 ANSYS. Inc.WS2: Transonic Flow Over a NACA 0012 Airfoil Case Check – Use Run Calculation > Check Case Workshop Supplement • Check the case file and make sure there are no reported issues. • Save the case file. Inc. April 28. 2009 Inventory #002601 WS2-22 . All rights reserved. – File > Save Project (if running under workbench) ANSYS.

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.WS2: Transonic Flow Over a NACA 0012 Airfoil Run Calculation Workshop Supplement • Although the calculation is ready to compute. Inc. Proprietary © 2009 ANSYS. All rights reserved. Inc. 2009 Inventory #002601 . and press „Calculate‟. WS2-23 April 28. • Set the number of requested iterations to zero. ANSYS.

• Go to „Graphics and Animations in the LHS tree. All rights reserved.WS2: Transonic Flow Over a NACA 0012 Airfoil Run Calculation Workshop Supplement • Check the pressure and velocity contours to make sure that no spurious values are predicted. choose „Contours‟ and „Set Up‟ ANSYS. Inc. WS2-24 April 28. 2009 Inventory #002601 . Inc. Proprietary © 2009 ANSYS.

Inc. ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Run Calculation • • • • • Workshop Supplement Choose Contours of Pressure > Static Pressure and „Filled‟ Display. Inc. Repeat for Contours of Velocity> Mach Number. If you need to autoscale the display press <control> A Zoom in as required. All rights reserved. WS2-25 April 28. Examine the min and max reported values. 2009 Inventory #002601 . Proprietary © 2009 ANSYS.

2009 Inventory #002601 . Inc. drag and lift monitors that we set up earlier). Inc. so proceed to the main calculation. • Return to „Run Calculation‟ in the LHS tree. • Request 900 iterations. All rights reserved. Proprietary © 2009 ANSYS. • Change the number of windows to three (for the residual.WS2: Transonic Flow Over a NACA 0012 Airfoil Run Calculation Workshop Supplement • There are no spurious results from the FMG. • „Calculate‟ ANSYS. WS2-26 April 28.

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

– Turn off „Filled‟ to just display the contour lines. WS2-28 April 28. 2009 Inventory #002601 . Inc. Workshop Supplement The contour will display in the active window (click a window to activate). – Adjust the Levels to increase the number of contour lines. use the drop down menu to return the display to a single window as shown here ANSYS. All rights reserved. Inc.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. Alternatively. Proprietary © 2009 ANSYS.

All rights reserved. 2009 Inventory #002601 . Proprietary © 2009 ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing [FLUENT] Workshop Supplement • Plot contours of Velocity > Mach Number and notice that the flow is now locally supersonic. WS2-29 April 28. Inc. Inc. ANSYS.

Proprietary © 2009 ANSYS. ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing [FLUENT] Workshop Supplement • Select „Plots‟ in the LHS menu. All rights reserved. Inc. • Plot Pressure Coefficient along the top and bottom airfoil surfaces. 2009 Inventory #002601 . WS2-30 April 28. Inc.

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

plot the CFD and experimental Cp plots together. All rights reserved. 2009 Inventory #002601 . Proprietary © 2009 ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing [FLUENT] Workshop Supplement • Once loaded. Inc. ANSYS. WS2-32 April 28. Inc. • A good agreement can be seen.

All rights reserved. • We can see that this is achieved here. Proprietary © 2009 ANSYS. Inc. • Plot Turbulence > Y+. and for the turbulence model to work effectively. such that the first grid point is in the viscous sub-layer.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing [FLUENT] Workshop Supplement • In order to obtain a good drag prediction. we need to have a mesh that is well resolved near to the wall. along both of the airfoil walls.75 ANSYS. WS2-33 April 28. Ideally we want a Y+ value of 1 or less. – Deselect the Pressure Coefficient File Data. 2009 Inventory #002601 . Inc. the max Y+ is 0.

WS2-34 April 28.0083 – Again. 2009 Inventory #002601 . Proprietary © 2009 ANSYS.241 and Cd = 0. • From Reference 1 – Cl = 0. Inc. All rights reserved. Inc.241 and Cd = 0. ANSYS.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing [FLUENT] Workshop Supplement • Compare the predicted Cl and Cd against the experimental values. good agreement can be seen.0079 • From the console window. we have predicted – Cl = 0.

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

so a unit thickness will be added to the 2D airfoil.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing Workshop Supplement • Note that CFD Post works in 3D. 2009 Inventory #002601 . Inc. Proprietary © 2009 ANSYS. with symmetry side boundaries. WS2-36 April 28. ANSYS. Inc. All rights reserved.

Inc. 2009 Inventory #002601 . All rights reserved. Inc. WS2-37 April 28.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing – Top menu > Insert > Contour Workshop Supplement • Insert a new Contour and accept the default name Contour 1 • Choose the location as symmetry-1 • Choose the variable to be pressure and „Apply‟ (zoom in) ANSYS. Proprietary © 2009 ANSYS.

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

WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing Workshop Supplement • Make sure that two windows are open. Proprietary © 2009 ANSYS. • Lock the views so they are synchronised. WS2-39 April 28. Inc. and select the respective cases in a different window. All rights reserved. Inc. ANSYS. 2009 Inventory #002601 .

We can compare the two pressure plots. Inc. 2009 Inventory #002601 . Inc. WS2-40 April 28. Proprietary © 2009 ANSYS. ANSYS. • Select „Contour 1‟ and apply.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing Workshop Supplement • Toggle on location „Symmetry 1‟ in each case. All rights reserved.

we can plot the difference between the two. double-click Case Comparison. In the Outline view. ANSYS. Inc. Select Case Comparison Active and click Apply. All rights reserved.WS2: Transonic Flow Over a NACA 0012 Airfoil Post Processing • • • • • Workshop Supplement Finally. Inc. A third viewport opens that displays the pressure difference between the two cases. WS2-41 April 28. Proprietary © 2009 ANSYS. The Case Comparison details view appears. 2009 Inventory #002601 .

Inc. and we have explored some of the features within CFD Post. • We have used the density based solver with solution steering.WS2: Transonic Flow Over a NACA 0012 Airfoil Summary Workshop Supplement • In this tutorial we have used FLUENT within a Workbench project to compute the transonic. • We have seen how FLUENT can be linked to CFD Post in a Workbench project. 2009 Inventory #002601 . ANSYS. Proprietary © 2009 ANSYS. • We have compared the results to published experimental data and seen good agreement. WS2-42 April 28. compressible flow over a naca0012 airfoil. • We have imported a mesh that was generated in Gambit. All rights reserved. Inc.

” NASA Ames Research Center.WS2: Transonic Flow Over a NACA 0012 Airfoil References Workshop Supplement • T. “Two-Dimensional Aerodynamic Characteristics of the NACA 0012 Airfoil in the Langley 8-foot Transonic Pressure Tunnel. NASA TM 81927. “Numerical Simulation of Viscous Transonic Airfoil Flows. 2009 Inventory #002601 . • C.” NASA Ames Research Center. 1987.D. Inc. 1981. Coakley. WS2-43 April 28. Harris. Proprietary © 2009 ANSYS. All rights reserved. ANSYS. AIAA-87-0416. Inc.J.