Ansys 2d E83-Fluid-Mechanics-II-Final-Report

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

ANSYS FLUENT

Airfoil Analysis and Tutorial

ENGR083: Fluid Mechanics II

Terry Yu

5/11/2017
Abstract
The NACA 0012 airfoil was one of the earliest airfoils created. Its mathematically simple
shape and age have meant that it is one of the first choices for validating CFD programs, as there
is a wealth of data on this particular airfoil. Though the NACA 0012 airfoil is not in general use
currently due to its relatively poor lift to drag ratio, it remains a useful research tool. It still sees
some use, however, in control surfaces and helicopter blades, as it is symmetric and thus has a
simple correlation between angle of attack and lift.

This project validated methods for using ANSYS Fluent and created a tutorial for future
E83 students to also analyze this airfoil. The resulting coefficient of lift plot is remarkably
similar to one produced by NASA’s Langley Center, while the coefficient of drag plot seems to
be in error. This is likely due to our simple viscosity model.

Introduction
ANSYS Fluent is part of the ANSYS suite of engineering analysis software, which
includes Mechanical APDL, BladeGen, and many other software packages capable of thermal
analysis, electromagnetic analysis, and more. Fluent is also widely recognized as one of the
industry standard CFD software packages. Although Solidworks is capable of performing
rudimentary CFD analysis, it is only a rudimentary approach as Solidworks is fundamentally
CAD software and is not built with simulation in mind, as ANSYS is. The versatility and
capability of ANSYS Fluent makes it an easy first choice for fluid dynamics analysis.

This project seeks to find a basic understanding of ANSYS Fluent and develop a tutorial
for future students to also learn from this software. In a previous project, I analyzed the NACA
0012 airfoil structurally to understand its deflection due to aerodynamic forces in a helicopter.
Thus, I had the model readily available. However, the model was in 3D form, and I had to
analyze only a cross section of the airfoil. Unfortunately, Fluent’s academic license does not
allow for enough meshes to cover the entire 3D airfoil. This was fortuitous, though, as we were
able to corroborate our results with a NASA Langley Center study on the characteristics of the
airfoil.

After completing our analysis, we created a tutorial to introduce new E83 students to
Fluent. This tutorial will walk the user through importing the airfoil model and setting up the
boundary conditions for meshing and solving the fluids problem. Due to time, we were unable to
implement a tutorial for modeling or for more simple shapes in Fluent, which may have been
more helpful to novice students.
Problem
The fundamental problem we are attempting to solve is the modeling of a 2D airfoil cross
section. Given the below figure, how can we determine the lift and drag acting on the airfoil?

The picture above shows a box with an airfoil cutout. In order to analyze an airfoil, my
implementation does not implement a wind tunnel and an object suspended in it, although that is
a valid approach. Instead, this procedure cuts out an airfoil shape from a bounding box, and
meshes the box. The entire box is then divided into finite elements, and the fluid dynamics
equations are solved. By examining the fluid properties near the airfoil cutout, the lift and drag
can be determined.

We have wind tunnel tests and other software validations from the Langley center, so we are able
to compare our lift and drag results to validated results, and see if there were any mistakes in our
protocol or software implementation.

For our airfoil, we are working in the turbulent regime, with Re = 6million. Our speed is
M=0.15, which converts to about 51 m/s. This region is essentially incompressible, but the
NASA website cautions against running incompressible flow, as the results may differ.

From determined lift and drag forces, we can calculate the lift and drag coefficients. These are
plotted against the angle of attack, and compared to available data. A close match confirms that
our implementation and procedure are correct.
Theory
First, we must determine the regime that our analysis is in. Our reference data is for Re = 6
million, which is far into the turbulent region.

𝜌𝑣𝐿
𝑅𝑒 =
𝜇

where 𝜌=density, 𝑣=velocity, 𝜇=dynamic viscosity, and L is the characteristic length, which for
our airfoil is the chord.

With known viscosity, density, and speed, we can calculate the length. The values we used were:
kg
𝜌 = 1.185
m3
m
𝑣 = 51
s
kg
𝜇 = 1.7894 x 10−5
m∗s
𝐿 = 1.719 m

