Skip to content
Snippets Groups Projects
Ruben Heinrich's avatar
Ruben Heinrich authored
5ffe8b9b
History

r2ogs6

r2ogs6 is an R-API to the multiphysics simulator OpenGeoSys 6. r2ogs6 allows pre-processing (preparing input files), executing simulation runs, retrieving, post-processing and visualizing output data in R. Furthermore, the package comes with functionality to define ensemble runs.

Setup

Preparing your environment

Before you install and load r2ogs6, there are two prerequisites that need to be met so you can use r2ogs6 to its full extent later.

The most important one is having OpenGeoSys 6 installed on your system. You can download the current version of OpenGeoSys 6 from here.

Secondly, to read in the .vtu and .pvd files produced by OpenGeoSys 6, you need a Python installation including the libraries numpy and vtk. If you have an Anaconda installation on your system, setting up a Python environment with numpy and vtk will work. r2ogs6 was tested with the following environment:

$ conda create -n r2ogs6 python=3.7
$ conda install -c anaconda numpy, vtk==8.2.0

If you don't have any Python installation on your system, you can download the latest release of Python from here. Instructions on how to install numpy and vtk can be found here and here.

Installation

First, open a terminal and clone the r2ogs6 repository to your local machine.

$ git clone https://gitlab.opengeosys.org/ogs/tools/r2ogs6.git

After that, open R from your local (anaconda) environment. To install r2ogs6, you first need the R-package devtools.

# Install devtools
install.packages("devtools")

With devtools, you can now install r2ogs6.

# Install r2ogs6. Change the path to that of the cloned repository!
devtools::install("path/to/r2ogs6")

This will install all necessary R dependencies.

Usage

For tutorials on how to use the r2ogs6 package, have a look at its vignettes:

Furthermore, we compiled R scripts on how to create the OpenGeoSys benchmarks with r2ogs6 here: r2ogs6 Benchmark Scripts.

Links