Giter Site home page Giter Site logo

9eqmodel_knfandlstm's Introduction

Recurrent neural networks and Koopman-based frameworks for temporal predictions in a low-order model of turbulence

Introduction

The code in this repository features a Python implementation of recurrent neural networks and Koopman-based frameworks for prediction of temporal dynamics of a low-order model of near-wall turbulence proposed by Moehlis et al. (2004, New J. Phys.). The time series generated are used to train long-short-term memory (LSTM) networks and Koopman-based frameworks that can predict the time evolution of the coefficients of the nine-equation model. More details about the implementation and the results are available in "Recurrent neural networks and Koopman-based frameworks for temporal predictions in a low-order model of turbulence", H. Eivazi, L. Guastoni, P. Schlatter, H. Azizpour, R. Vinuesa (2021, International Journal of Heat and Fluid Flow).

Datasets

This folder contains the data files needed for training and testing of the models.

HDMD

HDMDs.py: Python class for Hankel dynamic mode decomposition (HDMD).

train_predict_HDMD.py: train an HDMD model and uses it to predict time series based on a given input seed and reproduce the long-term statistics.

KNF

KNFs.py: Python class for Koopman-based framework with nonlinear forcing (KNF).

train_predict_KNF.py: train a KNF model and uses it to predict time series based on a given input seed and reproduce the long-term statistics.

LSTM

LSTM1_t10000.h5: a trained LSTM model. More details in "Predictions of turbulent shear flows using deep neural networks", P.A. Srinivasan, L. Guastoni, H. Azizpour, P. Schlatter, R. Vinuesa (2019, Phys. Rev. Fluids; also available in arXiv)

predict_LSTM.py: uses the trained LSTM model to predict time series based on a given input seed and reproduce the long-term statistics.

lstm_pred_func.py: Python function for the LSTM prediction iterations.

Post-processing

compare_short_term_predictions.py: compares the performance of KNF, HDMD, and LSTM models in the short-term predictions by producing Figures 2 and 3 of the paper.

compare_long_term_statistics.py: compares the performance of KNF, HDMD, and LSTM models in the reproduction of the long-term statistics by producing Figure 5 of the paper.

Moehlis_perturb_generator.py: allows to generate time series that have a perturbation at time t=500.

Lyapunov_exponents.py: computes the Lyapunov exponents of these time series and compares it with the LSTM predictions.

Predictions

Results of the prediction of the time series and reproduction of the long-term statistics will be stored in this directory.

Utilities

optht.py: Optimal hard threshold for singular values.

statistics.py: a Python function that computes the long-term statistics from given reference and predicted time series.

9eqmodel_knfandlstm's People

Contributors

hamidrezaeiv avatar lguas 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.