Python framework for OpenFOAM
Project description
OpenFOAM is a very popular open-source C++ CFD framework. Working with OpenFOAM implies writting and modifying a lot of input files describing a simulation. The method described in the official OpenFOAM documentations is to copy an existing simulation directory and to modify the input files by hand. Fluidsimfoam is a Python package designed to improve the life of OpenFOAM users.
Fluidsimfoam allows one to write Fluidsim solvers based for the simulations on OpenFOAM. There are open-source solvers (in particular fluidsimfoam-tgv, fluidsimfoam-cbox and fluidsimfoam-sed) and it is not be difficult to write your own solver based on your OpenFOAM cases.
With a Fluidsimfoam solver, it becomes very easy to
- launch/restart simulations with Python scripts and terminal commands,
- load simulations, read the associated parameters/data and produce nice figures/movies.
Fluidsimfoam can be seen as a workflow manager for OpenFOAM or a Python wrapper around OpenFOAM. It uses OpenFOAM on the background and is thus NOT a rewrite of OpenFOAM!
The best way to use Fluidsimfoam is to write or use a solver adapted for your
particular use case. However, one can also use Python objects provided by
Fluidsimfoam for some common tasks, like parsing/writting input files,
modifying field files, writting blockMeshDict
files, etc.
Fluidsimfoam is now in quite early development. The goal is to get the equivalent of Snek5000, our Fluidsim framework for Nek5000. Looking at the Snek5000 tutorials should give a good idea of what Fluidsimfoam will soon allow.
For our examples, we currently target OpenFOAM v2206 but it should be possible to write Fluidsimfoam solvers targeting any recent OpenFOAM versions.
See more in Fluidsimfoam documentation.
Install
Currently, it still makes sense to install Fluidsimfoam like we, the
fluidsimfoam developers, install it, i.e. in a dedicated controlled virtual
environment created by Poetry. After installing Poetry (for example with
something like pip install poetry
), the following commands should install and
activate the virtual environment:
hg clone https://foss.heptapod.net/fluiddyn/fluidsimfoam
cd fluidsimfoam
poetry install
poetry shell
For better user experience with Matplotlib figures, you can also install with
poetry install --extra qt
.
Related projects
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fluidsimfoam-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83423b9574bc88c1f85b3f4e49a3327485c1816e8201172581dbb05c2458289d |
|
MD5 | f84fa0565606617195aff44ff0f7d6d2 |
|
BLAKE2b-256 | 32f10a72d1b51913afa8778e4519c98636302837b555e1a431739deb33c982c6 |