To determine the coefficients of drag and lift, we use the following equations from the NASA
website1.

where L and D are the lift and drag, 𝜌𝑟𝑒𝑓 is the free stream density, 𝑈𝑟𝑒𝑓 is the free stream
velocity, and A is the reference area (in 2-D it is reference length, or area per unit span).

It should be noted that these differ from the equations derived in class.

Our solver has the energy equation enabled, which enables compressible flow.

To model compressible flow, we use the ideal gas law to determine the density at any given
point.

1
https://turbmodels.larc.nasa.gov/noteonrunning.html
Fluent models turbulence with the Reynolds average Navier-Stokes Equations (RANS). This is
one of the most common approaches to computing flows. Other methods exist to model flow,
such as Detached Eddy Simulation or Large Eddy simulation. However, while more accurate,
RANS is far less computationally intensive and yields close enough results for the scales that we
are working at.

Below is the full Reynolds averaged momentum equation. At each iteration, this equation is
solved for all the mesh quadrilaterals. The Reynolds stress tensor describes unknowns introduced
by modeling and must be related to average flow quantities.

To calculate the Reynolds stress tensor, we must use eddy viscosity models. The Boussinesq
hypothesis states that Reynold stresses can be modeled with an eddy viscosity 𝜇 𝑇 . This is
reasonable for simple turbulent shear flows such as boundary layers, round jets, mixing layers,
channel flows, but for complex flows we need to fully solve the Reynolds Stress tensor, which is
computationally intense.

The eddy viscosity 𝜇 𝑇 above must be resolved to complete the RANS equations.

Below are our choices of models. There are many methods of calculating eddy viscosity, and we
have chosen the Spalart-Allmaras equation for its simplicity.

RANS based models Eddy viscosity models


Spalart-Allmaras is the computationally simplest model. It is economical for large meshes, but
performs poorly for 3D flows, free shear flows, and flows with strong separation. It is suitable
for mildly complex (quasi-2D) external/internal flows and boundary layer flows under pressure
gradient (e.g. airfoils, wings, airplane fuselages, missiles, ship hulls), which is perfect for our
simulations.

The other equations are more suitable to complex flows, such as turbomachinery, flows with
high separation, flows with high strain rates, or flows with high swirl rates. The Spalart-Allmaras
equations are adequate for our purposes, but any more complex analysis than simple shapes in a
uniform flow.

The Spalart-Allmaras equations can be characterized as

where eddy viscosity is obtained from

By solving this equation, Fluent can solve for the eddy viscosity. With the eddy viscosity, the
Reynolds stress tensor is known, and once the stress tensor is known, the entire Reynolds-
Averaged Navier Stokes equations can be solved.
Results
At the proscribed Re = 6 million, we obtained the following graph for the lift coefficient:

This was overlaid with the NASA coefficient of lift chart. Our values are in orange.

This shows very good agreement, with only some discontinuities in the stall region.
The coefficient of drag vs coefficient of lift graph was also plotted:
This was also overlaid with the NASA coefficient of lift chart. Our values are in green.

This shows fairly poor agreement with the NASA values. Although we managed the same
general shape, we are off by a fair amount.
Following are sample contours and streamlines from a 10 degree angle case.
Below are some sample streamlines and contours from the 25 degree case, where the airfoil is
stalled.
Discussion and Future Work
Our model was validated for lift. It shows very close agreement to the NASA Langley Center’s
data, which includes wind tunnel and software testing. We have successfully modeled an airfoil’s
lift in ANSYS Fluent to a very high degree of accuracy.

However, our drag results had some disagreements with the NASA results. Although we
maintained the same overall shape, we started producing an enormous amount of drag at higher
angles of attacks. A possible cause of this is the farfield boundary effect, which can have effects
on lift and drag at high lift conditions. This effect is unique to compressible flows and is a quirk
of numerical analysis, where boundary conditions are incorrectly set for compressible flows and
the solver is not aware of the farfield equilibrium conditions for the boundaries, and leads to
waves developing in the mesh. Further investigation is required into the settings necessary to
correct for this in ANSYS Fluent.

