Dimensional analysis
Physical equations must balance not only numbers but kinds of quantity. The solver tracks SI base dimensions as an exponent vector.
Base dimensions
[M] mass [L] length [T] time [I] current [Θ] temperature [N] amount [J] luminous intensity
Example — force is mass × acceleration:
[F] = [M][L][T]⁻² → N = kg·m/s²
Algebra of dimensions
- Multiply quantities → add dimension vectors
- Divide → subtract vectors
- Power
x^n→ scale the vector byn - Add / subtract only if dimensions match exactly
Consistency checks
For LHS = RHS, both sides must share the same dimension vector. Matching dimensions is necessary but not sufficient for physical truth — coefficients and constitutive laws still matter.
Unit conversion
convert: 100 km/h -> m/s
Both sides must share dimensions. The numeric factor is the ratio of SI scales. Prefixes (k, M, m, μ/u, n, …) and many imperial / engineering units are supported.
Variables
let m = 2.5 kg let a = 9.81 m/s^2 F = m * a
Bind quantities once, then reuse them. let may reuse names that are also SI symbols (e.g. let m = 2 kg). An unbound identifier that is not a known unit is an error.
Limits
- Not a full computer algebra system
- Absolute temperatures (°C, °F) involve offsets — prefer kelvin differences for thermodynamics
- Arguments of log, exp, sin must be dimensionless in rigorous work
Try the Dimensional Analysis Solver with the mass-flow template.