Skip to content

KTH-FlowAI/Beta-VAE-combined-with-Transformers-for-ROM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Towards optimal $\beta$-variational autoencoders combined with transformers for reduced-order modeling of turbulent flows

Introduction

The code in this repository features a Python implementation of reduced-order model (ROM) of turbulent flow using $\beta$-variational autoencoders and transformer neural network. More details about the implementation and results from the training are available in "Towards optimal β-variational autoencoders combined with transformers for reduced-order modeling of turbulent flows", Yuning Wang, Alberto Solera-Rico, Carlos Sanmiguel Vila and Ricardo Vinuesa

Data availabilty

We share the original data with 10,000 snapshots and 26,000 snapshots in OneDrive. We also provide the pre-trained models of $\beta$-VAE, transformers and LSTM in this repository. The obtined results such as temporal and spatial modes are available.

Training and inference

Modal decomposition: $\beta$-VAE

  • To train $\beta$-VAE, please run:

      python beta_vae_train.py
    
  • For post-processing, please run:

      python beta_vae_postprocess.py
    
  • For ranking the $\beta$-VAE mode, please run:

      python beta_vae_rankModes.py
    

Temporal-dynamics prediction: Transformer / LSTM

  • To train a self-attention-based transformer, please run:

      python temporal_pred_train_selfattn.py
    
  • For post-processing, pleas run:

      python temporal_pred_postprocess.py 
    
  • To yield the sliding-window error $\epsilon$, please run:

      python temporal_pred_sliding_window.py 
    

Archiecture

  • The transformer and LSTM archiectures are in the utils/NNs

  • The $\beta$-VAE archiectures are in the utils/VAE

  • The configurations of employed archiectures are in /utils/configs.py

Visualisation

We offer the scripts and data for reproducing the figures in the paper. For instance, to visualise the results of parametric studies, please run:

    python visual_lines.py

Repository structure

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published