You are on page 1of 46

Airfoil Analysis : A Deep Learning Approach

A PROJECT REPORT

Submitted by
Aadarsh Satyan C(FIT16ME001)
Jeevanandh Vijayan(FIT16ME062)
Francis Kuruvila(FIT16ME050)
to
the APJ Abdul Kalam Technological University
in partial fulfillment of the requirements for the award of the Degree

of

Bachelor of Technology
in
Mechanical Engineering

Department of Mechanical Engineering

Federal Institute of Science And Technology (FISAT)


R
Angamaly, Ernakulam

JUNE 2020
DECLARATION

I undersigned hereby declare that the project report (“Airfoil Analysis:


A Deep learning approach”), submitted for partial fulfillment of the require-
ments for the award of degree of Bachelor of Technology of the APJ Abdul
Kalam Technological University, Kerala is a bonafide work done by me under
supervision of Mr. Srijith Rajeev. This submission represents my ideas in
my own words and where ideas or words of others have been included, I have
adequately and accurately cited and referenced the original sources. I also
declare that I have adhered to ethics of academic honesty and integrity and
have not misrepresented or fabricated any data or idea or fact or source in
my submission. I understand that any violation of the above will be a cause
for disciplinary action by the institute and/or the University and can also
evoke penal action from the sources which have thus not been properly cited
or from whom proper permission has not been obtained. This report has
not been previously formed the basis for the award of any degree, diploma
or similar title of any other University.

Mookanoor Signature

June 16, 2020: Jeevanandh Vijayan

Aadarsh Sathyan C

Francis Kuruvila
DEPARTMENT OF MECHANICAL
ENGINEERING

Federal Institute of Science And Technology


(FISAT) R

Mookkannoor(P.O), Angamaly-683577

CERTIFICATE

This is to certify that the report entitled ”Airfoil Analysis : A Deep


Learning Approach” submitted by ”Francis Kuruvila” to the APJ Ab-
dul Kalam Technological University in partial fulfillment of the requirements for
the award of the Degree of Bachelor of Technology in (Mechanical Engineering)
is a bonafide record of the project work carried out by him/her under my/our
guidance and supervision. This report in any form has not been submitted to any
other University or Institute for any purpose.

Internal Supervisor External Supervisor

Project Coordiantor Head Of The Department


Contents

ACKNOWLEDGEMENT

ABSTRACT

LIST OF FIGURES

LIST OF TABLES

ABBREVATIONS

NOTATION

1 INTRODUCTION 1
1.1 General Background . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Deep Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Computational Fluid Dynamics . . . . . . . . . . . . . . . . . . . . 3
1.4 Airfoil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Scope and Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 LITERATURE SURVEY 5

3 METHODOLOGY 9

4 DESIGN AND IMPLEMENTATION 10


4.1 Limitations of Conventional CFD Software . . . . . . . . . . . . . . 10
4.2 Platform Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Data Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3.1 Image Data Generation . . . . . . . . . . . . . . . . . . . . . 14
4.4 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.5.1 Data Import and Loading . . . . . . . . . . . . . . . . . . . 16
4.5.2 Model Creation and Training . . . . . . . . . . . . . . . . . 19
4.6 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.7 Wing Design and Fabrication . . . . . . . . . . . . . . . . . . . . . 21
4.8 Wind Tunnel Testing . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5 RESULTS AND DISCUSSION 26


5.1 Training and Validation . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Ground Truth Comparison . . . . . . . . . . . . . . . . . . . . . . . 27
5.3 Confusion Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.4 Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

iii
6 CONCLUSION 31
6.1 Scope for Further work . . . . . . . . . . . . . . . . . . . . . . . . 31
6.2 Annexure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

REFERENCES 36

LIST OF PUBLICATIONS 36
ACKNOWLEDGMENT

At this pleasing moment of having successfully starting our project. We wish to


convey our sincere thanks and gratitude to the management of our college who
provided our facilities to us. We hereby express our deep sense of gratitude to our
guide Mr. Srijith Rajeev, co-guide Mr. Martin Antony,Asst. Professors, Dept. of
Mechanical Engineering, Federal Institute of Science and Technology, for the valu-
able guidance and suggestions offered during the preliminary course this project
and also in preparing this report. We would like to extend our thanks to Dr. Jose
Cherian, Head of the Department of Mechanical Engineering, Federal Institute of
Science and Technology. Along with them, we also extend our gratitude towards
our principal Dr. George Issac, Federal Institute of science and Technology, who
provided necessary arrangements for the work to be completed. We would also
like to express our thanks to our project coordinators, Mr. Jiju P.P., Mr. Sajan
S,Mr.Dileep G Menon , Assistant Professors for their encouragement and guidance
for the preparations of this report. Finally, we take this opportunity in expressing
our sincere gratitude to all our friends for their wholehearted co-operation. Last
but not least, we would like to thank all those people we have not mentioned
here, last whose helping hands have been great support to us. Special thanks to
the UIUC Airfoil Dataset and the opensource CFD solver software XFLR5, which
are the most important datasets and tool of this project, and also to Google Col-
laboratory, for creating a cloud machine learning environment without which this
project wouldn’t have been affordable.

