How To Get A Wing Into Workbench

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Method for Creating Aerofoil Geometry for Import into an

Ansys CFD Analysis

Introduction

This document details a method for creating an aerofoil intended for a


Computational Fluids Dynamics (CFD) analysis when using the Ansys
Workbench software.

The process starts with the acquisition of 2d (X,Y) coordinates from an


online database and will ultimately be completed by creating a 3d
analytical mesh that can be used for cfd analysis. On the way the initial
numerical point data must be manipulated to allow creation of 3d
geometry and then the geometry must be translated into the mesh.
Therefore, the process involves quite a few intermediate steps and
entails the use of a small range of different software packages for the
various steps: An outline of the procedure is given by:

A. Obtain XY coordinates from the UIUC Aerofoil Coordinate


Database.

B. Transfer these to Notepad and save the coordinates within a file


that has a *.txt file extension.

C. Open the text file within Microsoft Excel.

Add Z coordinates to each XY pair.

Rearrange the data to give a “clockwise” curve.

Scale the coordinates.

Save as CSV File (*.csv).

D. Open the csv file in Notepad ++ and save a copy as a Normal Text
File with a *.txt extension.

E Read the (Notepad ++) text file within SolidWorks and create a
Curve Though X,Y,Z Points.
Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
Create a Sketch – Draw a surrounding box and then use the
Convert Entities command to make wing the profile part of sketch.

Note: some open profiles may need to be closed with additional


geometry – the actual details will depend on the particular data
used.

Extrude Profile to 3D Solid

Save to *.igs file

These basic steps up to, but not including, the stage of importing the
geometry into Ansys Workbench will be outlined in detail throughout the
remainder of this document. Further processing of the geometry within
Ansys Workbench will be detailed in a later document.

Whilst a NACA0012 aerofoil will be used to as an example to explain the


procedure the overall method is general to an extremely wide range of
aerofoil shapes.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
A. Obtaining the 2d Coordinate Data

The initial data can be obtained from the UIUC (University of Illinois at
Urbana-Champaign) Airfoli Data Site. This can be easily accessed by
typing:

UIUC Coordinates Database

into a web browser. The actual page should be titled UIUC Airfoil Data
Site in the search results.

Click on the link and a banner page should appear entitled UIUC Applied
Aerodynamics Group.

Part of the way down the page will be the alphabetical characters A – Z.
These letters generally denote the first character in the aerofoil name
e.g. a NACA 0012 will obviously have the letter N has an initial letter.

Click on the appropriate letter (N) and a list of different aerofoil shapes
will appear. The NACA0012 may not be immediately visible in the list so
it may be necessary to scroll up or down a bit to find it but what is visible
in the list should be fairly close to its position.

Click on the label n0012.dat from the list. What happens next may be
computer specific but either:

i) a new window containing a list of formatted point data will appear; or,

ii) a file will be downloaded to your computer

In the first instance select all the data and copy it to the clipboard using
the normal procedures for doing so. Then progress to step B.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
Alternatively, if the file has been downloaded it will need to be opened
using Notepad. To do this click on the down arrow (1):

(1)

And then select Show in Folder. A file older will appear containing the
relevant file. This can be opened using Notepad. There is no need to do
any copy and pasting.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
B. Notepad Editing

Open Notepad from the list of available programs on your computer. If


the data has been copied to the clipboard then paste it into the Notepad
file.

The data should appear as:

Note that only a few of the data points have been shown in the figure
above. For the NACA0012 there are actually a total of 66 data points.

The first two data lines indicate the aerofoil name and the number of
datapoint pairs whilst the third line is blank. However, this is information
is not required and must be deleted from the list. Hence the data should
start from the initial coordinates:

and there should be no preceding blank lines above.

Now save the Notepad file. By default the file should save as a *.txt file.
For example the file could be named NACA0012_Aerofoil.txt.

(Note: at this stage it is probably worth thinking about setting up a


working directory on the computer H drive. This will contain all the files
associated with this project. Do not save work on the C drive. The
Desktop may be used but the H drive is preferred to avoid potential
problems at a later stage.)

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
C Editing Using Excel

Start up Excel in the usual manner. Use the Open procedure to locate
the *.txt file in the working directory.

By default Excel looks for excel workbooks and/or worksheets so it will


