Abstract
Accurate geological modelling of features such as faults, fractures or erosion requires grids that are flexible with respect to geometry. Such grids generally contain polyhedral cells and complex grid cell connectivities. The grid representation for polyhedral grids in turn affects the efficient implementation of numerical methods for sub-surface flow simulations. Methods based on two-point flux approximations are known not to converge on grids which are not $K$ orthogonal. In recent years, there has been significant research into mixed, multipoint, and mimetic discretisation methods that are all consistent and convergent. Furthermore, so-called multiscale methods have lately received a lot of attention. In this paper we consider a MATLAB implementation of consistent and convergent methods on unstructured, polyhedral grids. The main emphasis is put on flexibility and efficiency with respect to different grid formats, and in particular hierarchical grids used in multiscale methods. Moreover, we discuss how generic implementations of various popular methods for pressure and transport ease the study and development of advanced techniques such as multiscale methods, flow-based gridding, adjoint sensitivity analysis, and applications such as optimal control or well placement. (..)