Well trajectories

geodetic_engine.welltrajectory positions a wellbore from its directional survey. The survey gives, at each station, the measured depth, the inclination and the azimuth of the hole. With a wellhead and a CRS, the module computes easting and northing (or longitude and latitude), elevation and dogleg severity at every station and anywhere between them.

The survey is reduced to offsets from the wellhead by the minimum curvature method, and the offsets are georeferenced in the CRS by one of four methods. Every coordinate change goes through geodetic_engine.geodesy, on the CRS’s own datum, so no datum shift is ever applied without being named.

Use it when you need positions along a well in a CRS, and need to be able to say how they were computed: which method georeferenced them, on which datum, with which grid convergence.

It does not cover survey error models and uncertainty (ISCWSA), anti-collision, magnetic declination, a grid convergence that varies across the well for grid azimuths, or vertical datums beyond the stated assumption that the wellhead elevation stands in for its ellipsoidal height in the ENU method.

How a trajectory is computed

        flowchart LR
    Input["TrajectoryInput<br/>survey, wellhead, CRS,<br/>north reference, settings"] --> North{"Azimuths<br/>against?"}
   North -- "grid north" --> Turn["Turned onto true north<br/>by the grid convergence<br/>at the wellhead"]
    North -- "true north" --> MC
    Turn --> MC["Minimum curvature<br/>offsets east, north, TVD<br/>from the wellhead"]
    MC --> Georeference["Georeferencing method<br/>AzimuthalEquidistant, GridNorthLocal,<br/>ENU or LMP"]
    Input -- "wellhead and CRS" --> Georeference
    Georeference --> Result["WellTrajectory<br/>x, y, z, angles, DLS,<br/>provenance"]
    

The API in one table

You want to

Use

Gather the survey, wellhead, CRS and settings, from arrays, rows, a DataFrame, a survey file or an OSDU request body

TrajectoryInput

Compute the trajectory

TrajectoryInput.compute, or compute_trajectory() with the parts given separately

Save an input as a survey file

TrajectoryInput.to_csv

State the survey stations and their units on their own

Survey

Read positions, angles, depths and dogleg severity

WellTrajectory

Get points between the stations, on the arcs

WellTrajectory.interpolate, WellTrajectory.resample

Move the positions to another CRS, such as WGS 84

WellTrajectory.to_geographic

Run minimum curvature without a CRS

MinimumCurvature

Choose how the offsets are georeferenced in the CRS

Method

Look at the wells in 3D

plot_trajectory(), open_in_browser()

Convert a unit name into metres or radians

length_factor(), angle_factor(), or length_unit() and angle_unit() for the whole unit

Conventions

Quantity

Convention

Coordinate values

xy order, as everywhere in this package: easting then northing, or longitude then latitude, in the CRS’s own units.

Inclination \(I\)

From vertical: 0 is straight down, 90 is horizontal.

Azimuth \(\alpha\)

Clockwise from north, against grid north ("GN") or true north ("TN").

Grid convergence

\(\gamma\), from true north to grid north, clockwise positive: \(\alpha_{grid} = \alpha_{true} - \gamma\). This needs a conformal projection. See Projection factors.

Offsets

east, north and tvd from the wellhead, against true north, TVD positive down, in z_unit.

Elevation

\(z = z_0 - \mathrm{TVD}\), with \(z_0\) the wellhead elevation. The same for every method.

Dogleg severity

Degrees per 30 m of MD, or per 100 ft for a survey in feet. Any other length on request.

Units

Symbols (m, ft, ftUS), OSDU unit ids, or OSDU unit persistableReferences.

Rules this module enforces

  1. Units are named, never assumed. An unknown unit, or a unit of the wrong quantity, raises UnitError rather than defaulting: a length read in the wrong unit moves every position by a plausible looking amount.

  2. Nothing changes datum. Every position is computed on the trajectory CRS’s own datum. Moving it to another datum goes through Transformation, so the operation must be named, or come with a bound CRS, as for any other datum change.

  3. Grid azimuths need a grid. Azimuths against grid north in a geographic CRS raise UnsupportedCRSError, and so do they in a projected CRS that does not preserve angles at the wellhead, since grid convergence alone cannot account for angular distortion. There, azimuths against true north still work, without grid azimuths.

  4. Points between stations lie on the arcs. Interpolation follows the same circular arcs as the stations, never straight lines between them.

  5. A survey that cannot describe a wellbore is refused, with InvalidSurveyError, or DegenerateSurveyError where two stations point in opposite directions. An input that is incomplete or out of format is refused with InvalidInputError, as soon as it is made.

  6. Every trajectory says how it was computed, in operations.

Pages in this section

The well trajectory example notebook reads the synthetic survey file, computes, interpolates, converts and plots its trajectory, then shows each other way to build the input, and checks a real well, Volve F-1, against its survey report.