# DIMENSION

The **DIMENSION** keyword is encountered in the ATOM and CONSTANT declarations in ASCEND syntax. It is used to declare the dimension that a particular variable or constant will be required to take.

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. Many different measurement units may exist for a variable of any given dimensionality. 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.