Skip to main content

A package for oil and gas well analysis

Project description

Oil and Gas Analysis Package

This package provides tools for analyzing well logs, generating IPR curves, predicting reservoir performance, and selecting candidates for artificial lift in the oil and gas industry.

Installation

pip install oilgas_analysis

Usage

Well Log Analysis

from oilgas_analysis import load_well_log_data, analyze_well_log

# Load well log data
log_data = load_well_log_data('well_log.csv')

# Analyze well log
analysis_results = analyze_well_log(log_data)
print(analysis_results)

IPR Curve Generation

from oilgas_analysis import generate_ipr_curve, plot_ipr_curve

# Generate IPR curve
pressures, rates = generate_ipr_curve(reservoir_pressure=3000, bubble_point_pressure=2500, productivity_index=2.5, water_cut=0.2)

# Plot IPR curve
plot_ipr_curve(pressures, rates, title="Well X IPR Curve")

Reservoir Performance Prediction

from oilgas_analysis import predict_reservoir_performance, forecast_production
import numpy as np

# Historical production data
time = np.array([0, 30, 60, 90, 120])
production_data = np.array([1000, 950, 905, 865, 830])

# Predict reservoir performance
params = predict_reservoir_performance(time, production_data)

# Forecast future production
forecast_time, forecast_rates = forecast_production(params, time_horizon=24)
print(f"Forecasted production after 2 years: {forecast_rates[-1]:.2f} STB/day")

Artificial Lift Analysis

from oilgas_analysis import select_artificial_lift_candidates, analyze_lift_performance

# Select artificial lift candidates
wells_data = [
    {'name': 'Well A', 'production_rate': 40, 'economic_limit': 50, 'reservoir_pressure': 2000, 'bottomhole_pressure': 1000, 'water_cut': 0.3},
    {'name': 'Well B', 'production_rate': 60, 'economic_limit': 50, 'reservoir_pressure': 1800, 'bottomhole_pressure': 1200, 'water_cut': 0.5},
    {'name': 'Well C', 'production_rate': 30, 'economic_limit': 50, 'reservoir_pressure': 2200, 'bottomhole_pressure': 1100, 'water_cut': 0.8}
]

candidates = select_artificial_lift_candidates(wells_data)
print(f"Candidates for artificial lift: {candidates}")

# Analyze lift performance
initial_rate = 50
time = np.array([0, 30, 60, 90])
lifted_rates = np.array([100, 95, 92, 90])
lift_type = 'ESP'

lift_analysis = analyze_lift_performance(initial_rate, time, lifted_rates, lift_type)
print(lift_analysis)

Running the Package

To run this package:

  1. Install the package and its dependencies:

    pip install oilgas_analysis
    
  2. Create a Python script (e.g., analysis_script.py) and import the necessary functions as shown in the usage examples above.

  3. Run your script:

    python analysis_script.py
    

Running Tests

To run the test suite:

  1. Ensure you have the package and its dependencies installed.
  2. Navigate to the root directory of the package.
  3. Run the following command:
    python -m unittest discover tests
    

This will discover and run all the tests in the tests directory.

Contributing

Contributions to this package are welcome. Please ensure that you add or update tests as appropriate when making changes. Follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Write your code and tests.
  4. Run the test suite to ensure all tests pass.
  5. Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or issues, please open an issue on the GitHub repository or contact the maintainer at [shailesh.tripathi2706@gmail.com].

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

oilgas_analysis-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

oilgas_analysis-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file oilgas_analysis-0.1.0.tar.gz.

File metadata

  • Download URL: oilgas_analysis-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.12

File hashes

Hashes for oilgas_analysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1680153e7ddee12b2df4ca24ce1e0329e63ff899dd336860c8365a75ff680aaf
MD5 8083453852bdc838f24733cb6caf8630
BLAKE2b-256 6906545f1ebf6914fb1a1c25feda045e44c38daf658834ba64f4567b2070810c

See more details on using hashes here.

File details

Details for the file oilgas_analysis-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oilgas_analysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 388a0dcccebd90c96fcbd81e7e327b09b5d8b0f54023872adb0e33b5829bd9b2
MD5 ad419895beaba56ea6397138912856ac
BLAKE2b-256 18662bb444940a56abeb9f3c8a5e0d6ffe9415602a2fdbb213b38e642aafdcaf

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