0% found this document useful (0 votes)
21 views29 pages

CFX-Intro 16.0 WS03 NACA0012-Airfoil

CFX-Intro 16.0 WS03 NACA0012-Airfoil

Uploaded by

qwerty335009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views29 pages

CFX-Intro 16.0 WS03 NACA0012-Airfoil

CFX-Intro 16.0 WS03 NACA0012-Airfoil

Uploaded by

qwerty335009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Workshop 03

Fluid flow around the NACA0012 Airfoil

16.0 Release

Introduction to ANSYS CFX

© 2015 ANSYS, Inc. March 13, 2015 1 Release 16.0


Introduction
Workshop Description:
The flow simulated is an external aerodynamics application for the two-
dimensional flow around a NACA0012 airfoil
Learning Aims:
This workshop introduces several new skills:
• Assessing Y+ for correct turbulence model behavior
• Modifying solver settings to improve accuracy
• Reading in and plotting experimental data alongside CFD results
• Producing a side-by-side comparison of different CFD results.
Learning Objectives:
To understand how to model an external aerodynamics problem, and skills to
improve and assess solver accuracy with respect to both experimental and
other CFD data.

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 2 Release 16.0
Import the supplied mesh file
Start ANSYS Workbench 16
• Copy a CFX Analysis System into the Project Schematic
• Import the mesh naca0012coarse.cfx5 from
…\workshop_input_files\WS_05_NACA0012 airfoil
• The mesh was created with ICEM CFD, choose the right filter
• Launch CFX Pre

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 3 Release 16.0
Case Setup: Boundary Condition Values


It is important to place the far field (inlet and po     1  2  1

 1   M 
outlet) boundaries far enough from the p   2  
object of interest. where
 For example, in lifting airfoil calculations, it is not po  total pressure  101325 Pa
uncommon for the far-field boundary to be a circle p  static pressure
with a radius of 20 chord lengths.   1.4 for air
M  Mach No.  0.7
po
 1.3871  p  73048 Pa
This workshop will compare CFD with wind- p
tunnel test data at Ma = 0.7. Therefore we
need to calculate the static conditions at the To     1  2 
 1   M 
far-field boundary for T and p. T   2  
where
 We calculate this from the total pressure, which
To  total temp.  311K
is atmospheric at 101325 Pa.
T  static temp.
 The wind tunnel operating conditions for To
validation test data give the total temperature as T0  1.3871  T  283.24 K
T
= 311 K.
Introduction Setup Solution Results Summary
© 2015 ANSYS, Inc. March 13, 2015 4 Release 16.0
Case Setup: Basic Settings
Edit the domain so that
 Air Ideal Gas is used as material,
 the SST turbulence model,
 and Total Energy model are applied.
Set the Reference Pressure of your domain
 pRef = 73048 [Pa]

The SST turbulence model is a very powerful model for aerodynamic, external flows.
The Total Energy model is needed for compressible flows where the Ma > 0.3
Since the fluid is compressible, density depends on Absolute Pressure. The Reference
Pressure chosen ensures that the values of static pressure in the solution are not too
large compared with the differences, so minimising round-off errors.

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 5 Release 16.0
Case Setup: Coordinate Frame
The angle of attack is 1.55 degrees (α).
One way of accounting for this angle is to create a new coordinate system
whose z-axis is in line with the flow direction.
We use this new coordinate system when applying boundary conditions.
y
 Create a new coordinate frame:
 Insert  Coordinate Frame  Name = Coord 1
 Option = Axis Points
 Origin = 0, 0, 0
 Z axis = 0.999634, 0.027049, 0 (cos1.55°, sin1.55°, 0)
 X-Z Plane Pt = 1, 1, 0 (a point on the plane) α
x
Original Coordinate Frame

Another way of accounting for this angle of attack would be to rotate the
velocities at the inlet via expressions

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 6 Release 16.0
Case Setup: Boundary Conditions
Create a boundary condition for the inlet:
 Set cartesian velocity components based on the new coordinate system,
