knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of rNodal is to provide nodal analysis for oil and gas wells.
You can install rNodal from github with:
# install.packages("devtools") devtools::install_github("f0nzie/rNodal")
This is a basic example which shows you how to solve a common problem:
## basic example code
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) z.DranchukAbuKassem(pres.pr = 4.5, temp.pr = 1.4) z.BeggsBrill(pres.pr = 4.5, temp.pr = 1.4) z.Ann10(pres.pr = 4.5, temp.pr = 1.4) z.Papp(pres.pr = 4.5, temp.pr = 1.4)
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.
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.
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)
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))
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.
knitr::include_graphics("man/figures/README-results_df.jpg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.