Skip to content

nasa/airfoil-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airfoil Learning

The goal of this repository is to outline a method of using graph neural networks and deep neural networks to predict the Lift and Drag of 2D Airfoils. Graph Neural Networks investigate the relationship between nodes through edges and edge attributes. Graph relationships are all around us, our social networks on Facebook, the products we purchase or are interested in on Amazon, molecular interactions. This project investigates using the connectivity of points that describe a 2D airfoil to predict performance.

image

Data Structure

  • (Feature) Vertices (x,y,z)
  • (Feature) Edge_Connectivity (edge_index1,edge_index2)
  • (Feature) Reynolds - flow velocity
  • (Feature) Ncrit - turbulence parameter
  • (Feature) Alpha - angle of attack
  • (Label) Cl - Coefficient of Lift
  • (Label) Cd - Coefficient of Drag
  • (Label) Cm - Coefficient of Moment
  • (Label) Cp - Pressure coefficient

Useful documentation on torch data object

Link to Dataset

Unprocessed dataset can be found at https://nasa-public-data.s3.amazonaws.com/plot3d_utilities/airfoil-learning-dataset.zip This dataset is not normalized and contains the geometry of each airfoil and the xfoil results. It's important to go through the process of normalizing the design. This will give you the scalars (scalers.pickle) used with the processed dataset. See tutorial (Normalization section).

Important note: Training can give you really low values for error and loss but all of that doesn't mean much until you do a sanity check with a random design. You may find low error but a mistake in your normalization/unnormalization code will give you strange results and most definitely affects the training. Always do a sanity check and plot what it is you are interested in.

Processed and normalized dataset: https://nasa-public-data.s3.amazonaws.com/plot3d_utilities/dataset-processed.zip

Note: This file may not give you the normalization scalars. It doesn't take long to run through the normalization process. The only parts that take a long time is Step4_CreateDataset.py (This is used to create the Processed and normalized dataset) AND training of the graph neural network.

Tutorial

This tutorial link covers which codes to run to setup the dataset and proceed with the training. Tutorial Link

Important Note: Google Colab may not provide you with enough resources to train or even process the data. It is encouraged to download the code and use the tips and tricks from the tutorial to run the code locally.

Regarding use of Jupyter Notebooks

Jupyter notebook is great from demonstrations, homework, interview questions, but it should never be used for real development work. I have witnessed interns who do development work in Jupyter because they do not know how to debug python with vscode, pycharm, or any editor. Their notebooks are massive 1000+ lines of code and output. They broke something in cell 20, ended up fixing it in cell 50 and when they run through the code from start to finish it's broken from cell 21 to 49. Weeks go by and still they couldn't figure it out. End of internship and the notebook is still broken. Notebooks are never mean for code development, only for show and tell.

For python development, I recommend the following:

  • Visual studio code
    • Extensions:
      • autodocstring
      • better comments
      • docker
      • python
      • pylance
      • remote ssh
      • restructuredtext
      • syntax highlighting
  • anaconda (learn how to make virtual environments)
  • Learn best practices of debugging python with visual studio code from youtube.

Reporting Bugs

To report bugs, add a github issue. Instructions for adding github issues: How to submit issues

Repository Walk through

Below are links to two interactive walk throughs detailing how to reproduce the results of this work.

  1. Generating Airfoil Designs Generate Xfoil
  2. Training Graph Networks and MultiLayer Perception (MLP) pytorch

Technical Reports

A link to the publication will be included here once it's been published.

License

NASA Open Source Agreement

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published