The dive planner.

Bühlmann ZH-L16C with gradient factors: sixteen tissue compartments loading and off-gassing in real time, a live ceiling, a decompression schedule, and the gas planning that decides whether any of it is survivable. This is the algorithm inside a modern dive computer, written out where you can watch it work.

read this first This is a teaching instrument and a way to see the model move. It is not a dive computer, it has never been validated against one, and it must not be used to plan a real dive. No decompression model is a guarantee: divers following them correctly are still bent, because the model is a curve fit to a physiological process nobody can measure directly. Plan real dives on equipment and training you trust, and treat every number here as an illustration.

The dive.

01 · profile

Build a profile out of levels. Descent and ascent between them are handled at the rates below, with the compartments integrated through the transitions rather than jumped, which is what separates this from a table.

The sixteen compartments.

02 · tissue loading

Each bar is one compartment at the end of the dive: how much inert gas it holds, against the pressure it could tolerate if you surfaced now. Fast compartments on the left fill and empty in minutes, slow ones on the right take most of a day. A bar past its line is a compartment that would be supersaturated beyond the model's limit.

Decompression.

03 · schedule
StopDepthTimeRun

Gas.

04 · mix and supply
What the model is doing. compartments, M-values, gradient factors, and where it stops being true notes

Sixteen compartments. Bühlmann's model does not describe any actual tissue. It is sixteen hypothetical compartments with half-times from 4 to 635 minutes, chosen so that between them they bracket how fast real tissues might plausibly take up and release inert gas. A compartment loads exponentially toward the pressure it is breathing, so after one half-time it has closed half the gap, after two, three quarters.

M-values. Each compartment has a coefficient pair, a and b, that defines the highest inert gas pressure it can hold at a given ambient pressure without, in the model's account, forming problematic bubbles. Rearranged, they give the shallowest pressure you may ascend to: the ceiling. That is the whole algorithm. Everything else is bookkeeping.

Gradient factors. Raw Bühlmann lets you ascend right up to the M-value line. Gradient factors pull that back to a fraction of it: GF low applies at the deepest stop and GF high at the surface, interpolated between. 30/80 is a common conservative choice, 100/100 is the bare model. Lower is slower and, on the balance of evidence, safer. This is the knob real computers expose, and it exists because the bare model was calibrated on fit young men in a chamber.

The coefficients. ZH-L16C, the variant intended for dive computers rather than printed tables, cross checked between two independent open source implementations that agree exactly on every half-time and every a and b for both nitrogen and helium. Compartment one uses the 5 minute half-time variant.

Where it stops being true. The model has no opinion about your fitness, temperature, workload, hydration, patent foramen ovale, or what you did yesterday. It cannot see a bubble. It treats gas uptake as symmetric with gas release, which is probably wrong. It assumes you actually followed the profile. Real computers add conservatism, repetitive dive handling and deep stop logic on top, and this does not.