## MRST - MATLAB Reservoir Simulation Toolbox

The module consists of a set of modular components that can be combined in different ways coarse grids that adapt to geological features. The routines can also generate flow-adapted coarse grids that are ideal for computing fluid transport. The fundamental characteristic of all algorithms is that coarse blocks are generated by amalgamating cells from the original fine grid, with cell-wise indicator functions guiding the amalgamation directions and the new grid resolution.

## Tutorials

### Nonuniform coarsening

We show the four basic steps of the nonuniform coarsening algorithm, which is an ad hoc approach for creating a coarse grid that distinguishes high-flow and low-flow regions, thereby trying to mimic a streamline-type grid without moving grid points

### Constrained coarsening

We show how constrain the coarse blocks to underlying geological information like facies, rock types, saturation regions, etc. Moreover, we discuss how to avoid creating blocks that are completely confined within another coarse block.

### Different flow indicators

We show the use of different flow indicators to create coarse grids. Two different grids are considered: (i) simple refinement of high-flow regions, (ii) nonuniform coarsening.

We demonstrate how one can make grids that adapt dynamically to an advancing saturation front by first introducing a coarse partitioning and then refining it back to the original resolution or some intermediate resolution near strong saturation fronts.

## Description

 Assumptions: a matching polyhedral grid with n cells c a mapping N(c) between cell c and its nearest neighbours a set of indicator functions I(c), each with a single value in cell c that can be used to locally control the amalgamation process We seek a coarse grid that adapts to flow patterns predicted by the indicator(s) is formed by grouping cells into blocks is described by a partition vector p with n elements, in which element number i assumes the value j if cell number i is part of block j To coarsen the grid, we manipulate a set of partition vectors according to the following coarsening principles: Minimize heterogeneity of flow field inside each grid block, e.g., by minimizing the variance of a flow indicator inside each block Equilibrate indicator values over grid blocks (e.g., so that the volume of the block scales inversely with the magnitude of the local flow). Keep block sizes within prescribed upper and lower bounds. The internal block borders of any a priori partition that is marked as static should be preserved when grouping cells into blocks. The general framework is implemented as a set of algorithmic primitives that create partition vectors (sources) and a set of primitives that manipulate them (filters): Partition - take a grid and an indicator function (or some axuiliary information) as input and compute a partition as output. The partition vector can be constructed based on prescribed topology, on predefined block shapes, or as an segmentation of cells into bins according to a flow indicator. Intersection - take one or more partition vectors as input and produce a new admissible partition vector as output, splitting multiply connected blocks into sets of singly connected cells. Merging - merge blocks that are below a certain size (measured by a volume indicator. Each block is merged with the neighbouring block that has the closest indicator value. Refinement - split blocks in which the accumulated indicator values exceed a prescribed threshold.