Aadarsh Sathyan C.
Jeevanandh Vijayan
Francis Kuruvila
ABSTRACT

Machine Learning and AI is becoming more and more relevant in almost every
engineering areas and related application. Advent of Machine Learning has made
us think of modern problems in a much more data-driven way. Our focus will
be to make a deep learning model capable of predicting a lift-by–drag ratio of an
airfoil with comparable accuracy to the traditional Computational Fluid Dynam-
ics (CFD) approach, which is comparatively more time consuming and is more
computationally expensive.
Our Project is to design, test and validate a deep learning model that will be
able to perform on quality which is comparable with traditional CFD software,
and which will be able to produce accurate results, with much faster speed. We
will be comparing the results of the CNN model that we had developed, with the
CFD results and also validate an experimental result that we had worked out.
A wing will be made out of which a selected airfoil shape (preferably NACA)
will be prototyped. We had designed this wing in an open-source aerodynamics
design software called XFLR5 and a prototype is made out of multilayered wood
structure. This model is to be tested out in the sub-Sonic wind tunnel in which
max speeds of 0.3 Mach can be achieved. Tests on the wing are to be carried out
and different attack angles are used and the lift-by-drag ratio is observed. The
same conditions are simulated as deep learning problem and then the model is
validated by comparing the results from the wind tunnel test.
The future scope of this project can be extended to not only just aerodynamics,
but also hydrodynamics as well, if we include data which is created in the respective
hydrodynamics context. We can also create an airflow simulation setup in this
methodology also, which can also work faster than most commercial CFD Software.
List of Tables

5.1 Speed Comparison of CNN model with XFLR5 . . . . . . . . . . . 30


List of Figures

1.1 Artificial Intelligence and Deep Learning . . . . . . . . . . . . . . . 2


1.2 Airfoil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.1 Projected Steps for the project . . . . . . . . . . . . . . . . . . . . 9

4.1 Modeling in ANSYS geometry enviornment . . . . . . . . . . . . . . 11


4.2 Mesh generated in the mesh module . . . . . . . . . . . . . . . . . 11
4.3 Problem setup is defined in the ANSYS . . . . . . . . . . . . . . . . 12
4.4 Running the calculation . . . . . . . . . . . . . . . . . . . . . . . . 12
4.5 Lift Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Drag Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.7 Aircraft Wing design using XFLR5 . . . . . . . . . . . . . . . . . . 14
4.8 Airfoil analysis with XFLR5 analysis with graph . . . . . . . . . . . 14
4.9 Airfoil analysis export data . . . . . . . . . . . . . . . . . . . . . . 15
4.10 Code for importing data from Google drive to Colab . . . . . . . . 16
4.11 Loading Images into ’imgs’ Dataframe . . . . . . . . . . . . . . . . 17
4.12 Convert images to arrays . . . . . . . . . . . . . . . . . . . . . . . . 17
4.13 Import training labels and split dataset . . . . . . . . . . . . . . . . 18
4.14 Model creation with CNN . . . . . . . . . . . . . . . . . . . . . . . 19
4.15 Training and Validation . . . . . . . . . . . . . . . . . . . . . . . . 19
4.16 The Convolution operation applied over an image . . . . . . . . . . 20
4.17 Pipeline of Data Flow Process . . . . . . . . . . . . . . . . . . . . . 21
4.18 Cross Section of Wing we had designed in the XFLR5 enviornment 21
4.19 Isotropic view of the NACA4412 Wing . . . . . . . . . . . . . . . . 22
4.20 Pressure gauge setup to measure lift and drag coefficient . . . . . . 23
4.21 CUSAT Wind Tunnel Apparatus . . . . . . . . . . . . . . . . . . . 23
4.22 Cross section revealing attack angle . . . . . . . . . . . . . . . . . . 24
4.23 Wind Tunnel Specifications . . . . . . . . . . . . . . . . . . . . . . 25

5.1 50 Samples-50 epoch . . . . . . . . . . . . . . . . . . . . . . . . . . 26


5.2 50 Samples-400epoch . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3 100 Samples-200 epoch . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4 Confusion matrix of the CNN model trained on 10 epochs . . . . . 28
5.5 Confusion matrix of the CNN model trained on 50 epochs . . . . . 29
5.6 Confusion matrix of the CNN model trained on 200 epochs . . . . . 29
5.7 Confusion matrix of the CNN model trained on 400 epochs . . . . . 30
ABBREVATIONS

CFD Computational Fluid Dynamics


CNN Convolutional Neural Networks
DL Deep Learning
NN Neural Networks
CL Coefficient of Lift
CD Coefficient of Drag
Chapter 1

INTRODUCTION

1.1 General Background


