1. Building TInF
1.1. Install External Software
Please note that in order to build and run the Turbulent Inflow Tool, your system must have installations of the following components:
Install a modern C++ compiler that is compliant with modern C++ standards (preferably C++17).
Install the Qt framework. Qt is free for open source developers. Qt version 5.10 or later is required and version 5.12 or later is recommended.
Install OpenFOAM (v6 or v7) from the OpenFOAM Foundation
Note
The first open source release of OpenFOAM
was in 2004. It was based on the FOAM
code, which was originally developed by Henry Weller in 1989. As sometimes happens with open source software when commercial interests get involved, the code forked over time and a number of open source distributions from different entities are available. The two main distributions of the code come from the OpenFOAM Foundation and from ESI OpenFOAM. Currently Turbulence Inflow Tool compiles and runs with versions 6 and 7 of the code released by the OpenFOAM Foundation.
1.2. Building the UI from Source
You must first obtain the source-code from Turbulence Inflow Tool Github page and then compile and build it using Qt’s qmake. This can be done in a command window on Windows or a terminal window on a Mac machine using the following commands:
git clone https://github.com/NHERI-SimCenter/TurbulenceInflowTool
git clone https://github.com/NHERI-SimCenter/SimCenterCommon
cd TurbulenceInflowTool
qmake TurbulenceInflowTool.pro
make
1.3. Compiling the Source Code in OpenFOAM
Download the source code of the turbulent velocity boundary conditions from
https://github.com/NHERI-SimCenter/TurbulenceInflowTool/tree/master/openFOAM_code
The source code files are contained in a directory named turbulentInflow. Note that the code is provided for OpenFOAM version 6 and 7, and is slightly different in this two versions. Please choose the correct package to download according the version of OpenFOAM you have installed on your computer.
Create a project directory by typing the following script in a terminal prompt:
$ mkdir -p $FOAM_RUN
Copy or move the turbulentInflow directory which has been downloaded earlier and all the files in it to the above created directory. Go to the relocated turbulentInflow directory by typing:
$ cd $FOAM_RUN/turbulentInflow
Compile the codes in the turbulentInflow directory by typing the following in the terminal prompt:
$ wmake
After the compilation is successfully complete, a library file named libturbulentInflow.so will be generated in the directory $FOAM_USER_LIBBIN.