Last updated

Deviation

# Introduction

This overview describes the software architecture for Deviation.JS. The basic classes and methods designed to facilitate the implementation of deviated wells are described below.
The class diagram is as follows:

# Trajectory2d

Class geotoolkit/deviation/Trajectory2d is used to define trajectory of a well that is not exactly vertical, azimuthal turn exists over a segment or segments of the planned well path. Trajectory contains MD- (measured depth), X- and Y-coordinates along itself. The class stores 2D coordinates internally and works in 2D space.

There are two ways in the class to create a trajectory instance:

  • Directly with constructor accepting arrays of X-, Y- and MD-values.
  • Indirectly with "createTrajectory" static method accepting arrays of MD-, inclinations- and azimuth-values (latter one is not supported currently). Other parameters are: "rightDeviation" - inclination direction in the right handed coordinate system, "start" - start index, "filter" - redundant points filtering flag, "approximate" - approximation flag

Please refer to the following diagram:

  • (Xi,Yi) represents a point in the trajectory.
  • trajectory C.S is essentially DeviatedCompositeNode - instance's parent model space.
  • 'w' stand for 'trackwidth'

# DeviatedCompositeNode

Class geotoolkit/scene/DeviatedCompositeNode extends CarnacJS geotoolkit/scene/CompositeNode to accept deviation parameters via "setDeviation".

The method's parameters are:

  • 'trajectory' a geotoolkit/deviation/Trajectory2d instance (the only mandatory parameter).
  • 'transformer' - a geotoolkit/deviation/Transformer2d-derived class instance (default: geotoolkit/deviation/PiecewiseTransformer instance - see below)
  • 'trackWidth' - deviated track width (across trajectory) (default: 100)
  • 'offset' - position of trajectory inside deviated track (bended strip) for any point along the trajectory (default: 0)

The deviation set is applied to all child nodes.

# Transformer2d

Interface geotoolkit/deviation/Transformer2d declares the only method "create" that returns an instance of geotoolkit/deviation/DeviatedTransformation-derived class.

DeviationJS library provides two Transformer2d implementations that handle trajectory information in a different ways:

  • geotoolkit/deviation/TVDTransformer - trajectory's measured depth values are equal to the trajectory's Y-values
  • geotoolkit/deviation/PiecewiseTransformer - trajectory's measured depth values are equal to original 2D-space's Y-values

# DeviatedTransformation

geotoolkit/deviation/DeviatedTransformation is an abstraction to represent nonaffine transformation from a linear 2D-space to a deviated space (and backwards when possible).

Its methods are as follows:

  • transforming methods - for a point, a line and a polyline
  • scaling information - for a particular 2D-point as well as general scale statistics (min/max/mean x- and y-scales)
  • deviated area bounding information
  • a point containment verification