From OpenFOAM cell data to regular NumPy grids.
Read OpenFOAM fields with fluidfoam and resample them onto regular arrays with local radial-basis interpolation, ready for profiles and planar sections. A multirotor-wake snapshot is included, so you do not need OpenFOAM to try it.
git clone https://github.com/EngFlavioMartins/openfoam-postprocessing.git
cd openfoam-postprocessing
python run.pyrun.py reads the bundled snapshot, resamples one plane and plots it to outputs/sample.svg. The first time, it installs what it needs into a private .venv folder (a minute or so); after that it starts at once. All you need is Python 3.10 or newer (and OpenFOAM to run the case).
Prefer conda?
conda env create -f environment.yml
conda activate openfoam-postprocessing
python examples/plot_sample.pyNext: The notebooks Creating_Backups.ipynb and Examples.ipynb show the full workflow.
One wake plane before and after: the OpenFOAM cell centres (left) and the same velocity deficit on a regular grid (right).
sh scripts/render/make_figure.sh # the figure
python scripts/render/make_animation.py # the animation at the topBoth need ParaView; the figure also needs LaTeX.
The bundled data comes from the paper below. If you use the data or this workflow, please cite:
@article{martins2025multirotor,
author = {Martins, Flavio A. C. and van Zuijlen, A. and Ferreira, C. S.},
title = {Proof of Concept for Multirotor Systems with Vortex-Generating Modes for Regenerative Wind Energy: A Study Based on Numerical Simulations and Experimental Data},
journal = {Wind Energy Science},
volume = {10},
pages = {41--58},
year = {2025},
doi = {10.5194/wes-10-41-2025}
}GitHub's Cite this repository button (from CITATION.cff) gives the same reference in other formats.
Apache 2.0: you are free to use, change and share this code, also commercially. If you pass it on, keep the NOTICE file with it; it says where the code comes from and how to cite it.

