This package contains quantities (Real
types)
that are instantiated
to represent physical values (Real
variables). The
unit
attribute of each quantity is used to denote the
physical dimensionality in terms of fundamental dimensions:
angle (A), length (L), mass (M), amount of subtance (N), and time (T).1
The fundamental dimensions
are combined according to the rules established for unit strings
[Modelica2010, p. 210].
The abbreviations (A, L, M, N, T) are applied in alphabetical order in each numerator and denominator.
Temperature and charge are considered derived dimensions as if the
Faraday constant
(kF or 96485.3399 C/mol) and the
gas constant
(R or 8.314472 J/(mol K)) are nondimensionalized.
The quantity
attribute of each quantity is not used since it is redundant in this context.
The displayUnit
attribute is
only used for quantities that imply a certain display unit. For example,
Temperature is an alias for
Potential with a default
display unit of K. Some quantities have minimum values
(e.g., min=0
for PressureAbsolute).
This package (Quantities) is abbreviated as Q
throughout
the rest of QCalc.
Most quantities are named with adjectives following the noun so that related
quantities are grouped when alphabetized.
Methods for unit checking
have been established [Mattsson2008,
Broman2008,
Aronsson2009] and can, in theory, be applied to
dimension checking instead. However, this does not work in Dymola as of 2014, so unit checking must be turned
off (Advanced.CheckUnits = false
).
For more information, please see the documentation of the Units package.
1. This misnomer (unit
attribute for dimension) is necessary because Real
variables do not have a dimension
attribute in Modelica. Beware that:
↵unit="L"
indicates a length quantity (not a volume in litres).unit="T"
indicates a time quantity (not a magnetic flux in teslas).unit="A"
indicates an angle (not a current in amperes).unit="N"
indicates an amount of substance (not a force in newtons).
Licensed by the Hawaii Natural Energy Institute under the Modelica License 2
Copyright © 2009–2014,
Hawaii Natural Energy Institute and
Georgia Tech Research Corporation.
This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see QCalc.UsersGuide.License or visit http://www.modelica.org/licenses/ModelicaLicense2.