Coder Social home page Coder Social logo

proxy-crm's Introduction

Proxy Capacitance Resistance Model (Proxy-CRM)

This repository is highly inspired from pywaterflood and CapacitanceResistanceModel. The main source of this code [1] has written about creating Capacitance Resistance Model (CRM), specifically CRMP (Capacitance Resistance Model-Produer)[3], for shut-in well and well treatments that also consider geological uncertainties. However, this repository will only explore the shut-in nature. CRM itself will predict (history match) the observed liquid/oil production rate, providing rapid calculation for history matching in early stage of reservoir performance analysis.

TLDR: This repository will predict oil/liquid production rate of shut-in period using CRMP.

Shut-in Well Algorithm

The main star of the repository is this indicator function of shut-in mask.

equation

During shut-in period, the indicator function will return value of 1. This will cause the interwell connectivity between the injector-producer well (λ) to be converted into the value of 0. Before getting converted to the value of 0, the interwell connectivity of shut-in producer-x will be summed with the interwell connectivity of the non-shut-in producer-j. This looks like:

equation

There is also another reference that explains the usage of CRMP for shut-in wells [4].

Fractional Flow Model

To calculate the predicted oil production rate, as we will usually predict the liquid production rate, we use a fractional flow model for CRMP[2]:

equation

From the equation, we will obtain the fraction of the oil, which will be multiplied by the predicted liquid production rate.

Data

There are two types of data, the synthetic case data and UNISIM-I data, specifically UNISIM-I-M [5]. The synthetic case data itself is a field with the grid of 20×20×3 and homogeneous permeability. It has 5 injector and 4 producer wells, and is divided into base (no shut-in period), single shut-in well, and two shut-in wells cases.

Simple Guideline

Proxy CRM can now be installed by using (big disclaimer on the still ongoing dependencies management):

pip install proxy-crm

To automatically create a conda environment (due to the aforementioned dependecies problem), you can always use:

conda env create --file requirements.yml

You can first import the module as any names that you like. In this case, we will use pCRM.

import proxy_crm_modules as pCRM

Then, you can address the class proxy_crm as, for example:

base_pcrm = pCRM.proxyCRM()

Then, you can address the data and fitting process as follows. Do note that synthetic case data is divided into 75%-25% train-test.

data_src = "D:/crmProject/crmp_code_test/proxy_crm/data/test/"
oil_prod = pd.read_excel(data_src + 'Base_PROD.xlsx', header=None)
prod = pd.read_excel(data_src + "Base_LIQUID.xlsx", header=None)
inj = pd.read_excel(data_src + "Base_INJ.xlsx", header=None)
time = pd.read_excel(data_src + "TIME.xlsx", header= None)
pressure = pd.read_excel(data_src + "Base_BHP.xlsx", header=None)
wor = pd.read_excel(data_src + "Base_WOR.xlsx", header=None)
cwi = pd.read_excel(data_src + "Base_CWI.xlsx", header=None)

... #train-test splitting

base_pcrm.fit(oil_prod_train, inj_train, press_train, time_train[:,0],num_cores=4, ftol=1e-3)

To-Do List

This project is very much WIP (Work In Progress), so future works will be concentrated on:

  • Fixing issues for fractional flow model
  • Creating connectivity parameter visualization of lambda parameter using networkx and plotly

License

This repository used GPLv3 license.

Citations

[1] Gubanova, A., Orlov, D., Koroteev, D., & Shmidt, S. (2022). Proxy Capacitance-Resistance Modeling for Well Production Forecasts in Case of Well Treatments. SPE Journal, 27(06), 3474–3488. https://doi.org/10.2118/209829-PA

[2] Lake, L.W., Liang, X., Edgar, T.F., Al-yousef, A.A., Sayarpour, M., & Weber, D. (2007). Optimization Of Oil Production Based On A Capacitance Model Of Production And Injection Rates. https://doi.org/10.2118/107713-MS

[3] Sayarpour, M., Zuluaga, E., Kabir, C. S., & Lake, L. W. (2009). The use of capacitance–resistance models for rapid estimation of waterflood performance and optimization. Journal of Petroleum Science and Engineering, 69(3–4), 227–238. https://doi.org/10.1016/j.petrol.2009.09.006

[4] Salehian, M., & Çınar, M. (2019). Reservoir characterization using dynamic capacitance–resistance model with application to shut-in and horizontal wells. Journal of Petroleum Exploration and Production Technology, 9(4), 2811–2830. [https://doi.org/10.1007/s13202-019-0655-4] (https://doi.org/10.1007/s13202-019-0655-4)

[5] Gaspar, A. T., Avansi, G. D., Maschio, C., Santos, A. A., & Schiozer, D. J. (2016). UNISIM-I-M: Benchmark Case Proposal for Oil Reservoir Management Decision-Making. SPE-180848-MS. [https://doi.org/10.2118/180848-MS] (https://doi.org/10.2118/180848-MS)

proxy-crm's People

Contributors

leleony avatar

Stargazers

 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.