Skip to main content

Python framework for OpenFOAM

Project description

Fluidsimfoam

PyPI Documentation Status

Python framework for OpenFOAM

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

fluidsimfoam-0.0.4.tar.gz (76.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluidsimfoam-0.0.4-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

File details

Details for the file fluidsimfoam-0.0.4.tar.gz.

File metadata

  • Download URL: fluidsimfoam-0.0.4.tar.gz
  • Upload date:
  • Size: 76.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for fluidsimfoam-0.0.4.tar.gz
Algorithm Hash digest
SHA256 83cae26c8fbf916a82387ef77d1a36cc6546f9ec43b2f047863c6a24c3a1e5e2
MD5 aabf624e85edf3fec5c1e6c474a94c21
BLAKE2b-256 27f03bf41d341a4b2da2c5ad3bae6a11b623d93841392f362a80030bcd37b4c6

See more details on using hashes here.

File details

Details for the file fluidsimfoam-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: fluidsimfoam-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 44.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for fluidsimfoam-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83423b9574bc88c1f85b3f4e49a3327485c1816e8201172581dbb05c2458289d
MD5 f84fa0565606617195aff44ff0f7d6d2
BLAKE2b-256 32f10a72d1b51913afa8778e4519c98636302837b555e1a431739deb33c982c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page