No Table Generated
Enter tank details and shell dimensions, then click Generate Table.
No Diagram
Generate a table first.
No Course Data
Generate a table first.
What it is: The API Manual of Petroleum Measurement Standards (MPMS) defines exactly how to measure, calibrate, and compute the capacity of oil tanks. Chapter 2.2A covers vertical cylindrical tanks; Chapter 2.2D covers horizontal and sphere tanks.
How TankCal applies it: Every formula in the engine cites its specific MPMS section. All arithmetic runs in millimetres (lengths) and litres (volumes) using exact conversion constants defined by NIST — no rounded approximations. Quick-mode output is watermarked; Certified mode requires the full Phase 5 validation gate.
What it is: Every physical unit used in petroleum measurement has an exact SI equivalent established by statute or international agreement. Using a rounded approximation (like 0.00629 bbl/L) would accumulate error across millions of table rows.
How TankCal applies it: The engine converts all user inputs to millimetres at entry and all volumes to litres internally. Display conversion to bbls, USG, m³ etc. happens only at the output layer, always using the exact chain shown below.
The barrel constant 158.987294928 L/bbl replaced a previously rounded value of 0.00628981 bbl/L — documented in docs/decisions/001-bbl-constant.md.
What it is: A real tank is not a perfect cylinder — each welded ring (course) may have a slightly different inside diameter due to plate thickness and welding. The shell volume formula treats each course as its own cylinder and sums only the portion below the liquid level.
How TankCal applies it: You enter each course's inside diameter and height in the sidebar. The engine builds a course map and calls shellVol(courseMap, h) at every table increment. The liquid level h is measured from the shell base (the cone-shell junction for non-flat tanks).
What it is: When a horizontal cylindrical tank is partially filled, the liquid occupies a circular segment — the region inside the circle below the liquid surface. Its area depends on the fill height h and the tank radius r.
How TankCal applies it: The engine integrates this area along the tank's length (and along the depth of each end-cap) using 200 axial slices to compute the total volume at each table row.
What it is: The bottom of a tank is rarely flat. A cone-up bottom has a cone rising from the floor that displaces liquid — the usable liquid occupies the annular ring around it. A cone-down (sump) drops below the floor to collect sediment. Both require a dedicated volume formula because a simple cylinder formula overcounts.
How TankCal applies it: The engine builds a lookup table at every integer-mm height from 0 to the cone/sump height at startup (after you click Generate). Table rows within the bottom zone read from this lookup; rows above it add bzTop (the full bottom zone volume) plus the shell cylinder above.
Cone Up (§12) — liquid is the annular ring around the cone
Cone Down / Sump (§13) — frustum widens from the apex upward
What it is: The strike plate is a small steel pad on the tank floor where the gauge bob lands. Liquid below this point cannot be measured — it is called dead stock. The strapping table datum is the strike plate: row h = 0 means the liquid surface is at the strike plate level, not the tank floor.
How TankCal applies it: Dead stock is computed once and added as an offset to every cumulative volume in the table. In the diagram it appears as the red fill below the strike plate line (SP). The formula branches on tank type because the effective volume geometry differs for each bottom style.
The cone-up case has two branches because the strike plate can lie within the cone zone (below the apex) — in that case the bottom-zone table gives the exact annular volume directly, avoiding over-counting from the cylindrical formula.
What it is: Any object inside the tank that physically occupies space is called deadwood — its volume must be subtracted from the capacity table. Heating coils, structural supports, and inlet pipes are common examples. Conversely, any structural feature that adds interior volume (a flush-mounted nozzle box, an external manhole chamber) is treated as negative deadwood and increases capacity.
How TankCal applies it: Each item is entered with a low level, high level, and total volume. The engine distributes its volume linearly across that span. At any table row height h, only the fraction of the item below h is deducted from cumulative volume.
What it is: Horizontal tanks have dished end-caps. The ASME standard 2:1 ellipsoidal head has a depth equal to half the tank radius (depth = r/2). Its volume profile is not a simple shape — the liquid area at each axial cross-slice changes as you move away from the tank centre.
How TankCal applies it: The engine divides the head depth into 200 equal axial slices. At each slice position z it computes the local ellipse radius Rz, then the circular segment area at that radius for the current liquid height. Summing 200 such areas × slice thickness gives the head's contribution to total volume.
What it is: A hemispherical head is a perfect half-sphere — its depth equals the tank radius (depth = r). It holds more liquid near the centreline than an ellipsoidal head does, so its volume at partial fill is different even for the same tank diameter. Sphere tanks use two such heads joined with no cylindrical shell between them.
How TankCal applies it: Same 200-slice numerical integration as the SE head, but the slice radius follows the sphere equation Rz = √(r² − z²) instead of the ellipse equation. For a sphere tank the engine calls this function twice (once for each hemisphere) with no shell volume contribution.