A powerful tool to post-process OpenFOAM simulations (written in Python 🐍).
Are you fed up with processing OpenFOAM simulations using ParaView?
Yeah, OpenFOAM function objects are awesome🌟, however processing .vtk manually can be very boring👎.
For this purpose, OpenFOAMPost can extract colorful images 🌈 from your simulations!!
For code contributions, refer to contribute and build sections! Enjoy! 🤗
The following instructions are well-tested on Linux-based systems 🐧.
However, installation process is also reported for Windows and MacOS platforms.
Dependencies installation is specified for Linux only. MacOS and Windows users must find their way to install pipx and/or pip.
Before starting, install all the dependencies (only procedure for Ubuntu-based systems is reported, find an equivalent for your specific Linux distro):
sudo apt update
sudo apt install python3-pip pipx
pipx ensurepath
- It is necessary to restart the shell session (i.e. the terminal) to apply the changes above!
- The package requires
python3.10or later!
You can install the wheel package through pipx (this is the suggested option) 🚀:
pipx install openfoampost
or, alternatively, through pip (not supported starting from Ubuntu 24.04):
pip install openfoampost
When a new version is released, the package can be upgrade, preferably through pipx:
pipx upgrade openfoampost
or, alternatively, through pip:
pip install --upgrade openfoampost
This script will essentially look for .vtk, .dat, .xy files into the specified directories and convert them into .png format (other formats can be selected by the user).
command not found... error, ensure you installed the dependencies correctly!
ofpost /path/to/OpenFOAM/simulation
Other options can be specified by the user. All the input arguments can be listed by:
ofpost --help
For example, the user can post-process a 2D, steady-state, incompressible simulation in the current working directory by typing:
ofpost . --2D yes --steady yes --incomp yes
All sorts of contributions are very welcome 🤗! You can start by cloning the git repo:
git clone https://github.com/TheBusyDev/OpenFOAMPost.git
Then, the necessary modules can be installed and the environment variables can be initialized by executing (a virtual environment is strongly suggested):
cd OpenFOAMPost
pip install -r requirements.txt
source init.sh
source init.sh command is always required before starting to work on this project in order to initialize all the enviromnent variables properly!
Hence, by calling :
ofpost-test
the program will be launched into the /test folder!
Moreover, the following command can be used to clean up the /test folder:
ofpost-clean
All the source files can be found in /src/ofpost directory! Enjoy coding! 🤓
In order to build a new package, a new version can be specified in the VERSION.txt file. Then, the package can be created by executing:
ofpost-build
Many other examples can be found inside /test folder! 🌈

