DIMENSION: Difference between revisions
Created page with '{{missing}} Category:Syntax' |
No edit summary |
||
| Line 1: | Line 1: | ||
{{ | Real values have '''dimensionality''' such as length/time for velocity. Dimensionality is to be distinguished from the units such as km/h or ft/s. ASCEND takes care of mapping between units and dimensions. A value without units (this includes integer values) is taken to be dimensionless. Dimensionality is built up from the following base dimensions: | ||
{| class='wikitable' | |||
! Symbol || definition !! typical units !! symbol | |||
|- | |||
| L || length || metre || m | |||
|- | |||
| M || mass || kilogram || kg | |||
|- | |||
| T || time || second || s | |||
|- | |||
| E || electric current || ampere || A | |||
|- | |||
| Q || quantity || mole || mol | |||
|- | |||
| TMP || temperature || kelvin || K | |||
|- | |||
| LUM || luminous intensity || candela || cd | |||
|- | |||
| P || plane angle || radian || rad | |||
|- | |||
| S || solid angle || steradian || srad | |||
|- | |||
| C || currency || US dollars || USD | |||
|} | |||
The [[ATOM]] and [[CONSTANT]] definitions in the library illustrate the use of dimensionality. Dimensions may be any combination of these symbols along with rounded parentheses, (), and the operators *, ^ and /. Examples include <tt>M/T</tt> or <tt>M*L^2/T^2/TMP</tt> (this latter means <tt>(M*(L^2)/(T^2))/TMP</tt>). The second operand for the to-the-power-of operator, ^, must be an integer value (e.g., -2 or 3) because fractional powers of dimensional numbers are physically undefined in ASCEND. If the dimensionality for a real value is undefined, then ASCEND gives it a wildcard dimensionality. If ASCEND can later deduce its dimensionality from its use in a model definition it will do so. For example consider the real variable | |||
a, suppose a has wildcard dimensionality, b has dimensionality of L/T. Then | |||
the statement | |||
<source lang=a4c> | |||
a + b = 3 {ft/s}; | |||
</source> | |||
requires that a have the same dimensionality as the other two terms, namely, <tt>L/T</tt>. ASCEND will assign this dimensionality to <tt>a</tt>. The user will be warned of dimensionally inconsistent equations. | |||
== See also == | |||
* [[Units]] | |||
* [[ATOM]] | |||
* [[CONSTANT]] | |||
[[Category:Syntax]] | [[Category:Syntax]] | ||
Revision as of 18:37, 14 February 2012
Real values have dimensionality such as length/time for velocity. Dimensionality is to be distinguished from the units such as km/h or ft/s. ASCEND takes care of mapping between units and dimensions. A value without units (this includes integer values) is taken to be dimensionless. Dimensionality is built up from the following base dimensions:
| Symbol | definition | typical units | symbol |
|---|---|---|---|
| L | length | metre | m |
| M | mass | kilogram | kg |
| T | time | second | s |
| E | electric current | ampere | A |
| Q | quantity | mole | mol |
| TMP | temperature | kelvin | K |
| LUM | luminous intensity | candela | cd |
| P | plane angle | radian | rad |
| S | solid angle | steradian | srad |
| C | currency | US dollars | USD |
The ATOM and CONSTANT definitions in the library illustrate the use of dimensionality. Dimensions may be any combination of these symbols along with rounded parentheses, (), and the operators *, ^ and /. Examples include M/T or M*L^2/T^2/TMP (this latter means (M*(L^2)/(T^2))/TMP). The second operand for the to-the-power-of operator, ^, must be an integer value (e.g., -2 or 3) because fractional powers of dimensional numbers are physically undefined in ASCEND. If the dimensionality for a real value is undefined, then ASCEND gives it a wildcard dimensionality. If ASCEND can later deduce its dimensionality from its use in a model definition it will do so. For example consider the real variable a, suppose a has wildcard dimensionality, b has dimensionality of L/T. Then the statement
a + b = 3 {ft/s};
requires that a have the same dimensionality as the other two terms, namely, L/T. ASCEND will assign this dimensionality to a. The user will be warned of dimensionally inconsistent equations.