Sie sind auf Seite 1von 30  17.0 Release

Workshop 03: Fluid flow around the NACA0012 Airfoil

Introduction to ANSYS CFX 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. Import the Supplied Mesh File

Start ANSYS Workbench 17.

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.   Case Setup: Boundary Condition Values

It is important to place the far field (inlet and outlet)

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

This workshop will compare CFD with wind-tunnel test data at Ma = 0.7. Therefore we need to calculate the static conditions at the far-field boundary for T and p.

We calculate this from the total pressure, which is atmospheric at

101325 Pa.

The wind tunnel operating conditions for validation test data give the

total temperature as T 0 = 311 K.  1
p
  1
p
2 
where
p
total pressure
101325
Pa
o
p
static pressure
  1 .4 for air
M  Mach No.
0.7
p
o
 1.3871 
p  73048 Pa
p
T
o
T
2 
where
T
 total temp.
311
K
o
T
 static temp.
T
o
1.3871 
T
 283.24
K
T

o

1

M

2

1

1

M

2 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

p Ref = 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. 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.

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) y
α
x
Original Coordinate Frame

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

the inlet via expressions.  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:

Fractional Intensity = 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. 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. Case Setup: Solution Monitors

To help check convergence you will monitor the

lift and drag coefficients.

The drag coefficient, for example, is calculated as c D = 2F/(Av²).

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.  Case Setup: Solution Monitors

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. 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 , c l = 0.241 and c d = 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.   Post Processing - Check the mesh (Y+)

The correct modeling 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 better predict boundary layer separation.

For this to happen, the first grid point should lie within the viscous sub-layer (y + ≤ 2).

Otherwise the Universal Law of The Wall for turbulence is used. The above graph shows non-dimensional velocity versus non-dimensional distance from the wall, y + . / 
 y
 Wall
y  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 + .  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.  Post Processing Pressure Coefficient (c P )

We will compare the simulation results with experimental data for the pressure coefficient, c P , 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:

c P = 2(p-p )/( u ²)

where indicates free stream values.

It is used to assess pressure distribution for different designs. Post Processing Pressure Coefficient (c P )

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]. Post Processing c P 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. 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.  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.  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.

Modeling errors.

Systematic errors.

The first three are numerical errors that should be removed from every simulation before modeling and systematic errors are investigated! 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.  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. 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.

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

(The predicted value of the drag coefficient is 0.230, compared with 0.232 for single precision.

The predicted value of the lift coefficient was .0146, compared with .0147 for double precision) 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.

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 RMS

Residual Target 1e-6 (this is quite strict).

Conservation Target of 0.01. 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. 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.

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. Test 4: Modeling Errors

For some aspects of the physics the CFD solver cannot provide an exact solution. For

example, turbulence is essentially a random process.

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

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