-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note that this required a bit more rewriting since replacing ISO-standard by SI-standard from BIPM. I have not seen the ISO-standard so I don't know if the previous text was consistent with it or not.
- Loading branch information
1 parent
a92a67b
commit b371f10
Showing
1 changed file
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
\chapter{Unit Expressions}\doublelabel{unit-expressions} | ||
|
||
Unless otherwise stated, the syntax and semantics of unit expressions in | ||
Modelica are conform with the international standards ISO 31/0-1992 | ||
Modelica conform with the international standards | ||
"International System of Units (SI)" by BIPM superseding parts of | ||
ISO 31/0-1992 | ||
"General principles concerning quantities, units and symbols" and ISO | ||
1000-1992 "SI units and recommendations for the use of their multiples | ||
and of certain other units". Unfortunately, neither these two standards | ||
nor other existing or emerging ISO standards define a formal syntax for | ||
and of certain other units". | ||
Unfortunately, these standards do not define a formal syntax for | ||
unit expressions. There are recommendations and Modelica exploits them. | ||
|
||
Note that this document uses the American spelling meter, whereas the SI specification from BIPM uses the British spelling metre. | ||
|
||
Examples for the syntax of unit expressions used in Modelica: "\lstinline!N.m!", | ||
"\lstinline!kg.m/s2!", "\lstinline!kg.m.s-2!" "\lstinline!1/rad!", | ||
"\lstinline!mm/s!". | ||
|
@@ -25,10 +29,10 @@ \section{The Syntax of Unit Expressions}\doublelabel{the-syntax-of-unit-expressi | |
\end{lstlisting} | ||
|
||
The unit of measure of a dimension free quantity is denoted by "1". The | ||
ISO standard does not define any precedence between multiplications and | ||
divisions. The ISO recommendation is to have at most one division, where | ||
SI standard does not define any precedence between multiplications and | ||
divisions. The SI recommendation is to have at most one division, where | ||
the expression to the right of "\lstinline!/!" either contains no multiplications or | ||
is enclosed within parentheses. It is also possible to use negative | ||
is enclosed within parentheses, or use negative | ||
exponents, for example, "\lstinline!J/(kg.K)!" may be written as "\lstinline!J.kg-1.K-1!". | ||
|
||
\begin{lstlisting}[language=grammar] | ||
|
@@ -39,15 +43,13 @@ \section{The Syntax of Unit Expressions}\doublelabel{the-syntax-of-unit-expressi | |
"." | ||
\end{lstlisting} | ||
|
||
The ISO standard allows that a multiplication operator symbol is left | ||
out. However, Modelica enforces the ISO recommendation that each | ||
multiplication operator is explicitly written out in formal | ||
specifications. For example, Modelica does not support "\lstinline!Nm!" for | ||
newtonmeter, but requires it to written as "\lstinline!N.m!". | ||
The SI standard specifies that a multiplication operator symbol is written as space | ||
or as a dot. For example, Modelica does not support "\lstinline!Nm!" for | ||
newton-meter, | ||
but requires it to written as "\lstinline!N.m!". | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
HansOlsson
Author
Collaborator
|
||
|
||
The preferred ISO symbol for the multiplication operator is a "dot" a | ||
bit above the base line: "·". Modelica supports the ISO alternative ".", | ||
which is an ordinary "dot" on the base line. | ||
The SI standard requires that this "dot" is a bit above the base line: "·", which is not part of ASCII. | ||
The ISO standard also prefers "·", but Modelica supports the ISO alternative ".", which is an ordinary "dot" on the base line. | ||
|
||
\begin{lstlisting}[language=grammar] | ||
unit_factor: | ||
|
@@ -57,7 +59,7 @@ \section{The Syntax of Unit Expressions}\doublelabel{the-syntax-of-unit-expressi | |
[ "+" | "-" ] integer | ||
\end{lstlisting} | ||
|
||
The ISO standard does not define any operator symbol for exponentiation. | ||
The SI standard uses super-script for the exponentation, and does thus not define any operator symbol for exponentiation. | ||
A \lstinline!unit_factor! consists of a \lstinline!unit_operand! possibly suffixed by a | ||
possibly signed integer number, which is interpreted as an exponent. | ||
There must be no spacing between the \lstinline!unit_operand! and a possible | ||
|
@@ -92,13 +94,13 @@ \section{Examples}\doublelabel{examples2} | |
|
||
The unit expression "\lstinline!m!" means meter and not milli | ||
(10\textsuperscript{-3}), since prefixes cannot be used in isolation. | ||
For millimeter use "\lstinline!mm!" and for squaremeter, m\textsuperscript{2}, write | ||
For millimeter use "\lstinline!mm!" and for square meter, m\textsuperscript{2}, write | ||
"\lstinline!m2!". | ||
|
||
The expression "\lstinline!mm2!" means \lstinline!mm2! = (10\textsuperscript{-3}m)2 = | ||
10\textsuperscript{-6}m\textsuperscript{2}. Note that exponentiation | ||
includes the prefix. | ||
|
||
The unit expression "\lstinline!T!" means Tesla, but note that the letter "\lstinline!T!" is | ||
The unit expression "\lstinline!T!" means tesla, but note that the letter "\lstinline!T!" is | ||
also the symbol for the prefix \lstinline!tera! which has a multiplier value of | ||
10\textsuperscript{12}. |
typo of missing "be"