Skip to main content

Physics-inspired waterflood performance modeling

Project description

pywaterflood: Waterflood Connectivity Analysis

PyPI version Conda PyPI - Downloads

Documentation Status DOI status

License codecov pre-commit

pywaterflood provides tools for capacitance resistance modeling, a physics-inspired model for estimating well connectivity between injectors and producers or producers and other producers. It is useful for analyzing and optimizing waterfloods, CO2 floods, and geothermal projects.

Overview

A literature review has been written by Holanda, Gildin, Jensen, Lake and Kabir, entitled "A State-of-the-Art Literature Review on Capacitance Resistance Models for Reservoir Characterization and Performance Forecasting." They describe CRM as the following:

The Capacitance Resistance Model (CRM) is a fast way for modeling and simulating gas and waterflooding recovery processes, making it a useful tool for improving flood management in real-time. CRM is an input-output and material balance-based model, and requires only injection and production history, which are the most readily available data gathered throughout the production life of a reservoir.

There are several CRM versions (see Holanda et al., 2018). Through passing different parameters when creating the CRM instance, you can choose between CRMIP, where a unique time constant is used for each injector-producer pair, and CRMP, where a unique time constant is used for each producer. CRMIP is more reliable given sufficient data. With CRMP, you can reduce the number of unknowns, which is useful if available production data is limited.

Getting started

You can install this package from PyPI with the line

pip install pywaterflood

Or from conda/mamba with

conda install -c conda-forge pywaterflood

Then, read the docs to learn more. If you want to try it out online before installing it on your computer, you can run this google colab notebook.

A simple example

import numpy as np
import pandas as pd
from pywaterflood import CRM

gh_url = "https://raw.githubusercontent.com/frank1010111/pywaterflood/master/testing/data/"
prod = pd.read_csv(gh_url + 'production.csv', header=None).values
inj = pd.read_csv(gh_url + "injection.csv", header=None).values
time = pd.read_csv(gh_url + "time.csv", header=None).values[:,0]

crm = CRM(tau_selection='per-pair', constraints='up-to one')
crm.fit(prod, inj, time)
q_hat = crm.predict()
residuals = crm.residual()

print("MAE by well:", np.round(np.abs(residuals).mean(axis=0), 2), "barrels")
print("MAPE by well:", np.round(np.mean(np.abs(residuals) / prod * 100, axis=0), 2), "percent")
print("RMSE by well:", np.round(np.sqrt(np.sum(residuals**2, axis=0)), 2))

Contributing

Contributions are extremely welcome! Have an issue to report? Want to offer new features or documentation? Check out the contribution guide to help you set up. Discussions could start anytime at the discussions section.

pywaterflood uses Rust for computation and python as the high level interface. Luckily, maturin is a very convenient tool for working with mixed Python-Rust projects.

Running tests, building the package, linting to conform to code standards, and building the documentation are all handled by nox.

Running tests

The guide for getting started, has instructions for installing rust, python, and nox. At that point, both the lint and unit test sessions are run with the command

nox

License

This software library is released under a BSD 2-Clause License.

Acknowledgments

Capacitance resistance modeling would not have caught on without the persistence of two professors: Larry Lake and Jerry Jensen. Both of these gentlemen generously helped answer questions in the development of this library. Research funding for this project came from the Department of Energy grant "Optimizing Sweep based on Geochemical and Reservoir Characterization of the Residual Oil Zone of Hess Seminole Unit" (PI: Ian Duncan) and the State of Texas Advanced Resource Recovery program (PI: William Ambrose). Further development is supported by Penn State faculty promotion funds and volunteer time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywaterflood-0.3.3.tar.gz (973.4 kB view details)

Uploaded Source

Built Distributions

pywaterflood-0.3.3-pp310-pypy310_pp73-win_amd64.whl (157.8 kB view details)

Uploaded PyPy Windows x86-64

pywaterflood-0.3.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pywaterflood-0.3.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

pywaterflood-0.3.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl (261.8 kB view details)

Uploaded PyPy macOS 11.0+ ARM64

pywaterflood-0.3.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl (274.2 kB view details)

Uploaded PyPy macOS 10.12+ x86-64

pywaterflood-0.3.3-pp39-pypy39_pp73-win_amd64.whl (157.8 kB view details)

Uploaded PyPy Windows x86-64

pywaterflood-0.3.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pywaterflood-0.3.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

pywaterflood-0.3.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl (261.8 kB view details)

Uploaded PyPy macOS 11.0+ ARM64

pywaterflood-0.3.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl (274.2 kB view details)

