Applications of Computational Geometry for Automatic Transformation to Unstructured Reservoir Gridding
Authors: Melaih Firas H. , Alturki Ali A. , Al-Harbi Razen M. , Baddourah Majdi A. 
Published: June 2020

Reservoir simulation is becoming a standard practice for oil and gas companies, helping with decision making, reducing reservoir characterization uncertainties, and better manage hydrocarbon resources. The reservoir model sizes can reach multi-billion grid cells, which led Saudi Aramco to develop an in-house massively parallel reservoir simulator, as well as a pre- and post-reservoir simulation environment [Dogru et al. 2002]. Compared to structured grid modeling, unstructured grid modeling and billon cell pre- and post-simulation processing of reservoir simulation provides engineers with advanced modeling capabili- ties to represent complex well geometries and near wellbore modeling. Mapping between structured and unstructured (2.5D) domains is not a straightforward task. The indexing in unstructured grids makes cre- ating property modifiers, do near wellbore modeling, and local grid refinement (LGR) difficult.

We present a developed workflow to automatically transform the modeling of property modifiers, near wellbore modeling and LGR between the structured and unstructured domains. Several Computational Geometry algorithms were developed for efficiency and accuracy, which preprocess the corners of top layer cells into data structures. To map regions of interest (ROIs) between domains, the algorithms find all corner points inside them. The regions are translated using the algorithms and the results are exported in the unstructured format. The two challenges are that the number of corner points is massive, therefore, a brute-force search even for a simple ROI is expensive, and irregular ROIs result in very costly search complexity. We address these by preprocessing the input data in the form of range trees. We also propose a free-shape polygonal search strategy to find all corner points in the ROI.

The range tree algorithm provided a fast and robust workflow to perform the transformation from struc- tured to unstructured gridding domains, while providing ease of use with a visual component, to aid with property transformation, near wellbore modeling and LGR. The algorithm’s performance was measured using the time complexity of the preprocessing time, query time, and the space complexity. The range tree approach is fast compared to the other approaches, requiring only O(log(n)+k) operations, compared to the O(n) of linear search. It takes a costly O(nlog(n)) time to preprocess the data into the range tree, however, that is a one-time cost, as well as requiring O(nlog(n)) space in memory. This work is a major milestone to promote and support the unstructured grid modeling approach for large- and small-scale res- ervoir simulation models. The algorithm will provide engineers with a simplified workflow and smooth transitioning, allowing advanced capabilities to model complex well geometries and near wellbore mod- eling, while preserving complex geological features. In addition, this algorithm provides the building blocks in facilitating the migration and conversion of existing structured simulation models.