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.
├─ 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
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 inrequirements.txt
since it requires a more platform-specific installation. Please see the installation guide here. Versions1.0.1.post2
on Linux and1.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 duringpython 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 in02_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 removemayavi
(containingtvtk.api
) from the requirements. In that case, you will need to modify the visualization scripts07
and08
to your liking.
After a successful setup, simply run the scripts sequentially from the project root folder.
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.