TheTechIdea OilGas - User guide Developer guide →

Drilling engineering toolbox

The TheTechIdea.OilGas.Drilling package. Settings: toolboxes.drilling in the environment.

Well planning

WellPlan builds a trajectory from minimum-curvature sections - the method of Sawaryn & Thorogood, A Compendium of Directional Calculations Based on the Minimum Curvature Method (SPE 84246, 2005). Every section is a circular arc in a plane or a straight hold, so a plan ends exactly where its sections say:

var plan = WellPlan.Start("m")                          // tie-on: position, inclination, azimuth
    .Hold(500)                                          // vertical to the kick-off point
    .CurveHoldToTarget(3, north: 800, east: 0, tvd: 2000);   // arc at 3 deg per course length, then hold - lands on the target

Doglegs are per the environment's dogleg course length (survey.doglegCourseLength: 30 m, 100 ft, or 10 m in Russia / CIS presets). drilling.maxDogleg (your company's limit; none by default) is checked on every arc. Stations() writes the plan out every drilling.stationSpacing (none by default: 30 m for a plan in metres, 100 ft for one in feet, as survey.doglegCourseLength does) with the section ends; ToWellModel(header) turns it into a survey, so the trajectory views, the survey uncertainty and the anti-collision scan work on a plan exactly as on a drilled well.

Torque and drag

TorqueDrag.Run(trajectory, stringFromBit, case) is the soft-string model of Johancsik, Friesen & Dawson (Torque and Drag in Directional Wells - Prediction and Measurement, SPE 11380, 1984). The string - its sections listed from the bit up, each with length, weight per length in air and the outside diameter used as torque radius - is cut into elements and worked from the bit to surface:

W is the buoyed element weight (mud density and casingDesign.steelDensity). The operations are trip out (pick-up), trip in (slack-off), rotating off bottom and drilling (weight and torque on bit); BitTension puts a force at the bottom for the other operations (an overpull, say). Friction factors are field-calibrated, so they are inputs - one for cased hole, one for open hole below the casing shoe - with no defaults. The result gives tension, side force and torque along the string, the hook load and surface torque, and the depths in compression. The model reproduces its exact limits: the buoyed weight in a vertical hole, the closed forms of a straight inclined hole, and the capstan equation (F_out = F_in e^(mu x angle)) through a bend.

Hydraulics

Hydraulics.Circulate(mud, flowRate, sections, nozzles, bitTvd, surfaceLoss) works through the circulating system - the string sections, the bit and the annular sections - with the textbook field-unit methods (Bourgoyne et al., Applied Drilling Engineering, chapter 4; Guo & Liu, Applied Drilling Circulation Systems):

Every constant reproduces the SI physics it encodes (Hagen-Poiseuille, Fanning, Bernoulli) within 0.5 %, and the models reduce to one another for a Newtonian mud. API RP 13D's current Herschel-Bulkley method is in the paid standard and is not implemented.

Drilling performance

DrillingPerformance.Analyze(activities) reads a daily drilling report - lines with start, end, operation code, the depth before and after, a description and an optional NPT flag (DrillingPerformance.FromCsv reads them from CSV) - and gives:

The codes are the 23 original IADC daily drilling report codes (drilling.operationCodes: 1 rig up and tear down, 2 drilling, 3 reaming, 4 coring, 5 condition mud & circulate, 6 trips, 7 service / maintain rig, 8 repair rig, 9 cut off drilling line, 10 deviation survey, 11 wireline logs, 12 run casing & cement, 13 wait on cement, 14 rig up BOP, 15 test BOP, 16 drill stem test, 17 plug back, 18 squeeze cement, 19 fishing, 20 directional work, 21 run / retrieve riser equipment, 22 surface testing, 23 other); add your own codes or IADC DDR Plus codes to the list. TimeDepthView draws the curve (depth downward), the plan dashed and the non-productive periods shaded.

drilling.torqueDragElementLength (10 m) is the length of the elements the torque and drag model is worked in; a case may set its own ElementLength.