Giter Site home page Giter Site logo

enjamamulhoq / deep-learning-for-aerodynamic-prediction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saakaarb/deep-learning-for-aerodynamic-prediction

0.0 0.0 0.0 165 KB

This repository contains code used to create and train a deep neural network that replicates a RANS solver for aerodynamic prediction over airfoils.

Python 100.00%

deep-learning-for-aerodynamic-prediction's Introduction

Deep-Learning-for-Aerodynamic-Prediction

This repository contains scripts used to create and train a deep neural network that replicates a CFD solver for aerodynamic prediction over airfoils. The training data is prepared using a RANS (Reynolds-Averaged Navier-Stokes) solver. The hyperparameters were tuned using a grid search of reasonable values. The current code is provided and intended as a sample and is not the final version, which includes loss-function modification and multiple approaches to the deconvolution step.

Screenshot1

X-velocity contour plot over an s814 airfoil.

Citing this work

If you use this, please cite the following paper:

Introduction

CFD solvers play an important role today in development and design of products, particularly in mechanical and aerospace engineering. One of the biggest issues with performing high-fidelity simulations is the time to result of such simulations, along with the computational cost of performing the simulation. This project is the foundation of an ambitious project undertaken at the CASLab , University of Michigan to use deep neural networks to predict aerodynamic flow fields around complex vehicle geometries in near-real time as geometry shape is varied. The hypothesis is that the use of a trained neural network enables this, with most of the computational time and effort going into training the network offline. The use of such a tool would drastically improve turnaround times in design and would expand the boundaries of shapes designers would be able to experiment with given current limitations of resources. In the current work, we test the suitability of using convolutional neural networks(CNNs) to do 2-D prediction of flow fields around airfoil shapes.

Methodology

The neural network is constructed as a deep neural network, which effectively maps from the input geometry shape and flow conditions to an output of flow fields around the shape. The neural network consists of convolution layers, deconvolution layers and fully connected layers. The inputs and outputs are rectangular matrices, and owing to the structure of the problem the convolution and deconvolution steps are made mirror images of each other, as shown in the figure.

The network is trained on 252 datapoints, containing 3 different shapes, 20 different angles of attack and 4 different flow reynolds numbers. The preprocessed training data was obtained using TURNS, a RANS solver which uses the SA turbulence model. Data from TURNS is processed using a series of MATLAB scripts, an the final training data is available at the links in the README. The training data flow fields are normalized before training begins to speed up convergence. The set is randomized in order, and then training is done with a specified batch size. Gradients are propagated bckwards using the backpropagation algorithm, and optimization is done using the ADAM optimizer.

A certain fraction of the set is removed from the training process in order to evaluate validation error. We introduce nonlinearity into the system by using a Swish activation function. Further details can be found here.

Screenshot2

Depiction of the deep neural network created

Screenshot3

Visualization of a result of X-velocity from validation set(above) and comparison to true flow(below). Note this result is from a more enhanced network which includes gradient loss penalty in it's loss function

Results

Detail of all results obtained can be found here.

Files:

  • Front_end.py: All major training parameters are modified in this file
  • back_end.py: Major functions including those to build and train network based on specified hyper-parameters are included in this function
  • The MATLAB files used in data preparation have not been hosted on the Git.
  • Data Files(Y):
    • Output_rho.mat: Grid-density values for each of the training/validation set points.Set contains 252 points.
    • Output_u.mat: Grid-X velocity values for each of the training/validation set points.Set contains 252 points.
    • Output_v.mat: Grid-Y velocity values for each of the training/validation set points.Set contains 252 points.
    • Output_p.mat: Grid-Pressure values for each of the training/validation set points.Set contains 252 points.
  • Data Files(X):
    • SDF_values.mat: Grid signed distance function to pass shape of airfoil to network.
    • input_re_alpha.mat: Specifies flow variables in the form of reynolds number and angle of attack to the airfoil.

deep-learning-for-aerodynamic-prediction's People

Contributors

saakaarb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.