Documentation
The method, written down before the software.
Unit conventions, the relation behind every calculator, and an honest account of which of them have been checked. Published now, while the design is still open, because this is the part worth arguing with.
Where this is up to
What exists today, in one paragraph, so nothing below is read as a promise.
CompletionLab is in development. None of the cased-hole calculators in the directory compute anything yet — every one of them is marked Planned, on every card, on purpose.
What is being built around them is five tools that describe one well — a schematic builder, a tally, the calculators, casing design and an equipment database. The features page says what each one will do and how far along it is. None of it is public yet, and nothing on this site opens an application.
What is also published, and what this page is mostly about, is the METHOD for each calculator: the relation it will use, the units it expects, and the conditions under which the relation holds. That part is checkable now, and the point of publishing it before the software exists is that it can be argued with while the design is still open.
Units and conventions
Field units first, SI alongside, and the conversions written out exactly.
Every calculator takes field units as its primary entry, because that is what a completion programme, a daily report and a service ticket are written in. SI is accepted and displayed alongside rather than instead.
Depth is TRUE VERTICAL unless a field explicitly says otherwise. This is the single commonest error in the set: measured depth in a deviated well overstates hydrostatic pressure, and it does so quietly, because the number still looks reasonable. Every depth input on this site is labelled with which one it wants.
Density is accepted as ppg, specific gravity, lb/ft³ or kg/m³ and converted on entry rather than at the end, so a mixed-unit worksheet has one internal representation and one rounding step.
Angles are degrees. Pressures are gauge unless a field says absolute — the distinction matters for gas calculations and is stated on those inputs.
| Quantity | Field | SI | Conversion |
|---|---|---|---|
| Length / depth | ft | m | 1 ft = 0.3048 mExact by definition of the international foot since 1959. |
| Pressure | psi | kPa | 1 psi = 6.894757293… kPaExact from the pound-force and the inch, but the decimal does not terminate: 4.4482216152605 N ÷ 0.00064516 m². |
| Density | ppg | kg/m³ | 1 ppg = 119.826427… kg/m³US gallon. An imperial gallon is 20% larger and the mistake is silent. |
| Pressure gradient | psi/ft | kPa/m | 1 psi/ft = 22.6205948… kPa/m |
| Density to gradient | ppg → psi/ft | — | × 12 ÷ 231 = 0.0519480…This is the 0.052 everyone uses. It is a rounding UP of 0.1%, which is why the calculators will carry the ratio and round only for display. |
| Volume | bbl | m³ | 1 bbl = 0.158987294928 m³42 US gallons, exactly 9702 in³. |
| Capacity | d² (in²) → bbl/ft | — | ÷ 1029.4142From the barrel above: 9702 ÷ (12 × π/4) = 1029.414172…, so bbl/ft = d² ÷ 1029.4142 with d in inches. The familiar 1029.4 is this rounded. |
| Temperature | °F | °C | °C = (°F − 32) × 5/9Absolute forms: °R = °F + 459.67, K = °C + 273.15. |
| Force | lbf | N | 1 lbf = 4.4482216152605 N |
The methods
Every calculator, its governing relation and where the relation comes from.
Each calculator has its own page carrying the formula in field and SI form, a symbol legend, the assumptions that have to hold, and the reference the method comes from. Those pages are the documentation for the calculation itself; this is the index into them.
The assumptions are not small print and are not written as a disclaimer. They are the part that stops a correct number being applied to the wrong situation, which on this subject matter is the failure that costs something.
- Hydrostatic pressureP = 0.052 × MW × TVDPressureRe-derivedPlanned
- Bottomhole pressureLiquid: BHP = Ps + 0.052 × MW × TVDPressureSourcedPlanned
- Kill sheetKWM = OMW + SIDPP ÷ (0.052 × TVD)PressureRe-derivedPlanned
- Formation integrityEMWlot = MWt + Plot ÷ (0.052 × TVDs)PressureRe-derivedPlanned
- Fluid columnP = Σ (0.052 × ρi × hi)FluidsRe-derivedPlanned
- Displacement and pillsV = C × LFluidsRe-derivedPlanned
- Brine densityρd = ρs × [1 − a(T − Ts) + b(P − Ps)]FluidsNeeds reviewPlanned
- Several strings in one holeCann = (D² − Σdᵢ²) ÷ 1029.4WellboreRe-derivedPlanned
- Abandonment plugsVs = C × Lp × (1 + e)WellboreSourcedPlanned
- Tubing forcesΔL = ΔL₁ piston + ΔL₂ buckling + ΔL₃ ballooning + ΔL₄ temperatureTubularsNeeds reviewPlanned
- Collapse and burstPb = 0.875 × 2 × Yp × t ÷ DTubularsNeeds reviewPlanned
- Depth correlationΔd = dref − dlogLoggingSourcedPlanned
- Wireline stretchΔL = K × W × L ÷ 10⁶LoggingNeeds reviewPlanned
Worked examples
One set of numbers per relation, so the method can be checked rather than believed.
A published relation is checkable in principle. A relation with figures in it is checkable in about a minute, with a phone, by somebody who has no reason to trust us — which is the reader this whole project is aimed at. So every method that can carry a worked example carries one, on its own page.
The figures are recomputed by the test suite on every build. An edit to a relation that is not carried through to its example fails the build rather than leaving a wrong number on a page, which matters more here than it would elsewhere: the arithmetic on this site is the kind somebody works a kill sheet from.
Two methods carry no example, and the table below says which and why. Both need inputs this repository does not hold — a brine system’s density coefficients, a stated seal-assembly case — and inventing a plausible one would be the worst kind of error available to us: a checkable figure that checks out and is still made up.
| Method | Example | What it works, or why not |
|---|---|---|
| Hydrostatic pressure | 2 steps | Example Well A, checking the column before opening up. |
| Bottomhole pressure | 2 steps | A shut-in gas well, Example Well B, taken from surface to depth. |
| Kill sheet | 3 steps | Example Well C, shut in on a kick, working the sheet before the pump comes up. |
| Formation integrity | 2 steps | A leak-off test at the 9⅝" shoe, reduced to a working limit. |
| Fluid column | 4 steps | A brine cap over mud over a cement column, summed rather than averaged. |
| Displacement and pills | 2 steps | Displacing 2⅞" 6.5 lb/ft tubing to a brine, counting strokes to the end of the tubing. |
| Brine density | — | The coefficients a and b are fitted per brine system — CaCl₂, CaBr₂, ZnBr₂ and the blends each have their own, and they come from the supplier’s data rather than from arithmetic. This repository does not hold them, so any worked figure here would be a number we made up, shown on a page whose whole argument is that we do not do that. The relation and its shape are published; the constants have to come from whoever mixed the fluid. |
| Several strings in one hole | 2 steps | A dual completion: two 2⅞" strings side by side inside 9⅝" 47 lb/ft casing, to 9,200 ft. |
| Abandonment plugs | 3 steps | A 500 ft balanced plug in 7" 26 lb/ft casing, with a tenth excess. |
| Tubing forces | — | The four effects each have a standard form, but the sum they add up to depends on the seal-assembly case — free, anchored or limited-motion — and on tubing and packer-bore geometry that changes what the piston term even acts on. Publishing one arithmetic example would suggest the four combine the same way on every string, which is the misreading this calculator would exist to correct. The relation and the directions are drawn; the case has to be stated before a number means anything. |
| Collapse and burst | 2 steps | 5½" 17 lb/ft L-80 tubing, checked against a treating pressure. |
| Depth correlation | 2 steps | A cased-hole run tied back to the completion log on a 15 ft marker joint, before setting a plug read at 9,210.0 ft on this run. |
| Wireline stretch | 1 steps | A toolstring on monoconductor at 11,200 ft, before setting on depth, with 2,400 lbf read at surface and K taken from the cable certificate. |
What has been checked
How far each method has been reviewed, stated plainly, including the parts that have not.
Whether a calculator exists and whether its method has been reviewed are two different questions, so they carry two different badges. A relation can be exact arithmetic on a calculator nobody has written; a shipped calculator can rest on a coefficient nobody has confirmed.
Nothing on this site should be treated as an authority. Where a method comes from a standard, the standard is named and IS the authority — the tables themselves are not reproduced here, both because that is a licensing question and because a copy is one revision away from being wrong.
This table is generated from the same field the badges read, so it cannot drift from them. It is meant to shrink.
6 of 13
An exact identity or unit conversion, re-derived from first principles. The constant is arithmetic rather than a fitted value.
Hydrostatic pressure, Kill sheet, Formation integrity, Fluid column, Displacement and pills, Several strings in one hole
Re-derived3 of 13
A standard published method. The coefficients are quoted from the named reference and have not been independently re-derived here.
Bottomhole pressure, Abandonment plugs, Depth correlation
Sourced4 of 13
Needs a completion engineer, or tables this repository does not hold. Treat the relation as an outline, not as a figure to work from.
Brine density, Tubing forces, Collapse and burst, Wireline stretch
Needs reviewLimits
What these calculators are not, and what they must not be used as.
These are arithmetic tools. They do not constitute a well control procedure, a completion design, a barrier policy or an abandonment programme, and no output from them replaces the judgement of the competent person on the job or the requirements of the regulator for the jurisdiction.
Every relation here is a model with a range of validity. Outside that range a calculator will still return a number, and the number will still look reasonable — which is why the assumptions are printed next to the result rather than in a manual.
Where a coefficient belongs to a manufacturer — cable stretch and breaking strength, slurry yield, brine density and crystallisation — the datasheet for the actual product is the source. Nothing here substitutes for it.
Integration
There is no API. What that means today, and what is intended.
There is no public API, no endpoint, no key to request and nothing to integrate with. Saying so plainly is more useful than an API reference for something that does not exist, and this section will be replaced by real documentation at the point there is something to document.
What is intended, and is stated as an intention rather than a plan with a date: a worksheet format that is plain text and diffable, so a calculation can live in version control next to the programme it belongs to, and can be reviewed the way code is reviewed.
The tools are being built to make no network requests of their own. Any future integration has to be something a reader opts into, not something the software does on its own.
Argue with the assumptions.
If a relation here does not hold on the wells you run, or a constant is wrong, that is the most useful thing you could send us. It changes what gets built.