be necessary to change the file type to either All Files or Text Files:

or

When opening the file Excel will present a number of dialog menus (Text
Import Wizards) for file import. The appropriate options to use are:

Original Data Type => Delimited (by default so just accept)

Delimiters => Space (Tab is the default option, Space has to be


clicked on.)

Column Data Format => Do not Import Column (Skip) for the first
column only. The two remaining columns are imported as General
(clicking within the columns is used to select them.)

Finish

The data points are now displayed within Excel, with the first data pair
0, 0 appearing in row one.

Note that columns A and B are populated whilst column C is empty.

Scrolling down the list it is possible to see that:

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
row 66 contains the values 1, 0.00126 in columns A, and B. Also row 67
is blank, and row 68 contains the values 0,0. Also scrolling to the very
bottom of the list shows that:

row 133 contains the values 1, -0.00126.

It is appropriate to now give some consideration to what this means, and


to what is entailed for subsequent creation of an aerofoil for analysis.

i) An aerofoil as stored in the UIUC database has X and Y values.


These are listed in columns A and B of the spreadsheet.

ii) Two surfaces i.e. a top surface and a bottom surface make up the
aerofoil geometry. The top surface is contained in the rows 1 to 66 whilst
the bottom surface is in rows 68 to 133. Note that the blank row 67 is
actually a discontinuity in the data.

iii) The X coordinates are range from 0 to 1 for the top surface and
repeat from 0 to 1 for the bottom surface.

However, the geometry of an analysis aerofoil needs a different


representation to what is so far available because:

a) it needs to be three dimensional – it requires an additional set of Z


coordinates

b) it needs to be continuous – blank data leads to gaps in the geometry.


Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
c) “real” aerofoil geometries, as would be used for analysis purposes, do
not have unit chord lengths – lets say the chord length of an actual
aerofoil is 2500mm then the maximum X coordinate should have that
value and the set of corresponding Y coordinates should be scaled
appropriate to that chord length.

d) a requirement of the CAD package that will be used is that the data
should be listed in a continuous “clockwise” manner. That is the X
coordinates should be listed 0 to 1 and then back to 0.

Therefore some manipulation of the data is required to modify what is so


far available in i) to ii) to what is required in a) to d).

The first two steps are trivial. Insert a zero in cell C1 and copy this to all
cells in the column down to C133.

Then delete row 67:

For convenience (this is not essential) on the next step the three cells in
row 67 can be filled.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
The next step involves using the Data – Sort command to rearrange the
data in rows 67 to 132 (one row has been deleted from the original 133)
so that they will achieve the required clockwise ordering.

Select the cells A67 to B132 as indicated:

Use Data – Sort with the options set as shown:

This will reorder the data as:

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
and the row 132 should contain the coordinates 0,0,0, whilst row 133 will
be blank.

Finally the coordinates should be scaled to the required chord length.


This will be achieved by using an Excel formula and also this needs to
be done so that the scaled data points appear on a new sheet within the
Excel workbook.

So, open a new worksheet:

Note that at the bottom of the worksheet window a new tab may have
appeared. In the view shown the original worksheet is labelled n0012
and the new tab is labelled Scaled. Changing the labels is entirely
optional but can be done by right clicking on the tabs and using the
Rename command.

Now select the cell A1 within the new sheet. Within that cell use the
formula:

=’n0012’!A1*2500

The apostrophes and exclamation marks are an essential part of the


syntax and the formula must be written in this way to reference the cell
A1 on sheet n0012. The value 2500 is used as a scaling factor.

On entering the formula the value in cell A1 will be zero as required.


Now copy and paste this formula to the other cells. Remember that the
necessary cell range goes from A1 to B132, and that whilst it is

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
permissible to also copy the formula to the C column this will not affect
the values therein as they are all zeros anyway.

The resulting data will appear as:

The data now consists of a set of three dimensional (XYZ) coordinates,


arranged in a continuous clockwise manner, and appropriately scaled to
the chord length of a “real” aerofoil.

Save the Excel workbook in your working directory.

Now, use Save As to save the file as a comma separated values *.csv
file:

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
This is the file that will be opened in Notepad ++ to convert to a *.txt file
that can be opened in SolidWorks.