Uploaded PyPy macOS 10.12+ x86-64

pywaterflood-0.3.3-pp38-pypy38_pp73-win_amd64.whl (157.6 kB view details)

Uploaded PyPy Windows x86-64

pywaterflood-0.3.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pywaterflood-0.3.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

pywaterflood-0.3.3-pp38-pypy38_pp73-macosx_11_0_arm64.whl (261.9 kB view details)

Uploaded PyPy macOS 11.0+ ARM64

pywaterflood-0.3.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl (274.2 kB view details)

Uploaded PyPy macOS 10.12+ x86-64

pywaterflood-0.3.3-cp37-abi3-win_amd64.whl (157.2 kB view details)

Uploaded CPython 3.7+ Windows x86-64

pywaterflood-0.3.3-cp37-abi3-win32.whl (150.9 kB view details)

Uploaded CPython 3.7+ Windows x86

pywaterflood-0.3.3-cp37-abi3-musllinux_1_1_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.1+ x86-64

pywaterflood-0.3.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

pywaterflood-0.3.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

pywaterflood-0.3.3-cp37-abi3-macosx_11_0_arm64.whl (261.5 kB view details)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

pywaterflood-0.3.3-cp37-abi3-macosx_10_12_x86_64.whl (273.5 kB view details)

Uploaded CPython 3.7+ macOS 10.12+ x86-64

File details

Details for the file pywaterflood-0.3.3.tar.gz.

File metadata

  • Download URL: pywaterflood-0.3.3.tar.gz
  • Upload date:
  • Size: 973.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pywaterflood-0.3.3.tar.gz
Algorithm Hash digest
SHA256 735806182c55708c53f4988b12d5b41296eb3ded2a2dc23ba1d45ca573afb22e
MD5 9054099e91ab3ffbf8332b3e284fbf7a
BLAKE2b-256 206c70e17becc406aa1a56a80875fc92532f66908624f73aeb6b9894e9b95867

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 5b50179b92ced1e8a743cb2b281ef6bf02d92cf92448fcea133674a4d12e5ca3
MD5 e78fe83c7e55839801214100f3daf3b6
BLAKE2b-256 90ddb981fb356362446e1fe9ad22d5308ca2ad6099049e7ce8e2a5a5ae3453d1

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc5d88b99543e2e7eb09438fb99f1e5fe7762e79256c94db0cc4551741df95dc
MD5 0ec2516659bbdd51d44c6759c2ebb1fa
BLAKE2b-256 3f9c02cf9fb9ece7619d900f61f59523b70216e22686bf0c637eefa37f627059

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a874353b9a2727bc4cf0d0dad3053e0c29d25fa6c4106feae2c4b922fd0e5d4e
MD5 febacb49d25fc6a36787cd8b200e401f
BLAKE2b-256 35fd31ac74620af3300ad5a8a30ddae1fcbab415d1eac5bacd0db6d084502cdb

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ab1f8b93ca3b616177be7fbe24e5f8200cfe440250b019dbf46e71a333bf569d
MD5 9f97e16897706b71e6d291f17d9da718
BLAKE2b-256 1d76a7722dee9257b5cd7342b75d884daf8a365979c844a21011e10d00e2a2cd

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 37d636679da9dcaba461bcccc3c71ae93b3f70c056841ccb0ca87003d6feaeb0
MD5 0cd8d234dce8674ca704a559669b7820
BLAKE2b-256 f2eac8d4ce8cd32e9ec8e1be1cd17d1e6fbc3add53f2f568d3a5708529aee3ab

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 f00a206a2f34935ad66d98a3686ae75e29bba367347f4f45f003e65779f31b12
MD5 f895e3b8ec069350898429e9c57d9d26
BLAKE2b-256 b0ba3f82ee311004adfd8c21d0000828a48c60dc55810be0a108a3332c570b3d

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19b4d9dd22ca11f63aed463c980861d7ba824fa0b512b5c9472771f6f43d12a8
MD5 2748cad84839f382e15d7d9e1f9b55b4
BLAKE2b-256 361d769eaf0f11a5b484628036b983f548d03292b2af8c646e8d4cc3b6175993

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bbc0be8d42db0530b82e52ffffaff420916658288c6b63ae9466f2b99a23673d
MD5 31f6f90e1bd2ff219cbed30415e49ce1
BLAKE2b-256 c096d0b1e2a8e1a6a9bc7a993b12732d179acfeab43832046cf2735fb5f598cd

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f27d42dc6bac8f29c53301cef82eae95b17b668bc62326d26590ea89e47c3fdf
MD5 59e99166da98d2e172de3c671ed955d3
BLAKE2b-256 db7b858a478b2227eea2395d1d910f604b9bb5ebb0189061f1ea9843c5a7ec18

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4f5bf32eefa319bb8f07abc3cc0149607201e2a00c9848bd2d9f1e664b5f4cba
MD5 1a8b059a662598692a5fbb09e3109068
BLAKE2b-256 a712ddb24045000c5917afd8e563c26df9c282de8f863047cddce8eebb42c516

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 8963ee613d1f67342f84c74691926886d86a0e91600535d51cd3dd9d107aa805
MD5 2261c31813ab8c7ead191487b6468d4b
BLAKE2b-256 a87f0f7c5fd4def698864d5df1e7a11684b0183ae6bab28d6b2baad1d800a9ce

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7130e384dd3f87bb0c1815e1b0d256ba23a306eba3ef04c886aea07e999e81e
MD5 1e13e6040148c753e60669b1b07fe47d
BLAKE2b-256 7727cf668d780799c3bced3d45db90330c4fc2e96688c5dca4d5e9b4bce8cb82

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b01be0ff971e71f9035667afb40d54350f075f2c4acdd11694e271ed109223d1
MD5 360d913c24d52d46c7f4ad1d8009f08b
BLAKE2b-256 006935e43cddabff160eb47124807cd81642017e39ca3ea23530632cedbaa6e5

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp38-pypy38_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp38-pypy38_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 85cf7b997c3704d486cecfa28558f329bcb2c5cd9d602402b11f45d2ecb035f2
MD5 99efc78a0f365cce6a5bb2b45a85e197
BLAKE2b-256 fac2d5cff3d14f9a52ae7e7da76903b0706da408daa8cbe057ae7b7f98740152

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 69e3fd951cbef12f512168f8a77f1ab5082e3142e9112ae9840e08b112775bed
MD5 006784f4d6a8347307b9371b9dae3dc1
BLAKE2b-256 c93724f4d0612245402db1b7818a9d0a2c688ac5ee85a7cfd9f1013de599ef8b

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c708fd5d725f74f25437560f673e153e75c7d35a7d1c888fb68c15bc59724052
MD5 5272202b8cbd7e6667fcbfd52721e242
BLAKE2b-256 d92e9e4935d9e15c3733077f71364016ee9082c457d18cfa9410883cd10277f2

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-win32.whl.

