Bottom Hole Pressure (BHP) Prediction Model
This project implements a machine learning model to predict Bottom Hole Pressure (BHP) in oil wells based on various well parameters.
Features Used
- Qo: Oil production rate (STB/day)
- GOR: Gas-Oil Ratio (scf/STB)
- THT: Tubing Head Temperature (°F)
- Pwh: Wellhead Pressure (psi)
- WCT: Water Cut (%)
- Depth: Well depth (ft)
Derived Features
The model uses these engineered features:
- Fluid gradient:
(WCT/100)*0.433 + (1-(WCT/100))*0.273
- Ph (Hydrostatic Pressure):
Fluid gradient * Depth
Author
Kwadwo Fosu Adom
Model Usage
import pickle
import pandas as pd
# Load your test data
test_df = pd.read_csv('your_test_data.csv') # or other source
# Calculate derived features
test_df['Fluid gradient'] = (test_df['WCT']/100)*0.433 + (1-(test_df['WCT']/100))*0.273
test_df['Ph'] = test_df['Fluid gradient'] * test_df['Depth']
# Features to scale (must match training)
scaled_features = ['Qo', 'GOR', 'THT', 'Pwh(psi)', 'Ph', 'Depth']
# Load model and scaler
with open('modelBIGDATA5US1P57.pkl', 'rb') as file:
saved_data = pickle.load(file)
model = saved_data['model']
scaler = saved_data['scaler']
# Make predictions
X_test_scaled = scaler.transform(test_df[scaled_features])
test_df['Predicted_BHP'] = model.predict(X_test_scaled)
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support