Skip to main content

Open-source Python API for Well Performance and Nodal Analysis built on Schlumberger PIPESIM Toolkit.

Project description

well-analysis

A high-level Python wrapper for well performance & nodal analysis built on top of Schlumberger PIPESIM PTK.
It automates model setup, black-oil characterization, IPR/VLP matching, PT profiling, gas-lift design, and sensitivity studies. It is intended for those who are new to Pipesim and Python.

Requires: PIPESIM Python Toolkit installed. Run your scripts with the same interpreter that ships with PIPESIM (or ensure PTK site-packages are importable).

Features

  • Model setup: Well, Tubing, Casing, Packer, Perforation
  • Black-oil fluid definition
  • IPR Generation (PI or FBHP-based)
  • IPR–VLP Matching
  • Pressure–Temperature Profiling
  • Nodal Analysis
  • Gas-Lift Analysis
  • Sensitivity Analysis (Tubing Head Pressure, Tubing Size, Gas-Lift Rate, Water Cut, Gas Oil Ratio, Reservoir Pressure)
  • Exports: Excel reports & PNG plots

Documentation

The core module (core.py) serves as the main abstraction layer and includes:

  • Full parameter descriptions and expected units
  • Input validation logic
  • Return object structure (DataFrames, plots, reports)
  • Notes on PIPESIM model generation
  • Real-world usage examples

Installation

pip install well-analysis

Example Usage

import pandas as pd
from well_analysis import WELL_ANALYSIS

# Step 1: Initialize the well model
well1 = WELL_ANALYSIS(
    well_name="well1",
    tubing_dia=2.99,
    perforation_depth=2800,
    well_trajectory=pd.DataFrame({
        "MeasuredDepth": [0, 1100, 2200, 3200],
        "TrueVerticalDepth": [0, 1000, 2000, 2800]
    })
)

# Step 2: (Optional) Add gas lift configuration
well1.add_gas_lift(gl_depth=500, gl_rate=5000)

# Step 3: Add black-oil fluid properties
well1.add_black_oil(q_gas=90000, q_oil=5, q_water=5, api=30, gg=0.7, gas_well=True)

# Step 4: Create IPR curve
well1.create_ipr(reservoir_temperature=130, reservoir_pressure=95, liquid_pi=0.5)

# Step 5: Perform IPR–VLP matching
well1.ipr_vlp_matching(thp=30, fbhp=52)

# Step 6: Conduct PT analysis (generates Excel report)
well1.perform_pt_analysis(study_name="Study 1", thp=30)

# Step 7: Plot operating point (saves PNG plot)
well1.plot_operating_point()

# Step 8: Install new gas-lift valve
well1.install_new_glv(gas_injection_pressure=50, thp=30)

# Step 9: Perform multi-variable sensitivity study
well1.perform_sensitivity(
    study_name="Study 1",
    thp_sensitivity=[1, 10],
    tubing_sensitivity=[2.44, 3.49],
    lift_gas_sensitivity=[0, 10000],
    watercut_sensitivity=[0, 50],
    GOR_sensitivity=[100, 1000],
    reservoir_pressure_sensitivity=[100, 80]
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

well_analysis-0.2.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

well_analysis-0.2.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file well_analysis-0.2.0.tar.gz.

File metadata

  • Download URL: well_analysis-0.2.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for well_analysis-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aad461d19e2a9b4f5ed3841dfc34b0a0899e6d112916fc5ec94da3162fb63ec6
MD5 b77c4a79a4b2705aec19e9eb422ee6ca
BLAKE2b-256 b192e0ba64a7a62397cdd5427f8ce05ad2c0444f2d172aa3cced49f766e781fd

See more details on using hashes here.

File details

Details for the file well_analysis-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: well_analysis-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for well_analysis-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be6bf2808322b9ee78050969b283abe68e0543f86ca711f480f77489ffe64338
MD5 5919f6046d453d42ea3c5f618c3d450a
BLAKE2b-256 190e7f0ff46093fd2c6464289bd1f3d594445229bd7d342a24a704eab0957aaa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page