Code Monkey home page Code Monkey logo

rnodal's Introduction

rNodal

The goal of rNodal is to provide nodal analysis for oil and gas wells.

Installation

You can install rNodal from github with:

# install.packages("devtools")
devtools::install_github("f0nzie/rNodal")

Example

This is a basic example which shows you how to solve a common problem:

## basic example code

Using zFactor

zFactor is a R package. Calling from CRAN.

We will use zFactor for gas compressibility calculations.

# use the new library zFactor
library(zFactor)

z.HallYarborough(pres.pr = 4.5, temp.pr = 1.4)
#> [1] 0.7373812
z.DranchukAbuKassem(pres.pr = 4.5, temp.pr = 1.4)
#> [1] 0.7396345
z.BeggsBrill(pres.pr = 4.5, temp.pr = 1.4)
#> [1] 0.7343367
z.Ann10(pres.pr = 4.5, temp.pr = 1.4)
#> [1] 0.736032
z.Papp(pres.pr = 4.5, temp.pr = 1.4)
#> [1] 0.7299354

How rNodal works

Start by looking at the examples in the vignettes. We will use in this example VLP Brown - Example C13.

This is example C.13 in the Kermit Brown book.

Input well data

We enter the well data with the function setWellInput:

input.example.C13 <- setWellInput(field.name = "HAGBR.MOD",
                                    well.name = "Brown_C13", 
                                    depth.wh = 0, depth.bh = 2670, 
                                    diam.in = 1.995, 
                                    GLR = 500, liq.rt = 1000, wcut = 0.6, 
                                    thp = 500, tht = 120, bht = 150, 
                                    API = 22, gas.sg = 0.65, 
                                    wat.sg = 1.07, if.tens = 30)
                                    
                                    

The field name and well name are used for archival purposes.

Enter the parameters of the VLP model

The parameters of the model consist of:

vlp.model: the correlation or mechanistical model

segments: the number of segments to split the well

tol: the tolerance of the delta-P iterations

well.model <- setVLPmodel(vlp.model = "hagbr.mod", 
                           segments = 11, 
                                tol = 0.000001)
                                
                                
                                

Run the model

To run the model is necessary to provide:

well.input: all the well parameters as entered in the first step

well.model: the VLP model as entered in the second step

runVLP(well.input = input.example.C13, well.model))

Results

The results are given in the form of a dataframe where the rows represent the number of segment plus one and the columns are the calculations or variables.

rnodal's People

Contributors

alfonsorreyes avatar f0nzie avatar nynaamme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rnodal's Issues

Liquid s.g. in original Hagedorn and Brown

liq.sg <- (oil.rt * oil.sg + wat.sg * wat.rt) / liq.rt

I've been looking at Hagedorn's paper and couldn't figure out if not correcting for pressure and temperature was part of their original approach. Any insights as to how much this will make an impact on the calculation results?

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.