Machine Learning has become an integral part of many commercial and research
projects,but this field is not exclusive to large companies with research teams.
Machine learning is about extracting knowledge from data.From automatic rec-
ommendations of which movies to watch, to what food to order or which products
to buy, to personalized online radio and recognizing your friends in your photos,
many modern websites and devices have machine learning algorithms at their core.
When you look at a complex website like Facebook, Amazon, or Netflix, it is very
likely that every part of the site contains multiple machine learning models.The
rise in computational power has undeniably transformed engineering analysis and
design. Recently, the rapid advance in data science and machine learning tech-
niques has opened new doors in understanding unsolved aerodynamics and fluid
mechanics problems.
The traditional way of solving aerodynamics and fluid mechanics problems is a
top-down approach that relies on physics modeling. In order to build a good model,
a researcher needs to have a clear understanding of physics and theories. Most of
these problems are multi-dimensional, multi-scale, and nonlinear problems, which
can be very difficult to find underlying physics. Some low-fidelity models are based
on a first-order understanding. However, due to the complexity of the real-world
problems, there will inevitably be non-negligible differences between the actual
dynamics and the approximated models.
Even though faster and easier than traditional aerodynamic testing like wind
tunnel testing Computational Fluid Dynamics( CFD ) needs a long period of time
for processing and getting the result and also a number of steps has to be followed
for different calculations, not to mention the shear computational costs required
for running those CFD softwares.For the past decade the potential of combining
the meta-modeling of CFD tools with machine learning techniques has gained
widespread attention. Data-driven surrogate models are becoming popular, due
to the high volume of physical testing and the simulation data generated from the
design, analysis and optimization processes. Different machine learning algorithms
are being proposed to solve aerodynamics problems. In addition, deep learning
techniques have been brought to many researchers attention.

1
1.2 Deep Learning
Deep learning has emerged in the last few years as a premier technology for building
intelligent systems that learn from data. Deep neural networks, originally roughly
inspired by how the human brain learns, are trained with large amounts of data to
solve complex tasks with unprecedented accuracy. With open source frameworks
making this technology widely available, it is becoming a must-know for anybody
involved with big data and machine learning.
Deep learning (DL) has penetrated the computer science consciousness beyond
most techniques in recent history. This is in part due to how it has shown not only
top-flight accuracy in machine learning modeling, but also demonstrated generative
mechanics that fascinate even the noncomputer scientist DL has been a challenge
to define for many because it has changed forms slowly over the past decade.
One useful definition specifies that deep learning deals with a “neural network
with more than two layers.” The problematic aspect to this definition is that it
makes deep learning sound as if it has been around since the 1980s. We feel that
neural networks had to transcend architecturally from the earlier network styles
(in conjunction with a lot more processing power) before showing the spectacular
results seen in more recent years.

Figure 1.1: Artificial Intelligence and Deep Learning

Following are some of the facets in this evolution of neural networks:


• More neurons than previous networks
• More complex ways of connecting layers/neurons in NNs
• Explosion in the amount of computing power available to train
• Automatic feature extraction
1.3 Computational Fluid Dynamics
Computational fluid dynamics (CFD) is a branch of fluid mechanics that uses nu-
merical analysis and data structures to analyze and solve problems that involve
fluid flows. Computers are used to perform the calculations required to simulate
the free-stream flow of the fluid, and the interaction of the fluid (liquids and gases)
with surfaces defined by boundary conditions. With high-speed supercomputers,
better solutions can be achieved, and are often required to solve the largest and
most complex problems. Ongoing research yields software that improves the ac-
curacy and speed of complex simulation scenarios such as transonic or turbulent
flows. Initial validation of such software is typically performed using experimental
apparatus such as wind tunnels.

1.4 Airfoil
Lift and drag are the two fundamental forces of wind. They determine whether
a plane will fly or a wind turbine will rotate. The force component parallel to
the direction of the wind is called aerodynamic drag or simply drag, and the force
component perpendicular to the direction of wind is called aerodynamic lift or
simply lift. Angle of Attack is the angle between the oncoming air and a reference
line on the wing. Aerodynamic forces depend upon the shape and size of an object,
and angle of attack influences it also. The lift coefficient is the ratio of the lift
force to the aerodynamic force causing it. The drag coefficient is the ratio of the
drag force to the aerodynamic force causing it
We basically use an airfoil to increase the lift force of a flying body. It is a
profile for the outline of an airplane wings or turbine blades with the property of
having a large lift coefficient and a very small drag coefficient. The leading edge
is where the moving air first strikes, and the trailing edge is where the moving
air leaves the airfoil. The chord is the distance between the leading edge and the
trailing edge. The line connecting the leading edge and the trailing edge is called
chord line. The important property of an airfoil is that it needs to possess very
large value of lift force and smaller values of drag force for most angles of attack.
This property is usually represented by the lift and drag coefficients and the lift-
to-drag ratio, which is the ratio of the lift coefficient and drag In aerodynamics,
the lift-to-drag ratio is the amount of lift generated by a wing or vehicle, divided
by the aerodynamic drag it creates by moving through air. A greater or more
favorable lift-to-drag ratio is typically one of the major goals of aircraft design;
since a particular aircraft’s required lift is set by its weight, delivering that lift with
lower drag results directly in better fuel economy in aircraft, climb performance,
and glide ratio. The term is calculated for any particular airspeed by measuring
the lift generated, then dividing by the drag at that speed. These vary with speed,
so the results are typically plotted on a 2 dimensional graph. In almost all cases
the graph forms a U-shape, due to the two main components of drag.
Figure 1.2: Airfoil

