Coder Social home page Coder Social logo

arturs-berzins / snirom Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 5.0 43.61 MB

Standardized Non-Intrusive Reduced Order Modeling

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
reduced-order-models reduced-order-surrogate-model reduced-basis lid-driven-cavity

snirom's Introduction

Introduction

This repository covers the main functionality and visualization routines used in Standardized Non-Intrusive Reduced Order Modeling Using Different Regression Models With Application to Complex Flow Problems. We aim to facilitate scientific reproducibility, give other practitioners access to a quick-to-get-working yet performant reduced order model, which can also serve as a baseline model. Also attached is the skewed-lid-driven-cavity dataset, which can serve as a benchmark problem for novel methods. See this section to learn how to transfer sniROM to your dataset. The other two datasets used in the paper are much larger (around 10 and 3 GB, respectively), and are only available upon request.

Structure

├─ dataset/          # Skewed lid driven cavity dataset
├─ data/             # Training and testing data (untracked)
├─ models/           # Definitions of regression models
├─ visualization/    # Definition of mesh and .vtp outputs (untracked)
├─ config.py         # Configuration specifying the problem
├─ utils.py          # Utilities for loading and storing
├─ 01-05_*.py	     # Core functionality
├─ 06-08_*.py	     # Prediction and visualization
├─ 99_*.py           # Plots for debugging and building intuition
├─ requirements.txt  # Python dependencies
└─ README.md

Setup

Python 3.6.8 with dependencies listed in requirements.txt was used and tested on Linux, macOS and Windows. It is highly recommended to use a virtual environment:

git clone https://github.com/arturs-berzins/sniROM.git
cd sniROM
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install --upgrade -r requirements.txt

Versions of dependencies should not be ignored.

  • The largest dependency, namely, PyTorch is not included in requirements.txt since it requires a more platform-specific installation. Please see the installation guide here. Versions 1.0.1.post2 on Linux and 1.6.0+cpu on Windows and macOS were tested succesfully. CUDA is theoretically supported in the implementation, but the ANN and the datasets are too small to benefit from hardware acceleration.
  • ray.tune currently has only experimental support on Windows. If you can't get it to run properly on your machine (as indicated by errors during python 02_tune.py), it is possible to skip the tuning procedure altogether and instead use the near-optimal hyperparameter configuration identified in the paper. See the comment in 02_tune.py for more information.
  • The visualization is done using ParaView, which has to be installed separately to view the .vtp files. If you wish to use another visualization pipeline, you will not need ParaView and can also remove mayavi (containing tvtk.api) from the requirements. In that case, you will need to modify the visualization scripts 07 and 08 to your liking.

After a successful setup, simply run the scripts sequentially from the project root folder.

Applying to your dataset

The code should be easily transferable to other datasets. The dataset must be provided in the format described in dataset/readme.md and the config.py must be adjusted accordingly. This is enough to run the core scripts 01-05 and all plotting scripts 99.

If you also wish to visualize the predictions to ParaView, you will need to provide the mesh representation under visualization/ and possibly modify script 07 depending on the specific problem.

snirom's People

Contributors

arturs-berzins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

snirom's Issues

help-wanted

i used to run this project which involves the redis package in the PycharmIDE and such error occured "RuntimeError: Unable to connect to Redis at 127.0.0.1:6379.". Besides, errors involving "auth" and "password" like "sent auth but no passport is set"also showed up.
Furthermore, I have run this redis-cli, but it did not resolved.
If you received my message ,please give me some advice.Thank you

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.