{"id":22139959,"url":"https://github.com/frank1010111/pywaterflood","last_synced_at":"2025-07-25T22:32:42.961Z","repository":{"id":37050352,"uuid":"234408267","full_name":"frank1010111/pywaterflood","owner":"frank1010111","description":"Capacitance resistance models for waterflood connectivity","archived":false,"fork":false,"pushed_at":"2024-03-21T01:49:05.000Z","size":1769,"stargazers_count":38,"open_issues_count":8,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-18T11:28:08.549Z","etag":null,"topics":["petroleum-engineering","python","reservoir","rust"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frank1010111.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-16T20:44:07.000Z","updated_at":"2024-05-16T22:27:41.061Z","dependencies_parsed_at":"2023-10-02T21:18:29.823Z","dependency_job_id":"9fd78090-9ece-4f10-afcb-1282ca3d4034","html_url":"https://github.com/frank1010111/pywaterflood","commit_stats":{"total_commits":363,"total_committers":4,"mean_commits":90.75,"dds":"0.18181818181818177","last_synced_commit":"c43d0f272e6cad6441ed797da6b3a51aa327c60b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frank1010111%2Fpywaterflood","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frank1010111%2Fpywaterflood/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frank1010111%2Fpywaterflood/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frank1010111%2Fpywaterflood/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frank1010111","download_url":"https://codeload.github.com/frank1010111/pywaterflood/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227622512,"owners_count":17795153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["petroleum-engineering","python","reservoir","rust"],"created_at":"2024-12-01T20:20:56.209Z","updated_at":"2024-12-01T20:20:56.882Z","avatar_url":"https://github.com/frank1010111.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `pywaterflood`: Waterflood Connectivity Analysis\n\n[![PyPI version](https://badge.fury.io/py/pywaterflood.svg)](https://badge.fury.io/py/pywaterflood)\n[![Conda](https://img.shields.io/conda/v/conda-forge/pywaterflood)](https://anaconda.org/conda-forge/pywaterflood)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pywaterflood)](https://pypi.org/project/pywaterflood/)\n\n[![Documentation Status](https://readthedocs.org/projects/pywaterflood/badge/?version=latest)](https://pywaterflood.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://zenodo.org/badge/234408267.svg)](https://zenodo.org/badge/latestdoi/234408267)\n[![status](https://joss.theoj.org/papers/2fdffa96e936553d289e622e5e12388c/status.svg)](https://joss.theoj.org/papers/2fdffa96e936553d289e622e5e12388c)\n\n[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)\n[![codecov](https://codecov.io/gh/frank1010111/pywaterflood/branch/master/graph/badge.svg?token=3XRGLKO7T8)](https://codecov.io/gh/frank1010111/pywaterflood)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n\n`pywaterflood` provides tools for capacitance resistance modeling, a\nphysics-inspired model for estimating well connectivity between injectors and\nproducers or producers and other producers. It is useful for analyzing and\noptimizing waterfloods, CO\u003csub\u003e2\u003c/sub\u003e floods, and geothermal projects.\n\n## Overview\n\nA literature review has been written by Holanda, Gildin, Jensen, Lake and Kabir,\nentitled \"A State-of-the-Art Literature Review on Capacitance Resistance Models\nfor Reservoir Characterization and Performance Forecasting.\"\n[They](https://doi.org/10.3390/en11123368) describe CRM as the following:\n\n\u003e The Capacitance Resistance Model (CRM) is a fast way for modeling and\n\u003e simulating gas and waterflooding recovery processes, making it a useful tool\n\u003e for improving flood management in real-time. CRM is an input-output and\n\u003e material balance-based model, and requires only injection and production\n\u003e history, which are the most readily available data gathered throughout the\n\u003e production life of a reservoir.\n\nThere are several CRM versions (see Holanda et al., 2018). Through passing\ndifferent parameters when creating the CRM instance, you can choose between\nCRMIP, where a unique time constant is used for each injector-producer pair, and\nCRMP, where a unique time constant is used for each producer. CRMIP is more\nreliable given sufficient data. With CRMP, you can reduce the number of\nunknowns, which is useful if available production data is limited.\n\n## Getting started\n\nYou can install this package from PyPI with the line\n\n```\npip install pywaterflood\n```\n\nOr from conda/mamba with\n\n```\nconda install -c conda-forge pywaterflood\n```\n\nThen, [read the docs](https://pywaterflood.readthedocs.io/) to learn more. If you\nwant to try it out online before installing it on your computer, you can run\n[this google colab notebook](https://colab.research.google.com/github/frank1010111/pywaterflood/blob/master/docs/user-guide/7-minutes-to-pywaterflood.ipynb).\n\n### A simple example\n\n    import numpy as np\n    import pandas as pd\n    from pywaterflood import CRM\n\n    gh_url = \"https://raw.githubusercontent.com/frank1010111/pywaterflood/master/testing/data/\"\n    prod = pd.read_csv(gh_url + 'production.csv', header=None).values\n    inj = pd.read_csv(gh_url + \"injection.csv\", header=None).values\n    time = pd.read_csv(gh_url + \"time.csv\", header=None).values[:,0]\n\n    crm = CRM(tau_selection='per-pair', constraints='up-to one')\n    crm.fit(prod, inj, time)\n    q_hat = crm.predict()\n    residuals = crm.residual()\n\n    print(\"MAE by well:\", np.round(np.abs(residuals).mean(axis=0), 2), \"barrels\")\n    print(\"MAPE by well:\", np.round(np.mean(np.abs(residuals) / prod * 100, axis=0), 2), \"percent\")\n    print(\"RMSE by well:\", np.round(np.sqrt(np.sum(residuals**2, axis=0)), 2))\n\n## Contributing\n\nContributions are extremely welcome! Have [an issue to report](https://github.com/frank1010111/bluebonnet/issues/new)?\nWant to offer new features or documentation? Check out the [contribution guide](https://github.com/frank1010111/pywaterflood/blob/master/CONTRIBUTING.md)\nto help you set up. Discussions could start anytime at\n[the discussions section](https://github.com/frank1010111/pywaterflood/discussions).\n\n`pywaterflood` uses Rust for computation and python as the high level interface.\nLuckily, [maturin](https://www.maturin.rs/) is a very convenient tool for working\nwith mixed Python-Rust projects.\n\nRunning tests, building the package, linting to conform to code standards, and building the documentation are all handled by [nox](https://nox.thea.codes).\n\n### Running tests\n\nThe [guide for getting started](https://github.com/frank1010111/pywaterflood/blob/master/CONTRIBUTING.md#get-started), has instructions for installing rust, python, and nox. At that point, both the lint and unit test sessions are run with the command\n\n```\nnox\n```\n\n## License\n\nThis software library is released under a BSD 2-Clause License.\n\n## Acknowledgments\n\nCapacitance resistance modeling would not have caught on without the persistence\nof two professors: Larry Lake and Jerry Jensen. Both of these gentlemen generously\nhelped answer questions in the development of this library. Research funding for\nthis project came from the Department of Energy grant \"Optimizing Sweep based on\nGeochemical and Reservoir Characterization of the Residual Oil Zone of Hess Seminole\nUnit\" (PI: Ian Duncan) and the State of Texas Advanced Resource Recovery program\n(PI: William Ambrose). Further development is supported by Penn State faculty\npromotion funds and volunteer time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrank1010111%2Fpywaterflood","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrank1010111%2Fpywaterflood","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrank1010111%2Fpywaterflood/lists"}