Installation From Sources

The most recent pythonFlu sources can be found here


  • Make sure that managedFlu (C++ library that provides proper memory management for OpenFOAM objects) is installed.
  • Make sure that Python (developement version, with Python.h header file) is installed (tested with 2.4, 2.6, 2.7).
    Read more from web-site or use native precompiled binary package:
sudo apt-get install python-dev
  • Make sure that SWIG is installed (tested with 1.3.36 - 1.3.40 and 2.0.3 - 2.0.6).
    Read more from web-site or use native precompiled binary package.
sudo apt-get install swig

Then follow the instructions below in order to build and install the pythonFlu.

Basic Installation

The build procedure of the pythonFlu package is based on GNU autoconf and make utilities.
In order to build the module you have to perform the following steps:

  • Start a new shell session (to ensure a clear environment).
  • Go to the source directory :
cd <path to the sources>
  • Copy the provided "" file to "" and adjust to your local environment.
<your favorite editor> ./
  • Source this "" file to define the corresponding configuration environment.
source ./
  • Configuring the build system:
  • Source the generated on configure step "bashrc" file to define the corresponding build environment.
source ./bashrc
  • Build and install pythonFlu :
sudo make install

Use "make clean" command to cleanup the build folder.
Use "sudo make uninstall" command to uninstall pythonFlu.

Utility Environment

Before using pythonFlu do not forget to configure OpenFOAM itself

# For OpenCFD's OpenFOAM-2.1.1
source /opt/openfoam211/etc/bashrc 

# For Extended's OpenFOAM-1.6
source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc

Installation check

Import installed pythonFlu kernel library

python -c "from Foam import finiteVolume; print 'ok'"

Note : Install one of the existing pythonFlu based solvers to verify this installation on a more complex test case