Deviated Wellbore

This tutorial shows how to create a deviated wellbore schematic. The DeviationJS library is a part of GeoToolkitJS that provides a set of classes to render deviated nodes. It provides transformers from linear coordinates to trajectory coordinates. Transformations from linear space, where vertical coordinates represent either measured depths or true vertical depths, are currently supported.

# Steps to Setup Deviation

1. A trajectory (geotoolkit/deviation/Trajectory2d) can be defined in two ways: through its constructor or through the static createTrajectory method. The constructor is passed x-component and y-component arrays with the option of a measured depth (MD) array. Alternatively, the static method creates a trajectory from arrays with azimuth, inclination, and measured depth data sets.

2. Set a deviated node (geotoolkit/deviation/scene/DeviatedCompositeNode) by using the setDeviation function call. Note that 'trajectory' is the only mandatory parameter; 'transformer', 'trackWidth' and 'offset' are all optional.

3. A Node instance should be added to the DeviatedCompositeNode instance through the addChild call.

4. The DeviatedCompositeNode instance itself (like any other geotoolkit/scene/Node implementation) should be added to geotoolkit/plot/Plot or a parent composite node.

This tutorial shows SchematicsJS's WellBoreNode as an example of a node that can be deviated.

import { Rect } from "@int/geotoolkit/util/Rect.ts";
import { DeviatedCompositeNode } from "@int/geotoolkit/deviation/scene/DeviatedCompositeNode.ts";
import { ViewMode, WellBoreNode } from "@int/geotoolkit/schematics/scene/WellBoreNode.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { Trajectory2d } from "@int/geotoolkit/deviation/Trajectory2d.ts";
import { WellBoreData } from "@int/geotoolkit/schematics/data/WellBoreData.ts";
import data from "/src/assets/data/wellBoreData.json?import";
function createScene(canvas) {
  const wellBoreNode = new WellBoreNode({
    "data": new WellBoreData(data),
    "viewmode": ViewMode.Compressed
  });
  const deviatedNode = new DeviatedCompositeNode().setDeviation({
    "trajectory": new Trajectory2d({
      "data": {
        "x": [0, 0, 300],
        "y": [0, 500, 500],
        "d": [0, 250, 500]
      }
    }),
    "trackwidth": 200,
    "clip": false
  });
  deviatedNode.addChild(wellBoreNode);
  deviatedNode.setBounds(new Rect(110, 0, 400, 400));
  return new Plot({
    "canvaselement": canvas,
    "root": deviatedNode,
    "autorootbounds": false
  });
}
export { createScene };

createScene(document.querySelector('[ref="plot"]'));