We have successfully developed a tutorial to complete the lift and drag analysis on an airfoil in
Fluent. This tutorial starts the user at a model and walks them through configuring the fluid
dynamics solver.

Future work includes implementing simpler problems into the Fluent tutorial, such as flow over a
flat plate or flow over a cylinder. These simulations are relatively short, so a more complex
modeling scheme such as full Reynolds Stress tensor solving could be used. The bounding box
could be even further extended, and farfield boundary conditions could be investigated to ensure
they are not causing the drag to be erroneous.

References
1. “2DN00: 2D NACA 0012 Airfoil Validation Case.”
https://turbmodels.larc.nasa.gov/naca0012_val.html, NASA Langley Turbulence
Modeling Resource, 2015.
2. “The Spalart-Allmaras Turbulence Model.” https://turbmodels.larc.nasa.gov/spalart.html,
NASA Langley Turbulence Modeling Resource, 2016.
3. “Implementing Turbulence Models into the Compressible RANS Equations.”
https://turbmodels.larc.nasa.gov/implementrans.html, 2016.
4. “Modeling Turbulent Flow”
http://www.southampton.ac.uk/~nwb/lectures/GoodPracticeCFD/Articles/Turbulence_No
tes_Fluent-v6.3.06.pdf , ANSYS.
Appendix: Raw Data
Aoa 0 2 4 6 8 10 12 14 16 18 20
Lift (raw) -193.873 1104.916 2262.783 3328.692 4700.008 5695.405 5861.7 6117.44 5639.552 6079.101 4988.397
Drag (raw) 54.67304 57.35482 67.23361 87.76437 113.4601 158.2453 221.6186 332.4173 703.4925 1232.324 787.9097
Cl -0.03441 0.196122 0.401644 0.590843 0.834251 1.010934 1.040451 1.085845 1.00102 1.07904 0.88544
Cd 0.009704 0.01018 0.011934 0.015578 0.020139 0.028089 0.059004 0.12487 0.218737 0.139854

Aoa -2 -4 -6 -8 -10 -12 -14 -16 -18 -20


Lift (raw) 1104.916 1944.315 3328.692 4577.761 5529.038 5861.7 6117.44 5639.552 6079.101 4988.397
Drag (raw) 57.35482 57.33402 87.76437 112.0173 156.5781 221.6186 332.4173 703.4925 1232.324 787.9097
Cl -0.19612 -0.34512 -0.59084 -0.81255 -0.9814 -1.04045 -1.08585 -1.00102 -1.07904 -0.88544
Cd 0.01018 0.010177 0.015578 0.019883 0.027793 0.039337 0.059004 0.12487 0.218737 0.139854
Appendix: Fluent Tutorial
This is a short tutorial in running the airfoil analysis with ANSYS Workbench with the NACA
0012 airfoil.
There are four provided files, blade_only.agdb, blade_2.iges, airfoil_single_example.wbpj, and
wing_analysis_aggregate.wbpj, The blade_2.iges file contains the base 3D geometry for the
blade. The wing_analysis_aggregate.wbpj is simply a bunch of models with connected to a
parameter set which allows for running all the angles of attacks at once. This is useful when one
needs to run the entire model, but for the purposes of this tutorial we will only run one system at
a time.

This tutorial will focus on constructing a model from the blade_only.agdb file. Double click this
file to open it.
Once opened, ANSYS will likely throw an error saying that the blade_2.iges file is missing. This
can be ignored for now; we will locate it later. The following screen should appear:
This is the home screen for ANSYS Workbench, which incorporates all the ANSYS products.
From the left, double click on Fluid Flow (Fluent). A new system will appear. Drag the box
labeled “Geometry” in the A system to the box labeled “Geometry” in the B system, which has
the question mark. They have now been linked. The screen should now look like:

