Getting Started
System Setup
This project requires a Python version 3.7+ install for code generation and Python version 2.7 install along with the OP2 Library to build executables for different computational architectures. This installation guide is for Linux platforms only, it hasn’t been tested on OSX/Windows.
Python Installation
Install Python versions 2.7 and 3 using:
sudo apt install python2.7
sudo apt install python3
Install Python package manager (pip) using the package manager
aptand then install the required python libraries:
sudo apt-get install python-pip python-tk
pip install --user sympy==1.1
pip install --user scipy numpy h5py matplotlib
Note
Remember that SymPy version 1.1 is required, more recent versions are not tested and may cause issues.
OP2 Installation
To translate the #C code generated by the source code you must clone the OP2-Common GitHub repository into your local machine. To clone the repository first we should install git via package manager apt using the command:
sudo apt-get install git
After it is installed create a directory where you want to clone the OP2 repository. I suggest creating a directory called ‘softwares‘ in your home directory, now open a terminal and change the working directory to the installation directory (~/softwares) and clone the repository using:
git clone git@github.com:OP-DSL/OP2-Common.git
You will then need to set up your OP2-related environment variables, listed below.
export OP2_INSTALL_PATH=~/softwares/OP2-Common/op2
export OP2_COMPILER=gnu
These variables must be included in the .bashrc file located in your home (~) directory. After editing the file you must apply the changes done using the command source ~/.bashrc in the terminal.
After installation, it is recommended that you run the test suite to check that OP2 is installed and performing as it should by executing these commands:
cd ~/softwares/OP2−Common/apps/c/jac1/dp/
make jac_seq
./jac_seq
make jac_openmp
./jac_openmp
These should print output to the screen like Results check PASSED!. Try this for other applications of jac2, jac1/sp/ etc. If you are still facing any issues while installing OP2 you can refer to this Installation Guide.
Dependencies
Warning
Should finalize and add the dependencies that we have.
Cloning the Solvers
After installing all the required libraries and API’s you must now clone the solver’s source code from GitHub repository. Currently we have two different repositories for PerfectGas and CO2 solvers. The differences between both the solvers is explained in Solver Types.
# Cloning PerfectGas solver repository
git clone git@github.com:UnstructuredFVM/PerfectGas.git
# Cloning CO_2 solver repository
git clone git@github.com:UnstructuredFVM/CO2.git
Note
In future we are planning to combine both the solvers into a single solver which is automated to generate and run simulations for both PerfectGas and CO2 test cases.