Fully implicit solvers based on automatic differentiation
MRST offers capabilities for industry-standard reservoir simulation using fully-implicit discretizations, CPR-type preconditioners in combination with multigrid linear solvers, automated time-step selection, ECLIPSE type input decks, simple computation of adjoints and sensitivities, etc. Since the simulators are based on automatic differentiation, they are simple to extend with new constitutive relationships, extra conservation equations, new functional dependencies, etc



Fully implicit SPE1

Solving the SPE1 case using a black-oil solver. The results are then validated by comparing to well rates from a commerical simulator.



Gravity segregation

Example demonstrating how to set up and simulate a simple two-phase gravity segregation simulator, including definition of grid and fluid models.



Simulator workflow example

This example aims to show the complete workflow for creating, running and analyzing a simulation model. Unlike the other examples, we will create all features of the model manually to get a self-contained script without any input files required.



Fully implicit SPE9

The SPE9 model is a black-oil problem with a large number of producers that change controls based on the reservoir dynamics. We go through the model in some detail, and compare output with a commercial simulator.



This module contains a set of fully implicit solvers based on automatic differentiation. This enables quick prototyping of new models for subsurface flow without the need to compute Jacobians by hand in a tedious process. The framework includes a standard three-phase black-oil solver where light and heavy hydrocarbon components can exist in either phase (gas dissolution and oil vaporization) as well as simpler two-phase models.

All the solvers are also capable of calculating analytic derivatives for some objective function using an adjoint formulation.

Verification / Validation

The solvers have been tested extensively in-house, with good match with commercial simulators on both standard benchmarks and real field data from partners. For a full worked example, see the SPE1 example from the tutorial section. The figures below show validation studies for the SPE9 benchmark case and the Voador field from Brazil. For SPE9, the only difference from the baseline case is defaulted reference depth for the wells, as they are set to very high values in the input file. All wells are controlled dynamically based on the limits specified by the schedule. MRST shows excellent match with the commercial simulator in both cases.

Flexible object oriented design

The AD solvers are written in a flexible, object-oriented framework that makes it easy to implement new models, either from the ground up or as extensions of existing functionality. Carefully constructed interfaces makes it easy to implement new linear and non-linear solvers and immediately apply research ideas to commercial grade models.


This module is included with MRST from under the name 'ad-core' (Core functionality for the AD framework).  The blackoil functionality is implemented as a separate 'ad-blackoil' module which builds upon the generic framework from 'ad-core'.

Published November 23, 2016