Coord 1:
(U,V,W) = (0, 0, 0.7*340.29) [m/s]
340.29[m/s] equals Ma = 1.0 for the given free stream values, i.e. it is the
speed of sound under the prevailing conditions
 Set values for turbulence intensity and eddy viscosity ratio:
TI = 0.01, Eddy Viscosity Ratio = 1.0
 Set the Static Temperature at the inlet:
T = 283.4 [K]
This will create an inlet boundary condition with air flowing at a speed flow
with Ma = 0.7 at an angle of attack (α) of 1.55 deg.
Introduction Setup Solution Results Summary
© 2015 ANSYS, Inc. March 13, 2015 7 Release 16.0
Case Setup: Boundary Conditions
Create a boundary condition for the outlet:
 Set a relative pressure of 0 [Pa]

Create a wall boundary, called airfoil, containing the upper and lower
surfaces of the airfoil
 Create a no-slip, adiabatic wall

Create symmetry boundary conditions for the bottom and the top of the
domain

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 8 Release 16.0
Case Setup: Solution Monitors
To help check convergence you will monitor the lift and drag coefficients.
• The drag coefficient, for example, is calculated as cD = 2F/(Av²).
– Density and velocity refer to free stream values and A is the area of the airfoil calculated
as chord * span of the airfoil, the chord being a straight line between the leading and
trailing edges.
• In CEL this is defined as:
2*force_z_Coord 1()@airfoil / (0.6[m^2]*massFlowAve(Density)@inlet
*(massFlowAve(Velocity)@inlet)^2)

• Use the above expression to create a Monitor Point for the drag coefficient.
• The lift coefficient is defined analogously for the x component of force in the
local coordinate frame.
– Duplicate the first monitor (right click on the monitor object in the Outline Tree) and
edit the expression in the copy. Rename the new monitor.
 Functions, variables & expressions are available in the expression details tab (RMB)
 The expressions must match the names for the airfoil and inlet (free stream)
boundary conditions. Check how you named them.
Introduction Setup Solution Results Summary
© 2015 ANSYS, Inc. March 13, 2015 9 Release 16.0
Run Calculation
• Close CFX-Pre
• Save the project to airfoil.wbpj in your
working directory
• Start the run
• Review the convergence plots
• Click User Points to review the lift and drag
coefficient convergence
– From Reference [1], cl = 0.241 and cd = 0.0079
– Compare with the simulation results and
determine the relative error for these quantities
– Later we will see how to improve the results in a
Best Practice Study
• Close the CFX-Solver Manager and import the
results to CFD Post

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 10 Release 16.0
Post Processing - Check the mesh (Y+)

• The correct modelling of the turbulence is a


crucial task in most CFD simulations
• The reliability of the turbulence models
strongly depends on the correct prediction of
the flow behaviour near the walls
• The SST model uses the automatic wall
function which allows for integration of the
governing equations directly to the wall (a
low Reynolds number treatment) and so can The above graph shows non-dimensional velocity
better predict boundary layer separation versus non-dimensional distance from the wall, y+.

– For this to happen, the first grid point should lie


within the viscous sub-layer (y+ ≤ 2) y  Wall / 
y 
– Otherwise the Universal Law of The Wall for 
turbulence is used

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 11 Release 16.0
Post Processing - Check the mesh (Y+)

• In CFD-Post y+ values can be accessed at


all wall boundary conditions
• Check the global range of y+

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 12 Release 16.0
Post Processing – y+ chart

• Plot the y+ values along the


airfoil surfaces
– Create a Location > Polyline
which represents the pressure
and suction sides of the air foil
• Use the Boundary Intersection
method
– Create a chart based on this
polyline which plots the y+ as
function of the x-coordinate

• Create another chart for the


