-
Notifications
You must be signed in to change notification settings - Fork 16
Installation procedure
To install SOMAFoam, please ensure that you are using Ubuntu (Bionic Beaver) as your operating system. Failing to use Ubuntu (Bionic Beaver) might result in failure to install SOMAFoam, as it requires libraries such as qt4 and gcc5/g++-5 that are not available in newer versions of Ubuntu.
Download Ubuntu Here|Instruction to install Ubuntu
It is strongly recommended to install Ubuntu on a clean hard drive to avoid partitioning with Windows on the same drive. However, you may proceed depending on your particular usage scenario.
To install somaFOAM in a newer version of Ubuntu (tested in 24.04.02), first install toolbox.
sudo apt-get install podman-toolbox
After installing toolbox, create an Ubuntu 18 container.
toolbox create --image quay.io/toolbx/ubuntu-toolbox:18.04
After creating the toolbox, access the toolbox by typing the following command.
toolbox enter ubuntu-toolbox-18.04
After entering the container, continue the installation process as prescribed below.
After installing Ubuntu, the following libraries need to be installed:
sudo apt-get install git-core build-essential binutils-dev cmake flex bear \
zlib1g-dev libncurses5-dev libreadline-dev qt4-dev-tools libqt4-dev libncurses5-dev \
libxt-dev rpm mercurial graphviz python python-dev python3 python3-dev gcc-5 g++-5 \
gnuplot gnuplot-qt gnuplot-data openmpi-bin openmpi-common libopenmpi-dev libgtk2.0-dev
After installing these packages, gcc will be configured to ensure that gcc5 is being used. To do so, follow these steps:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 1
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 1
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 1
sudo update-alternatives --set c++ /usr/bin/g++
The "1" at the end of lines 1, 2, 3, and 5 represent the importance in increasing order of the gcc library being used in Ubuntu. If the installation of libraries requires a newer version of gcc (such as for graphics cards), increase the number at the end of the line by +1 and so on, while making sure to revert back to gcc5. The "1" at the end of the line assumes a new system. If this is not the case, a random number can be used to make sure the system detects the changes. You can confirm that gcc libraries are successfully installed by using the following command:
gcc -v
g++ -v
This should confirm that gcc5 is being used:
gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1)
To download SOMAFoam, type the following command in the terminal:
git clone https://github.com/vayyaswamy/SOMAFOAM.git
After downloading SOMAFoam, go to the SOMAFoam directory and type the following:
chmod +x cleanall
./cleanall
This will ensure that SOMAFoam is ready to install. To install SOMAFOAM, run the following command:
./install.sh > log.install 2>&1
The installation should take about 20 minutes to 1 hour, depending on the computer's performance. To test that the software is installed properly, from the SOMAFoam directory, run:
source etc/bashrc
Type plasmaSimFoam in the terminal. An error message should appear indicating that the file cannot be opened. Congratulations! You have installed SOMAFoam correctly. Happy FOAMing!