Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nonlinear Reduced-Order Modeling for Three-Dimensional Turbulent Flow by Large-Scale Machine Learning

This script was used for the paper "Nonlinear Reduced-Order Modeling for Three-Dimensional Turbulent Flow by Large-Scale Machine Learning".

Setting up execution environment on Fugaku

  1. Install Python environment
    mkdir -p /data/$(id -g -n)/$(id -u -n)
    tar xvfz ../pytorch.tar.gz -C /data/$(id -g -n)/$(id -u -n)
    ln -s /data/$(id -g -n)/$(id -u -n)/pytorch $HOME/
    
  2. Place required data
    • Place flow field snapshot data (na_nn_*.ary) in the directory flowfield
    • Place grid file (ex. grid.dat) in the directory grid

Execution on Fugaku

  1. Go to run directory
    cd run/
    
  2. Launch interactive job
    pjsub --interact -L "node=3" -L "rscunit=rscunit_ft01" -L "rscgrp=int" -L "elapse=6:00:00" --sparam "wait-time=600" --mpi "proc=12"
    
  3. Activate Python environment
    source pytorch_setting.sh
    
  4. Create time-averaged flow field data
    python3 ../src/xmean.ary ../param/xmean.toml
    
  5. Training (Mode docomposition)
    mpiexec -np 12 python3 ../src/pytorch/train_mdcnnae_modelpar.py ../param/train_mdcnnae.toml
    
    The number of MPI processes must be (number of modes + 1) x (number of MPI processes for the data parallelism). Batchsize is divided by the number of MPI process for the data parallelism.
  6. Inference (Output time series of latent vector)
    mpiexec -np 3 python3 ../src/pytorch/infer_mdcnnae_modelpar.py ../param/infer_mdcnnae.toml
    
    The number of MPI processes must be (number of modes + 1).
  7. Inference (Flow filed reconstruction)
    mpiexec -np 3 python3 ../src/pytorch/infer_decoded_field.py ../param/infer_decoded_field.toml
    
    The number of MPI processes must be (number of modes + 1).

Setting up execution environment on GPU server

  1. Install Python environment (Anaconda)
    wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
    sh Anaconda3-2021.05-Linux-x86_64.sh
    
  2. Create virtual environment of Anaconda
    conda create --name pytorch-gpu python=3.8
    
  3. Install required Python modules
    conda install -y pytorch cudatoolkit=11.3 -c pytorch
    conda install -y toml
    conda install -y matplotlib
    conda install -y scipy
    conda install -y mpi4py
    

Execution on GPU server

  1. Go to run directory
    cd run/
    
  2. Activate virtual environment of Anaconda
    conda activate pytorch-gpu
    
  3. Create time-averaged flow field data
    python3 ../src/xmean.ary ../param/xmean.toml
    
  4. Training (Mode docomposition)
    python3 ../src/pytorch/train_mdcnnae.py ../param/train_mdcnnae.toml
    
  5. Inference (Flow filed reconstruction)
    python3 ../src/pytorch/infer_mdcnnae.py ../param/infer_mdcnnae.toml
    

References

  • T. Murata, K. Fukami, K. Fukagata, Nonlinear mode decomposition with convolutional neural networks for fluid dynamics. Journal of Fluid Mechanics. 2020;882:A13. doi:10.1017/jfm.2019.822
  • T. Nakamura, K. Fukami, K. Hasegawa, Y. Nabae, K. Fukagata, Convolutional neural network and long short-term memory based reduced order surrogate for minimal turbulent channel flow. Physics of Fluids 1 February 2021; 33 (2): 025116. https://doi.org/10.1063/5.0039845
  • K. Ando, K. Onishi, R. Bale, A. Kuroda, M. Tsubokura, Nonlinear reduced-order modeling for three-dimensional turbulent flow by large-scale machine learning, Comput. Fluids 266 (2023) 106047.
  • K. Ando, R. Bale, A. Kuroda, M. Tsubokura, Neural network-based parametric model reduction for predicting turbulent flow for different vehicle geometries, Comput. Fluids (2026) 107196.

License

This project is licensed under the MIT License. See LICENSE for details.

About

Nonlinear Reduced-Order Modeling for Three-Dimensional Turbulent Flow by Large-Scale Machine Learning

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages