Master Thesis - Visualization of subsurface grids in Octave


This page contains some resources for my master thesis - Visualization of subsurface grids in Octave. After a short demonstration video that shows a comparison of some visualization methods in for MRST grids you will find instructions on how to download, install and use the software developed as part of the thesis. The thesis itself can be downloaded here

Demonstration Video

Obtaining the software

The software is developed for Octave 3.6.1 on Unix based systems, and has been tested on Ubuntu 10.04. It requires OpenGL 4.2 and you must have the following header files available on your system: gl.h, glu.h, glew.h, glm.hpp. The software is available as a git patch which can be downloaded here . When the patch is applied my contributions can be found mainly in the files gl-render.h/ (search for the functions draw_patch2 and draw_unstructured_grid), grid.h/grid.cpp and Triangulator.h/Triangulator.cpp. Before applying the git patch you will need the source code for Octave 3.6.1. Download the file octave-3.6.1.tar.gz from this page. Then follow these steps (terminal commands given in bold):

  • Move octave-3.6.1.tar.gz to an empty folder
  • Extract the file, tar xzf octave-3.6.1.tar.gz
  • Initialize a new git repository, git init
  • Add the extracted octave folder to the repository, git add octave-3.6.1
  • Commit the changes, git commit -m "Uncompiled Octave"
  • Move the file new_functionality.patch into the folder.
  • Apply the patch, git am --signoff < new_functionality.patch

  • You are now ready to compile Octave 3.6.1. If you are running Ubuntu you might want to run the command sudo apt-get build-dep octave3.2 to install the necessary Octave dependencies. Then you can navigate into the octave-3.6.1 folder and type
  • ./configure
  • make -j 6
  • make install

  • to compile Octave. The number after -j signals how many jobs you want to run simultaneously. This should reflect the number of processors on your system. The last command will install Octave on your system (default under /usr/local/bin). This is recommended if you want to use the standalone C++ application, as it makes its compilation easier.

    You then need a copy of the Matlab Reservoir Simulation Toolbox. The latest version can be downloaded from the MRST project's homepage. Note that Octave is not fully supported in the current version of MRST (MRST 2011b). This will change in future versions.

    If you want to use the standalone C++ application this must be downloaded separately here. Extract the folder and copy it to the MRST folder. The code in this folder must be compiled before it can by run. This is done by running make .

    Using the new functions

    Before using the new plotting functionality you need two files: init_octave.m and patch.m. These should be copied to the MRST folder. You can then start Octave, navigate to the MRST folder and type init_octave , and you are ready to go.

    You might want to download one of the available data sets so that the software can be used on some real grid models. I suggest the zip-file NPD5:5 layers, from this page.. By extracting the files and placing them in the MRST folder you can run the Johansen visualization tutorial..

    If you have compiled the standalone application it can be used by navigating into the folder standalone and using the command standalone_plot_grid and giving a grid structure as argument. Type help standalone_plot_grid for more information.