pressure distribution along the
airfoil

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 13 Release 16.0
Post Processing – Pressure Coefficient (cP)

We will compare the simulation results with experimental data for the
pressure coefficient, cP, on the upper and lower surfaces of the airfoil.
The pressure coefficient is a dimensionless quantity representing the
ratio of static to dynamic pressure, calculated as:

cP = 2(p-p)/(u²)
where  indicates free stream values.
It is used to assess pressure distribution for different designs.

© 2015 ANSYS, Inc. March 13, 2015 14 Release 16.0


Post Processing – Pressure Coefficient (cP)
To plot the pressure coefficient you will need to create a new variable.
• On the Variables tab, right-click anywhere in the window and select
New…
• Provide a name for the variable, e.g. cp. Do not call it Cp as this is
reserved for specific heat at constant pressure - names of system
variables must not be used for expressions or user variables.
• Enter the expression shown below:

Here the relative static pressure, p, is assumed to be 0 [Pa].


Introduction Setup Solution Results Summary
© 2015 ANSYS, Inc. March 13, 2015 15 Release 16.0
Post Processing – cP chart

• Create a chart to plot the pressure


coefficient against X on the polyline.
– It shows the expected shape with a
value just above 1 at the stagnation
point (typical for compressible flow)
and a recovery to a slightly positive
value at the trailing edge.
• Import the experimental data by
editing the details of the graph to
include another data series:
– Data Series  New  Name =
Experimental
– Data Source  File  Browse 
ExperimentalData.csv
– Apply
Introduction Setup Solution Results Summary
© 2015 ANSYS, Inc. March 13, 2015 16 Release 16.0
Post Processing – Contour Plots

• Examine the contours of static


pressure

 Note the high pressure at the


nose and low pressure on the
upper (suction) surface. The latter
is expected as the airfoil wing is
generating lift.

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 17 Release 16.0
Post Processing – Contour Plots

• Examine the contours of Mach


Number

 Notice that the flow is locally


supersonic (Mach Number > 1) as
the flow accelerates over the upper
surface of the wing

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 18 Release 16.0
Best Practice Study
The current results are not satisfactory
We should perform a Best Practice Study to understand sources of error and
reduce the errors (more details in the lecture on Best Practice Guidance)
There are 5 categories of error:
 Round-Off errors
 Iterations errors
 Discretization errors
 Modelling errors
 Systematic errors
The first three are numerical errors that should be removed from every
simulation before modelling and systematic errors are investigated!

© 2015 ANSYS, Inc. March 13, 2015 19 Release 16.0


Best Practice Study
The following slides give general guidance rather than step-by-step
instructions.
Tip: Multiple Systems can share:
 (Upstream) Geometry and Mesh Sessions
 (Downstream) Post-processing sessions

There will be several valid schemes

© 2015 ANSYS, Inc. March 13, 2015 20 Release 16.0


Best Practice Study
Getting Started:
For the following runs adapt the Solver Controls
• Increase Max Iterations to 500
• Set Timescale Control > Aggressive (to speed up the simulation)
• Set as Convergence Criterion
• Residual Type RMS
• Residual Target 1e-4

Do not run the solver yet.

© 2015 ANSYS, Inc. March 13, 2015 21 Release 16.0


Test 1: Round-Off Errors
Round-off errors arise from the accuracy (number of significant
digits) your computer processor works to. There are many factors
that determine whether SINGLE PRECISION is sufficient, or whether
DOUBLE PRECISION is needed.

Task:
Run the simulation (with the new settings from the last slide) twice more.
For the second run switch on Double Precision. Compare the drag and lift
coefficients displayed in the User Points monitor.
If you see a difference, then DOUBLE PRECISION should be used.
(Why? In this case there are some very high aspect ratio grid cells)

© 2015 ANSYS, Inc. March 13, 2015 22 Release 16.0