(Note, although it may appear to be possible to save the file directly out
of Excel as a *.txt file this approach will not work. The csv file format
inserts commas that are expected by SolidWorks between the
coordinate values. Saving it directly as *.txt does not do this.)

Return OK and/or Yes to any warning messages that Excel displays.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
D.. Editing the Data in Notepad ++

From a file folder that displays your working directory right click on the
*.csv file and select Edit with Notepad ++ from the drop down dialog:

Open the file, and the data should be displayed similar to:

There is no data manipulation to be done at this stage. Simply save the


file using Save a Copy As in the *.txt Normal text file format:

Close Notepad ++. Failure to do so may result in an error message


being displayed when later attempting to read the file into SolidWorks.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
E. Creating Geometry in SolidWorks

Open SolidWorks with the option selected to create a New Part. If


prompted select units of (mm, gramme, seconds) and ISO to designate
the units to be used for the modelling.l

On the Features tab select Curves, Curves through XYZ points.

A dialog box will appear that has empty cells for X,Y and Z coordinates.
What needs to be done is to specify the *.txt file to as input. You will
need to browse to your working directory and select the appropriate file.

However, the default file type that SolidWorks looks for is of *.sldcrv
format. Therefore the *.txt file will not be immediately visible. So click on
the down arrow to and select Text Files (*.txt) to enable visibility of this
file format.
Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
It should now be possible to select the appropriate file.

Once the correct file has been specified the dialog box should display
the XYZ coordinates being read from the *.txt file:

However, if this box is empty of values, or if SolidWorks displays any


form of error message, e.g.,

then there is a problem with the way the data has been formatted. In this
case retrace the earlier steps to find out where any error could have
occurred and correct any mistakes.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
Because the data points were created with non zero values in the first
and second column then the curve should be displayed in an orientation
that corresponds to the Front Plane within SolidWorks.

Note that sometimes it will be necessary to use the Zoom All icon in
order to see the complete aerofoil profile.

Now, pick on Front Plane from the history tree (usually on the left hand
side f the screen) and create a Sketch on that plane.

The aerofoil profile will be visible within the sketch however it will not be
possible at this stage to edit it (SolidWorks does not as yet recognise it
as part of its internal entity set.)

Use the Convert Entities command:

and select the aerofoil profile. This will make the geometry part of the
current sketch. The success of this operation will be signified by the
colour of the curves should turning from blue to black.

Now draw a box around the aerofoil profile:

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
(note aerofoil profile is shown before applying Convert Entities here.)

This can be done using the Corner Rectangle icon and defining
two opposing corners of a box that surrounds the aerofoil profile.

Apply dimensions to the box. For an initial mesh and purely to


demonstrate the process the box should be dimensioned as shown:

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
The dimensions all start from a datum defined by the point at the leading
edge of the aerofoil.

What has been created is a box that is two and a half chord lengths in
front of the aerofoil’s leading edge, ten chord lengths behind, and three
chord lengths above and below the chord. These dimensions will not
necessarily ensure that at a subsequent meshing stage a “good” overall
mesh will created for the aerofoil geometry. This process is intended to
be iterative – that is we start with an initial guess, run an analysis, see
how good the results are, and then determine if changes need to be
made to obtain better results.

Exit the sketch.

Now go to the Features tab and select Extruded Boss Base .

Solidworks should automatically select the sketch although some


manual intervention to select a sketch may sometimes be required.

Fill in the dialog box as shown:

The protrusion distance should be 0.1.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014
The reason for this dimension is that the final 3d mesh will have just one
cell throughout its thickness. This cell should be dimensioned so that
ideally it will be of approximately similar size to the smallest cell that
appears in the other two dimensions. This issue should become clearer
when the mesh is being created at a later stage.

On completing the protrusion SolidWorks should display the finished


geometry.

Save the SolidWorks part file to your working directory.

Now save the file again but this time using a *.igs format.

(Note: IGES is a CAD file translation format that allows model data to be
transferred between different CAD software systems.)

This completes the process of creating the aerofoil geometry. The next
stages of meshing and analysis within Ansys Workbench will be detailed
within a further document.

Method for Creating Aerofoil Geometry for Import into an Ansys CFD Analysis
– D.A. Fisher Sept 2014

You might also like