Concepts

Units as a check

Updated 3 November 2026 · 3 min read

Give everything in a model a unit and the builder checks every formula against them. It is the cheapest test a model will ever get, and it catches the mistakes that are hardest to see in the numbers: a rate per year in a model that runs in days, a flow that is really a stock, a factor of a thousand gone missing.

The rules the checker applies#

  • Adding and subtracting need like units. Metres plus seconds is a mistake.
  • Multiplying and dividing combine units. People times per day is people per day.
  • Exp and Log take a pure number. Exp(-t / Tau) is fine when t and Tau are both in days; Exp(-t) is not, unless time has no unit.
  • A flow must come out in its stock’s unit per time unit. A flow into a stock of people, in a model that runs in days, must be in people/day.
  • A bare number is a pure number when it multiplies, and takes the unit of whatever it is added to, so 2 * Infected and 1 - Fraction both pass.

Units has the full grammar: how to write powers, what counts as a pure number, and which prefixes are treated as scale.

What it catches#

Say the coffee’s flow is given the unit °C instead of °C/minute. The formula, temperature difference over cooling time, comes out in °C per minute, which doesn’t match what the flow claims to be, and the flow doesn’t have the unit a flow from a °C stock needs either. The builder marks the flow on the canvas and lists the problem in the Units tab.

  1. 1What is wrong, on which block. Click it to select the block.

The same check catches the mistake that is easiest to make and hardest to see: mixing time units. A death rate typed as 0.05 per year in a model that runs in days is 365 times too large if it is used as per day. The numbers would look plausible and be wrong. The units won’t come out, and the checker says so.

Warnings, not errors#

A unit problem is a warning. The model still runs, because sometimes you know better: a fitted coefficient whose unit you haven’t worked out yet, or a quick test. But a warning is almost always right. Read each one before you trust a result.

Problems that stop a run are a different kind: a formula naming something that doesn’t exist, brackets that don’t balance, a model with no stocks. Those appear in red at the top of the side panel, and the model won’t run until they are fixed.

Scale is your job#

The checker works with dimensions, not sizes. Oil field volumes show why: Bcf, MMscf and scf are all volumes of gas, so the checker treats them as the same unit, and a formula that multiplies a gas in place in Bcf by a factor in rb/scf passes as reservoir barrels. The factor of a thousand or a million between them is yours to get right. The same is true of grams and kilograms: write kg and g and the checker will not convert for you.