Ambient pressure follows the standard freshwater-equivalent rule P = 1 + depth/10 (bar). Air consumption scales with that pressure — a diver's lungs need the same volume of gas at depth, but it takes more molecules to fill them, so surface-equivalent SAC (L/min) is multiplied by P to get real consumption:
P(depth) = 1 + depth/10
consumption = SAC · P (L of tank gas / min)
tank_pressure(t) = 200 − ∫consumption dt / cylinder_L
Nitrogen loading uses a single-compartment Haldane model — the same idea behind every dive-table and dive-computer algorithm, simplified to one representative fast (5-minute half-time) tissue instead of a full 16-compartment Bühlmann set:
P_N2,amb = 0.79 · P(depth)
dP_tissue/dt = (P_N2,amb − P_tissue) · k, k = ln(2)/5min
NDL: solve P_tissue(t) = M0 for t, M0 ≈ 1.58 bar
If ambient N₂ pressure at the current depth is already below the surfacing M-value M0, the tissue can never load past it and the no-decompression limit shows "No limit". Otherwise the countdown is the time until continuing to breathe at this depth would put the tissue's nitrogen load above what a direct ascent to the surface can safely release — go past it and the dive owes a decompression stop it isn't modeling. Ascending faster than 10 m/min is flagged because rapid pressure drop lets dissolved nitrogen form bubbles before it can diffuse out through the lungs (the mechanism behind decompression sickness).