1.5 Objective
Our objective is to create a Machine learning/Deep learning model that could re-
place traditional CFD techniques for calculation of Lift-Drag ratio for airfoils,that
is to develop a Deep Learning model capable of predicting the Lift-Drag ratio
from an image of the airfoil. Compare the speed of finding the lift-by-drag ratio
with traditional CFD softwares and techniques like windtunnel testing and CFD
softwares.

1.6 Scope and Challenges


The first challenge is to find hardware that can be used for training the model
using image data, cloud based softwares such as Google Colaboratory a reasearh
project by Google was another option. Identify programming language to be used
as many options were there like Matlab, Python, Java etc...the most optimum one
has to be selected.One of the major challege is to create or find the data required
for training the Machine Learning model. Different CFD softwares are to be tried.
A physical model of the airfoil is to made using 3D printing or any other method
for tesing and analyzing in windtunnel.
Chapter 2

LITERATURE SURVEY

Guo et. al (2016) reviews that aerodynamics related design, analysis and opti-
mization problems, flow fields are simulated using computational fluid dynamics
(CFD) solvers. However, CFD simulation is usually a computationally expen-
sive, memory demanding and time consuming iterative process. These drawbacks
of CFD limit opportunities for design space exploration and forbid interactive
design. They propose a general and flexible approximation model for real-time
prediction of non-uniform steady laminar flow in a 2D or 3D domain based on
convolutional neural networks (CNNs). They explored alternatives for the geom-
etry representation and the network architecture of CNNs. The team show that
convolutional neural networks can estimate the velocity field two orders of mag-
nitude faster than a GPU-accelerated CFD solver and four orders of magnitude
faster than a CPU-based CFD solver at a cost of a low error rate. This approach
can provide immediate feedback for real-time design iterations at the early stage
of design. Compared with existing approximation models in the aerodynamics
domain, CNNs enable an efficient estimation for the entire velocity field. Further-
more, designers and engineers can directly apply the CNN approximation model in
their design space exploration algorithms without training extra lower-dimensional
surrogate models. They also conclude that even though for many domains, such
as architectural design, low Reynolds number flows are usually sufficient, and that
they intend to explore higher Reynolds number flows in the future, to extend
the approach to other areas of design optimization. It would also be worthwhile
investigating whether they could use the results from the approximation mod-
els as an initial setup to warm start high-accuracy CFD simulations. Since the
predictions are fairly close representations of the final, fully converged results, the
number of iterations required to converge to steady state could be greatly reduced,
and therefore high-accuracy traditional CFD methods could be made to converge
much more quickly. In this paper, they applied deep Convolutional Neural Net-
works to Computation Fluid Dynamics modelling. The main motivation was to
provide lightweight (fast and less-accurate) interior and exterior flow performance
feedback to improve interactivity of early design stages, design exploration and op-
timization. Using this approach, designers can easily generate immense amounts
of design alternatives without facing the time-consuming task of evaluation and
selection. The results show that the CNN based CFD predictions achieve 2-4 or-
ders of magnitude speedup compared to traditional CFD methods to model steady
state laminar flow at a cost of low error rates.
Haque et. al (2015) explains that aircraft wings are the lifting surfaces with
the chosen aerofoil sections. The efficiency as well as the performance of an air-
craft mostly depends on the aerodynamic characteristics e.g. lift, drag, lift to drag

