API Overview

Units

The following data structure lists the supported unit type/categories and actual units supported for each category:
1
{
2
density: ['sg', 'ppg', 'kg/m3', 'lb/ft3'],
3
diameters: ['in', 'm', 'ft'],
4
dls: ['deg/30m', 'deg/100ft'],
5
duration: ['s', 'h', 'd', 'min'],
6
length: ['m', 'ft', 'km', 'in'],
7
pressurechange: ['bar', 'psi', 'Pa', 'MPa', 'kPa'],
8
temperature: ['C', 'F', 'K'],
9
tempgrad: ['C/100m', 'F/100ft', 'C/m', 'F/ft', 'K/m'],
10
volume: ['m3', 'ft3', 'bbl', 'STB', 'Sm3', 'MMSCF', 'MSm3', 'SCF'],
11
weight: ['tonnes', 'kg', 'mt', 'lbf', 'kip', 'N'],
12
force: ['N', 'lbf', 'tonnes'],
13
torqueGradient: ['N', 'lbf'],
14
wgrad: ['sg', 'ppg'],
15
wltubulars: ['ppf', 'kg/m'],
16
weightGradient: ['ppf', 'kg/m'],
17
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'],
18
massFlowRate: ['kg/s', 'lbm/s'],
19
permeability: ['mD', 'm2'],
20
interfacialTension: ['dyn/cm', 'N/m', 'mN/m', 'lbf/ft'],
21
forceGradient: ['N/m', 'lbf/ft'],
22
percentage: ['%', 'fr'],
23
deg: ['deg', 'rad'],
24
power: ['W', 'kW', 'MW', 'hp', 'BTU/h'],
25
latitude: ['°N', '°S'],
26
longitude: ['°E', '°W'],
27
speed: ['m/s', 'ft/s', 'm/min', 'ft/min', 'm/h', 'ft/h', 'mph'],
28
acceleration: ['m/s2', 'ft/s2'],
29
torque: ['Nm', 'ftlbf'],
30
rpm: ['rpm', 'Hz'],
31
sdstats: ['CI', 'Sigma'],
32
viscosity: ['Pa*s', 'P', 'mPa*s', 'cP'],
33
pressureGradient: ['Pa/m', 'bar/m', 'bar/100m', 'psi/ft', 'psi/100ft'],
34
angleGradient: ['deg/30m', 'deg/100ft', 'deg/m', 'deg/m', 'deg/ft', 'rad/m', 'rad/ft'],
35
intensity: ['W/m2', 'hhp/in2', 'hhp/ft2'],
36
gor: ['Sm3/Sm3', 'SCF/STB']
37
}
Copied!

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):
1
[
2
{
3
"default_params": ["mw", "hid", "0"],
4
"id": "hydrostatic_isolation_depth",
5
"name": "Hydrostatic Isolation Depth",
6
"paramdefs": {
7
"paramdefs": [
8
{"d": "Mud weight", "t": "num", "u": "wgrad", "ucalc": "sg"},
9
{"d": "HID", "t": "num", "u": "length", "ucalc": "mMD"},
10
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg"}
11
]
12
},
13
"type": "eg"
14
},
15
{
16
"id": "frac_prev_shoe_gg_above",
17
"name": "[email protected] Shoe/GG above",
18
"paramdefs": {
19
"paramdefs": [
20
{"d": "Gas gravity", "t": "num", "u": "wgrad", "ucalc": "sg"},
21
{"d": "FG below prev shoe", "t": "num", "u": "wgrad", "ucalc": "sg"},
22
{"d": "Frac. error margin", "t": "num", "u": "wgrad", "ucalc": "sg"}
23
]
24
},
25
"type": "eg"
26
},
27
{
28
"default_params": ["1.1|sg"],
29
"id": "mud_cement_mix_water",
30
"name": "Mud and Cement Mix-Water",
31
"paramdefs": {
32
"paramdefs": [
33
{"d": "Cem.mix/water d.", "t": "num", "u": "wgrad", "ucalc": "sg"},
34
{"d": "SC Emu/No SW", "t": "bool", "u": "0/1"}
35
]
36
},
37
"type": "eg"
38
},
39
{
40
"default_params": [1],
41
"id": "min_form_pore_pressure",
42
"name": "Minimum Formation Pore Pressure",
43
"paramdefs": {
44
"paramdefs": [
45
{"d": "Cem.mix/water d.", "t": "num", "u": "wgrad", "ucalc": "sg"},
46
{"d": "Mud.Dr=1,No=0", "t": "bool", "u": "0/1"},
47
{"d": "0=P.Shoe,1=TOC", "t": "bool", "u": "0/1"}
48
]
49
},
50
"type": "eg"
51
},
52
{
53
"default_params": ["pp_prev_shoe", "mw"],
54
"id": "shoe_mud_grad_w_pp",
55
"name": "Shoe/Mud grad. w/PP",
56
"paramdefs": {
57
"paramdefs": [
58
{"d": "PP Prev.Shoe", "t": "num", "u": "wgrad", "ucalc": "sg"},
59
{"d": "Mw above TOC", "t": "num", "u": "wgrad", "ucalc": "sg"}
60
]
61
},
62
"type": "eg"
63
},
64
{
65
"default_params": ["0.998"],
66
"id": "above_below_prior_shoe",
67
"name": "Above/Below Prior Shoe",
68
"paramdefs": {
69
"paramdefs": [{"d": "Cem.mix/water d.", "t": "num", "u": "wgrad", "ucalc": "sg"}]
70
},
71
"type": "eg"
72
},
73
{
74
"default_params": ["mw", "1"],
75
"id": "fluid_gradients_burst",
76
"name": "Fluid Gradients (Burst)",
77
"paramdefs": {
78
"paramdefs": [
79
{"d": "FG above TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
80
{"d": "FG below TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
81
{"d": "SC Emu/No SW", "t": "bool", "u": "0/1"}
82
]
83
},
84
"type": "eg"
85
},
86
{
87
"default_params": ["mw", "mw"],
88
"id": "fluid_gradients_collapse",
89
"name": "Fluid Gradients (Coll.)",
90
"paramdefs": {
91
"paramdefs": [
92
{"d": "FG above TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
93
{"d": "FG below TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
94
{"d": "SC Emu/No SW", "t": "bool", "u": "0/1"}
95
]
96
},
97
"type": "eg"
98
},
99
{
100
"default_params": ["mw", "mw"],
101
"id": "fluid_grad_w_pp_collapse",
102
"name": "Fluid Gradients w/PP (Collapse)",
103
"paramdefs": {
104
"paramdefs": [
105
{"d": "FG above TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
106
{"d": "FG below TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
107
{"d": "SC Emu/No SW", "t": "bool", "u": "0/1"}
108
]
109
},
110
"type": "eg"
111
},
112
{
113
"default_params": ["mw", "1"],
114
"id": "fluid_grad_w_pp_burst",
115
"name": "Fluid Gradients w/PP (Burst)",
116
"paramdefs": {
117
"paramdefs": [
118
{"d": "FG above TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
119
{"d": "FG below TOC", "t": "num", "u": "wgrad", "ucalc": "sg"},
120
{"d": "SC Emu/No SW", "t": "bool", "u": "0/1"}
121
]
122
},
123
"type": "eg"
124
},
125
{
126
"id": "mud_cem_slurry",
127
"name": "Mud and Cement Slurry",
128
"paramdefs": {"paramdefs": [{"d": "SC Emu/No SW", "t": "bool", "u": "0/1"}]},
129
"type": "eg"
130
},
131
{
132
"default_params": ["max_pp_bottom_next_oh_section_md", "0", "mw_next", "gas_gradient", "", "0"],
133
"id": "displacement_to_gas",
134
"name": "Displacement To Gas",
135
"paramdefs": {
136
"paramdefs": [
137
{"d": "Influx depth", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
138
{"d": "Mud/Gas interf.", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
139
{"d": "Mud weight", "t": "num", "u": "wgrad", "ucalc": "sg", "usuff": "EMW"},
140
{"d": "Gas Gradient", "t": "num", "u": "wgrad", "ucalc": "sg", "usuff": "EMW"},
141
{"d": "Limit [email protected]", "t": "bool", "u": "0/1"},
142
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg", "usuff": "EMW"}
143
]
144
},
145
"type": "lc"
146
},
147
{
148
"default_params": [],
149
"id": "custom_internal_pressure",
150
"name": "Custom Internal Pressure",
151
"paramdefs": {
152
"paramdefs": [{"d": "Custom Table", "t": "dropdown", "u": "dropdown", "ucalc": ""}]
153
},
154
"type": "lc"
155
},
156
{
157
"id": "custom_external_pressure",
158
"name": "Custom External Pressure",
159
"paramdefs": {
160
"paramdefs": [{"d": "Custom Table", "t": "dropdown", "u": "dropdown", "ucalc": ""}]
161
},
162
"type": "eg"
163
},
164
{
165
"default_params": ["gas_gradient", ""],
166
"id": "frac_at_shoe_gg_above",
167
"name": "[email protected]/GG Above",
168
"paramdefs": {
169
"paramdefs": [
170
{"d": "Gas/Fl.Grad.Ab.", "t": "num", "u": "wgrad", "ucalc": "sg"},
171
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg"}
172
]
173
},
174
"type": "lc"
175
},
176
{
177
"default_params": ["mw_next", "0.036"],
178
"id": "drill_ahead_burst",
179
"name": "Drill Ahead (Burst)",
180
"paramdefs": {
181
"paramdefs": [
182
{"d": "Mud weight next", "t": "num", "u": "wgrad", "ucalc": "sg"},
183
{"d": "ECD", "t": "num", "u": "wgrad", "ucalc": "sg"}
184
]
185
},
186
"type": "lc"
187
},
188
{
189
"default_params": ["mw_next", "0.036"],
190
"id": "drill_ahead_collapse",
191
"name": "Drill Ahead (Collapse)",
192
"paramdefs": {
193
"paramdefs": [
194
{"d": "Mud weight next", "t": "num", "u": "wgrad", "ucalc": "sg"},
195
{"d": "ECD", "t": "num", "u": "wgrad", "ucalc": "sg"}
196
]
197
},
198
"type": "lc"
199
},
200
{
201
"default_params": [
202
"max_pp_bottom_next_oh_section_md",
203
"gas_vol_next_casing_last_liner",
204
0,
205
"mw_next",
206
0.7,
207
0,
208
5,
209
0,
210
0,
211
0
212
],
213
"id": "gas_kick_profile",
214
"name": "Gas Kick Profile",
215
"paramdefs": {
216
"paramdefs": [
217
{"d": "Influx depth", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
218
{"d": "Kick volume", "t": "num", "u": "volume", "ucalc": "m3"},
219
{"d": "Kick intensity", "t": "num", "u": "wgrad", "ucalc": "sg"},
220
{"d": "Max mud weight", "t": "num", "u": "wgrad", "ucalc": "sg"},
221
{"d": "Kick gas gravity", "t": "num", "u": "wgrad", "ucalc": "sg"},
222
{"d": "Fracture MoE", "t": "num", "u": "wgrad", "ucalc": "sg"},
223
{"d": "DP OD", "t": "num", "u": "diameters", "ucalc": "in"},
224
{"d": "Collar OD", "t": "num", "u": "diameters", "ucalc": "in"},
225
{"d": "Collar length", "t": "num", "u": "length", "ucalc": "m"},
226
{"d": "Limit [email protected]", "t": "bool", "u": "0/1"}
227
]
228
},
229
"type": "lc"
230
},
231
{
232
"default_params": ["0", "mw"],
233
"id": "pressure_test",
234
"name": "Pressure Test",
235
"paramdefs": {
236
"paramdefs": [
237
{"d": "Test Pressure", "t": "num", "u": "pressurechange", "ucalc": "bar"},
238
{"d": "Fluid.d", "t": "num", "u": "wgrad", "ucalc": "sg"}
239
]
240
},
241
"type": "lc"
242
},
243
{
244
"default_params": ["surface_35_70", "mw_next", 0],
245
"id": "pa_pressure_test",
246
"name": "P&A Pressure Test",
247
"paramdefs": {
248
"paramdefs": [
249
{"d": "Surf.p.", "t": "num", "u": "pressurechange", "ucalc": "bar"},
250
{"d": "MW in Hole", "t": "num", "u": "wgrad", "ucalc": "sg"},
251
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg"}
252
]
253
},
254
"type": "lc"
255
},
256
{
257
"default_params": ["0", "mw"],
258
"id": "green_cem_pt_burst",
259
"name": "Green Cement Pressure Test (Burst)",
260
"paramdefs": {
261
"paramdefs": [
262
{"d": "Surf.p", "t": "num", "u": "pressurechange", "ucalc": "bar"},
263
{"d": "Fluid.d", "t": "num", "u": "wgrad", "ucalc": "sg"}
264
]
265
},
266
"type": "lc"
267
},
268
{
269
"default_params": ["max_pp_bottom_next_oh_section_md", "packer_depth", "sw_sg", "gas_gravity"],
270
"id": "tubing_leak",
271
"name": "Tubing Leak",
272
"paramdefs": {
273
"paramdefs": [
274
{"d": "Perf.Depth", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
275
{"d": "Packer Depth", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
276
{"d": "Packer fl.d", "t": "num", "u": "wgrad", "ucalc": "sg"},
277
{"d": "Gas gravity", "t": "num", "u": "wgrad", "ucalc": "sg"}
278
]
279
},
280
"type": "lc"
281
},
282
{
283
"default_params": ["shoe_over_oh_md", "0", "mw_next_casing_last_liner"],
284
"id": "lost_ret_w_water",
285
"name": "Lost Returns w/Water",
286
"paramdefs": {
287
"paramdefs": [
288
{"d": "Mud/Water If.", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
289
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg"},
290
{"d": "MW In Hole", "t": "num", "u": "wgrad", "ucalc": "sg"}
291
]
292
},
293
"type": "lc"
294
},
295
{
296
"default_params": ["gas_gradient", "0.998", "0"],
297
"id": "surf_protection_bop",
298
"name": "Surface Protection (BOP)",
299
"paramdefs": {
300
"paramdefs": [
301
{"d": "Gas Gradient", "t": "num", "u": "wgrad", "ucalc": "sg"},
302
{"d": "Water Density", "t": "num", "u": "wgrad", "ucalc": "sg"},
303
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg"}
304
]
305
},
306
"type": "lc"
307
},
308
{
309
"default_params": ["sw_sg", "packer_depth", 100, 1],
310
"id": "stim_surf_leak",
311
"name": "Stimulation Surface Leak",
312
"paramdefs": {
313
"paramdefs": [
314
{"d": "Packer Fl. Density", "t": "num", "u": "wgrad", "ucalc": "sg"},
315
{"d": "Packer Depth", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
316
{"d": "Injection Press.", "t": "num", "u": "pressurechange", "ucalc": "bar"},
317
{"d": "Injection Dens..", "t": "num", "u": "wgrad", "ucalc": "sg"}
318
]
319
},
320
"type": "lc"
321
},
322
{
323
"default_params": [100, 1],
324
"id": "inj_down_casing",
325
"name": "Injection Down Casing",
326
"paramdefs": {
327
"paramdefs": [
328
{"d": "Injection Press.", "t": "num", "u": "pressurechange", "ucalc": "bar"},
329
{"d": "Injection Dens..", "t": "num", "u": "wgrad", "ucalc": "sg"}
330
]
331
},
332
"type": "lc"
333
},
334
{
335
"default_params": [100, "sw_sg"],
336
"id": "perf_gun_pressure",
337
"name": "Perforating Gun Pressure",
338
"paramdefs": {
339
"paramdefs": [
340
{"d": "Max Trigger Press.", "t": "num", "u": "pressurechange", "ucalc": "bar"},
341
{"d": "Fluid Dens. w/Perf.", "t": "num", "u": "wgrad", "ucalc": "sg"}
342
]
343
},
344
"type": "lc"
345
},
346
{
347
"default_params": [
348
"max_pp_bottom_next_oh_section_md",
349
"gas_gradient",
350
"0",
351
"mw_next_casing_last_liner",
352
"50",
353
"wh_depth",
354
"0"
355
],
356
"id": "gas_over_mud_ratio",
357
"name": "Gas Over Mud Ratio",
358
"paramdefs": {
359
"paramdefs": [
360
{"d": "Influx depth", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
361
{"d": "Gas gradient", "t": "num", "u": "wgrad", "ucalc": "sg"},
362
{"d": "Frac.Err.Margin", "t": "num", "u": "wgrad", "ucalc": "sg"},
363
{"d": "[email protected] Next", "t": "num", "u": "wgrad", "ucalc": "sg"},
364
{"d": "Gas Percent", "t": "num", "u": "percentage", "ucalc": "%"},
365
{"d": "Depth Ref.", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
366
{"d": "MASP/MAWP to [email protected]", "t": "num", "u": "0/1"},
367
{"d": "Limit to [email protected]", "t": "num", "u": "0/1"}
368
]
369
},
370
"type": "lc"
371
},
372
{
373
"default_params": ["100", "", "mw_next"],
374
"id": "casing_evac",
375
"name": "Casing Evacuation",
376
"paramdefs": {
377
"paramdefs": [
378
{"d": "Pct Evac", "t": "num", "u": "percentage", "ucalc": "%"},
379
{"d": "Mud Level", "t": "num", "u": "length", "ucalc": "m", "usuff": "MD"},
380
{"d": "Mud Weight", "t": "num", "u": "wgrad", "ucalc": "sg"}
381