pycopm: An open-source tool to tailor OPM Flow geological models
David Landa-Marbán
TL;DR
pycopm addresses the need for fast, integrated manipulation of geological models used by OPM Flow by combining coarsening, refinement, submodel extraction, and geometric transformations within a Python-based workflow. It operates on corner-point grids expressed in Eclipse decks, updating the $i$, $j$, and $k$ coordinates and associated properties while preserving transmissibilities and pore volumes. The tool leverages NumPy, pandas, Shapely, and OPM Python bindings, exposes a CLI with 27 flags and a Python API, and supports chaining operations such as refining a model and extracting submodels. Future work includes extending keyword support to additional deck content and enabling generation of a single input deck by merging multiple models, with ongoing emphasis on FAIR documentation and industry adoption.
Abstract
Reservoir simulations help the energy industry make better decisions by predicting how fluids like oil, gas, water, hydrogen, and carbon dioxide will flow underground. To keep these predictions accurate, engineers often need to update geological models quickly as new information becomes available. pycopm is a tool designed to make this process faster and easier. It allows users to adjust geological models in several ways, such as simplifying complex grids, focusing on specific parts of a reservoir, or changing the shape and position of the model. These capabilities help engineers test different scenarios efficiently. Although pycopm was first used on two well-known public datasets, it has since become useful in many other situations because of its easy-to-use features and recent extensions. Today, it supports studies involving model refinement, comparing coarse and detailed models, analyzing interactions between nearby sites, and speeding up troubleshooting in large simulations.