5
ratio, etc of wings. Besides many factors, the effects of wing shape are also crucial
to aircraft performance. This paper represents the experimental investigation to
explore better aerodynamic performance by incorporating curvature at the leading
edge of a wing. A wooden model with straight leading and trailing edge i.e. rectan-
gular platform and another model with curved leading edge and straight trailing
edge are prepared with NACA 4412 aerofoil in equal length (span) and surface
area. Both the models are tested in a closed circuit wind tunnel at air speed of
85.35 kmph (0.07 Mach) i.e. at Reynolds number 1.82 x 105. The static pressure
at different angles of attack (-4, 0, 4, 8, 12, 16, 20 24) are measured from both
upper and lower surfaces of the wing models through different pressure tapings by
using a multi-tube water manometer. From the static pressure distribution, lift
coefficient, drag coefficient and lift to drag ratio of both the models are analysed.
After analysing the data, it is found that the curved leading edge wing platform is
having higher lift coefficient and lower drag coefficient than the rectangular wing
platform. Thus, the curved leading edge platform is having higher lift to drag
ratio than the rectangular platform. It concludes by saying that, this experiment,
curvature is incorporated at the leading edge in such a way that the surface area
from the middle of the wing towards the root increases and towards the tip the
area decreases in the same rate. The overall surface area of the wing remains same
as of the rectangular platform. As a result, the wing can produce more lift due
to increased surface area near the root. At the same time, flow separation along
the span of the wing is reduced due to gradual reduction of chord length along the
span and so the drag is also reduced. From the analysis of experimental data it is
observed that the lift coefficient of the curved leading edge platform increases and
the drag coefficient decreases at angles of attack below 12 in comparison to the
rectangular platform; whereas critical angle of attack does not vary significantly
between the two platforms. Beyond critical angle of attack, values of lift and drag
coefficients are almost equal. As such, it can be concluded that the curved lead-
ing edge platform exhibits better aerodynamic performance than the rectangular
platform due to higher lift to drag ratio at angles of attack below the critical angle
of attack.
Ismail et. al (2015) investigates the effect of profile-modifications on a NACA-
0015 aerofoil used in VAWTs (vertical axis wind turbines). The profile-modifications
being investigated consist of a combination of inward semi-circular dimple and Gur-
ney flap at the lower surface of the NACA-0015 aerofoil. Rather than maximize
the lift-coefficient or the ratio of the lift to drag coefficients, this paper choose to
maximize the average (or effective) torque of the VAWT as this is a much bet-
ter measure of the power produced. A fully automated optimization using RSA
(Response Surface Approximation) is utilized here to maximize the average torque
produced by the wind turbine blade. The data-set used in the optimization is
generated using CFD (computational fluid dynamics) simulations. In order to en-
sure reliability, the computational domain and the turbulence model used in the
CFD simulations are validated against previous experimental results. The opti-
mized shape of the modified aerofoil is shown to improve the aerodynamics of the
wind turbine blade. The paper concludes by proposing a RSA-based automated
process to maximize the performance of VAWT blades by optimizing the configu-
ration of a Gurney flap in combination with an inward dimple. The algorithm can
automatically change the RSA model by changing the DOE data-set if deemed
necessary. In this paper, CFD simulations were used to obtain the data needed
for the RSA optimization (at Reynolds number, Rec 2.55e5 and a tip speed ratio
of 3.5). The turbulence models used in the CFD study were validated against
previously published experiments. From the study, it can be concluded that the
average tangential force can be increased by approximately 35 percent in steady
state case and 40 percent in oscillating case (at each revolution) by utilizing an
optimized combination of Gurney flap and semi-circular inward dimple.
Swalwell et. al (2001) presents lift and drag data obtained from pressure
taps on a NACA 0021 aerofoil at Reynolds numbers of around 3.5e5 over a wide
range of angles of attack. The airfoil was subjected to low turbulence flow of
turbulence intensity 0.6 percent, and turbulent flows of length scale 0.56 chords
and intensities of 4 percent and 7 percent. Turbulence was found to delay stall
in a way that is consistent with the delayed stall seen on Horizontal Axis Wind
Turbines. Increasing the turbulence intensity delayed stall until higher angles of
attack. Further work is proposed to investigate the reasons for this delay, to repeat
this experiment on a thick cambered aerofoil and to assess the likely effect on wind
turbine performance. They finds that the addition of turbulence of a length scale
of 0.56c and intensity of 4 percent was found to delay stall on the NACA 0021
model in accordance with previous results. Increasing the turbulence intensity to
7 percent delayed stall further.
Yilmaz et. al (2017) presents formulations and results of the application of
deep learning methodologies, which have become popular extensions to machine
learning, to airfoil performance prediction. Expensive computational fluid dynam-
ics (CFD) simulations and wind tunnel tests in the earlier phases of the aircraft
and airfoil design process are costly in terms of financial budgets and program
schedule. Surrogate modelling methods can be leveraged to somewhat mitigate
such expenses with proper planning. Nevertheless, surrogate modelling typically
requires careful parameterization of the airfoil geometry in terms of particular
classes of shape functions. As an alternative, deep networks have the advantage
of automatic feature detection from unstructured data, allowing the limitations of
particular geometric parameterizations to be avoided and providing a possible ba-
sis for generalization. Therefore, with the motivation of effective use of resources,
a supervised learning problem was formulated for predicting airfoil performance
given the airfoil geometry. To explain the input-output mapping, neural network
based classifiers applied to convolutional neural networks (CNN) were investigated.
Results have shown more than 80 percent validation accuracy for the predictive
capability of tuned CNN-based classifiers at test points. The application of sur-
rogate modeling within aerospace design is now well-established. However, such
approaches can be disadvantageous and limiting due to the need to establish spe-
cific shape parameters that must be defined a priori by the user of the method. In
this paper, we have shown that deep learning methodologies have the potential to
overcome certain of these drawbacks of surrogate modeling approaches. The main
reason for this promising potential is that deep learning aims to operate at much
more abstract levels than other machine learning and surrogate modeling methods
and incorporates feature detection as an integral aspect of the approach. After
reviewing several machine learning concepts from convolutional layers to softmax
classifiers and fully connected multi-layer neural networks, a series of deep network
structures were selected for application in this airfoil pressure coefficient predic-
tion example study. Test accuracy results for deep neural networks composed of
fully connected layers and softmax classifiers could not exceed 20 percent pre-
diction accuracy for initial runs. On the other hand, the convolutional neural
network structures succeeded in learning a mapping between the input and output
data set by achieving more than 80 percent test accuracy. The achieved values
for validation support the motivation behind this paper. When the number of
classes for labels are increased, the testing accuracy drops as expected. A brief
analysis for the arrangement of layers within the deep CNN and the size of pa-
rameters at each layer was also conducted. In order to improve the proficiency
of the learned mapping, network parameters should further be tuned. Moreover,
whether generalization to other classes of airfoils is possible with these networks
requires additional exploration. To decrease training time, new approaches em-
ploying GPU-based methods and parallelization of the computations are necessary.
For further validation, Monte Carlo analysis for the training phase should be per-
formed and statistics of test accuracy should be presented. Future research may
include 3-D and inverse formulations and learning the influence of boundary layer
effects while training. Another possibility is to input airfoil images rather than
coordinate data and to visualize the training in terms of feature detectors. More
exploration of the network structure, different network types, parameter tuning,
and finer grids of label classes are also worth investigation. New data sets including
additional wind tunnel experiment results and networks trained on hybrid experi-
mental/computational data would also be beneficial for providing broader training
and validation datasets with additional physical effects beyond the potential flow
model adopted in this paper.
Chapter 3

