Skip to content

About

Read OpenFOAM fields in Python and resample unstructured cell data onto regular NumPy grids with local RBF interpolation (fluidfoam, SciPy).

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

OpenFOAM post-processing

Example smoke test paper: 10.5194/wes-10-41-2025 python: 3.10+ license: Apache 2.0 website: research page

From OpenFOAM cell data to regular NumPy grids.

A cross-flow plane travelling down a multirotor wake, leaving resampled planes of the velocity deficit behind it

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.

Run it

git clone https://github.com/EngFlavioMartins/openfoam-postprocessing.git
cd openfoam-postprocessing
python run.py

run.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.py

Next: The notebooks Creating_Backups.ipynb and Examples.ipynb show the full workflow.

Figure and animation

One wake plane: OpenFOAM cell centres on the left and the same velocity deficit on a regular grid on the right

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 top

Both need ParaView; the figure also needs LaTeX.

Cite

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.

Licence

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.

About

Read OpenFOAM fields in Python and resample unstructured cell data onto regular NumPy grids with local RBF interpolation (fluidfoam, SciPy).

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages