# Gas Inflow Overbalanced

#### Alfonso R. Reyes

#### 2019-01-13

This vignette show the search of papers that are about gas influx in an overbalanced well where a long section of exposed shale was shut in for many hours. While gas influx was not expected because the well was in an overbalanced condition while shut in, the gas influx may have been caused by a desorption mechanism. To explain the flow, a differential equation was written using a concentration gradient, not pressure gradient.

    library(petro.One)

    major <- c("gas influx")
    minor <- c("overbalanced", "shut in")
    lesser <- c("shale", "drilling")
    more <- c("gas diffusion", "concentration gradient")

    paper_results <- run_papers_search(major, minor, lesser, more,
                                       get_papers = TRUE,       # return with papers
                                       verbose = FALSE,         # show progress
                                       len_keywords = 4,        # naming the data file
                                       allow_duplicates = FALSE) # by paper title and id
    #>
    #> NULL

    (papers <- paper_results$papers)
    #> # A tibble: 15 x 7
    #>    book_title      paper_id  dc_type  authors       year source keyword
    #>    <fct>           <fct>     <fct>    <chr>        <int> <fct>  <chr>
    #>  1 Dynamic Modeli~ SPE-1679~ confere~ Gruber, Cla~  2014 SPE    'gas+influ~
    #>  2 An Attempt to ~ SPE-1763~ confere~ Adachi, Y.,~  2015 SPE    'gas+influ~
    #>  3 Improving the ~ SPE-1902~ confere~ Konopczynsk~  2018 SPE    'gas+influ~
    #>  4 The Nature of ~ SPE-1858~ confere~ Green, Just~  2017 SPE    'gas+influ~
    #>  5 HPHT Drilling—~ SPE-1199~ confere~ Junior, Rub~  2009 SPE    'gas+influ~
    #>  6 Impact of Dril~ SPE-1772~ confere~ Elshehabi, ~  2015 SPE    'gas+influ~
    #>  7 An Integrated ~ OTC-2288~ confere~ Shrivastav,~  2012 OTC    'gas+influ~
    #>  8 HPHT Well Cont~ OTC-1532~ confere~ Rommetveit,~  2003 OTC    'gas+influ~
    #>  9 Transient Full~ OTC-2834~ confere~ Sun, Xiaohu~  2018 OTC    'gas+influ~
    #> 10 Flow Visualiza~ PETSOC-2~ confere~ Romero-Zero~  2002 PETSOC 'gas+influ~
    #> 11 Gas Diffusion ~ SPE-7747~ confere~ Bradley, Ni~  2002 SPE    'gas+influ~
    #> 12 Life Without B~ SPE-1455~ confere~ Downs, John~  2011 SPE    'gas+influ~
    #> 13 Kick Detection~ SPE-1800~ confere~ Linga, Hara~  2016 SPE    'gas+influ~
    #> 14 A Semianalytic~ SPE-1817~ journal~ Yang, Ruiyu~  2017 SPE    'gas+influ~
    #> 15 Permeable Tar ~ SPE-1632~ confere~ Mishra, Vin~  2012 SPE    'gas+influ~

## Providing the author or company

Now, we want to reduce the number of papers that might be authored by BP.

    library(petro.One)

    major <- c("gas influx")
    minor <- c("overbalanced", "shut in", "shut-in")
    lesser <- c("shale", "drilling", "logging")
    more <- c("desorption", "concentration gradient")
    author <- c("British Petroleum", "BP")

    paper_results <- run_papers_search(major, minor, lesser, more, author,
                                       get_papers = TRUE,       # return with papers
                                       verbose = FALSE,         # show progress
                                       len_keywords = 4,        # naming the data file
                                       allow_duplicates = FALSE) # by paper title and id
    #>
    #> NULL

    (papers <- paper_results$papers)
    #> data frame with 0 columns and 0 rows

    # returns "no non-missing arguments to max; returning -Inf"

    # library(xlsx)
    # write.xlsx2(papers <- paper_results$papers, file = "gas_influx_gas_difusion.xlsx")