/Turbulent-Flow-Nets

Towards Physics-informed Deep Learning for Turbulent Flow Prediction

Primary LanguageJupyter Notebook

Towards Physics-informed Deep Learning for Turbulent Flow Prediction

Paper:

Rui Wang, Karthik Kashinath, Mustafa Mustafa, Adrian Albert, Rose Yu Towards Physics-informed Deep Learning for Turbulent Flow Prediction, KDD 2020

2000 velocity fields (formula)

NOTE: Run process_raw_images.py to process and generate the dataset from the raw data.

Abstract:

While deep learning has shown tremendous success in a wide range of domains, it remains a grand challenge to incorporate physical principles in a systematic manner to the design, training, and inference of such models. In this paper, we aim to predict turbulent flow by learning its highly nonlinear dynamics from spatiotemporal velocity fields of large-scale fluid flow simulations of relevance to turbulence modeling and climate modeling. We adopt a hybrid approach by marrying two well-established turbulent flow simulation techniques with deep learning. Specifically, we introduce trainable spectral filters in a coupled model of Reynolds-averaged Navier-Stokes (RANS) and Large Eddy Simulation (LES), followed by a specialized U-net for prediction. Our approach, which we call turbulent-Flow Net (TF-Net), is grounded in a principled physics model, yet offers the flexibility of learned representations. We compare our model, TF-Net, with state-of-the-art baselines and observe significant reductions in error for predictions 60 frames ahead. Most importantly, our method predicts physical fields that obey desirable physical characteristics, such as conservation of mass, whilst faithfully emulating the turbulent kinetic energy field and spectrum, which are critical for accurate prediction of turbulent flows.

Model Architecture

Velocity U & V Prediction and Ablation Study

Description

  1. Baselines/: Six baseline modules included in the paper.
  2. TF-Net/:
    1. model.py: TF-net pytorch implementation.
    2. model_init.py: Modified version of model.py that currently has the dimensions to work with raw images
    3. model_karman_2d.py: Modified version of model.py that works with Karman 2D (Navier-stokes) data
    4. penalty.py: a few regularizers we have tried.
    5. train.py: data loaders, train epoch, validation epoch, test epoch functions.
    6. train_init.py: Same as train.py, but with modifications on data loading
    7. train_orig_exp.py: Sets up running a reproduction of the original experiment based on the data processed from process_raw_images.py
    8. train_karman_2d.py: Sets up running TF-Net with Karman 2D data
    9. run_model.py: Scripts to train TF-Net
    10. run_model_init.py: Same run_model.py, but with modifications to calling the dataset and saving model during training
    11. run_model_orig_exp.py: Sets up for running a reproduction of the original experiment. Includes normalizing the image data before starting training.
    python run_model.py
    
  3. Evaluation/:
    1. Evaluation.ipynb: contains the functions of four evaluation metrics.
    2. Evaluation-Raw.ipynb: Uses the functions of Evaluation.ipynb to visualize the results of training on the raw 256x1796 images as well as some reproductions of the original experiment with processed and normalized images.
    3. Evaluation_karman_2d.ipynb: Uses the functions of Evaluation.ipynb to visualize results of training on Karman 2D data
    4. radialProfile.py: a helper function for calculating energy spectrum.
  4. Videos/: Videos of velocity u, v predictions and ablation study.

Requirement

  • python 3.6
  • pytorch 10.1
  • matplotlib

Cite

@article{Wang2020TF,
   title={Towards Physics-informed Deep Learning for Turbulent Flow Prediction},
   author={Rui Wang, Karthik Kashinath, Mustafa Mustafa, Adrian Albert, Rose Yu},
   journal={Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining},
   Year = {2020}
}