Migflow can be installed as a python package or compiled from source. In addition to migflow itself, the gmsh mesh generator is required and optionally petsc4py.
The easiest way to install migflow is to use the package from pypi using pip.
If you do not have pip installed (check the output of pip --version), follow the official instruction to get it.
Once pip is installed, simply type :
pip install -i https://test.pypi.org/simple --user migflow
Compilation from sources
If you plan to develop migflow, you'll have to compile it from source (instead of installing the python package). if your operating system is Windows 10 version 2004 or higher, use the Windows Subsystem for Linux.
Go on the gitlab page dedicated to the project to upload your ssh or https link
Open your terminal and type the following commands(don't forget to specify your username)
cd ~ git clone https://USERNAME@git.immc.ucl.ac.be/fluidparticles/MigFlow.git cd MigFlow mkdir build cd build cmake .. make
State the location of the python modules by writing the following line in your .bashrc
→ For MacOS you possibly need to create this hidden file in your HOME directory
Meshes representing the computational domain, on which Navier-Stokes equations are discretised, are created from .geo files using GMSH.
If you use a package manager, it is recommended to install GMSH from your package manager (e.g.
apt install gmsh on ubuntu).
Otherwise, you can download it from GMSH website or install it with pip (
pip install --user gmsh). Either way, check that the gmsh executable is in your PATH variable.
ParaView is an open-source, multi-platform data analysis and visualization application.
If you use a package manager, it is recommanded to install ParaView from your package manager (e.g.
apt install paraview on ubuntu).
Otherwise, you can download it from ParaView website.
In order to install MigFlow Plugins, you need to open ParaView. Access "Tools → Manage Plugins...". On the opened window, click on "Load New Plugin" and select "MigFlow/paraview_utils/MigFlow.xml". You will need to tick the "Auto-load" box.
To use MigFlow macros developed for ParaView visualization, click on "Macros → Add new macro..." and select "MigFlow/paraview_utils/migflow_refresh.py". Be aware that the "show_problem.py" macro is only available if you have installed ParaView from sources or by
apt install python3-paraview.
MigFlow uses a linear solver to solve Navier-Stokes. The installation of PETSc4py is optional, if it is not available, migflow will use scipy instead. For large meshes, PETSc4py is faster.
Again if you use a package manager and if a PETSc4py package is available, use it. (ubuntu :
apt install python3-petsc4py).
Otherwise, follow the instructions bellow to compile it from sources.
a. For other OS, go on [PETSc](https://www.mcs.anl.gov/petsc/download/index.html) webpage and clone the repository on your computer: git clone -b release https://gitlab.com/petsc/petsc.git petsc b. Compiling options for PETSc: cd petsc ./configure --with-debugging=0 --with-shared-libraries=1 COPTFLAGS="-O2" FOPTFLAGS="-O2" CXXOPTFLAGS="-O2" --with-mpi=0 --with-petsc4py=yes --with-fortran=0 c. Compile PETSc: make -j4 make -j4 install