Example C44 by Hagendorn-Brown

This notebook runs the modified Hagedorn-Brown correlation calculated according to Brown’s book and procedure in Appendix C. Although the question is not really pointed at finding the bottomhole flowing pressure given the surface conditions and the wellhead pressure but rather calculating the length of the tubing if BHP is known, the calculations here demonstrate that both can be calculated or verified using this algorithm.

The pressures at both ends of the tubing: P1 is 500 psia and P2 1000 psia.

library(rNodal)
library(tibble)

# Example from C.44 in Brown's book
# P2 (pressure at end point is given in the original example). 
# The original question is: what is the length of the tubing.
#
# In our case we aproximately know the length (from the book), so we will try to
# match P2 (known)
#
# Differences with Example C.13:
# GLR, watercut, oil viscosity and API are different in C.44
#
# The final results are very close to those of Brown.


input_example <- setWellInput(field.name = "HAGBR.MOD",
                                 well.name = "Brown_C44", 
                                 depth.wh = 0, depth.bh = 3590, 
                                 diam.in = 1.995, 
                                 GLR = 1000, liq.rt = 600, wcut = 0.0, 
                                 thp = 500, tht = 120, bht = 150, 
                                 API = 42, oil.visc = 1.0, 
                                 gas.sg = 0.65, wat.sg = 1.07, if.tens = 30
                                 )

well_model <- setVLPmodel(vlp.model = "hagbr.mod", segments = 15, tol = 0.00001)


as.tibble(runVLP(well.input = input_example, well_model))
# A tibble: 16 x 45
       i     depth       dL  temp     pres    p_avg t_avg segment   GOR
   <int>     <dbl>    <dbl> <dbl>    <dbl>    <dbl> <dbl>   <dbl> <dbl>
 1     1    0.0000   0.0000   120 500.0000 500.0000   120       0  1000
 2     2  239.3333 239.3333   122 524.5052 512.2526   121       1  1000
 3     3  478.6667 239.3333   124 549.3611 536.9339   123       2  1000
 4     4  718.0000 239.3333   126 574.5716 561.9679   125       3  1000
 5     5  957.3333 239.3333   128 600.1371 587.3559   127       4  1000
 6     6 1196.6667 239.3333   130 626.0597 613.0999   129       5  1000
 7     7 1436.0000 239.3333   132 652.3409 639.2018   131       6  1000
 8     8 1675.3333 239.3333   134 678.9822 665.6630   133       7  1000
 9     9 1914.6667 239.3333   136 705.9847 692.4849   135       8  1000
10    10 2154.0000 239.3333   138 733.3494 719.6685   137       9  1000
11    11 2393.3333 239.3333   140 761.0773 747.2148   139      10  1000
12    12 2632.6667 239.3333   142 789.1689 775.1245   141      11  1000
13    13 2872.0000 239.3333   144 817.6246 803.3981   143      12  1000
14    14 3111.3333 239.3333   146 846.4448 832.0361   145      13  1000
15    15 3350.6667 239.3333   148 875.6296 861.0385   147      14  1000
16    16 3590.0000 239.3333   150 905.1789 890.4056   149      15  1000
# ... with 36 more variables: Rs <dbl>, gas.fvf <dbl>, gas.free <dbl>,
#   liq.dens <dbl>, z <dbl>, gas.dens <dbl>, oil.visc <dbl>,
#   wat.visc <dbl>, mixL.visc <dbl>, oil.fvf <dbl>, wat.fvf <dbl>,
#   liq.svel <dbl>, gas.svel <dbl>, NL <dbl>, CNL <dbl>, NLV <dbl>,
#   NGV <dbl>, A <dbl>, B <dbl>, BA <dbl>, ND <dbl>, X2 <dbl>,
#   HL.psi <dbl>, X2.mod <dbl>, psi <dbl>, HL <dbl>, Re.TP <dbl>,
#   ff <dbl>, mix.dens <dbl>, mixL.volume <dbl>, mixL.dens <dbl>,
#   mixTP.dens <dbl>, mixTP.svel <dbl>, elev.grad <dbl>, fric.grad <dbl>,
#   dp.dz <dbl>
p30 = 906.7220
p30 = 906.7217 (with zFactor)
p30 = 908.1580
p30-9 = 958.1

h5 temp

hdf5 in inst/extdata

    MD      TVD     Pres    Temp  
    0       0       500.0   128.5
    239.3   239.3   528.4   130.4
    478.7   478.7   557.2   132.4
    718.0   718.0   586.2   134.2
    957.3   957.3   615.6   136.1
    1196.7  1196.7  645.2   137.9
    1436.0  1436.0  675.2   139.7
    1675.3  1675.3  705.5   141.4
    1914.7  1914.7  736.0   143.0
    2154.0  2154.0  766.9   144.6
    2393.3  2393.3  798.0   146.0
    2632.7  2632.7  829.4   147.3
    2872.0  2872.0  861.1   148.4
    3111.3  3111.3  893.1   149.2
    3350.7  3350.7  925.5   149.8
    3590.0  3590.0  958.1   150.0