|
|
## Installation
|
|
|
MigFlow requires a linear solver to solve the Navier-Stokes equations. Before starting the installation of MigFlow, make sure you have a recent version of [PETSc](https://www.mcs.anl.gov/petsc/download/index.html) with proper configuration.
|
|
|
|
|
|
Meshes representing the computational domain on which Navier-Stokes equations are discretised are created from .geo files using [GMSH](http://gmsh.info/)
|
|
|
|
|
|
|
|
|
+ Installation of the mesh generator :
|
|
|
|
|
|
The continuous equations of the model used in the MigFlow project are solved on unstructured meshes. The msh file format is the only one supported by MigFlow and require the installation of a specific mesh generator.
|
|
|
|
|
|
1. Go on [GMSH](http://gmsh.info/) webpage and follow the instruction given in the _Download_ section
|
|
|
|
|
|
2. Create a path in your .bashrc to launch gmsh with command system
|
|
|
- Linux
|
|
|
|
|
|
export PATH="TheGoodPath/gmsh/build:$PATH"
|
|
|
|
|
|
- MacOs
|
|
|
|
|
|
export PATH="/Applications/Gmsh.app/Contents/MacOS:$PATH"
|
|
|
|
|
|
|
|
|
+ Installation of MigFlow
|
|
|
|
|
|
1. Go on the [gitlab](https://git.immc.ucl.ac.be/fluidparticles/migflow) page dedicated to the project to upload your ssh or https link
|
|
|
|
|
|
2. Open your terminal and type the following commands
|
|
|
|
|
|
cd ~
|
|
|
git clone https://username@git.immc.ucl.ac.be/fluidparticles/MigFlow.git
|
|
|
cd MigFlow
|
|
|
mkdir build
|
|
|
cmake ..
|
|
|
make
|
|
|
|
|
|
|
|
|
3. State the location of the python modules by writing the following line in your .bashrc
|
|
|
|
|
|
export PYTHONPATH=$HOME/MigFlow/build:$PYTHONPATH
|
|
|
|
|
|
→ For MacOS you possibly need to create this hidden file in your HOME directory
|
|
|
|
|
|
4. (Optional) Linear Solver:
|
|
|
|
|
|
MigFlow solves the nonlinear Navier-Stokes equations using a Newton's method equations solver that requires the use of a linear solver. MigFlow has its own linear solver based on LU decomposition but it supports the use of PETSc to fasten time consuming computations.
|
|
|
|
|
|
a. For Ubuntu and other Unix system it is more convenient to use the PETSc project supported by the officiel distribution repository:
|
|
|
- Ubuntu:
|
|
|
|
|
|
sudo apt install petsc_dev
|
|
|
|
|
|
b. 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 maint https://bitbucket.org/petsc/petsc petsc
|
|
|
|
|
|
c. Compiling options for PETSc:
|
|
|
|
|
|
cd petsc
|
|
|
./configure --with-mpi=0 -with-mpi=0 COPTFLAGS="-O3" --with-fc=0 --with-cxx=0 --with-debugging=0
|
|
|
|
|
|
d. Compile PETSc:
|
|
|
|
|
|
cd ../
|
|
|
make -j4
|
|
|
|
|
|
e. Compile MigFlow specifying PETSc paths:
|
|
|
|
|
|
- Ubuntu:
|
|
|
|
|
|
cd ~/MigFlow/build
|
|
|
cmake .. -DENABLE_PETSC=1 -DPETSC_DIR=/usr/lib/petscdir/petsc3.9/ -DPETSC_ARCH=x86_64-linux-gnu-real
|
|
|
make
|
|
|
|
|
|
- Other OS:
|
|
|
|
|
|
cd ~/MigFlow/build
|
|
|
cmake .. -DENABLE_PETSC=1 -DPETSC_DIR=$HOME/petsc -DPETSC_ARCH==seq-real-opt
|
|
|
make |
|
|
\ No newline at end of file |