METHODOLOGY

Figure 3.1: Projected Steps for the project

In the methodology pipeline, we first traced and identified the problem at hand.
We then discussed about the nature of the problem and how we can possibly
tackle it. We initially conducted a literature survey to study about the possible
solutions and how researchers in the specific areas experimented and analyzed their
research topics. We then decided to use a deep learning methodology so that we
can decrease the time and effort to reach the solution to the problem. We procure
data to train and validate the model. We then select a suitable architecture and
model which is compatible with the problem. Since we are dealing with image
data, a Convolutional Neural Network is most suitable for it. We then begin to
train the model with the data that we have at hand. We then test the model for
speed and accuracy. We have designed the wing with the airfoil profile that we had
in the modeling and analysis platform called XFLR5. We then fabricate the wing
out of wooden frame structure and plastic sheet foil. The wing is then tested as
per given conditions in the wind tunnel environment and the results are compared
with that of the model that we had at hand and performance is compared

9
Chapter 4

DESIGN AND IMPLEMENTATION

4.1 Limitations of Conventional CFD Software


Traditional CFD softwares require a large number of steps to be followed for find-
ing the result.It also requires in depth knowledge about the parameters that has
to be set and experience in the software is required for the implementation of the
parameters.CFD softwares uses numerical analysis and data structures using com-
plex equations like Navier Stokes Equations to analyze and solve problems that
involve fluid flows.Even if all the above cons are managed CFD analysis takes time
and a large amount of computational power to achieve the required result.

4.2 Platform Selection


A suitable platform for writing the code and training the model was to be selected
for cutting the cost down free cloud based platform Google colab was choosen as
it had the advantage of importing data from Google drive and built in support for
Tensorflow. Python programming language was selected for writing the code.

4.3 Data Creation


To find the relationship between lift-to-drag ratio and airfoil shape through neural
network, the first and critical step is preparing input data with proper mathemat-
ical representation for training the neural network. We had initially tried creating
data using ANSYS Fluent software

10
Figure 4.1: Modeling in ANSYS geometry enviornment

Figure 4.2: Mesh generated in the mesh module


Figure 4.3: Problem setup is defined in the ANSYS

Figure 4.4: Running the calculation


Figure 4.5: Lift Coefficient

Figure 4.6: Drag Coefficient


As it was time consuming for creating data using ANSYS was very high, we
searched for alternate methods for data creation and analysis. We had discovered
the University of Illinois at Urbana Champaign (UIUC) Airfoil Database. It holds
almost upto 1550 airfoil profiles and related data in .DAT and .GIF format. We
also found out about an open source aerodynamic tool known as XFLR5, which can
analyze, evaluate airfoils. By choosing the numerical method, the results of cL/cd
canbe obtained from the software. An opensource software is used for finding the
cl/cd ratio of airfoil at different angles of attack.The calculated values are exported
with the corresponding Name of airfoil and angle of attack into a csv file.

Figure 4.7: Aircraft Wing design using XFLR5

Figure 4.8: Airfoil analysis with XFLR5 analysis with graph

4.3.1 Image Data Generation


We initially had hoped to create our own data with CFD Software such as ANSYS,
but even if we were able to create our own data, it would not have been sufficient
enough to train our model. Thus, we were prompted to seek the help of open
source repositories to acquire data for our research project.
Figure 4.9: Airfoil analysis export data

4.4 Method
There are several methods of training the machine learning model, what we try
to implement is a deep learning model using Convolutional Neural Networks.The
coding was done in Google Colaboratory, a Google research project created to help
disseminate machine learning education and research. It’s a Jupyter notebook
environment that requires no setup to use and runs entirely in the cloud.
4.5 Code

4.5.1 Data Import and Loading


The data set of images of airfoil was uploaded and imported from Google drive to
Google Colab Python Libraries Pandas, Numpy, Os, zip file was used for this data
import and extraction.

Figure 4.10: Code for importing data from Google drive to Colab