File metadata

  • Download URL: pywaterflood-0.3.3-cp37-abi3-win32.whl
  • Upload date:
  • Size: 150.9 kB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 f02bf2c1aaf6e7ae2612c881bdcc396579769b30ace55c4dcf93feeb38644459
MD5 a9065d450e4275ca1034404769386997
BLAKE2b-256 4cf7dc7bbbbdaf4c4c8025c2e53043f8c40e2650475bc7ba8ccc01da3759bfc9

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 59311a62b1fb19184e95c65b5552816f00553ca351088b528a9e8d61371aa33b
MD5 c1d12804cab6e7567dab5de0a9a52158
BLAKE2b-256 1f13ea9fd9658cb34dcf43b01d3b002ca3dda1115f6291dafb2241dfda8f52c2

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 daf6bfd6bc07fe59a8d90de746c617924ca3bff1a82b86276f81f368d85ea3de
MD5 27c5189849c9018182f526793ea67d57
BLAKE2b-256 ca640b5a26a898386611f553f805b425b6428825fd920f90dc3da4db5b7fcb48

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b771d4ae89365189da378f8b9eff0b3c3d780c9c05da480ec3edd787f56aac15
MD5 5a35f5262d5d02299f052cbd150f599a
BLAKE2b-256 241ad1d4f7a3768c79a2175a3827e1936463b06ac1bccaaa6dfab808a98d6e1e

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6aceb5828c9293488384c63ee62fd62f4c49a95c11959b5746f9562b64fccf66
MD5 696bca08fb665b2e35f685fb63bdcb2b
BLAKE2b-256 df3be70dfd6212b5f70b311b1e56e90f9abe1c4adf8638e1b7c4482a8b3849ea

See more details on using hashes here.

File details

Details for the file pywaterflood-0.3.3-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pywaterflood-0.3.3-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 be3e1450fcb4ce48c8e91c8703cc529893fab1103f591c1de2d2c826b910f611
MD5 99fc65b968ed161c45143a0423723c19
BLAKE2b-256 65ac7e864ba11036bdc0da393e2e108005fdf84d4fe7276fbd6ad5a09fd34d39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page