You are on page 1of 30

Technical Note (2018)-RA 11009016 Date: 20/Jan.

/2018

Script creation for a 2D airfoil


meshing using ICEM CFD on
ANSYS

Octavio Regeni Silva

20. Jan. 2018.

Applied Aerodynamics Laboratory

Centro de Engenharia, Modelagem e Ciências Sociais Aplicadas

Universidade Federal do ABC

E-mail: o.regeni@ufabc.edu.br & Homepage: http://sites.google.com/site/aaerolab


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Contents

Abstract

Introduction

Chapter 1. Script initialization and geometry creation.

1.1. Script initialization


1.2. Geometry creation.
1.3. Blocking

Chapter 2. Meshing

2.1. Mesh creation.

2.2. Saving mesh as output.

Chapter 3. Using the script.

3.1. Script initialization

Reference
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Abstract

For an optimization, a valid mesh must be used for a good accordance between the
results and the experimental values, the RAE2822 airfoil is one of the most used for
this type of work, this note has the objective of create a script that models a valid
structured mesh for the RAE2822 airfoil, thus, it can be used for other supercritical
airfoils.

Introduction

The script must be able to construct a mesh for various types of airfoils,
maintaining the orthogonality and smoothing transition between the blocks, for
this, ICEM can be used, since it gives a good control in structured mesh’s that
satisfy the previously requisites.

Chapter 1. Script initialization and geometry creation.

1.1. Script initialization


• Go to replay script and enable replay control, it will open a window, minimize it and
back to ICEM, with this, the script will record all the commands.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

1.2. Geometry creation.


• Go to import geometry -> formatted point data, and insert the .dat file in the input file,
also, put 0.000001 in the tolerance for a smooth curve.

• Enable to show the points in the geometry, go to geometry -> modify curve -> segment
curve.
• Click in the curve and then click in the first point at the leading edge, this will split the
curve in two.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Now, is expect that you have this geometry, with two curves, one in the top and other in the
bottom line.

• For creating the farfield, is needed to create a point -> explicit locations, and insert the
coordinates for the farfield points, for a farfield with 20 chords in the C-type, you will
need to insert these coordinates:

(-20, 0, 0) (0, 20, 0) (0,-20,0) (20, 20, 0) (20, -20, 0)


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• With the points created, go to curves -> arc, Modify the curve name to FF by disabling
inherit part and select the points (-20, 0, 0) (0, 20, 0) (0,-20,0) . Confirm with the scroll
button.

• Select the lines, and join all the points for the farfield.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Create a new surface, and name it “FLUID” , select all the farfield lines.

Now, is expected for having this geometry of farfield.

1.3. Blocking

• Go to blocking -> create block and select fluid and 2D planar


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Go to blocking -> associate -> associate edge to curve

• Click in the edge of the outlet and associate to itself


• Click in the 3 other edges and associate to the 3 curves of the inlet
• Make sure that project vertices is enabled
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Go To mesh -> part mesh setup, and put this values as input
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Click apply and dismiss.


• Go to blocking -> split block -> ogrid, select the block in the middle and click with the
scroll.

Do the same to the edge in the outlet


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Apply.

• In the split block, select split block in the edge in red, drag the split to the trailing edge
of the airfoil
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Apply.

• Go to delete block and delete the block in de middle.

• Go to move vertex and align the vertices to the farfield


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Go to blocking associations -> associate edge to curve and select the edge above the
upper surface of the airfoil

Do the same to the bottom surface


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Move the vertex to the trailing edge


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Go to blocking -> mesh-> pre mesh params and select 100 nodes for the edges in red,
click copy parameters and apply.

Now, to the nodes fit better in the curves, it’s good to associate those edges in the upper and
bottom surface, for this, go to blocking -> edit edge -> edit edge, select automatic linear and
the edge in red
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Do the same to the bottom edge


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Go to associate -> associate edge to curve and select the edge in the leading edge to
the two curves of the airfoil
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

The next step, only need be followed if you want a sharp trailing edge, if you don’t want,
ignore the next 2 steps:

• Move the vertex close each other.

• Go to blocking -> merge vertex -> collapse block and select the edge in red and the
block, and click with the scroll
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Now, you should have this geometry

Chapter 2. Meshing

2.1. Mesh creation.

By clicking in blocking –> pre-mesh params -> edge params you can choose the number of
nodes in a edge, and the growing rate and behavior of them. Use this to create a mesh as you
want.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Enable the pre-mesh in the blocking toolbar at the left.

You can choose the grow rate in the pre-mesh params, select the edge in red and put in
spacing 2 the first node length and in ratio 2 the wanted grow ratio.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• Use the mesh law to control the behavior of the grow rate, with this, you can achieve a
more orthogonal mesh.

To achieve a better mesh near the airfoil, you can split the blocking in two.

For this, go to split block, and select the edge in red to the wanted size.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

• After this, you will need to set new parameters for the splinted edges.

• Change the params of the edges near the airfoil according your wish.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Now, select match edges, and match all the edges that are in contact. For this, choose the
reference edge, and select the edge that you want copy the parameter, then, click with the
scroll button, follow the sketch bellow, in R will be the reference edge and T the target edge,
do this for each one of the numbers.

Now, you should have this, the difference between the mesh with the split block and without
the split block near the airfoil is that now you can control edges near the airfoil, with this, you
can control the grow rate of them and thus, control the orthogonality
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

You can see the difference in the orthogonality below.

You can copy the params to other edges, choose between copy to selected edge or to parallels
according to your wish.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Controlling the grow rate of each edge, you can achieve smooth transitions like this:

After this, you can smooth the mesh, go to blocking -> pre mesh smooth.

For this case, I’ll use the orthogonality smooth, with 10 iterations, modified laplace and a
stabilizing factor of 5.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Now, you should have a mesh with those aspects:

• When the mesh is finished, click with the right button in pre mesh, on the toolbar at
the left, and select “convert to unstruct mesh”
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Now, you finished the mesh, go to the script window and save the script.

2.2. Saving mesh as output.

• Go to output mesh -> select solver and select the wanted solver.

Apply.

• Go to output mesh-> output mesh, save the file, then, select 2D and click in done.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Now, you’re ready to use the mesh in the solver.

Chapter 3. Using the script.


3.1. Script initialization

• Go to replay script, and select load script file.


• Select the script file, and click edit, in the window, edit the name of the airfoil ant the
point.
Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Put the name of the airfoil that you want to study (previously saved in the folder) and change
the point number, the point need to be the first point of the leading edge, you can know the
value by opening the airfoil before in other window and select to see the point numbers.

In the example bellow, the point number would be 34.

• After edit the script text, run the script.


Technical Note (2018)-RA 11009016 Date: 20/Jan./2018

Reference
[1] https://www.youtube.com/watch?v=EknKVAJGEJ8&t=303s

Video from ansys that explain most part of this tutorial.

You might also like