okmechak / RiverSim

Simulation of river growth using Laplace equation
https://okmechak.github.io/RiverSim/
GNU General Public License v2.0
0 stars 1 forks source link

River Growth Simulation (RiverSim)

Build Status

Faculty of Physics. University of Warsaw

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.

Documentation

Built-in dependencies:

External dependencies:

1. System setup

This setup applies to Ubuntu, Mint and Windows Linux Subsyste, at least those are tested.

As we discussed above product contains few external dependencies: Deal.II and Boost. To build system on computer

Build environmet

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

Deal.II setup:

Or compile it but do not forget to use -fPIC compiler option.

Boost:

~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

CentOS

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

2. Compiling and running Tests

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:

Makefile will be generated, which next is used for compiling of program:

make or for faster(multithread build) type make -j5

Installation:

make install

Project will be installed to path specified by _CMAKE_INSTALLPREFIX variable.

Running Tests

After compiling, simply type a command:

make test

3. How to use RiverSim program

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)..

4. References

[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.

5. Links