The large blocks are known as systems, and incorporate all the steps necessary to simulate the
model. The relevant system is labeled “Fluid Flow-Fluent”, as we will be working with Fluent
today.
1. Geometry: This is the configuration of all the geometries necessary to define the model.
2. Mesh: This creates the mesh on which Fluent’s finite volume method acts.
3. Setup: This defines the physical constants, boundary conditions, and solver method.
4. Solution: This is where the solver is initiated.
5. Results: The results of the simulation can be viewed here.
6. Parameters: Fluent will output the lift and drag values here.
To start, save this project. Remember to save often! First, we will inspect the geometry and
adjust the angle as needed. Double click the Geometry box in “A” (the master geometry) to
launch the DesignModeler.
First, we will import the blade_2.iges file. First click on Import as highlighted, and then click on
the source. Some ellipsis will appear. Locate the blade_2.iges file and click it to import.
The modeling has been done already. To move around in the window, use the middle mouse
button to rotate and CTRL+middle mouse to translate. The axes on the bottom right will reset the
view when clicked.
Next on the left, click on Rotate. (The subscripts are purely for naming incrementing.) In the
details section, the angle of the blade can be adjusted. When at a satisfactory angle, click
GENERATE to save the changes and create the final model. For this example, we will use -10
degrees. Note that negative angle here corresponds to positive lift.
Now, return to the ANSYS Workbench screen. If properly executed, there will be green check
marks next to the Geometry label. We will now launch the Mesh by double clicking it.
On the left, right click on Mesh, which should have a yellow thunderbolt as the mesh hasn’t been
generated yet. Go to Insert>Refinement. The yellow Geometry on the bottom right will turn
yellow, which is a prompt to select a geometry. Select the geometry, which will turn green. Click
on Refinement, and at the details pane in the bottom right set the refinement to 2.
We next need to create the named selections so the solver has boundary conditions. Switch to
edge selection at the top.

Right click the left edge (the inlet) and select Create Named Selection at the bottom. Call this
Inlet. Repeat this for the right edge (Outlet), the upper and bottom edges (Wall-use CTRL-click
to select multiple edges before right clicking), and the cutout of the airfoil (Airfoil-again, select
both top and bottom edge).
Click GENERATE after this is done. The mesh will now generate. To see the mesh, press Mesh
on the left pane. The meshing window can be closed.
Return to the ANSYS workbench screen. It is recommended that you save at this point. Right
click on the Mesh box and click Update. The Mesh box should have a green checkmark.

Next click Setup. This will launch Fluent.


On the left, under Models, turn Energy on, and set Viscous to Spalart-Allmaras.
Under Materials>Fluids>Air, set the density to Ideal Gas Law. This enables compressibility.
Under Boundary Conditions>Inlet, set to Velocity-Inlet. For this example use 51 m/s. Ensure
Outlet is set to Pressure-Outlet.
Next, we will set our output parameters. Under Parameters and Customization> Parameters>
Output Parameters, click Create>Lift. Click Airfoil for wall zone on the right. Then, select
Save Output Parameter, and create a new parameter called Lift. Click OK, and OK again.
For drag, under Parameters and Customization> Parameters> Output Parameters, click
Create>Drag. Click Airfoil for wall zone on the right. Then, select Save Output Parameter,
and create a new parameter called Drag.
For the parameters, the force vectors should be correct, but you can reference the Design
Modeler to be sure.
At this step, we can start preparing the solver. Open the Solution Tab.
Under Solution Methods, set the scheme to Coupled.
Under Run Calculation, set the Number to Iterations to 200, adjusting if necessary.
To run the method, you can double click on Run Calculation, or go to the Workbench and right
click>Update on Results, which will run everything up to and including Results.
From Results, the contours and streamlines can be inspected.
Click on Parameter Set to view the lift and drag.
To make the process easier, one can define the angle of attack as a parameter. This precludes
going into the modeler and changing it every time. Simply check the box next to the angle box.

Then, the angle can be changed from the parameter set.

kg
The density of air used by the ideal gas model is 1.182m3, the chord length is 1.7894m, and the
perimeter of the airfoil shape is 3.665m.
The airfoil_single_example.wbpj contains a project that should be the end result of these
instructions.

You might also like