API Overview

Units

The following data structure lists the supported unit type/categories and actual units supported for each category:

{
  density: ['sg', 'ppg', 'kg/m3', 'lb/ft3'],
  diameters: ['in', 'm', 'ft'],
  dls: ['deg/30m', 'deg/100ft'],
  duration: ['s', 'h', 'd', 'min'],
  length: ['m', 'ft', 'km', 'in'],
  pressurechange: ['bar', 'psi', 'Pa', 'MPa', 'kPa'],
  temperature: ['C', 'F', 'K'],
  tempgrad: ['C/100m', 'F/100ft', 'C/m', 'F/ft', 'K/m'],
  volume: ['m3', 'ft3', 'bbl', 'STB', 'Sm3', 'MMSCF', 'MSm3', 'SCF'],
  weight: ['tonnes', 'kg', 'mt', 'lbf', 'kip', 'N'],
  force: ['N', 'lbf', 'tonnes'],
  torqueGradient: ['N', 'lbf'],
  wgrad: ['sg', 'ppg'],
  wltubulars: ['ppf', 'kg/m'],
  weightGradient: ['ppf', 'kg/m'],
  flowrate: ['lpm', 'bpm', 'm3/s', 'm3/d', 'gpm', 'ft3/s', 'ft3/d', 'Mm3/d', 'bbl/d', 'MMSCFD', 'STB/d', 'Sm3/d', 'MSm3/d', 'SCF/d'],
  massFlowRate: ['kg/s', 'lbm/s'],
  permeability: ['mD', 'm2'],
  interfacialTension: ['dyn/cm', 'N/m', 'mN/m', 'lbf/ft'],
  forceGradient: ['N/m', 'lbf/ft'],
  percentage: ['%', 'fr'],
  deg: ['deg', 'rad'],
  power: ['W', 'kW', 'MW', 'hp', 'BTU/h'],
  latitude: ['°N', '°S'],
  longitude: ['°E', '°W'],
  speed: ['m/s', 'ft/s', 'm/min', 'ft/min', 'm/h', 'ft/h', 'mph'],
  acceleration: ['m/s2', 'ft/s2'],
  torque: ['Nm', 'ftlbf'],
  rpm: ['rpm', 'Hz'],
  sdstats: ['CI', 'Sigma'],
  viscosity: ['Pa*s', 'P', 'mPa*s', 'cP'],
  pressureGradient: ['Pa/m', 'bar/m', 'bar/100m', 'psi/ft', 'psi/100ft'],
  angleGradient: ['deg/30m', 'deg/100ft', 'deg/m', 'deg/m', 'deg/ft', 'rad/m', 'rad/ft'],
  intensity: ['W/m2', 'hhp/in2', 'hhp/ft2'],
  gor: ['Sm3/Sm3', 'SCF/STB']
}

Unit Values

Inside the application (and API), unit values are stored as a pipe separated string, where the first value is the numerical value and the second value is the unit. E.g. 100|m means "100 meters", and 100|ft means "100 feet".

Unit Tables

To keep tables simple (and to support copy/paste from/to spreadsheets), tables with units are supported by indicating the unit of each column in a first unit row. For instance the first row ['ft', 'deg/100ft'] indicates a table where the first column (in the rows below) are given in feet and degrees per 100 ft (unit category dls, dogleg severity).

Load Cases and External Gradients

Load Cases and External Gradients typically contains a reference to a type and it's input parameters. Load cases is typically a list of depth internal pressure values, while external gradients is similar but with external pressure values. These are combined to create the differential pressure used in calculating casing loads (internal pressure - external pressure).

The type value indicates whether this is a load case or an external gradient.

In the paramdefs list, the order is important. Arguments to load cases etc need to be passed as a list of strings (with units). The d is short for description and explains what the parameter is (and used as a label in the app GUI). u denotes the unit category, what type of value this is, e.g. length or wgrad, which again indicates what kind of units are supported for that category. The ucalc indicates what the load case expects, and what value any type of unit value gets converted to before it is fed to the calculation engines.

Please note that paramdefs etc is not needed when using the API directly; it's mostly used by the app GUI for helping users get the correct values in the right places.

The following list shows the currently supported load cases, types, parameters definitions and parameter default values (what the GUI uses as defaults when one of these get added to a dataset):

Last updated

Was this helpful?