Simulation of river growth using model based on Laplace equation[1]. Mathematicaly, in this program we solve PDE equation using Finite Element Method(FEM). And as result program produces VTK file, which contains solution and its details, which furthere can be viewed in ParaView
Program is written in C++ Language. And contains few built-in and external dependencies.
As we discussed above product contains few external dependencies: Deal.II and Boost. To build system on computer
To build from source at every beginning you need tools like: CMake, Make, GCC compiler etc. easiest way to install them all is:
sudo apt install build-esential
also Cmake with curses gui(Terminal gui) is very handy:
sudo apt install cmake-curses-gui sudo apt install doxygen sudo apt install graphviz
and call command is same as cmake, but:
ccmake
sudo apt install libdeal.ii-dev
Or compile it but do not forget to use -fPIC
compiler option.
~sudo apt install libbost-all-dev~ Install boost from gtihub.com/boostorg/boost.org and while compiling do not forget to use -with=python option
Problem: Program uses c++ 17 standard features, but last prebuild gcc version for CentOS is 4.8 and it only supports c++ 11 standart. Solution is to build from source gcc compiler(more details by this link). Then compile Deal.II from source, there will be some problems which can be resolved by this link.
If gcc is installed in custom path, specify before running cmake
environmental variable LD_LIBRARY_PATH
:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<custom path>/lib64
When you have configured and setuped all dependencies. Now you can build RiverSim source code using cmake.
It is very easy and fast(in comparsion to Deal.II compiling process), you just have to setup two variables in cmake:
DEALII_DIR - path too Deal.II files, and
cmake -DDEALII_DIR:STRING=/path/to/deal/ii -DCMAKE_INSTALL_PREFIX=/installation/path /path/to/riversim/project/folder
Makefile will be generated, which next is used for compiling of program:
make or for faster(multithread build) type make -j5
make install
Project will be installed to path specified by _CMAKE_INSTALLPREFIX variable.
After compiling, simply type a command:
make test
As any Linux program, now just type in terminal from folder source(in your build folder) command:
./riversim
More details about parameters you can find in help of program:
./riversim -h or ./riversim --help
Typical forward river simulation command:
./riversim -n 100 -o simdata
And after that, typical backward simulation commnad:
./riversim -n 130 -o revsim --simulation-type=1 simdata.json
add more details about workflow with program(TODO)..
[1]: [Problem odwrotny do ewolucji sieci rzecznych]().
[2]: Bifurcation dynamics of natural drainage networks Alexander P.Petroff†, Olivier Devauchelle‡, Hansjörg Seybold and Daniel H.Rothman.
[3]: Path selection in the growth of rivers Yossi Cohen, Olivier Devauchelle, Hansjörg F. Seybold, Robert S. Yia, Piotr Szymczak, and Daniel H. Rothmana.
[4]: Ramification of stream networks Olivier Devauchelle, Alexander P. Petroff, Hansjörg F. Seybold, and Daniel H. Rothman.
[5]: Shape and dynamics of seepage erosion in a horizontal granular bed Michael Berhanu, Alexander Petroff, Olivier Devauchelle, Arshad Kudrolli, and Daniel H. Rothman.