The images were loaded from the folder according to file names in csv file using
cv2 library. The images and training labels were converted to array and the data
set was split into Train, Test and Validation sets using scikit-learn library.Data
was split into 16860 train, 1874 Validation and 986 test sets.The remaining data
was used for manually testing the model after training.
Figure 4.11: Loading Images into ’imgs’ Dataframe

Figure 4.12: Convert images to arrays


Figure 4.13: Import training labels and split dataset
4.5.2 Model Creation and Training
For training the model Tensorflow an open-source software library was used. It
is an end-to-end open source platform for machine learning developed by Google
Brain. It has a comprehensive, flexible ecosystem of tools, libraries and community
resources that lets researchers push the state-of-the-art in ML and developers easily
build and deploy ML powered applications.

Figure 4.14: Model creation with CNN

The model was trained on 16860 individual images and corresponding label
with validation of 1874 images and labels.Different models were tried during the
training trials yielding different results the most accurate model was again trained
with different optimizers and learning rates.

Figure 4.15: Training and Validation

As we had a large dataset, about 19,000 images to work with, we had initially
used a traditional fully connected multilayered perceptron. But beyond a certain
point in training, we were able to observe that despite giving the model more data
to train, there is not much of an increase in accuracy or performance of the model.
In the traditional architecture if we are to use a very large image, we might be
able to observe a very large number of neuron weights (numbering in millons) and
the model would become too bulky and slow. But if we were to use simple tech-
nique called Convolution followed by pooling, it would be more efficient. Therefore
we decided to go for a much more powerful Convolutional Neural Network architec-
ture for our problem. Convolution is an basically an operation performed on two
functions (f and g) to produce a third function. Convolution is a very important
function in terms of image processing. We basically use an image filter (kernel) to
basically perform the convolution operation on the image and only highlight the
required parts and soley give focus on them

Figure 4.16: The Convolution operation applied over an image

Since the problem’s nature is not of a discrete regression and a classification


problem, we just could not use the traditional binary crossentropy or a categorical
cross entropy function as the loss function. So we considered using the mean
absolute error or the mean squared error as the loss function for the problem. We
finalized on using the mean squared error (MSE) over the mean absolute error
because it worked better for the given problem. We implemented a four layer
convolutional layer followed by a fully connected layer for the model. The CNN
model shows much more improved performance than the Fully Connected neural
network model
4.6 Data Flow Diagram

Figure 4.17: Pipeline of Data Flow Process

The above data flow diagram shows the processes from import of the data to
the Google Collaboratory environment. The image data is processed as tensors.
The model is initialized using the Keras API with Tensorflow back-end. The model
is trained until we attain a desirable accuracy. The model is then validated and
tested. The trained model weights are then saved for further use.

4.7 Wing Design and Fabrication

Figure 4.18: Cross Section of Wing we had designed in the XFLR5 enviornment

We designed the wing using the NACA0012 coordinates that we had procured
from the UIUC Airfoil Coordinate Database. The wing that we have developed
has an aspect ratio of 10:1, wing span of 1 meters, wing area of 0.1 squaremeters.
We’ll be able to export this whole wing as an .XFL. We were able to get assistance
of an expert wing fabrication workshop in Cheranaloor, Kochi (Glorod Avionics
Pvt. Ltd.). We had a plan to fabricate wing out of wooden panels, followed by a
plastic coating using thin sheets, to create a wing in 300mm x 300mm, so as to fit
in the wind tunnel dimensions, but due to unexpected circumstances we were not
able to fabricate it yet.
Figure 4.19: Isotropic view of the NACA4412 Wing

4.8 Wind Tunnel Testing


The Wind tunnel setup that we had selected for our experiments is the sub sonic
tunnel at Cochin University of Science and Technology, Kalamassery. The wind
tunnel accomodates a 300mm x 300mm cross sectional wing section and has a max
vane speed of 2500 rpm. It is powered by a DC Shunt motor which runs at 220
V. We plan to conduct the experiment at Reynolds number of 500,000 and Mach
No. of 0
Figure 4.20: Pressure gauge setup to measure lift and drag coefficient

Figure 4.21: CUSAT Wind Tunnel Apparatus


Figure 4.22: Cross section revealing attack angle
Figure 4.23: Wind Tunnel Specifications
Chapter 5

RESULTS AND DISCUSSION

5.1 Training and Validation


Training of model was done with various hyperparameters and after optimising
them the model was again trained with different number of epochs and we found
200 epoch as the best for our CNN model.

Figure 5.1: 50 Samples-50 epoch

The graph shows that when we train with 50 epochs and we test the model
with a test size of 986 images we get a comparative study side-by-side graph as in
(Fig 5.1) with only good accuracy. When we do increase the number epochs, we
do notice a better performance as compared to the previous one (Fig 5.3). But
whenthe no. of iterations approach 400, we see signs of overfitting which affects
the performance of the model

26
Figure 5.2: 50 Samples-400epoch

Figure 5.3: 100 Samples-200 epoch

5.2 Ground Truth Comparison


