Skip to content

Repository files navigation

Banner

Lightweight Python Library for Static Reservoir Modeling

DocumentationInstallationQuick Start

License Python Version Documentation

Introduction

Petres is a lightweight, open-source Python library for corner-point reservoir grid generation, property modeling, and visualization. It provides a fully code-driven workflow for static reservoir modeling.

For complete documentation, see the Petres documentation.

Stability Notice
Petres is currently in early development. The API is not yet stable and may change without notice.

Why Petres?

  • Open Access: Free alternative for engineers and students without access to expensive commercial softwares.

  • Scriptable Modeling: Avoid UI complexity and work with code-driven workflows.

  • Fully Customizable: Integrate your own code alongside built-in methods.

  • AI Integration: Use the Python ecosystem to apply AI and Machine Learning techniques.

Features

  • Grid Generation: Construct Corner-Point, Rectilinear, and Regular grids.
    Apply boundary polygons to deactivate cells outside the target region.

  • Structural Modeling: Generate horizon and zone surfaces from well tops to support grid construction.

  • Property Modeling: Assign petrophysical properties to grid cells using stochastic or deterministic methods, derived attributes, or interpolation from well data.

  • Import & Export Grids: Handle Eclipse grids (SLB reservoir simulator) using the .GRDECL file format. Visualize and export modeled Corner-Point grids.

  • Visualization: Interactive 2D and 3D rendering of Corner-Point grids, structural zones, horizons, and spatial property distributions.

Installation

Full installation instructions are available in the documentation.

Quickstart

Import and visualize a corner-point grid from a .GRDECL file:

from petres.grids import CornerPointGrid

# Define the path to the ".GRDECL" file containing the grid data
path = r"https://raw.githubusercontent.com/jamalbaylit/petres/v0.1.0/data/opm/norne/grdecl/norne_with_props.grdecl"

# Import corner-point grid from a ".GRDECL" file, including specified properties
grid = CornerPointGrid.from_grdecl(
  path, 
  properties=["PORO", "PERMX"]
)

# Visualize grid
grid.show(scalars="depth", z_scale=5)

# Visualize property
grid.show(scalars="PORO", z_scale=5)

Technical Architecture

Component Implementation
Grid Operations High-performance, vectorized array computations using NumPy
2D Plotting Visualization via Matplotlib
3D Visualization Interactive rendering and mesh handling via PyVista
Kriging Interpolation Ordinary and Universal Kriging via PyKrige
RBF Interpolation Multi-dimensional Radial Basis Function interpolation via SciPy
IDW Interpolation In-house implementation of Inverse Distance Weighting

Contributing

Contributions of all sizes are welcome, whether it's fixing bugs, improving documentation, adding new features, or suggesting ideas for future development.

If you'd like to contribute, please read the developer guide to learn about the project structure, development workflow, coding standards, testing, and how to submit a pull request.

Contact

For questions, bug reports, or collaboration opportunities contact via jamalbaylit@gmail.com or connect via LinkedIn.

About

No description, website, or topics provided.

Resources

Stars

22 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages