A powerful tool to to post-process OpenFOAM simulations.
Project description
OpenFOAMPost - OpenFOAM Post-Processing Utility
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!!
⚠️NOTE: If you are just a user, it is sufficient that you take a look at install and usage sections (you can find also an example section below).
For code contributions, refer to contribute and build sections! Enjoy! 🤗
How to install
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.
Dependencies - Linux only (working also on WSL)
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
⚠️WARNING:
- It is necessary to restart the shell session (i.e. the terminal) to apply the changes above!
- The package requires
python3.10or later!
Install package - Linux, MacOS, Windows
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
Upgrade package
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
How to use
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).
⚠️IMPORTANT: This script will look into the specified directories and their subdirectories recursively!! Be sure you selected the correct directory before launching it!
⚠️WARNING: If you get a command not found... error, ensure you installed the dependencies correctly!
Basic usage
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
How to contribute
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
⚠️NOTE: 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! 🤓
How to build
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
Examples
Many other examples can be found inside /test folder! 🌈
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openfoampost-1.1.7-py3-none-any.whl.
File metadata
- Download URL: openfoampost-1.1.7-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a119fc2fcc12a38eb0dce04992d34c4e04a5e7083bf56ddc40bd2b24d9046e3a
|
|
| MD5 |
d6e7bd216aaa46dc83c3e0544b1f88e0
|
|
| BLAKE2b-256 |
6d6053eeb1b70e0f1871fbe6aa101baff455699d40e8f6084ec2c201df6a3785
|
Provenance
The following attestation bundles were made for openfoampost-1.1.7-py3-none-any.whl:
Publisher:
python-publish.yml on TheBusyDev/OpenFOAMPost
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openfoampost-1.1.7-py3-none-any.whl -
Subject digest:
a119fc2fcc12a38eb0dce04992d34c4e04a5e7083bf56ddc40bd2b24d9046e3a - Sigstore transparency entry: 226733684
- Sigstore integration time:
-
Permalink:
TheBusyDev/OpenFOAMPost@9f098b44666ab99c3a8fba3ddab847ead57bcf51 -
Branch / Tag:
refs/tags/v1.1.7 - Owner: https://github.com/TheBusyDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@9f098b44666ab99c3a8fba3ddab847ead57bcf51 -
Trigger Event:
release
-
Statement type: