| name | drilling |
| description | Use when working with well drilling operations, real-time drilling monitoring, kick detection, stuck pipe analysis, or drilling parameter optimization |
Skill: Drilling Pipeline
Guide AI agents through well drilling operations and monitoring.
Purpose
Support drilling engineers in well planning, real-time monitoring, and post-well analysis.
Roles
- Drilling Engineer - Well design, casing program, drilling parameters
- Mud Engineer - Drilling fluids, hydraulics, wellbore stability
- Well Planner - Trajectory design, anti-collision, target intercept
- Rig Supervisor - Real-time operations, safety, equipment
Data Types
| Data | Source | Frequency |
|---|
| WOB, RPM, Torque | MWD/Surface | Real-time (1 Hz) |
| Mud weight, viscosity | Mud logging | Periodic |
| Flow rate, pit volume | Surface sensors | Real-time (1 Hz) |
| Gamma ray, resistivity | LWD | Real-time |
| Pressure | PWD (Pressure While Drilling) | Real-time |
| Trajectory | MWD | Every stand (~30 m) |
Workflow
Phase 1: Well Planning
- Define targets (from exploration)
- Design trajectory (3D wellpath)
- Design casing program (depths, sizes, grades)
- Select drilling fluids
- Identify hazards (pore pressure, fracture gradient, H2S)
- Optimize drilling parameters (ROP, hydraulics)
Phase 2: Real-Time Drilling
- Monitor drilling parameters
- Weight on Bit (WOB)
- RPM (Rotations Per Minute)
- Torque
- Rate of Penetration (ROP)
- Monitor mud returns
- Flow rate
- Mud weight
- Cuttings analysis
- Monitor LWD data
- Gamma ray
- Resistivity
- Pressure
- Detect anomalies
- Kicks (influx of formation fluid)
- Losses (mud lost to formation)
- Stuck pipe indicators
Phase 3: Post-Well Analysis
- Compare actual vs. planned
- Document lessons learned
- Update drilling database
- Optimize future wells
Key Parameters
| Parameter | Typical Range | Alert Threshold |
|---|
| WOB | 10-80 klbs | >120% of planned |
| Torque | 5-50 kft-lbs | >110% of planned |
| RPM | 60-180 rpm | Varies |
| ROP | 50-500 ft/hr | Depends on formation |
| Mud weight | 8-20 ppg | >0.5 ppg change |
| Flow in/out | 200-1000 gpm | Not equal = alert |
Safety Focus
Kick Detection
Signs of kick (well control situation):
- Mud volume increase (pit gain)
- Flow rate differential (flow in ≠ flow out)
- Mud weight decrease
- Drilling break (sudden ROP increase)
Response: STOP, shut-in, record pressures, kill well
Stuck Pipe Indicators
- Excessive torque/drag
- No circulation
- Can't move pipe
Lost Circulation
- Sudden mud loss
- No returns at surface
- Loss > 50 bbl/hr
Domain Tasks
These tasks are handled by this skill:
- Optimize drilling parameters
- Interpret LWD data
- Calculate hydraulics
- Analyze drilling performance
Software Tasks
These tasks invoke petropowers:oil-gas-delegation:
- Real-time drilling monitoring dashboard
- Rig telemetry database
- Automated drilling reports
- Well planning software integration
Real-Time Monitoring Example
import pandas as pd
import numpy as np
data = pd.DataFrame({
'timestamp': pd.date_range('2024-01-01', periods=100, freq='1s'),
'wob_klbs': np.random.normal(40, 5, 100),
'torque_kftlbs': np.random.normal(25, 3, 100),
'rpm': np.random.normal(120, 10, 100),
'rop_fthr': np.random.normal(150, 30, 100),
'flow_in_gpm': np.random.normal(800, 20, 100),
'flow_out_gpm': np.random.normal(800, 20, 100),
})
def check_for_kick(df):
alerts = []
flow_diff = df['flow_out_gpm'] - df['flow_in_gpm']
if (flow_diff > 50).any():
alerts.append('POTENTIAL KICK: Flow out >> Flow in')
if df['rop_fthr'].max() > 2 * df['rop_fthr'].median():
alerts.append()
alerts
alerts = check_for_kick(data)
alert alerts:
()
Hydraulics Calculation
import math
def calculate_annular_velocity(flow_rate_gpm, hole_diameter_in, pipe_diameter_in):
"""Calculate annular velocity in ft/min"""
annular_area = math.pi/4 * (hole_diameter_in**2 - pipe_diameter_in**2)
av = (flow_rate_gpm * 144) / annular_area
return av
av = calculate_annular_velocity(800, 12.25, 5)
print(f"Annular velocity: {av:.1f} ft/min")
Quality Checklist
Drilling operations checklist:
References
- SPE Drilling & Completion
- API SPEC 5CT (Casing and Tubing)
- IADC Drilling Manual
- Well Control: MIT (Managed Pressure Drilling)