-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathREADME.Rmd
109 lines (69 loc) · 2.95 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rNodal
The goal of rNodal is to provide nodal analysis for oil and gas wells.
## Installation
You can install rNodal from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("f0nzie/rNodal")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
## basic example code
```
## Using `zFactor`
`zFactor` is a R package. Calling from CRAN.
We will use zFactor for gas compressibility calculations.
```{r}
# 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)
```
## 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.
```{r, out.width = "800px", echo=F}
knitr::include_graphics("man/figures/README-results_df.jpg")
```