-
Notifications
You must be signed in to change notification settings - Fork 40
Home
Welcom 682C e to the olaFlow wiki!
Many people use OpenFOAM in a containerized environment such as Docker, for convenience and compatibility with Mac and Windows. olaFlow can be installed in the Docker image normally, following the normal compilation procedure.
However, there is a catch. You need to download or store the olaFlow folder in one of the folders that are inside the Docker image, and not in a folder that is shared with your computer. The reasons behind it are some issues with not case-sensitive systems.
The easiest way to get olaFlow compiled and running is to execute the following sequence of commands in your Docker terminal:
cd
git clone git://github.com/phicau/olaFlow.git
cd olaFlow
./allMake
Please note that you need to have git installed in your Docker distribution. If this is not the case use your favorite package manager to install it.
Compiling olaFlow in a Mac computer may require some changes in the code. You can find more information on how to do this in this post. Thanks Chris!
In order to include the wave generation and active wave absorption boundary conditions without needing to re-compile a solver, you can include the following lines of code in the controlDict file of your case:
libs
(
"libwaveGeneration.so"
"libwaveAbsorption.so"
);
The boundary conditions will be loaded at runtime.
By default olaFlow is installed in the local user directories ($FOAM_USER_LIBBIN
, $FOAM_USER_APPBIN
). This is the proper way, as any changes in the code that the users may implement will only be available to them.
However, if you need to make olaFlow available for all users, you can change the directories above for $FOAM_LIBBIN
and $FOAM_APPBIN
in all the files named files inside the Make folders. You can do this automatically by running the following instructions in a terminal from the olaFlow installation folder:
find . -name "files" -print -exec sed -i 's/FOAM_USER_LIBBIN/FOAM_LIBBIN/g' {} \;
find . -name "files" -print -exec sed -i 's/FOAM_USER_APPBIN/FOAM_APPBIN/g' {} \;
Please note that this might require sudo access, depending on how OpenFOAM was installed.