Diagnose and manage well integrity and barrier problems including sustained casing pressure, annular pressure buildup, tubing or casing leak triage, mechanical integrity test interpretation, barrier envelope review, cement isolation concerns, and failure-mode screening for production and injection wells. Use when the user asks about SCP, annulus pressure, MIT results, barrier diagrams, tubing leaks, casing leaks, communication behind pipe, pressure bleedoff or buildup, corrosion-related failures, or how to assess whether a well still has two independent barriers. Trigger phrases include sustained casing pressure, annular pressure, integrity test, tubing leak, casing leak, barrier envelope, MIT, bleeddown, communication behind pipe, barrier failure, or well integrity.
Integrity skill for production, injection, and workover decision support. Use it to frame the problem, screen likely leak paths, and identify which logs or pressure tests are worth running next.
Important: Barrier questions are high-consequence. Do not overstate certainty from a single bleeddown test. Always distinguish between screening diagnosis and formal well-integrity signoff.
def annulus_gas_inventory_scf(pressure_psia, annulus_volume_bbl,
temperature_f=100.0, z=1.0):
"""
Approximate free-gas inventory in standard cubic feet.
Uses PV/ZT scaling from actual annulus conditions to standard conditions.
"""
if pressure_psia <= 0 or annulus_volume_bbl <= 0 or z <= 0:
return None
v_ft3 = annulus_volume_bbl * 5.615
t_r = temperature_f + 459.67
scf = pressure_psia * v_ft3 * 520.0 / (14.7 * z * t_r)
return scf
def bleeddown_volume_scf(p_initial_psia, p_final_psia, annulus_volume_bbl,
temperature_f=100.0, z=1.0):
"""Gas volume released between two annulus pressures."""
q1 = annulus_gas_inventory_scf(p_initial_psia, annulus_volume_bbl, temperature_f, z)
q2 = annulus_gas_inventory_scf(p_final_psia, annulus_volume_bbl, temperature_f, z)
if q1 is None or q2 is None:
return None
return max(0.0, q1 - q2)
def pressure_rebuild_rate(p_start_psia, p_end_psia, days):
"""Average annulus pressure rebuild rate."""
if days <= 0:
return None
return (p_end_psia - p_start_psia) / days
Interpretation
| Pressure behavior | Likely meaning |
|---|---|
| Pressure bleeds to zero and stays there | Trapped pressure, low active communication |
| Pressure bleeds to zero and rebuilds repeatedly | SCP or leak path communication |
| Pressure tracks temperature / production cycles | Thermal annulus behavior likely |
| Large bleedoff gas volume from small annulus | Real gas source, not just thermal expansion |
def maasp_from_shoe(shoe_tvd_ft, fracture_gradient_psi_ft, annulus_fluid_ppg):
"""
Screening maximum allowable annulus surface pressure from the shoe.
MAASP = (FG - fluid gradient) * TVD
fluid gradient = 0.052 * MW(ppg)
"""
fluid_grad = 0.052 * annulus_fluid_ppg
return (fracture_gradient_psi_ft - fluid_grad) * shoe_tvd_ft
def safety_factor_to_limit(current_pressure_psi, allowable_pressure_psi):
"""Fraction of pressure limit currently consumed."""
if allowable_pressure_psi <= 0:
return None
return current_pressure_psi / allowable_pressure_psi
Barrier review should answer:
| Symptom | Likely leak path | Best next discriminator |
|---|---|---|
| SCP on A-annulus with stable tubing | Tubing leak or packer leak | Tubing pressure test, noise / temperature log |
| Multi-annulus pressure communication | Behind-pipe or connection issue | Cement evaluation, pressure communication matrix |
| Pressure tied to production shut-ins | Tubing-to-annulus communication | Shut-in sequence and gradient comparison |
| Pressure tied to injection cycles | Injection string or packer leak | Injection falloff and annulus monitoring |
| Iron, scale, or solids in annulus bleedoff | Corrosion breach or produced-fluid communication | Sample the bleedoff, inspect metallurgy |
Use MIT results to answer three separate questions:
Do not treat "failed MIT" as a full diagnosis. It only narrows the suspect set.
Escalate the integrity concern when any of these are true:
When using this skill, structure the answer as:
api-well-standards for casing, tubing, and cement design context.pnge:tubing-design for tubing movement, seal assembly, and packer force effects.pnge:flow-assurance and pnge:production-chemistry when corrosion or deposits are implicated.pnge:materials-fracture-mechanics when crack growth or fatigue is part of the failure hypothesis.