PressureDrop.jl

PressureDrop.jl: Pressure traverses and gas lift analysis for oil & gas wells - Published in JOSS (2019)

https://github.com/jnoynaert/pressuredrop.jl

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords from Contributors

standardization

Scientific Fields

Engineering Computer Science - 60% confidence
Sociology Social Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Package for computing pressure profiles for gas lift optimization of oil & gas wells.

Basic Info
  • Host: GitHub
  • Owner: jnoynaert
  • License: apache-2.0
  • Language: Julia
  • Default Branch: master
  • Size: 1.42 MB
Statistics
  • Stars: 24
  • Watchers: 2
  • Forks: 6
  • Open Issues: 1
  • Releases: 9
Created almost 7 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License

README.md

PressureDrop.jl

Build Status Docs DOI

Julia package for computing multiphase pressure profiles for gas lifted oil & gas wells, developed as an open-source alternative to feature subsets of commercial nodal analysis or RTA software such as Prosper, Pipesim, or IHS Harmony (some comparisons here).

Currently calculates outlet-referenced models for producing wells using non-coupled temperature gradients.

In addition to being open-source, PressureDrop.jl has several advantages over closed-source applications for its intended use cases: - Programmatic and scriptable use with native code--no binaries consuming configuration files or awkward keyword specifications - Dynamic recalculation of injection points and temperature profiles through time - Easy duplication and modification of models and scenarios - Extensible PVT or pressure correlation options by adding functions in Julia code (or C, Python, or R) - Utilization of Julia's interoperability with other languages for adding or importing new functions for model components

Changelog here.

Installation

From the Julia prompt: press ], then type add PressureDrop.

Alternatively, in Jupyter: execute a cell containing using Pkg; Pkg.add("PressureDrop").

Usage

Models are constructed from well objects, optional valve objects, and parameter specifications. Well and valve objects can be constructed manually or from files (see here for an example well input file and here for an example valve file).

Note that all inputs and calculations are in U.S. field units:

```julia julia> using PressureDrop

julia> examplewell = readsurvey(path = PressureDrop.examplesurveyfile, id = 2.441, maxdepth = 6500)

Wellbore with 67 points. Ends at 6459.0' MD / 6405.05' TVD. Max inclination 13.4°. Average ID 2.441 in.

julia> examplevalves = readvalves(path = PressureDrop.examplevalvefile)

Valve design with 4 valves and bottom valve at 3395.0' MD.

julia> model = WellModel(wellbore = examplewell, roughness = 0.00065, valves = examplevalves, pressurecorrelation = BeggsAndBrill, WHP = 200, #wellhead pressure, psig CHP = 1050, #casing pressure, psig dpest = 25, #estimated ΔP by segment. Not critical temperaturemethod = "Shiu", #temperatures can be calculated or provided directly as a array BHT = 160, geothermalgradient = 0.9, #°F, °F/100' qo = 100, qw = 500, #bpd GLR = 2500, naturalGLR = 400, #scf/bbl APIoil = 35, sgwater = 1.05, sg_gas = 0.65); ```

Once a model is specified, developing pressure/temperature traverses or gas lift analysis is simple:

```julia julia> tubingpressures, casingpressures, valvedata = gasliftmodel!(model, findinjectionpoint = true, dp_min = 100) #required minimum ΔP at depth to consider as an operating valve

Flowing bottomhole pressure of 964.4 psig at 6459.0' MD. Average gradient 0.149 psi/ft (MD), 0.151 psi/ft (TVD).

julia> using Gadfly #necessary to make integrated plotting functions available

julia> plotgaslift(model, tubingpressures, casing_pressures, valvedata, "Gas Lift Analysis Plot") #expect a long time to first plot due to precompilation; subsequent calls will be faster ``` example gl plot

Valve tables can be generated from the output of the gas lift model:

