AngouriMath

Navigation

DimensionAnalysis


← Back to list of classes

Description

Summary

Reads the dimension off an expression tree, bottom up, given the dimension of each
variable. The rules are the ones a physicist checks by eye: a sum and a comparison need
their sides to agree, a product multiplies, a power needs a pure-number exponent and,
on a dimensional base, a rational one, and a transcendental function needs a pure
number to act on.

Remarks

Nothing here simplifies. The check is about the expression as written, so
x - x with x a length is a length, and sin(x) - sin(x) with the
same x is inconsistent although it simplifies to 0: what was written
is meaningless before any rewriting makes it vanish.
Every arm of Of(AngouriMath.Entity,System.Collections.Generic.IReadOnlyDictionary{AngouriMath.Entity.Variable,AngouriMath.Core.Dimension}) names a concrete node type, and none matches an abstract
one such as Function or Statement. A node type added to the
library later therefore reaches the last arm and is reported
Undetermined, rather than being read as a pure number
because it happens to derive from a class whose other members are.
DimensionsTest.EveryNodeTypeHasADecidedReading lists the verdict on each node type
and fails on one it does not list.
A set is not a quantity, so Of(AngouriMath.Entity,System.Collections.Generic.IReadOnlyDictionary{AngouriMath.Entity.Variable,AngouriMath.Core.Dimension}) does not give one a dimension. Where a set
says what a variable ranges over — x in [0; l], max(f, x in S), a sum over
a set — Elements(AngouriMath.Entity,System.Collections.Generic.IReadOnlyDictionary{AngouriMath.Entity.Variable,AngouriMath.Core.Dimension}) reads the dimension its members share.

Members

























Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 6003 pages online