Test 2: Iteration Errors
A well-posed CFD simulation converges monotonically towards the correct
solution. How many iterations are needed? Check the Residuals,
Imbalances and changes to Monitor Points. As these decrease, the iteration
error decreases.

Task:
Look at the residuals in the Solver Manager
• If we switch to the Max Residuals, we can see that those for Mass and
Momentum are still > 1e-3
• The Monitor Points for Lift and Drag are not converged
• The Imbalances are low (< 0.1 %)

Change the following settings in the Solver Control section in CFX-Pre


• Residual Type Max
• Residual Target 1e-5 (this is quite strict)
• Conservation Target of 0.01

© 2015 ANSYS, Inc. March 13, 2015 23 Release 16.0


Test 2: Iteration Errors (Cont)
After running on the simulation with these more demanding criteria, you
should find that:

• All residuals reach the strict convergence criterion


• This happens before reaching the maximum number of iterations
• The monitor points are now very well converged
• The imbalances are much below the chosen criterion

© 2015 ANSYS, Inc. March 13, 2015 24 Release 16.0


Test 3: Discretization Errors
The CFD solution is computed at a number of discrete locations, defined by
nodes in the mesh. How do we know that the mesh is fine enough to give a true
simulation of the flow? It is important to check that we reach mesh
independence to minimise Discretization errors.

Task:
Recompute this simulation and examine the results for the mesh files:
1) naca0012medium.cfx5
2) naca0012fine.cfx5
Duplicate the system and right-click on the Imported Mesh cell to import the
new mesh.
We expect you will observe that:
• There is a big difference between the solutions on the coarse and medium
meshes
• The results from the medium and the fine mesh are almost identical
• Therefore we should use the mesh: naca0012medium.cfx5

© 2015 ANSYS, Inc. March 13, 2015 25 Release 16.0


Test 4: Modelling Errors
For some aspects of the physics the CFD solver cannot provide an exact
solution. For example, turbulence is essentially a random process.

Task:
• We know that a proper resolution of the boundary layer will have a
strong influence on the quality of the solution of this test case. This is
guarantueed by a proper mesh resolution and the automatic wall
treatment of the SST turbulence model.
• Change to the k-epsilon turbulence model and recompute the flow. This
model applies a scalable wall function, which cannot resolve the
influence of the viscous sublayer.
• Check the influence on the results.

© 2015 ANSYS, Inc. March 13, 2015 26 Release 16.0


Test 5: Systematic Errors
Systematic Errors arise from the workflow and assumptions that have been
made. For example:
 The geometry might have been simplified (Fillets removed)
 Only part of the device is simulated (just a single turbine blade)
 Steady-state simulation of a naturally unsteady flow.

We do not suggest that you explore Systematic Errors here since that would
modification of the original geometry.

Factors to bear in mind are:


 Were the domain boundaries far enough away from the airfoil?
 Are there 3D effects to consider? For example, the experiment could not
be pure 2D as there would be sides to the wind tunnel.

© 2015 ANSYS, Inc. March 13, 2015 27 Release 16.0


Wrap-up
This workshop has shown the basic steps that are applied during CFD
simulations:
• Defining material properties.
• Setting boundary conditions and solver settings
• Running a simulation whilst monitoring quantities of interest
• Post-processing the results

One of the important things to remember in your own work is, before even
starting the ANSYS software, is to think WHY you are performing the simulation:
• What information are you looking for?
• What do you know about the flow conditions?

In this case we were interested in the lift (and drag) generated by a standard
airfoil and how well the solver predicted these when compared to high quality
experimental data

Knowing your aims from the start will help you make sensible decisions about
how much of the part to simulate, the level of mesh refinement needed, and
which numerical schemes to select
Introduction Setup Solution Results Summary
© 2015 ANSYS, Inc. March 13, 2015 28 Release 16.0
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

Introduction Setup Solution Results Summary


© 2015 ANSYS, Inc. March 13, 2015 29 Release 16.0

You might also like