First applications of pyMANGA

Before you start with first applications, if you haven’t already done so, you should read the installation and preparation instructions for your operating system. This is especially recommended for beginners who have little experience with Python and the input console. These instructions are generally suitable for all three operating systems (Ubuntu, Windows).

Setup without OpenGeoSys

Here, we explain how to run the simple pyMANGA setup ‘SimpleBettina’ from our benchmark gallery. More information on our benchmarks can be found here.

First you have to use the console interface again to navigate to the file location of the pyMANGA main level. Entering then for Windows

py -3.7 MANGA.py -h

respectively for Ubuntu

python3 MANGA.py -h

starts pyMANGA and displays all available input options (-h stands for help).

Here you can see that the MANGA.py file has been executed and is waiting for further input. So the start of pyMANGA was successful, and you can test the first example. You can enter the following code (see Figure 2) for Windows:

py -3.7 MANGA.py -i Benchmarks\ModuleBenchmarks\GrowthAndDeath\SimpleBettina\SimpleBettina.xml

respectively for Ubuntu:

python MANGA.py -i Benchmarks/ModuleBenchmarks/GrowthAndDeath/SimpleBettina/SimpleBettina.xml

-i refers to the index or path of the file in which the input to be used for this example is defined.

This code calls pyMANGA with the control file ‘SimpleBettina.xml’. For detailed information on the structure of control files see chapter Control File

Setup with OpenGeoSys

Here, we explain how to run the complex pyMANGA setup ‘OGS3D_SAZOI_BETTINA’ from our benchmark gallery. More information on our benchmarks can be found here, and a detailed OGS setup can be found here.

This setup uses OpenGeoSys (OGS), which is a scientific open source project for the development of numerical methods for the simulation of thermo-hydro-mechanical-chemical (THMC) processes in porous and fragmented media. To use OGS, you need to download and install it. Again the installation is different for windows and ubuntu.

First applications of pyMANGA with OGS in Ubuntu

On this homepage you will find several variants of OGS version 6.2.2 at the bottom of the page. Select the variant “ogs-6.2.2-Linux-5.3.4-arch1-1-ARCH-x64-python–de-utils “ and download the compressed folder or use this link directly. Please make sure that you download exactly this version of OGS.

Unzip the folder and move the three folders it contains (bin, lib and share) seen from the pyMANGA main level to the following folder:

./TreeModelLib/BelowgroundCompetition/OGS

The files must be located directly in this folder. To check if OGS is executable on your computer, open a terminal in the pyMANGA main level and enter the following:

./TreeModelLib/BelowgroundCompetition/OGS/bin/ogs

If OGS runs correctly, you will get the following output:

PARSE ERROR:
             Required argument missing: project-file

Brief USAGE: 
   ./ogs  [--enable-fpe] [--unbuffered-std-out]
          [--config-warnings-nonfatal] [-l <LOG_LEVEL>] [-o <PATH>] [-r
          <PATH>] [--] [--version] [-h] <PROJECT_FILE>

If this does not work, first check if you have installed the Python module “vtk” in version 8.1.2. Please also read the section on installing pyMANGA in Ubuntu. If you encounter insurmountable problems at this point contact us.

Now you can start the next application example by opening a terminal in the pyMANGA main level and entering the following command:

python3 MANGA.py -i Benchmarks/ExampleSetups/OGSExampleSetup/OGS3D_SAZOI_BETTINA.xml
First applications of pyMANGA with OGS in Windows

To use OGS you have to download and install it first. To do so, go to the following website and scroll down until you find version 6.3.0 and download it (see Figure 7 and Figure 8).

Select the file to be downloaded according to your operating system. Then unzip the zip file, copy the bin folder and paste it into the pyMANGA-master folder in the following path (see Figure 9).

pyMANGA-master\TreeModelLib\BelowgroundCompetition\OGS

OGS is now installed. To test if it works properly, open the Bin folder, press shift and the right mouse button and select Open PowerShell window here (see Figure Figure 10).

Copy the path that appears in the PowerShell window and append \OGS and press Enter. The following Figure 11 shows the PowerShell window output when OGS is running smoothly.

Now you can start the next application example by opening the command prompt in the pyMANGA-master folder and starting pyMANGA as usual. Then enter the following command (see Figure 12).

py -3.7 MANGA.py -i \Benchmarks\ExampleSetups\OGSExampleSetup\OGS3D_SAZOI_BETTINA.xml

Note: The computing time can take several hours. You can reduce this by opening

.\Benchmarks\ExampleSetups\OGSExampleSetup\OGS3D_SAZOI_BETTINA.xml

and changing the line 22 to

<delta_t_ogs> 604800 </delta_t_ogs>

This is the time step length, which indicates how long the groundwater flow model calculates before the rest of the BETTINA time step is extrapolated, given in seconds.

From the results the pore-water distribution is extrapolated under steady state assumptions. Consequently, this parameter has to be used very carefully but is a means to significantly reduce computing time (see Figure 13).