Skip to main content

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
  • UNITS: Metric units are used in the library as default.

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.set_operating_glv_parameters(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, reservoir_pressure=90)

# 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],
    sensitivity_type= "StepWithXAxis"
)

Metadata

Release files for well-analysis 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for well-analysis 0.5.1
File Size Uploaded
well_analysis-0.5.1.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for well-analysis 0.5.1
File Interpreter ABI Platform
well_analysis-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.0 kB

Release files / well_analysis-0.5.1.tar.gz

Download URL well_analysis-0.5.1.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a03150f8e928b97c139fcb5f4b60ce38c3320426e66613a96f4e747971e8a858
BLAKE2b-256 checksum
How to use checksums
bfc78d4cf6ef903d0238a67848bd5d8cec15dc1c3bec7c77a7462f66f8f0ee29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / well_analysis-0.5.1-py3-none-any.whl

Download URL well_analysis-0.5.1-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ccdfa93096286908e008aa458387d645329d6464e60a8987b901d8c5888bdf2
BLAKE2b-256 checksum
How to use checksums
75586daa01f8c7c724e7a715a9ff4490ffda5ff474d83e121baa3652bb87015a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page