Figure 5.3 We can see that two plots almost overlap, which means our prediction
matches ground truth with high accuracy.Blue lines represent the ground truth
CL/CD of each airfoil sample calculated by CFD. Orange lines represent our CNN
model prediction results. X-axis is foil number, Y-axis is lift-to-drag ratio. We
had initially planned to validate our model with a wind tunnel experiment, but
due to unexpected circumstances we could not.
5.3 Confusion Matrix
A confusion matrix is a table that is often used to describe the performance of
a model on a set of test data for which the true values are known. It allows the
visualization of the performance of an algorithm.If the predicted value is accurate
enough the blue dot will be near to the diagonal lines here we can see the blue
dots clustered along the diagonal. We have four models which are trained on the
same data. In the model trained on 50 epochs(Fig 5.5), we are able to achieve an
accuracy of 92.76 percentage, also the model trained on 200 epochs(Fig 5.6), we
are able to achieve an accuracy of 93.92 percentage. We also compared the model
trained on 10 epochs, which we got an accuracy of 91.8 percentage(Fig 5.4). The
model trained up to 400 epochs shows signs of overfitting, which eventually leads
to an drop in performance of 93.4 percentage (Fig 5.7) .

Figure 5.4: Confusion matrix of the CNN model trained on 10 epochs


Figure 5.5: Confusion matrix of the CNN model trained on 50 epochs

Figure 5.6: Confusion matrix of the CNN model trained on 200 epochs
Figure 5.7: Confusion matrix of the CNN model trained on 400 epochs

5.4 Efficiency
The table shows how the performance of the two entities varies. It is clear that
the CNN model outperforms the XFLR5 CFD Software in mostly all ways. while
it takes 30 seconds for XFLR5 to test 10 samples,it takes less than one tenth
of a second for the CNN Model to create the output. The XFLR5 software is
considered to be the fastest CFD software, still the CNN has better speed when
considering large amount of data to process

Number of Time taken by Time taken by


Samples XFLR5 in sec- Trained Model
tested onds in seconds
10 30.95 0.099
50 181.75 0.196
100 277.54 0.183
200 836.66 0.217
300 1897.52 0.248

Table 5.1: Speed Comparison of CNN model with XFLR5

• When processing 10 samples, the CNN is 312.626 times faster than XFLR5
• When processing 50 samples, the CNN is 927.295 times faster than XFLR5
• When processing 100 samples, the CNN is 3855.576 times faster than XFLR5
• When processing 300 samples, the CNN is 7651.290 times faster than XFLR5
Chapter 6

CONCLUSION

The deep learning model that we have developed is found to be much faster than
the traditional CFD solver software. With this trained high-accuracy CNN, airfoil
optimization can be achieved in the future and also our CNN Model can be used
as a backend support for calculation of Cl-by-Cd ratio quickly without any compli-
cated procedures. A person who isn’t that well versed in aerodynamics and CFD
can easily use this model to find Cl-by-Cd ratio of airfoil just using the image of
airfoil made accordingly.

• The Convolutional Neural Network Model that we built can maintain a rel-
ative high level of accuracy.

• Accuracy of CNN will increase with the growth of epochs with more data.
We had trained our model with dataset of 16,860, validation set size of 1874
and a test set size of 986 (85.5/9.5/5) with a learning rate of 0.001 and
trained with 200 epochs. We have been able to achieve a test accuracy of
93.92 percentage.

• When we compare the speed of XFLR5 software with our trained model,
when processing 300 samples, we can record that the XFLR5 software takes
about 1897.52 seconds, while the trained CNN only takes about 0.248 sec-
onds, almost 7500x faster

6.1 Scope for Further work


Machine Learning and AI has limitless potential in the field of engineering, if
used with skill and quality. How and where we use this technology is the most
important part of machine learning. The model that we had developed has been
trained exclusively on aerodynamic data. It is possible to include hydrodynamic
data as well, so we can get another aspect of CFD . It is also possible to extend
this model (if the data is available) to flow visualization problems as well which
requires a lot of computational power for its calculations.

31
6.2 Annexure
Bibliography

[1] X. Guo, W. Lei and F. Iorio (2016) , “Convolutional Neural Networks for
Steady Flow Approximation” - The 22nd ACM SIGKDD International Con-
ference

[2] M. Haque, M.Ali and I. Ara (2014), ”Experimental investigation on the perfor-
mance of NACA 4412 aerofoil with curved leading edge planform” - 6th BSME
International Conference on Thermal Engineering

[3] M. Ismail and K. Vijayaraghavan (2015), ”The effects of aerofoil profile modi-
fication on a vertical axis wind turbine performance” - Journel of Energy

[4] K. Swalwell, K. Sheriden and W. Melbourne (2001), ”The Effect of Turbu-


lence Intensity on Stall of the NACA 0021 Aerofoil” - 14th Australasian Fluid
Mechanics Conference

[5] H. Liu, Z. Li and F. Lu (2018), ”An Airfoil Aerodynamic Parameters Calcula-


tion Method Based on Convolutional Neural Network”

[6] E. Yilmaz, B. German (2017), ”A Convolutional Neural Network Approach to


Training Predictors for Airfoil Performance” - 18th AIAA/ISSMO Multidisci-
plinary Analysis and Optimization Conference

36

You might also like