next up previous contents
Next: Composable Equations Up: Top-level Forms Previous: defScenario

defDimension, defUnit, defConstantQuantity

The vocabulary used to describe quantities varies from one domain to another. For this reason, it is essential to be able to define new dimensions and units. Often, these will be derived from the base set of SI dimensions and units (e.g. an electro-magnetic domain theory might define a dimension for magnetic-flux and its SI derived unit, the Weber). In non-physical domains, new dimensions and units must be introduced (e.g. an economics theory might define a dimension for currency and units such as dollar, yen, mark, and so on). The top-level forms defDimension and defUnit provide this facility. The top-level form defConstantQuantity is also provided for defining global named constants.

defDimension
  Define a basic or derived dimension.
 (defDimension Dim name := dimension expression)

  figure686
Figure: Basic and derived dimensions are defined with the defDimension form.

If the optional dimension expression is not provided, then the new dimension may not be reducible to other dimensions (See section gif, page gif for the complete syntax).

tex2html_wrap2472 A CML base domain theory provides definitions for all of the basic SI dimensions: time-dimension, length-dimension, temperature-dimension, mass-dimension, luminosity-dimension, charge-dimension, amount-dimension (usually measured in moles), and dimensionless.

The semantics of the defDimension for is simply:

displaymath2468

tex2html_wrap2474

defUnit
  Define a basic or derived unit.
 (defUnit Unit name

[:= quantity expression]

[:dimension dimension expression ] )

  figure717
Figure: Basic and derived units are defined with the defUnit form.

If the := argument is absent, then a fundamental unit is being defined, and the :dimension must be provided (as in the meter example). Otherwise, if the :dimension argument is absent, then it defaults to the dimension of the quantity expression. In case the expression is complex, it may be more informative to provide the dimension explicitly.

The CML base domain theory will provide definitions for the common SI units including the base units, meter, kilogram, second, ampere, Kelvin, mole, and candela, as well as the derived units Hertz, Newton, Pascal, Joule, Watt, Coulomb, volt, Farad, ohm, Siemens, Weber, Tesla, and Henry.

The semantics of the defUnit form is simply

displaymath2469

defConstantQuantity
Define a constant quantity. The defConstantQuantity form is identical to defUnit, except that := must be provided.

 (dēfConstantQuantity Const name

:= quantity expression

[ :dimension dimension expression ] )

  figure762
Figure: Global symbolic constants are defined with the defConstantQuantity form.


next up previous contents
Next: Composable Equations Up: Top-level Forms Previous: defScenario

Tom Mostek
Wed Jan 21 13:00:43 CST 1998