MRST is provided as a self-contained archive file (a Unix-style TAR file compressed with GZip). The archive can be extracted from within MATLAB using the untar function. The MRST developers recommend extracting the archive to a subdirectory of your user's home directory. Using untar, this would be a command like
which would create a new directory mrst-2015a in your current working directory. Once MRST has been extracted to some directory, you must navigate MATLAB there, either using the builtin file browser, or by using the cd command,
On Linux/Mac OS,
or on Windows,
Assuming that the files were extracted to the home directory. The startup.m file must then be run to activate MRST,
Alternatively, if do not want to navigate to the MRST root directory, for instance in an automated script, you can call startup directly
To verify that MRST is active, you can run a simple example, for example by writing 'flowSolverTutorial1' (the example is named 'gravityColumn' for versions prior to MRST 2016a). A simple gravity pressure problem should be solved and plotted.
We also have a Jolt tutorial that goes through the process of getting MRST up and running:
The minimal requirement of MRST is MATLAB version 7.4 (R2007a). However, certain modules use features that were not present in R2007a:
Note that the naming convention for MRST simply refers to the time of the release (2016a was released in the first half of 2016, for instance). It does not imply a specific MATLAB version for a specific release, even though the naming conventions for MATLAB is similar to that of MRST.
A related question is also to what extent MRST can be used with Octave. Here, the primary difficulty is the lack of visualization. (The interested user may, however, check out a simple MRST-geared backend developed by Lars Jahr Røine). In addition, Octave does not yet offer the new-style classes (classdef) used in the implementation of automatic differentiation.
There is a preliminary user guide that describes the grid structure, generation of petrophysical properties, various single-phase solvers (two-point, mimetic/MPFA), as well as how to use automatic differentiation to make your own solvers for nonlinear single-phase models. For the remaining parts of MRST, we suggest you use the following sources of information:
MRST is, as the name implies, a toolbox that contains many of the features associated with reservoir simulators such as visualization, solvers, and grid processing/generation, but it is not a stand-alone/black-box simulator. It assumes that the user is comfortable working "under the hood" and knows how to choose the right tools for the right job. It is not meant as a replacement to commercial simulators.
MRST has several different solvers for both pressure and transport problems. Choosing the correct solver depends on the physical effects involved as well as other features in your problem. The table below lists the main solvers used for general flow problems and their features.
In addition to this, there are several specialized solvers such as multiscale solvers for pressure (MsMFEM / MsFVM), vertical equilibrium solvers for CO2 segregation problems, time-of-flight solvers, and so on. The table may indicate which solver is the most applicable for your problem. As a rule of thumb, the sequential splitting solvers support less physical effects than the fully implicit solvers, but they may be easier and faster to use. For most simple problems, we recommend the use of incompTPFA / implicitTransport. For including additional effects, such as three-phase black-oil or polymer injection with more complex well controls, the ad-blackoil module is the best choice. Here, the use of automatic differentiation ensures that the part of a solver that implements the model equations is quite transparent and simple to understand. On the other hand, if you decide to dive deep into the details of the advanced 'ad-fi' solvers, you will probably find that the control logic is more involved since the solvers support more complex effects (well descriptions, in particular). Likewise, additional complexity is added by the preconditioning used to make a solver efficient and the adjoint formulation used to compute sensitivities.
For more specialized solvers and applications we refer to the modules overview page.
Several users have experienced that MATLAB crashes or locks up when MRST plots figures involving transparency or when plotting on multi-monitor setups. This is a known issue with some graphics drivers in MATLAB and has nothing to do with MRST as such. The primary two issues are:
set(0, 'DefaultFigureRenderer', 'OpenGL')
plotCellData(G, 'FaceAlpha', 0.5)
set(0, 'DefaultAxesDrawMode', 'fast')
These two issues make up most of the issues encountered with OpenGL. Because of this, the fixes are specifically incorporated in the function 'setRenderFixes'. If you are having issues, try activating it:
mrstModule add mrst-gui
The defaults can be reset using
For more info on OpenGL and possible workarounds, see Mathworks' own page on the subject. Updating your graphics adapter drivers may also help.
Although we have plots showing for example radial well refinement, MRST does not currently include functions for doing so on general grids. For other types of dynamic coarsening / refinement, see the agglom module.
Published October 15, 2013