Code Monkey home page Code Monkey logo

python_automated_dca's Introduction

Python Automatic Decline Curve Analysis (DCA) For Petroleum Producing wells

Table of Contents

  1. About the Project
  2. Workflow
  3. Dependencies
  4. References

About The Project

Decline Curve Analysis (DCA) is a widely accepted method for analyzing declining production rates and forecasting future performance of oil and gas wells. [1] For oil fields with hundreds or even thousands of wells updating the production forecast for each well based on DCA could be very time consuimg. Here's why:

  1. Typically curve fitting to estimate the decline rate and initial rate is done graphically which could be very time consuming, and
  2. Over the life of a conventional oil producing well, decline rates may change over time with changes in operating conditions, e.g. start of water injection, aritifical lift methodlogy or effciency changes, etc. Thus the history of the well could be divided into different distinct regions and DCA parameters should only be estimated based on the last stable producing conditions rather than average fitting of all the historical performance.

Workflow

  1. Connect to production database to read well data (Python File here)
  2. Use R to detect change points assuming a piecewise linear trend using EnvCpt Package[2] as shown in example below (R File here) alt text
  3. Finally an integrated Python file (Final Python File here) is used to a) Load Well Data b) detect change points using R via Rpy2 c) fit exponential or Hyperbolic decline based on user input on the last stable period d) Forecast production rate. Note forecast is limited by user minimum rate and forecast period. alt_text

NOTE A compiled Python Script integrates all previous steps and loops through all the wells in the database and exports the total field/company forecast. (Compiled Python File here)

Dependencies

Python Packages <- sqlalchemy, scipy, matplotlib, pandas, numpy, json, rpy2
R Packages <- EnvCpt


References

[1] https://petrowiki.spe.org/Production_forecasting_decline_curve_analysis#:~:text=Decline%20curve%20analysis%20(DCA)%20is,fluids%2C%20are%20usually%20the%20cause.
[2] https://rdrr.io/cran/EnvCpt/man/envcpt.html

python_automated_dca's People

Contributors

yous3ry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.