Deeply connected onvolutional neural network to learn the maximum lift-to-drag ratio at angle for 2D aerofoils.
Maximum lift-to-drag ratio at angle is an important aerodynamic property of aircraft wings:
An aerofoil is a 2D cross-section of a wing. Thus a 3D wing is essentially a combiation of 2D aerofoil sections:
Computational fluid dynamics (CFD) is used to find aerodynamic properties of aerofoils such as lift, drag and moment. There are different levels of fidelity in CFD, where high levels of fidelity requires many more hours, days or weeks of computational time.
The end goal of this project is to take high fidelity aerodynamic data and create a neural network that can accurately predict the aerodynamics within a significantly smaller time frame.
Currently low fidelity aerodynamic data is being used in the learner, and in time higher fidelity aerodynamic will be acquired. Further, as the project develops 3D wing geometry will replace the 2D aerofoils.
The Jupyter notebook main includes most of the capabilities in the repo. Check it out for a walk-through.
- 2D aerofoil coordinate data with maximum lift-to-drag ratio at angle downloaded with the aerofoils downloader script. This outputs csv files in the correct format for the neural network.
- aerofoil coordinates redistributed along the x axis (according to a sample x axis distribution) to ensure all inputs to the neural network have the same size using the aerofoil redistribution script. Moreover, this allows for a reduction in the number of channels (from two to one) as all aerofoils have the same x distribution. Therefore, the CNN only takes the y coordinates of the aerofoil as input.
- augmented aerofoils created using the aerofoil augmentor script. This uses Bezier curves to modify the thickness and camber of pre-existing aerofoils using random values. This outputs csv files in the correct format for the neural network, but excludes the aerodynamic data. Therefore, these augmented aerofoils will need to be run through XFoil.
- learning rate finder plot available
- heat map available
- plot of all activations available
- the computational graph is available
- scripts will work on GPU if available
- augment new aerofoils using the aerofoil augmentation code. It is suggested that the user plays
around with the number of control points for thickness and camber and their size with
print_plots = True
. Once the number of control points and their lower bound has been decided, turnprint_plots = False
to create new aerofoils. Not all the augmented aerofoils will be valid, and a certain of amount of playing around with the parameters is required - interactive 2D PCA figure plots the two largest principal components of all aerofoils (within a directory), and plots the corresponding aerofoil for easy comparisons
- aerofoils downloaded from Airfoil Tools, with aerodynamic data provided by XFoil.
- instructions on how to run XFoil locally to get aerodynamic data found here
- unfortunately XFoil has now been depreciated for the latest versions of MacOS, so I am currently unable to get aerodynamic data for augmented aerofoils. This is fundamental as the current CNN is trained on only 1550 examples. Note that Airfoil Tools provide aerodynamic data from XFoil on their website.
- deeply connected neural network example
- ShowAerofoil.py needs to be updated for TensorBoard
- look into aerofoil transformations. Currently there is on a flip horizontal transformation (not yet used)
- include more aerodynamic properties to input
- plot all aerofoils to make sure that they're valid after aerofoil_redistribution.py
- check if can reduce PCA to only one dimension