Overview

UnitFlow is a unit algebra and symbolic constraint library for Python. It is aimed at engineering workflows where dimensions must stay correct, conversions should be exact (rationals and explicit π), and equations are first-class objects—not strings.

What you use it for

  • Computing with quantities (3 * m, 5000 * si.W) and converting with .to(...).

  • Building symbolic models: symbol("F", unit=N), equations F == m * a, bounds, conjunctions.

  • Introspection via free_symbols for dependency graphs in larger engines.

  • Evaluation of expressions and constraints with explicit tolerances.

  • Numeric compilation of expression trees to fast float functions for solvers.

  • Optional NumPy integration for array-backed quantities.

Relationship to ThunderGraph

UnitFlow is the foundational math layer for ThunderGraph, an MBSE-oriented platform. The library itself is standalone and has no proprietary runtime dependency.

Next steps