/ofw2022_dmd_training

Material for the OpenFOAM workshop 2022

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Analyzing coherent structures in unsteady flows by means of dynamic mode decomposition (DMD)

This repository accompanies the training session on DMD analysis of unsteady flows given at the 17th OpenFOAM workshop in Cambridge (2022).

Dependencies

OpenFOAM

Without modification, the simulations will only work with OpenFOAM-v2206. You can use the pre-compiled binaries or the provided Singularity container. To build the container, run:

sudo singularity build of2206.sif docker://andreweiner/of_pytorch:of2206-py1.11.0-cpu

When working with the container, use the Allrun.singularity instead of the Allrun scripts and make sure to set the image location in each script.

flowTorch

flowTorch is a Python library for the analysis and modeling of fluid flows. We use flowTorch to access OpenFOAM data in Python and to perform modal analysis (DMD, proper orthogonal decomposition). For this training, you need the latest development version, which can be conveniently installed via pip and git:

pip3 install git+https://github.com/FlowModelingControl/flowtorch.git@aweiner

Data

The simulations require 40 MPI ranks and run for approximately 2 days in total. For the preliminary flow analysis and the DMD analysis in flowTorch, you can also download the following archives:

  • probe and force data, fullCase, ~30MB (link)
  • sample planes, fullCaseDMD, ~1.2GB (link)

Training material overview

How to run the simulations

The current setup requires 40 MPI ranks. The suggested workflow to execute the simulations is as follows:

# we are at the top-level of this repository
mkdir run
cp -r surfaceMountedCube run/
cd run/surfaceMountedCube
./Allrun
# or with the container
./Allrun.singularity

Getting in touch

For questions, corrections, etc. after the workshop, open a new issue in this repository.