Kind of Quantity
A KindOfQuantity
represents the general notion of a quantity, such as: a length, mass, speed, etc. This can be contrasted with more specific quantity definitions, like: my height, your weight, etc.
KindOfQuantity
objects are defined (and identified) by a name and a term (a short name). For example, this code creates a new context with the base kinds of quantity Length and Time
from QV import *
context = Context( ("Length","L"), ("Time","T") )
Length, Time = context.base_quantities
The algebraic rules of quantity calculus are defined for KindOfQuantity
objects (see, context
).
- class KindOfQuantity(name, symbol)
A type of quantity like mass, length, etc.
KindOfQuantity objects can be multiplied and divided. Declaring a ratio and simplifying a ratio is also supported.