Skip to content

Commit

Permalink
Change SIunits to Units.SI as is the case as of MSL v4.0.0
Browse files Browse the repository at this point in the history
Question is that since MSL 4.0.0 is based on MLS v3.4 if this might also be backported to 3.4 spec, *if* there will be   maintenance update.
  • Loading branch information
dietmarw committed Feb 20, 2020
1 parent e2af8b1 commit c54438a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ \section{Annotations for the Graphical User Interface}\doublelabel{annotations-f
user-interface for plotting and entering parameters), the offset must be
ignored, for a variable defined with annotation absoluteValue = false.
This annotation is used in the Modelica Standard Library for example in
Modelica.SIunits for the type definition TemperatureDifference.}{]}
Modelica.Units.SI for the type definition TemperatureDifference.}{]}

A model or block definition may contain:
\begin{lstlisting}[language=modelica]
Expand Down Expand Up @@ -1150,7 +1150,7 @@ \section{Annotations for the Graphical User Interface}\doublelabel{annotations-f
\begin{lstlisting}[language=modelica]
connector Frame "Frame of a mechanical system"
...
flow Modelica.SIunits.Force f[3]
flow Modelica.Units.SI.Force f[3]
annotation(unassignedMessage =
"All Forces cannot be uniquely calculated. The reason could be that the
mechanism contains a planar loop or that joints constrain the same motion.
Expand Down Expand Up @@ -1249,7 +1249,7 @@ \section{Annotations for the Graphical User Interface}\doublelabel{annotations-f
\begin{lstlisting}[language=modelica]
model DialogDemo
parameter Boolean b = true "Boolean parameter";
parameter Modelica.SIunits.Length length "Real parameter with unit";
parameter Modelica.Units.SI.Length length "Real parameter with unit";
parameter Integer nInports=0
annotation(Dialog(connectorSizing=true));
parameter Real r1 "Real parameter in Group 1"
Expand Down
4 changes: 2 additions & 2 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
\emph{Example 3:}
\begin{lstlisting}[language=modelica]
import SI = Modelica.SIunits;
import Modelica.Units.SI;
partial model BaseProperties
"Interface of medium model for all type of media"
Expand Down Expand Up @@ -1314,7 +1314,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
volume or a fixed boundary condition:}
\begin{lstlisting}[language=modelica]
import SI = Modelica.SIunits;
import Modelica.Units.SI;
connector FluidPort
replaceable model Medium = BaseProperties;
Expand Down
56 changes: 28 additions & 28 deletions chapters/connectors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
{[}\emph{Example}:
\begin{lstlisting}[language=modelica]
expandable connector EngineBus // has predefined signals
import SI=Modelica.SIunits;
import Modelica.Units.SI;
SI.AngularVelocity speed;
SI.Temperature T;
end EngineBus;
Expand Down Expand Up @@ -233,7 +233,7 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
import Interfaces=Modelica.Electrical.Analog.Interfaces;
expandable connector ElectricalBus
Interfaces.PositivePin p12, n12; // OK
flow Modelica.SIunits.Current i; // not allowed
flow Modelica.Units.SI.Current i; // not allowed
end ElectricalBus;

model Battery
Expand Down Expand Up @@ -312,7 +312,7 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
\emph{Engine system with sensors, controllers, actuator and plant that
exchange information via a bus (i.e. via expandable connectors):}
\begin{lstlisting}[language=modelica]
import SI=Modelica.SIunits;
import Modelica.Units.SI;
import Modelica.Blocks.Interfaces.RealInput;
// Plant Side
model SparkPlug
Expand Down Expand Up @@ -765,14 +765,14 @@ \subsection{Balancing Restriction and Size of Connectors}\doublelabel{balancing-
connector OutputReal = output Real; // A causal output connector

connector Frame_Illegal
Modelica.SIunits.Position r0[3] "Position vector of frame origin";
Modelica.Units.SI.Position r0[3] "Position vector of frame origin";
Real S[3, 3] "Rotation matrix of frame";
Modelica.SIunits.Velocity v[3] "Abs. velocity of frame origin";
Modelica.SIunits.AngularVelocity w[3] "Abs. angular velocity of frame";
Modelica.SIunits.Acceleration a[3] "Abs. acc. of frame origin";
Modelica.SIunits.AngularAcceleration z[3] "Abs. angular acc. of frame";
flow Modelica.SIunits.Force f[3] "Cut force";
flow Modelica.SIunits.Torque t[3] "Cut torque";
Modelica.Units.SI.Velocity v[3] "Abs. velocity of frame origin";
Modelica.Units.SI.AngularVelocity w[3] "Abs. angular velocity of frame";
Modelica.Units.SI.Acceleration a[3] "Abs. acc. of frame origin";
Modelica.Units.SI.AngularAcceleration z[3] "Abs. angular acc. of frame";
flow Modelica.Units.SI.Force f[3] "Cut force";
flow Modelica.Units.SI.Torque t[3] "Cut torque";
end Frame_Illegal;
\end{lstlisting}

Expand All @@ -787,25 +787,25 @@ \subsection{Balancing Restriction and Size of Connectors}\doublelabel{balancing-

\begin{lstlisting}[language=modelica]
connector Frame_a "correct connector"
input Modelica.SIunits.Position r0[3];
input Modelica.Units.SI.Position r0[3];
input Real S[3, 3];
input Modelica.SIunits.Velocity v[3];
input Modelica.SIunits.AngularVelocity w[3];
Modelica.SIunits.Acceleration a[3];
Modelica.SIunits.AngularAcceleration z[3];
flow Modelica.SIunits.Force f[3];
flow Modelica.SIunits.Torque t[3];
input Modelica.Units.SI.Velocity v[3];
input Modelica.Units.SI.AngularVelocity w[3];
Modelica.Units.SI.Acceleration a[3];
Modelica.Units.SI.AngularAcceleration z[3];
flow Modelica.Units.SI.Force f[3];
flow Modelica.Units.SI.Torque t[3];
end Frame_a;

connector Frame_b "correct connector"
output Modelica.SIunits.Position r0[3];
output Modelica.Units.SI.Position r0[3];
output Real S[3, 3];
output Modelica.SIunits.Velocity v[3];
output Modelica.SIunits.AngularVelocity w[3];
Modelica.SIunits.Acceleration a[3];
Modelica.SIunits.AngularAcceleration z[3];
flow Modelica.SIunits.Force f[3];
flow Modelica.SIunits.Torque t[3];
output Modelica.Units.SI.Velocity v[3];
output Modelica.Units.SI.AngularVelocity w[3];
Modelica.Units.SI.Acceleration a[3];
Modelica.Units.SI.AngularAcceleration z[3];
flow Modelica.Units.SI.Force f[3];
flow Modelica.Units.SI.Torque t[3];
end Frame_b;
\end{lstlisting}

Expand Down Expand Up @@ -1086,7 +1086,7 @@ \subsubsection{An Overdetermined Connector for Power Systems}\doublelabel{an-ove
\begin{lstlisting}[language=modelica]
type AC_Angle "Angle of source, e.g., rotor of generator"
extends Modelica.SIunits.Angle; // AC_Angle is a Real number
extends Modelica.Units.SI.Angle; // AC_Angle is a Real number
// with unit = "rad"
function equalityConstraint
input AC_Angle theta1;
Expand All @@ -1099,7 +1099,7 @@ \subsubsection{An Overdetermined Connector for Power Systems}\doublelabel{an-ove
end AC_Angle;
connector AC_Plug "3-phase alternating current connector"
import SI = Modelica.SIunits;
import Modelica.Units.SI;
AC_Angle theta;
SI.Voltage v[3] "Voltages resolved in AC_Angle frame";
flow SI.Current i[3] "Currents resolved in AC_Angle
Expand Down Expand Up @@ -1180,7 +1180,7 @@ \subsubsection{An Overdetermined Connector for 3-dimensional Mechanical Systems}
end Orientation;
connector Frame "3-dimensional mechanical connector"
import SI = Modelica.SIunits;
import Modelica.Units.SI;
SI.Position r[3] "Vector from inertial frame to Frame";
Orientation R "Orientation from inertial frame to Frame";
flow SI.Force f[3] "Cut-force resolved in Frame";
Expand All @@ -1192,7 +1192,7 @@ \subsubsection{An Overdetermined Connector for 3-dimensional Mechanical Systems}
\begin{lstlisting}[language=modelica]
model FixedTranslation
parameter Modelica.SIunits.Position r[3];
parameter Modelica.Units.SI.Position r[3];
Frame frame_a, frame_b;
equation
Connections.branch(frame_a.R, frame_b.R);
Expand Down
4 changes: 2 additions & 2 deletions chapters/inheritance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ \section{Redeclaration}\doublelabel{redeclaration}

HeatExchanger(
/*redeclare*/ replaceable /*parameter */ GeoHorizontal geometry,
redeclare /* input */ Modelica.SIunits.Angle u /*[2]*/);
redeclare /* input */ Modelica.Units.SI.Angle u /*[2]*/);
// The semantics ensure that parts in /*.*/ are automatically added
// from the declarations in HeatExchanger.
\end{lstlisting}
Expand All @@ -669,7 +669,7 @@ \section{Redeclaration}\doublelabel{redeclaration}
// Seen as syntactic sugar for "replaceable Real x[2,4];"
// Note the order.
end M;
M m(redeclare Modelica.SIunits.Length x[2,4]); // Valid redeclare of the type
M m(redeclare Modelica.Units.SI.Length x[2,4]); // Valid redeclare of the type
\end{lstlisting}

{]}
Expand Down
6 changes: 3 additions & 3 deletions chapters/interface.tex
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,13 @@ \section{Function-Compatibility or Function-Subtyping for Functions}\doublelabel
function-compatible function}
\begin{lstlisting}[language=modelica]
function GravityInterface
input Modelica.SIunits.Position position[3];
output Modelica.SIunits.Acceleration acceleration[3];
input Modelica.Units.SI.Position position[3];
output Modelica.Units.SI.Acceleration acceleration[3];
end GravityInterface;
function PointMassGravity
extends GravityInterface;
input Modelica.SIunits.Mass m;
input Modelica.Units.SI.Mass m;
algorithm
acceleration := -Modelica.Constants.G*m*position/(position*position)^1.5;
end PointMassGravity;
Expand Down
4 changes: 2 additions & 2 deletions chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ \subsubsection{homotopy}\doublelabel{homotopy}
\begin{lstlisting}[language=modelica]
model ConstantVoltageSource
extends Modelica.Electrical.Analog.Interfaces.OnePort;
parameter Modelica.SIunits.Voltage V;
parameter Modelica.Units.SI.Voltage V;
equation
v = homotopy(actual=V, simplified=0.0);
end ConstantVoltageSource;
Expand All @@ -951,7 +951,7 @@ \subsubsection{homotopy}\doublelabel{homotopy}

\begin{lstlisting}[language=modelica]
model PressureLoss
import SI = Modelica.SIunits;
import Modelica.Units.SI;
...
parameter SI.MassFlowRate m_flow_nominal "Nominal mass flow rate";
parameter SI.Pressure dp_nominal "Nominal pressure drop";
Expand Down

0 comments on commit c54438a

Please sign in to comment.