Source code of DROPS

The code is still under development. The releases below are published under the terms of the LGPL .


If you want to work with DROPS please send an email to drops@lists.rwth-aachen.de

Documentation

A user's manual can be found in the DROPS publication list. It explains the main mathematical concepts and numerical methods as well as software-related concepts. The last chapters contain some examples how to run numerical simulations with DROPS, which are rather outdated but still may be helpful for the user. An HTML documentation of the source code can be generated by typing make doc in the drops top-level directory, requiring the "doxygen" tool.

Tools to build DROPS

To build DROPS in an Unix environment, please make sure that a recent C++ compiler is installed on your system. Additionally, the CMake tool and the Boost library are needed. To visualize your results, DROPS supports many different output formats. Commonly, the results are written out by DROPS in the VTK format or a format which can be read in by Paraview. Detailed information of classes and functions can be generated by the tool doxygen. To generate a tetrahedral meshfile, which defines the computational domain, the tool Gambit (part of Fluent) or Netgen ( netgen at sourceforge ) can be used. Simple geometries, such as bricks and L-shaped domains, can be generated without the use of this tool.

Building DROPS executables

Note: For the pre-CMake versions until v2.0, please use this instructions.

Prerequisites

You will need
  • a C++11 compiler (e.g., gcc-5.2)
  • CMake
  • the Boost library, preferably version 1.58. From version 1.59 on, using C++-style comments in JSON files (which we use as parameter files) is not possible anymore. You can strip comments from JSON files by using g++ -E -x c++ myparam.json > myparam-stripped.json and removing the first lines starting with #.


Generating Makefiles

CMake is used to generate the build system based on Makefiles. First, generate a build directory. Within this build directory, call cmake /path/to/drops/src. For example, the build directory could be a folder bin inside the drops folder:
mkdir bin
cd bin
cmake ../src
This will populate a directory structure inside bin with associated Makefiles. These can be used to compile the different executables.

MPI version

To build the MPI version of DROPS (to be used on a parallel computer), the graph partitioner library ParMETIS is used. Download ParMETIS 4.0.2 and install it on your machine. After that, modify the path to ParMETIS and METIS (which is part of ParMETIS) in the CMakeSettings.txt in the src directory. Of course, an MPI library is needed, which is often chosen by using a corresponding module load command. The MPI library will then be automatically selected by CMake in the following. As DROPS is able to use OpenMP within a parallel node (i.e., hybrid parallelization), a thread-safe MPI library is the best choice. As next step, you have to add the option -DMPI=1 to the cmake command like this:
mkdir bin-par
cd bin-par
cmake -DMPI=1 ../src

Compiling Executables

Inside the build directory, go to the executable's directory and use make to build the executable. E.g., to compile twophasedrops:
cd levelset
make twophasedrops
Calling make all in the build directory will build all DROPS executables.

Running Executable

Usually, you have to provide a parameter file in JSON format as a command line option when calling the executable. Some example parameter files can be found in the directory param (on the same level as src) and has the same structure as the src directory. If the code for some executable xyz is located in src/abc, then the corresponding parameter files are stored in param/abc/xyz/. For example, if the executable twophasedrops resides in the directory drops/bin/levelset, from within that directory call
mkdir vtk  # for VTK output
./twophasedrops ../../param/levelset/twophasedrops/risingbutanoldroplet.json



Sven Gross ✉, last update: July 26th, 2019