managedFlu is a C++ library that allows to write interactive functionality on top of referenced OpenFOAM API. As it has appeared, OpenFOAM imposes limitations on writing corresponding solver code, namely - most OpenFOAM objects should live in the same "scope" and exactly within the same time (that is why solver expands its functionality by usage of "#include" tricks).
The most recent managedFlu distribution can be found at SourceForge.net
or downloaded from corresponding Git repo
Pre-requisites
- Make sure that confFlu (common configuration package) is installed.
- Make sure that OpenFOAM is installed (tested with OpenCFD 2.1.1 - 2.0.0 and Extended 1.6 versions).
Please follow instructions from corresponding OpenFOAM INSTALL file to enable this library in your environment.
- Make sure that Boost C++ libraries is installed (tested with 1.40 - 1.48 versions).
Read more from http://www.boost.org web-site or use native precompiled binary package.
sudo apt-get install libboost-all-dev
Installation
The build procedure of the managedFlu 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 "env.sh.example" file to "env.sh" and adjust to your local environment.
<your favorite editor> ./env.sh
- Source this "env.sh" file to define the corresponding configuration environment.
source ./env.sh
- Configuring the build system:
./build_configure
./configure
Make sure that after each configuration step the "--- OK ---" message is printed in your console.
To see all applicable configuration options run "./configure —help"
- Source the generated on configure step "bashrc" file to define the corresponding build environment.
source ./bashrc
- Build and install managedFlu:
make
sudo make install
Use "make clean" command to cleanup the build folder.
Use "sudo make uninstall" to remove the installed package from the system.
Utility Environment
Before using managedFlu 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
check that corresponding manageFlu libraries was built and installed at the right place.
# For OpenCFD's OpenFOAM-2.1.1
ls /opt/managedflu211-1.1.-1/lib/libmanagedFlu-OpenFOAM.so
# For Extended's OpenFOAM-1.6
ls /usr/lib/managedflu1.6-ext-1.1.-1/lib/libmanagedFlu-OpenFOAM.so