# Systems Perspective Description Language — Subsurface Drilling (SPDL-GEO) **Specification Document ID:** `SPDL-GEO-SPEC-2026-v4.2` **Classification:** Open Epistemic Standard / Real-Time Downhole MWD/LWD Substrate **Principal Architect:** Asse van Nix | Systems Perspective Framework & Proof-Driven Architecture Group **Target Environment:** Zig 0.16.0 Freestanding · Downhole Micro-Tool RTOS · WITSML Replacement **Applied Standards:** ISO/IEC 14977 EBNF · GBNF Maskable · Energistics WITSML Replacement · API RP 53 (Blowout Prevention) · IADC Drilling Safety --- ## 1. Epistemic Architecture: Why WITSML Must Be Replaced 1. **WITSML Schema Bulk:** The Energistics WITSML schema produces multi-megabyte XML files containing log records, trajectories, and BHA definitions. Downhole Measurement While Drilling (MWD) tools communicate via mud-pulse telemetry (1 to 10 bits per second). Transmitting XML is impossible, requiring lossy downhole compression. 2. **Blowout Barrier Disconnect:** WITSML stores drilling logs passively. It has no native mechanism to assert mud-weight hydrostatic pore-pressure barriers, leaving kick detection to surface human interpretation and introducing blowout risks. **SPDL-GEO** embeds wellbore kick and lost-circulation pressure windows directly into the telemetry stream. --- ## 2. Physical Invariants, DAEs & Mathematical Proof Gates ``` SPDL-GEO DRILLING MANIFOLD ┌─────────────────────────────────────────────────────────────────────────────┐ │ EQUIVALENT CIRCULATING DENSITY (ECD) HYDRAULIC PRESSURE EQUATION │ │ P_bottomhole = rho_mud * g * TVD + Delta_P_annular_friction │ ├─────────────────────────────────────────────────────────────────────────────┤ │ WELLBORE DRILLING PRESSURE WINDOW BARRIER │ │ P_pore(TVD) <= P_bottomhole(t) <= P_fracture(TVD) │ │ h_kick(P) = P_bottomhole - P_pore >= Margin_trip │ │ h_frac(P) = P_fracture - P_bottomhole >= Margin_loss │ └─────────────────────────────────────────────────────────────────────────────┘ ``` --- ## 3. Formal ISO/IEC 14977 EBNF Grammar ```ebnf GeoManifest = { Line } ; Line = [ Whitespace ] , ( Comment | GeoRecord ) , Newline ; Whitespace = { " " | "\t" | "\r" } ; Newline = "\n" | "\r\n" ; Comment = "#" , { AnyChar - Newline } ; GeoRecord = "(I) @GEO_INVARIANT" , " " , InvariantFields | "(A) @WELLBORE_PROFILE" , " " , WellFields | "(B) @WELL_WINDOW_BAR" , " " , WindowBarrierFields | "(M) @DRILL_STRING_CMD" , " " , DrillFields | "(T) @MWD_TELEMETRY" , " " , ObserverFields ; InvariantFields = "id:" , Token , " mud_pulse_bps:" , Number , " alloc_policy:ZERO_HEAP" ; WellFields = "id:" , Token , " well_uwi:" , Token , " tvd_m:" , Number , " md_m:" , Number ; WindowBarrierFields = "id:" , Token , " pore_sg:" , Number , " frac_sg:" , Number ; DrillFields = "id:" , Token , " rop_m_h:" , Number , " wob_klbs:" , Number , " rpm:" , Integer , " flow_gpm:" , Number ; ObserverFields = "id:" , Token , " ecd_sg:" , Number , " spp_psi:" , Number , " torque_ft_lbs:" , Number , " gamma_api:" , Number ; Token = Letter , { Letter | Digit | "_" | "-" } ; Number = [ "-" ] , Digit , { Digit } , [ "." , { Digit } ] ; Integer = [ "-" ] , Digit , { Digit } ; Letter = "A".."Z" | "a".."z" ; Digit = "0".."9" ; AnyChar = ? Any valid Unicode code point ? ; ``` --- ## 4. GBNF Structured Sampling Grammar ```gbnf root ::= GeoRecord "\n" GeoRecord ::= "(I) @GEO_INVARIANT" " " InvariantFields | "(A) @WELLBORE_PROFILE" " " WellFields | "(B) @WELL_WINDOW_BAR" " " WindowBarrierFields | "(M) @DRILL_STRING_CMD" " " DrillFields | "(T) @MWD_TELEMETRY" " " ObserverFields InvariantFields ::= "id:" [A-Za-z0-9_-]+ " mud_pulse_bps:" [0-9.]+ " alloc_policy:ZERO_HEAP" WellFields ::= "id:" [A-Za-z0-9_-]+ " well_uwi:" [A-Za-z0-9_-]+ " tvd_m:" [0-9.]+ " md_m:" [0-9.]+ WindowBarrierFields ::= "id:" [A-Za-z0-9_-]+ " pore_sg:" [0-9.]+ " frac_sg:" [0-9.]+ DrillFields ::= "id:" [A-Za-z0-9_-]+ " rop_m_h:" [0-9.]+ " wob_klbs:" [0-9.]+ " rpm:" [0-9]+ " flow_gpm:" [0-9.]+ ObserverFields ::= "id:" [A-Za-z0-9_-]+ " ecd_sg:" [0-9.]+ " spp_psi:" [0-9.]+ " torque_ft_lbs:" [0-9.]+ " gamma_api:" [0-9.]+ ``` --- ## 5. Production SPDL-GEO Manifest Exemplar ```spdl # ============================================================================== # SPDL-GEO v4.2 MANIFEST: DEEPWATER HIGH-PRESSURE HIGH-TEMPERATURE (HPHT) WELL # Standard: WITSML Replacement | Transport: 3.0 bps Mud-Pulse Acoustic # ============================================================================== (I) @GEO_INVARIANT id:INV-DEEP-WELL mud_pulse_bps:3.0 alloc_policy:ZERO_HEAP # --- GEOLOGICAL DRILL PROFILE --- (A) @WELLBORE_PROFILE id:WELL_NORTH_SEA_01 well_uwi:NO-25-4-B12 tvd_m:4250.0 md_m:5120.0 # --- HPHT HYDROSTATIC PRESSURE WINDOW BARRIERS --- (B) @WELL_WINDOW_BAR id:BAR_PRESSURE_LIMITS pore_sg:1.42 frac_sg:1.75 # --- SURFACE DRILLING CONTROL SLATE --- (M) @DRILL_STRING_CMD id:DRILL_ROTARY_SLATE rop_m_h:18.5 wob_klbs:28.0 rpm:120 flow_gpm:650.0 # --- DOWNHOLE MWD/LWD TELEMETRY STREAM --- (T) @MWD_TELEMETRY id:TEL_MWD_DOWNHOLE ecd_sg:1.54 spp_psi:3420.0 torque_ft_lbs:12400.0 gamma_api:85.2 ``` --- ## 6. Standards Compliance Matrix ``` ╔═════════════════════════════════╦══════════════════════╦═════════════════════════════════════════════════════╗ ║ Dimension │ Verification Standard│ Enforced Implementation Evidence ║ ╠═════════════════════════════════╬══════════════════════╬═════════════════════════════════════════════════════╣ ║ Wellbore Influx Prevention │ API RP 53 │ ECD bounded strictly between pore and frac curves. ║ ║ Low-Baud Downhole Viability │ Mud-Pulse Telemetry │ Ultra-compact records transmittable in < 12 seconds.║ ║ Zero-Heap Downhole Tool Memory │ Freestanding Silicon │ Execution requires M_aux <= 128 bytes stack. ║ ║ Deterministic Grammar Gating │ GBNF Structured Mask │ Eliminates parameter out-of-order errors in MWD. ║ ╚═════════════════════════════════╩══════════════════════╩═════════════════════════════════════════════════════╝ ```