```julia julia> valve_table(valvedata)

╭─────┬──────┬──────┬──────┬──────┬───────┬───────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬───────┬───────┬───────╮ │ GLV │ MD │ TVD │ PSO │ PSC │ Port │ R │ PPEF │ PTRO │ TP │ CP │ PVO │ PVC │ Ttd │ Tcd │ Qo │ Q1.5 │ Q_1 │ │ │ ft │ ft │ psig │ psig │ 64ths │ │ % │ psig │ psig │ psig │ psig │ psig │ °F │ °F │ mcf/d │ mcf/d │ mcf/d │ ├─────┼──────┼──────┼──────┼──────┼───────┼───────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┼───────┼───────┤ │ 4 │ 1813 │ 1806 │ 1055 │ 1002 │ 16 │ 0.073 │ 8 │ 1005 │ 384 │ 1100 │ 1104 │ 1052 │ 132 │ 112 │ 1480 │ 1125 │ 888 │ │ 3 │ 2375 │ 2357 │ 1027 │ 979 │ 16 │ 0.073 │ 8 │ 990 │ 446 │ 1115 │ 1092 │ 1045 │ 136 │ 116 │ 1493 │ 1135 │ 896 │ │ 2 │ 2885 │ 2856 │ 999 │ 957 │ 16 │ 0.073 │ 8 │ 975 │ 504 │ 1129 │ 1078 │ 1036 │ 141 │ 119 │ 1506 │ 1144 │ 903 │ │ 1 │ 3395 │ 3355 │ 970 │ 934 │ 16 │ 0.073 │ 8 │ 960 │ 568 │ 1143 │ 1063 │ 1027 │ 145 │ 123 │ 1518 │ 1154 │ 911 │ ╰─────┴──────┴──────┴──────┴──────┴───────┴───────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴───────┴───────┴───────╯ ```

Bulk calculations can also be performed either time by either iterating a model object, or calling pressure traverse functions directly:

```julia function timesteppressure(rate, temp, watercut, GLR) temps = linearwellboretemp(WHT = temp, BHT = 165, wellbore = examplewell)

return traverse_topdown(wellbore = examplewell, roughness = 0.0065, temperatureprofile = temps,
                 pressurecorrelation = BeggsAndBrill, dp_est = 25, error_tolerance = 0.1,
                 q_o = rate * (1 - watercut), q_w = rate * watercut, GLR = GLR,
                 APIoil = 36, sg_water = 1.05, sg_gas = 0.65,
                 WHP = 120)[end]

end

pressures = timesteppressure.(testdata, wellheadtemps, watercuts, GLRs)

plot(x = days, y = pressures, Geom.path, Theme(defaultcolor = "purple"), Guide.xlabel("Time (days)"), Guide.ylabel("Flowing Pressure (psig)"), Scale.ycontinuous(format = :plain, minvalue = 0), Guide.title("FBHP Over Time")) ```

example bulk plot

See the documentation for more usage details.

Supported pressure correlations

  • Beggs and Brill, with the Payne correction factors. Best for inclined pipe.
  • Hagedorn and Brown, with the Griffith and Wallis bubble flow adjustment.
  • Casing (injection) pressure drops using corrected density but neglecting friction.

These methods do not account for oil-water phase slip and assume steady-state conditions.

Performance

The pressure drop calculations converge quickly enough in most cases that special performance considerations do not need to be taken into account during interactive use.

For bulk calculations, note that as always with Julia, the best performance will be achieved by wrapping any calculations in a function, e.g. a main() block, to enable proper type inference by the compiler.

Plotting functions are lazily loaded to avoid the overhead of loading the Gadfly plotting dependency.

Pull requests & bug reports

  • Pull requests are welcome! For additional functionality, especially pressure correlations or PVT functions, please include unit tests.
  • Please add any bug reports or feature requests to the issue tracker. Ideally, include a minimal, reproducible example with any issue reports, along with additional necessary data (e.g. CSV definitions of well surveys).

JOSS Publication

PressureDrop.jl: Pressure traverses and gas lift analysis for oil & gas wells
Published
November 08, 2019
Volume 4, Issue 43, Page 1642
Authors
Jared M. Noynaert ORCID
Alta Mesa Resources
Editor
Olivia Guest ORCID
Tags
petroleum engineering gas lift nodal analysis

GitHub Events

Total
  • Watch event: 3
  • Fork event: 1
Last Year
  • Watch event: 3
  • Fork event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 132
  • Total Committers: 4
  • Avg Commits per committer: 33.0
  • Development Distribution Score (DDS): 0.076
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jared j****t@g****m 122
github-actions[bot] 4****] 8
Anthony DE FARIA d****y@g****m 1
Jared Noynaert j****t@a****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 10
  • Total pull requests: 14
  • Average time to close issues: 22 days
  • Average time to close pull requests: about 15 hours
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 3.0
  • Average comments per pull request: 0.14
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 9
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jnoynaert (8)
  • mancellin (1)
  • JuliaTagBot (1)
Pull Request Authors
  • github-actions[bot] (9)
  • jnoynaert (3)
  • AnthonyDF (2)
Top Labels
Issue Labels
enhancement (2) wontfix (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
juliahub.com: PressureDrop

Package for computing pressure profiles for gas lift optimization of oil & gas wells.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 9.9%
Average: 27.8%
Stargazers count: 29.1%
Forks count: 33.3%
Dependent packages count: 38.9%
Last synced: 4 months ago

Dependencies

.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite