| name | drilling-drilling-hydraulics |
| description | Sub-skill of drilling: Drilling Hydraulics (+5). |
| version | 1.0.0 |
| category | engineering |
| type | reference |
| scripts_exempt | true |
Drilling Hydraulics (+5)
Drilling Hydraulics
ECD = MW + (delta_P_annular / (0.052 * TVD))
delta_P = (L * rho * v**2) / (25.8 * (Dh - Dp))
HHP = (Q * delta_P_bit) / 1714
HSI = HHP / area_bit
Rate of Penetration
ROP = K * exp(a1 + sum(ai * xi))
MSE = (WOB / area_bit) + (2 * pi * RPM * T) / (60 * area_bit * ROP)
Torque and Drag (Soft String Model)
T = T0 + mu * N * L
F = F0 + mu * N * L
Well Control
KMW = original_MW + (SIDPP / (0.052 * TVD))
MAASP = (fracture_gradient - MW) * 0.052 * shoe_TVD
KT = (FG - MW_current) * shoe_TVD / depth_total
Example: ECD Calculation
def calculate_ecd(
mud_weight_ppg: float,
annular_pressure_loss_psi: float,
tvd_ft: float
) -> float:
"""
Calculate Equivalent Circulating Density.
Args:
*See sub-skills for full details.*
## Example: Parameter Validation
```python
def validate_drilling_parameters(params: dict) -> None:
"""Validate drilling parameters are within safe ranges."""
if params['mud_weight'] < params['pore_pressure']:
raise ValueError("Mud weight below pore pressure — kick risk!")
if params['mud_weight'] > params['fracture_gradient']:
raise ValueError("Mud weight above fracture gradient — losses risk!")
if params['wob'] > params['bit_rating']:
raise ValueError("WOB exceeds bit rating")