• Stars
    star
    156
  • Rank 238,165 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Tensorflow re-implementation of the paper Convolutional Neural Networks for Steady Flow Approximation

This repository contains an re-implementation of the paper Convolutional Neural Networks for Steady Flow Approximation. The premise is to learn a mapping from boundary conditions to steady state fluid flow. There are a few differences and improvements from this work and the original paper which are discussed bellow. This code and network architecture was later used to write this paper about optimizing wing airfoils to maximize the lift drag ratio.

Getting data and making TFrecords

This is the most difficult part of this project. Mechsys was used to generate the fluid simulations necessary for training however it can be difficult to set up and requires a fair number of packages. In light of this, I have made the data set available here (about 700 MB). Place this file in the data directory and this will be the train set. The test car set can be found here. Unzip this file in the data directory for the test car set.

Training

To train enter the train directory and run

python flow_train.py

Tensorboard

Some training information such as the loss is recorded and can be viewed with tensorboard. The checkpoint file is found in checkpoint and has a name corresponding to the parameters used.

Evaluation

Once the model is trained sufficiently you can evaluate it by running

python flow_test.py

This will run through the car dataset provided and do side by side comparisons. Here are a few cool images it will generated! The left image is true, the middle is generated, and right is difference. As you can see, the model is predicting flow extremely well. Comparing with the images seen in the original paper, we notice that our method predicts much smother flows on the boundaries.

alt tag alt tag alt tag

Learning Boundaries

While this isn't in this code base here are some cool videos form the paper optimizing a wing airfoil and heat sink.

IMAGE ALT TEXT HERE

IMAGE ALT TEXT HERE

Model details

As mentioned above, this work deviates from that seen in the original paper. Instead of using Signed Distance Function as input we use a binary representation of the boundary conditions. This simplifies the input greatly. We also use a U-network approach with residual layers similar to that seen in Pixel-CNN++. This seems to make learning incredibly fast and decreases the requirement of a large dataset. Notably, our model is trained on only 3,000 flow images instead of the 100,000 listed in the paper and still produces comparable performance.

Speed

The time pre image in a batch size of 8 is 0.00287 seconds on a GTX 1080 GPU. This is 3x faster the reported time of 0.0085 seconds in the paper. While our network is more complex we are able to achieve higher speed by not relying on any fully connected layers and keep our network all convolutional.

More Repositories

1

Convolutional-LSTM-in-Tensorflow

An implementation of convolutional lstms in tensorflow. The code is written in the same style as the basiclstmcell function in tensorflow
Python
420
star
2

Computational-Fluid-Dynamics-Machine-Learning-Examples

This repo contains some tutorial type programs showing some basic ways machine learning can be applied to CFD.
Python
271
star
3

Phy-Net

compressing physics with neural networks
Python
154
star
4

Computational-Physics-and-Machine-Learning-Reading-List

A list of papers relating Computational Physics and Machine Learning
131
star
5

Lattice-Boltzmann-fluid-flow-in-Tensorflow

A Lattice Boltzmann fluid flow simulation written in Tensorflow.
Python
122
star
6

Early-Visual-Concept-Learning-Recreation-of-Some-Results

Here is an implementation of some of a few results seen in Early Visual Concept Learning with Unsupervised Deep Learning
Python
28
star
7

latnet

Neural Network Based Lattice Boltzmann solver
Python
26
star
8

All-Convnet-Autoencoder-Example

Just a simple use example of the conv2d_transpose function in TensorFlow. Its run on MNIST.
Python
22
star
9

Variational-autoencoder-tricks-and-tips

just a few trouble shooting tips I have found for training variational autoencoders. All code in tensorflow
Python
22
star
10

MinDat-Mineral-Image-Dataset

A dataset of +500,000 mineral images with labels taken from mindat.org.
Python
21
star
11

Crystal-Gems

A dataset of mineral images and labels for machine learning purposes. http://www.minerals.net/
Python
18
star
12

PhantomGaze

Simple GPU rendering of scientific data with Pytorch, Jax, CuPy, and Warp backends.
Python
15
star
13

Deep-Learning-Papers

A list of deep learning papers and notes on them
12
star
14

dynamic_rnn_conv_lstm

just a quick example of using the conv lstm in tensorflow as per https://github.com/tensorflow/tensorflow/pull/8891
Python
9
star
15

Deep-Learning-Experiment-Manager

A simple python program to queue up deep learning experiments on gpus
Python
5
star
16

DeepDesign

Automated Design Library using Deep Neural Networks
Python
5
star
17

ultrasound-nerve-segmentation-in-tensorflow

Jumping in really late to the kaggle ultrasound nerve segmentation competition. Hopefully save peoples time in writing boring data loading scripts.
Python
5
star
18

Compressing-Dynamical-Systems-Atari

This is both an implementation of the paper "Action-Conditional Video Prediction using Deep Networks in Atari Games" and an extension of some of their results
Python
4
star
19

dynamical-systems-for-machine-learning

Simple dynamical systems to test machine learning algorithms. Written with TensorFlow in mind
Python
4
star
20

Mindat

A dataset of mineral images created from mindat.org
Python
3
star
21

Flow-Sculpter

Neural Networks learning to create objects with desired flow properties.
Python
3
star
22

Quantum-Walk-Simulator

A c++ simulator for Continuous-Time Quantum Walk.
C
2
star
23

Compressing-Dynamical-Systems

A tool to compressing video based dynamical systems on to small low dimensional LSTMs or fully connected networks. This also doubles as a video generative model as seen bellow.
Python
2
star
24

Cd.jl

A simple Restricted Boltzmann machine. For use in Neural Networks and other learning needs.
Julia
2
star
25

Memory-Efficient-Autoencoder

A repo looking at autoencoders that can be applied to extremely large 2D and 3D tensors.
Python
2
star
26

resume

my resume yaya
1
star
27

The-Wedding-Project

1
star
28

All-Convnet-TensorFlow-MNIST-Tutorial

A look at using conv nets all the way through for TensorFlows MNIST Tutorial
Python
1
star
29

Ring_Net

A Neural Network for compressing dynamical systems into Markov Chains and the like
Python
1
star
30

PumpkinPulse

Dense Plasma Focus Fusion Reactor
Python
1
star