diff --git a/Blocks/Continuous.mo b/Blocks/Continuous.mo index b7f0290c4e..8205bbe3fe 100644 --- a/Blocks/Continuous.mo +++ b/Blocks/Continuous.mo @@ -1,29 +1,22 @@ -package Continuous "Continuous control blocks with internal states" +package Continuous + "Continuous control blocks with internal states" + extends Modelica.Icons.Library; - package Interfaces = Modelica.Blocks.Interfaces; - package SIunits = Modelica.SIunits; - - annotation ( - Coordsys( - extent=[0, 0; 272, 438], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.02, - y=0.04, - width=0.27, - height=0.63, + annotation (Window( + x=0.05, + y=0.09, + width=0.35, + height=0.74, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1), + Documentation(info="
This package contains basic continuous input/output blocks.
Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - - block Integrator "Output the integral of the input signals" + block Integrator "Output the integral of the input signals" parameter Real k[:]={1} "Integrator gains"; - extends Interfaces.MIMOs(final n=size(k, 1)); - + parameter Real y0[:]=zeros(size(k, 1)) "Start values of integrators"; + extends Interfaces.MIMOs(final n=size(k, 1), y(start=y0)); + annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.29, - y=0.05, - width=0.53, - height=0.54), - Documentation(info=" - + Documentation(info="-This blocks computes output y=outPort.signal element-wise as -integral of the input u=inPort.signal multiplied with +This blocks computes output y=outPort.signal element-wise as +integral of the input u=inPort.signal multiplied with the gain k:
@@ -85,79 +68,70 @@ the gain k:Release Notes:
This blocks computes y=outPort.signal element-wise as integral of the input u=inPort.signal multiplied with the gain k. If the @@ -170,76 +144,74 @@ the integral away from the bounds.
Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
-"), +"), Icon( - Line(points=[-80, 78; -80, -90], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -80; 82, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, -80; 20, 20; 80, 20]), + Line(points=[-80, 78; -80, -90], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -80; 82, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, -80; 20, 20; 80, 20]), Text( - extent=[0, -10; 60, -70], - string="I", - style(color=8)), + extent=[0, -10; 60, -70], + string="I", + style(color=8)), Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0))), + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60]), Text( - extent=[-54, 46; -4, -48], - string="lim", - style(color=0)), - Line(points=[-100, 0; -60, 0]), - Line(points=[60, 0; 100, 0]), + extent=[-54, 46; -4, -48], + string="lim", + style(color=0)), + Line(points=[-100, 0; -60, 0]), + Line(points=[60, 0; 100, 0]), Text( - extent=[-8, 60; 60, 2], - string="k", - style(color=0)), + extent=[-8, 60; 60, 2], + string="k", + style(color=0)), Text( - extent=[-8, -2; 60, -60], - string="s", - style(color=0)), + extent=[-8, -2; 60, -60], + string="s", + style(color=0)), Line(points=[4, 0; 46, 0], style(color=0)))); - equation + equation for i in 1:n loop - der(y[i]) = if y[i] < p_outMin[i] and u[i] < 0 or y[i] > p_outMax[i] - and u[i] > 0 then 0 else p_k[i]*u[i]; + der(y[i]) = if y[i] < p_outMin[i] and u[i] < 0 or y[i] > p_outMax[i] and + u[i] > 0 then 0 else p_k[i]*u[i]; end for; end LimIntegrator; - - block Derivative "Approximated derivative block" + + block Derivative "Approximated derivative block" parameter Real k[:]={1} "Gains"; - parameter SIunits.Time T[:](min=fill(Modelica.Constants.SMALL, size(T, 1)) - ) = {0.01} "Time constants (T>0 required; T=0 is ideal derivative block)" - ; - + parameter SI.Time T[:](min=fill(Modelica.Constants.small, size(T, 1))) = {0.01} + "Time constants (T>0 required; T=0 is ideal derivative block)"; + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); - + output Real x[n] "State of block"; - - protected + + protected parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); annotation ( - Documentation(info=" - + Documentation(info="-This blocks defines the transfer function between the -input u=inPort.signal and the output y=outPort.signal +This blocks defines the transfer function between the +input u=inPort.signal and the output y=outPort.signal element-wise as approximated derivative:
@@ -251,7 +223,7 @@ element-wise as approximated derivative:
If you would like to be able to change easily between different
-transfer functions (FirstOrder, SecondOrder, ... ) by changing
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
parameters, use the general block TransferFunction instead
and model a derivative block with parameters
b = {k,0}, a = {T, 1}.
@@ -260,83 +232,82 @@ b = {k,0}, a = {T, 1}.
Release Notes:
This blocks defines the transfer function between the input u=inPort.signal and the output y=outPort.signal element-wise as first order system: @@ -350,7 +321,7 @@ and the output y=outPort.signal element-wise as first order system:
If you would like to be able to change easily between different
-transfer functions (FirstOrder, SecondOrder, ... ) by changing
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
parameters, use the general block TransferFunction instead
and model a first order SISO system with parameters
b = {k}, a = {T, 1}.
@@ -371,91 +342,90 @@ Example:
Release Notes:
This blocks defines the transfer function between the input u=inPort.signal and the output y=outPort.signal element-wise as second order system: @@ -470,7 +440,7 @@ the output y=outPort.signal element-wise as second order system:
If you would like to be able to change easily between different
-transfer functions (FirstOrder, SecondOrder, ... ) by changing
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
parameters, use the general model class TransferFunction
instead and model a second order SISO system with parameters
b = {k}, a = {1/w^2, 2*D/w, 1}.
@@ -478,7 +448,7 @@ b = {k}, a = {1/w^2, 2*D/w, 1}.
Example: - + parameter: k = {0.3}, w = {0.5}, D = {0.4} results in: @@ -491,112 +461,102 @@ Example:Release Notes:
This blocks defines the transfer function between the input u=inPort.signal and the output y=outPort.signal element-wise as PI system: @@ -614,7 +574,7 @@ the output y=outPort.signal element-wise as PI system:
If you would like to be able to change easily between different
-transfer functions (FirstOrder, SecondOrder, ... ) by changing
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
parameters, use the general model class TransferFunction
instead and model a PI SISO system with parameters
b = {k*T, k}, a = {T, 0}.
@@ -622,9 +582,9 @@ b = {k*T, k}, a = {T, 0}.
Example: - + parameter: k = {0.3}, T = {0.4} - + results in: 0.4 s + 1 @@ -635,97 +595,86 @@ Example:Release Notes:
This is the text-book version of a PID-controller. For a more practically useful PID-controller, use @@ -735,87 +684,80 @@ block LimPID.
Release Notes:
This is a PID controller incorporating several practical aspects. @@ -837,7 +779,7 @@ part of this controller, the following practical aspects are included: in its limits, anti-windup compensation is activated to drive the integrator state to zero. -
Release Notes:
-This block defines the transfer function between the input -u=inPort.signal[1] and the output y=outPort.signal[1] +This block defines the transfer function between the input +u=inPort.signal[1] and the output y=outPort.signal[1] as (nb = dimension of b, na = dimension of a):
@@ -1001,67 +916,66 @@ results in the following transfer function:Release Notes:
-The State Space block defines the relation -between the input u=inPort.signal and the output +The State Space block defines the relation +between the input u=inPort.signal and the output y=outPort.signal in state space form:
-- ++ der(x) = A * x + B * u y = C * x + D * u @@ -1072,19 +986,19 @@ The input is a vector of length nu, the output is a vector of length ny and nx is the number of states. Accordingly- A has the dimension: A(nx,nx), - B has the dimension: B(nx,nu), - C has the dimension: C(ny,nx), - D has the dimension: D(ny,nu) + A has the dimension: A(nx,nx), + B has the dimension: B(nx,nu), + C has the dimension: C(ny,nx), + D has the dimension: D(ny,nu)Example:
- parameter: A = [0.12, 2;3, 1.5] - parameter: B = [2, 7;3, 1] - parameter: C = [0.1, 2] + parameter: A = [0.12, 2;3, 1.5] + parameter: B = [2, 7;3, 1] + parameter: C = [0.1, 2] parameter: D = zeros(ny,nu) results in the following equations: @@ -1097,30 +1011,48 @@ results in the following equations: [x[2]] [u[2]]-"), +"), Icon( - Text(extent=[-90, 10; -10, 90], string="A"), - Text(extent=[10, 10; 90, 90], string="B"), - Text(extent=[-90, -10; -10, -90], string="C"), - Text(extent=[10, -10; 90, -90], string="D"), - Line(points=[0, -90; 0, 90], style(color=8)), - Line(points=[-90, 0; 90, 0], style(color=8))), + Text(extent=[-90, 10; -10, 90], string="A"), + Text(extent=[10, 10; 90, 90], string="B"), + Text(extent=[-90, -10; -10, -90], string="C"), + Text(extent=[10, -10; 90, -90], string="D"), + Line(points=[0, -90; 0, 90], style(color=8)), + Line(points=[-90, 0; 90, 0], style(color=8))), Diagram( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60]), Text( - extent=[-60, 40; 60, 0], - string="sx=Ax+Bu", - style(color=0)), + extent=[-60, 40; 60, 0], + string="sx=Ax+Bu", + style(color=0)), Text( - extent=[-60, 0; 60, -40], - string=" y=Cx+Du", - style(color=0)), - Line(points=[-100, 0; -60, 0]), + extent=[-60, 0; 60, -40], + string=" y=Cx+Du", + style(color=0)), + Line(points=[-100, 0; -60, 0]), Line(points=[60, 0; 100, 0]))); - equation + equation der(x) = A*x + B*u; y = C*x + D*u; end StateSpace; - -end Continuous; + block Der "Derivative of input (= analytic differentations)" + extends Interfaces.MIMOs; + + annotation (Icon(Text(extent=[-80, 76; 80, -82], string="der()")), + Documentation(info=" ++Defines that the output (= outPort.signal) is the derivative +of the input (=inPort.signal). Note, that Modelica.Blocks.Continuous.Derivative +computes the derivative in an approximate sense, where this block computes +the derivative exactly. This requires that the input signals are differentiated +by the Modelica translator, if these derivatives are not yet present in +the model. +
+")); + equation + for i in 1:n loop + y[i] = der(u[i]); + end for; + end Der; +end Continuous; diff --git a/Blocks/Examples.mo b/Blocks/Examples.mo new file mode 100644 index 0000000000..3a212e8613 --- /dev/null +++ b/Blocks/Examples.mo @@ -0,0 +1,301 @@ +package Examples "Demonstration examples of the components of this package" + + extends Icons.Library; + + encapsulated model BusUsage "Demonstration of signal bus usage" + import Modelica.Icons; + import Modelica.Blocks.Interfaces.BusAdaptors; + import Modelica.Blocks.Sources; + + extends Icons.Example; + + annotation (Documentation(info=" +Signal bus concept
+ ++In technical systems, such as vehicles, robots or satellites, many signals +are exchanged between components. In a simulation system, these signals +are usually modelled by signal connections of input/output blocks. +Unfortunately, the signal connection structure may become very complicated, +especially for hierarchical models. +
+ ++The same is also true for real technical systems. To reduce complexity +and get higher flexibility, many technical systems use data buses to +exchange data between components. For the same reasons, it is often better +to use a \"signal bus\" concept also in a Modelica model. This is demonstrated +at hand of this model (Modelica.Blocks.Examples.BusUsage), see diagram layer: +
+ +
+Difficulties arise if the input or output connector of an +input/output block shall be connected directly to a variable +of a bus because connections can only be performed between +connectors but not between variables. For convenience, +single variable connectors for Real, Integer and Boolean +variables are provided as Modelica.Blocks.Interfaces.RealPort, +Modelica.Blocks.Interfaces.IntegerPort, +Modelica.Blocks.Interfaces.BooleanPort. +For example, the RealPort connector is basically defined as: +
+connector RealPort = Real; ++ +
+This allows a definition of a bus in the form: +
+ +connector Bus + RealPort r1; + RealPort r2; + ... + end Bus; ++ +
+and a connection to r1 and r2 is possible since these are connectors. +Unfortunately, signals defined in this way have, by default, no unit. +To improve this situation, a RealPort is actually defined as +
+ +connector RealPort + replaceable type SignalType = Real; + extends SignalType; + end RealPort; ++ +
+This allows a redeclaration of the Real type to the desired type, such as: +
+ +connector Bus + import SI=Modelica.SIunits; + RealPort v(redeclare SignalType=SI.Velocity); + RealPort p(redeclare SignalType=SI.Pressure); + ... + end Bus; ++ +
+In order to connect from a RealPort connector to an InPort or OutPort +connector of a block from the Modelica.Blocks package, an adaptor block +is needed, since the two connectors are not compatible. Appropriate adaptors +are provided in Modelica.Blocks.Interfaces.BusAdaptors. The usage can +be seen in the diagram layer of the model at hand +(Modelica.Blocks.Examples.BusUsage). +
+ ++If a bus connector contains many signals it is no longer so easy +to test just one part of a system, because all parts of +the bus connector must get a value. To simplify this, +it is practical to provide a RestBus component which +sets all parts of a bus to a default value when selected +via the parameter menu. This is also demonstrated in the example +model (see diagram layer). +
+ +Simulate the system for 1 s. The outputs of the 'receive' signal +blocks should be the same as the inputs of the 'send' signal blocks. +
+")); + protected + Interfaces.Bus bus annotation (extent=[-80, -20; 80, -14]); + public + BusAdaptors.SendReal putRealSignal1 annotation (extent=[-60, 0; -40, 20], + rotation=-90); + BusAdaptors.SendBoolean putBooleanSignal annotation (extent=[-20, 0; 0, 20] + , rotation=-90); + BusAdaptors.SendInteger putIntegerSignal annotation (extent=[20, 0; 40, 20] + , rotation=-90); + BusAdaptors.ReceiveReal getRealSignal1 annotation (extent=[-40, -80; -20, - + 60], rotation=-90); + BusAdaptors.ReceiveBoolean getBooleanSignal annotation (extent=[0, -80; 20 + , -60], rotation=-90); + BusAdaptors.ReceiveInteger getIntegerSignal annotation (extent=[40, -80; 60 + , -60], rotation=-90); + RestBus restBus(set_realSignal2=true) annotation (extent=[60, 20; 80, 40]); + Sources.IntegerStep generateIntegerSignal( + height={1}, + offset={2}, + startTime={0.5}) annotation (extent=[20, 60; 40, 80], rotation=270); + Sources.BooleanStep generateBooleanSignal(startTime={0.5}) annotation ( + extent=[-20, 60; 0, 80], rotation=270); + Sources.Sine generateRealSignal1 annotation (extent=[-60, 60; -40, 80], + rotation=270); + + encapsulated package Interfaces "Interfaces specialised for this example" + + connector MultiPort "Combined port of real and boolean signal" + Real myRealSignal; + Boolean myBooleanSignal; + + annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style( + fillColor=76, fillPattern=1))), Diagram(Rectangle(extent=[- + 100, 100; 100, -100], style(fillColor=76, fillPattern=1)))); + end MultiPort; + + connector Bus "Signal bus" + import SI = Modelica.SIunits; + import Modelica.Blocks.Interfaces.*; + + RealPort realSignal1(redeclare type SignalType = SI.AngularVelocity) + "First Real signal (angular velocity)"; + RealPort realSignal2 "Second Real signal"; + IntegerPort integerSignal "Integer signal"; + BooleanPort booleanSignal "Boolean signal"; + MultiPort multiSignal "Combined signal"; + + annotation ( + Icon(Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-134, 168; 134, 108], + string="%name", + style(color=77))), + Diagram(Text( + extent=[-134, 168; 134, 108], + string="%name", + style(color=77)), Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1))), + Documentation(info=" +Defines connector for signalbus.
+ +")); + end Bus; + end Interfaces; + + encapsulated model Part "Component with MultiPort connector" + import Modelica.Blocks.Examples; + + Examples.BusUsage.Interfaces.MultiPort multiSignal annotation (extent=[ + 100, -10; 120, 10]); + + annotation (Icon(Rectangle(extent=[-100, 60; 100, -60], style(fillColor= + 76, fillPattern=1)), Text( + extent=[-106, 124; 114, 68], + style(fillColor=76, fillPattern=1), + string="%name"))); + equation + multiSignal.myRealSignal = time; + multiSignal.myBooleanSignal = time > 0.5; + end Part; + + encapsulated model RestBus + "Set default values for bus variables that are not defined elsewhere" + + import Modelica.Blocks.Examples; + + parameter Boolean set_realSignal1=false + "Set dummy value for desiredThrottle"; + parameter Boolean set_realSignal2=false "Set dummy value for brake"; + parameter Boolean set_integerSignal=false + "Set dummy value for controlLeverPosition"; + parameter Boolean set_booleanSignal=false + "Set dummy value for desiredGear"; + parameter Boolean set_multiSignal=false "Set dummy value for ignition"; + + annotation (Icon( + Rectangle(extent=[-100, 100; 100, -100], style(fillColor=7, + fillPattern=1)), + Text( + extent=[-100, 156; 100, 96], + string="%name", + style(pattern=0)), + style(color=77), + Text( + extent=[46, -10; 88, -40], + style(color=0), + string="0"), + Text( + extent=[-82, 62; 38, 34], + style(color=0), + string="false"), + Line(points=[-28, 24; -28, -66; 0, -66; 0, -104; 0, -102], style( + color=77, + fillColor=7, + fillPattern=1)), + Line(points=[68, -46; 68, -66; 0, -66; 0, -108], style( + color=77, + fillColor=7, + fillPattern=1)), + Rectangle(extent=[-90, 78; 46, 24], style(color=0)), + Rectangle(extent=[40, -4; 92, -46], style(color=0)))); + Examples.BusUsage.Interfaces.Bus bus annotation (extent=[-10, -120; 10, - + 100], rotation=90); + equation + if set_realSignal1 then + bus.realSignal1 = 0; + end if; + if set_realSignal2 then + bus.realSignal2 = 0; + end if; + if set_integerSignal then + bus.integerSignal = 0; + end if; + if set_booleanSignal then + bus.booleanSignal = false; + end if; + if set_multiSignal then + bus.multiSignal.myRealSignal = 0; + bus.multiSignal.myBooleanSignal = false; + end if; + end RestBus; + + Part part annotation (extent=[-100, -60; -80, -40]); + equation + + connect(putRealSignal1.toBus, bus.realSignal1) annotation (points=[-50, -2 + ; -50, -16], style(color=77)); + connect(putIntegerSignal.toBus, bus.integerSignal) annotation (points=[30, + -2; 30, -16], style(color=77)); + connect(generateRealSignal1.outPort, putRealSignal1.inPort) annotation ( + points=[-50, 58; -50, 24], style(color=3)); + connect(generateBooleanSignal.outPort, putBooleanSignal.inPort) annotation + (points=[-10, 58; -10, 24], style(color=5)); + connect(generateIntegerSignal.outPort, putIntegerSignal.inPort) annotation + (points=[30, 58; 30, 24], style(color=45)); + connect(getRealSignal1.fromBus, bus.realSignal1) annotation (points=[-30, - + 58; -30, -18], style(color=77)); + connect(getIntegerSignal.fromBus, bus.integerSignal) annotation (points=[50 + , -60; 50, -18], style(color=77)); + connect(restBus.bus, bus) annotation (points=[70, 20; 70, -18], style(color + =77)); + connect(putBooleanSignal.toBus, bus.booleanSignal) annotation (points=[-10 + , -2; -10, -16], style(color=77)); + connect(getBooleanSignal.fromBus, bus.booleanSignal) annotation (points=[10 + , -60; 10, -18], style(color=77)); + connect(part.multiSignal, bus.multiSignal) annotation (points=[-78, -50; - + 70, -50; -70, -18]); + end BusUsage; + + annotation (Documentation(info=" ++This package contains currently one example model to demonstrate the usage of the +signal bus concept provided by the Modelica.Blocks package. +
+ +Copyright © 2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file \"Modelica/package.mo\". +
+ +")); + +end Examples; diff --git a/Blocks/Interfaces.mo b/Blocks/Interfaces.mo index 34ccf7821c..70d57d84fd 100644 --- a/Blocks/Interfaces.mo +++ b/Blocks/Interfaces.mo @@ -1,39 +1,36 @@ package Interfaces "Connectors and partial models for input/output blocks" + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - - annotation ( - Coordsys( - extent=[0, 0; 294, 599], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.03, - y=0.01, - width=0.24, - height=0.63, - library=1, - autolayout=1), - Documentation(info=" - + annotation (Window( + x=0.05, + y=0.09, + width=0.72, + height=0.71, + library=1, + autolayout=1), + Documentation(info="-This package contains interface definitions for +This package contains interface definitions for continuous input/output blocks. In particular it contains the following connector classes:
- InPort Connector with input signals of type Real. - OutPort Connector with output signals of type Real. - BooleanInPort Connector with input signals of type Boolean. - BooleanOutPort Connector with output signals of type Boolean. + InPort Connector with input signals of type Real. + OutPort Connector with output signals of type Real. + BooleanInPort Connector with input signals of type Boolean. + BooleanOutPort Connector with output signals of type Boolean. + IntegerInPort Connector with input signals of type Integer. + IntegerOutPort Connector with output signals of type Integer. + + RealPort Connector with input/output signals of type Real. + BooleanPort Connector with input/output signals of type Real. + IntegerPort Connector with input/output signals of type Real.-
-The following partial block classes are provided -to model continuous control blocks: -
+The following partial block classes are provided +to model continuous control blocks:
BlockIcon Basic graphical layout of continuous block @@ -41,16 +38,16 @@ to model continuous control blocks: MO Multiple Output continuous control block SISO Single Input Single Output continuous control block SI2SO 2 Single Input / 1 Single Output continuous control block + SIMO Single Input Multiple Output continuous control block MISO Multiple Input Single Output continuous control block MIMO Multiple Input Multiple Output continuous control block MIMOs Multiple Input Multiple Output continuous control block with same number of inputs and outputs - MI2MO 2 Multiple Input / Multiple Output continuous + MI2MO 2 Multiple Input / Multiple Output continuous control block SignalSource Base class for continuous signal sources - Periodic Base class for periodic continuous signal sources SVcontrol Single-Variable continuous controller - MVcontrol Multi-Variable continuous controller + MVcontrol Multi-Variable continuous controller
@@ -62,15 +59,34 @@ to model Boolean control blocks: BooleanBlockIcon Basic graphical layout of Boolean block BooleanSISO Single Input Single Output control block with signals of type Boolean - BooleanSignalSource Base class for Boolean signal sources - MI2BooleanMOs 2 Multiple Input / Boolean Multiple Output + BooleanMIMOs Multiple Input Multiple Output control block + with same number of inputs and outputs + MI2BooleanMOs 2 Multiple Input / Boolean Multiple Output block with same signal lengths + BooleanSignalSource Base class for Boolean signal sources + IntegerMIBooleanMOs Multiple Integer Input Multiple Boolean Output control block + with same number of inputs and outputs + + +
+The following partial block classes are provided +to model Integer control blocks: +
+ ++ IntegerBlockIcon Basic graphical layout of Integer block + IntegerMO Multiple Output control block + IntegerSignalSource Base class for Integer signal sources+
In addition, a subpackage BusAdaptors is temporarily provided +in order to make a signal bus concept available. It will be removed, +when the package Block is revised exploiting new Modelica features.
+Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); connector InPort "Connector with input signals of type Real" parameter Integer n=1 "Dimension of signal vector"; - input Real signal[n] "Real input signals"; + replaceable type SignalType = Real "type of signal"; + input SignalType signal[n] "Real input signals"; annotation ( Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=3, fillColor=3))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=3, fillColor=3)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=3, fillColor=3)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=3))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=3, fillColor=3)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=3, fillColor=3)))); end InPort; + connector OutPort "Connector with output signals of type Real" parameter Integer n=1 "Dimension of signal vector"; - output Real signal[n] "Real output signals"; + replaceable type SignalType = Real "type of signal"; + output SignalType signal[n] "Real output signals"; annotation ( Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=3, fillColor=7))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=3, fillColor=7)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=3, fillColor=7)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=3))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=3, fillColor=7)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=3, fillColor=7)))); end OutPort; + connector BooleanInPort "Connector with input signals of type Boolean" parameter Integer n=1 "Dimension of signal vector"; input Boolean signal[n] "Boolean input signals"; annotation ( - Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=5, fillColor=5))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=5, fillColor=5)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=5, fillColor=5)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=5))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=5, fillColor=5)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=5)))); end BooleanInPort; + connector BooleanOutPort "Connector with output signals of type Boolean" parameter Integer n=1 "Dimension of signal vector"; output Boolean signal[n] "Boolean output signals"; @@ -163,25 +187,71 @@ Modelica in file \"Modelica/package.mo\". Coordsys(extent=[-100, -100; 100, 100]), Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( color=5, fillColor=7))), - Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style - (color=5, fillColor=7)), Text( + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=5, fillColor=7)), Text( extent=[-100, -120; 100, -220], string="%name", style(color=5))), - Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], - style(color=5, fillColor=7)))); + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=7)))); end BooleanOutPort; - partial block BlockIcon "Basic graphical layout of continuous block" - annotation ( - Coordsys(extent=[-100, -100; 100, 100]), + + connector IntegerInPort "Connector with input signals of type Integer" + parameter Integer n=1 "Dimension of signal vector"; + input Integer signal[n] "Integer input signals"; + + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=45))), + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=45)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=45))), + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=5))), Window( - x=0, - y=0, + x=0.4, + y=0.4, width=0.6, - height=0.6), - Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=3, fillColor=7 - )), Text(extent=[-150, 150; 150, 110], string="%name"))); end - BlockIcon; + height=0.6)); + end IntegerInPort; + + connector IntegerOutPort "Connector with output signals of type Integer" + parameter Integer n=1 "Dimension of signal vector"; + output Integer signal[n] "Integer output signals"; + + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Icon(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=7))), + Diagram(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style( + color=45, fillColor=7)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=45))), + Terminal(Polygon(points=[-100, 100; 100, 0; -100, -100; -100, 100], style + (color=5, fillColor=7))), + Window( + x=0.4, + y=0.4, + width=0.6, + height=0.6)); + end IntegerOutPort; + + partial block BlockIcon "Basic graphical layout of continuous block" + annotation (Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=3, + fillColor=7)), Text(extent=[-150, 150; 150, 110], string="%name") + )); + end BlockIcon; + partial block SO "Single Output continuous control block" extends BlockIcon; @@ -198,9 +268,11 @@ Modelica in file \"Modelica/package.mo\". width=0.6, height=0.6), Diagram); - protected - Real y=outPort.signal[1]; + output Real y; + equation + y = outPort.signal[1]; end SO; + partial block MO "Multiple Output continuous control block" extends BlockIcon; @@ -217,12 +289,13 @@ Modelica in file \"Modelica/package.mo\". y=0.03, width=0.6, height=0.6), - Diagram, - Documentation(info=" + Documentation(info=" ")); - protected - Real y[nout]=outPort.signal; + output Real y[nout]; + equation + y = outPort.signal; end MO; + partial block SISO "Single Input Single Output continuous control block" extends BlockIcon; @@ -230,21 +303,22 @@ Modelica in file \"Modelica/package.mo\". extent=[-140, -20; -100, 20]); OutPort outPort(final n=1) "Connector of Real output signal" annotation ( extent=[100, -10; 120, 10]); - annotation ( - Diagram, - Coordsys( + output Real y; + + annotation (Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], - component=[20, 20]), - Window( + component=[20, 20]), Window( x=0.32, y=0.07, width=0.6, height=0.6)); protected Real u=inPort.signal[1]; - Real y=outPort.signal[1]; + equation + y = outPort.signal[1]; end SISO; + partial block SI2SO "2 Single Input / 1 Single Output continuous control block" extends BlockIcon; @@ -255,27 +329,39 @@ Modelica in file \"Modelica/package.mo\". extent=[-140, -80; -100, -40]); OutPort outPort(final n=1) "Connector of Real output signal" annotation ( extent=[100, -10; 120, 10]); + output Real y "Output signal"; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.31, - y=0.07, - width=0.6, - height=0.6), - Documentation(info=" -Block has two Input vectors inPort1.signal and inPort2.signal and one -output vector outPort.signal. All vectors have one element. -"), - Diagram); + annotation (Documentation(info="+Block has two Input vectors inPort1.signal and inPort2.signal and one +output vector outPort.signal. All vectors have one element.
+")); protected Real u1=inPort1.signal[1] "Input signal 1"; Real u2=inPort2.signal[1] "Input signal 2"; - Real y=outPort.signal[1] "Output signal"; + equation + y = outPort.signal[1]; end SI2SO; + + partial block SIMO "Single Input Multiple Output continuous control block" + extends BlockIcon; + parameter Integer nout=1 "Number of outputs"; + InPort inPort(final n=1) "Connector of Real input signal" annotation ( + extent=[-140, -20; -100, 20]); + OutPort outPort(final n=nout) "Connector of Real output signals" + annotation (extent=[100, -10; 120, 10]); + output Real y[nout] "Output signals"; + + annotation (Documentation(info=" +Block has one continuous input signal and a vector of continuous output +signals.
+ +")); + protected + Real u=inPort.signal[1] "Input signal"; + equation + y = outPort.signal; + end SIMO; + partial block MISO "Multiple Input Single Output continuous control block" extends BlockIcon; parameter Integer nin=1 "Number of inputs"; @@ -283,20 +369,22 @@ output vector outPort.signal. All vectors have one element. extent=[-140, -20; -100, 20]); OutPort outPort(final n=1) "Connector of Real output signal" annotation ( extent=[100, -10; 120, 10]); - annotation (Documentation(info=" - + output Real y "Output signal"; + + annotation (Documentation(info="-Block has a vector of continuous input signals and +Block has a vector of continuous input signals and one continuous output signal.
")); protected Real u[:]=inPort.signal "Input signals"; - Real y=outPort.signal[1] "Output signal"; + equation + y = outPort.signal[1]; end MISO; - partial block MIMO "Multiple Input Multiple Output continuous control block" - + + partial block MIMO "Multiple Input Multiple Output continuous control block" extends BlockIcon; parameter Integer nin=1 "Number of inputs"; @@ -305,8 +393,8 @@ one continuous output signal. extent=[-140, -20; -100, 20]); OutPort outPort(final n=nout) "Connector of Real output signals" annotation (extent=[100, -10; 120, 10]); - annotation (Documentation(info=" - + output Real y[nout] "Output signals"; + annotation (Documentation(info="Block has a continuous input and a continuous output signal vector. The signal sizes of the input and output vector may be different. @@ -315,8 +403,10 @@ The signal sizes of the input and output vector may be different. ")); protected Real u[:]=inPort.signal "Input signals"; - Real y[:]=outPort.signal "Output signals"; + equation + y = outPort.signal; end MIMO; + partial block MIMOs "Multiple Input Multiple Output continuous control block with same number of inputs and outputs" @@ -327,16 +417,15 @@ The signal sizes of the input and output vector may be different. extent=[-140, -20; -100, 20]); OutPort outPort(final n=n) "Connector of Real output signals" annotation ( extent=[100, -10; 120, 10]); + output Real y[n] "Output signals"; annotation ( - Documentation(info=" - + Documentation(info="
Block has a continuous input and a continuous output signal vector where the signal sizes of the input and output vector are identical.
"), - Diagram, Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], @@ -348,8 +437,10 @@ where the signal sizes of the input and output vector are identical. height=0.6)); protected Real u[:]=inPort.signal "Input signals"; - Real y[:]=outPort.signal "Output signals"; + equation + y = outPort.signal; end MIMOs; + partial block MI2MO "2 Multiple Input / Multiple Output continuous control block" extends BlockIcon; @@ -362,6 +453,7 @@ where the signal sizes of the input and output vector are identical. extent=[-140, -80; -100, -40]); OutPort outPort(final n=n) "Connector of Real output signals" annotation ( extent=[100, -10; 120, 10]); + output Real y[n] "Output signals"; annotation ( Coordsys( extent=[-100, -100; 100, 100], @@ -373,34 +465,36 @@ where the signal sizes of the input and output vector are identical. width=0.6, height=0.6), Documentation(info=" -Block has two Input vectors inPort1.signal and inPort2.signal and one +Block has two Input vectors inPort1.signal and inPort2.signal and one output vector outPort.signal. All vectors have the same number of elements. -"), - Diagram); +")); protected Real u1[:]=inPort1.signal "Input signals 1"; Real u2[:]=inPort2.signal "Input signals 2"; - Real y[:]=outPort.signal "Output signals"; + equation + y = outPort.signal; end MI2MO; + partial block SignalSource "Base class for continuous signal source" extends MO; parameter Real offset[:]={0} "offset of output signal"; - parameter SIunits.Time startTime[:]={0} "output = offset for time < startTime"; + parameter SI.Time startTime[:]={0} "output = offset for time < startTime"; end SignalSource; + partial block SVcontrol "Single-Variable continuous controller" extends BlockIcon; protected Real u_s "Scalar setpoint input signal"; Real u_m "Scalar measurement input signal"; - Real y "Scalar actuator output signal"; public - InPort inPort_s(final n=1) "Connector of setpoint input signal" - annotation (extent=[-140, -20; -100, 20]); + InPort inPort_s(final n=1) "Connector of setpoint input signal" annotation + (extent=[-140, -20; -100, 20]); InPort inPort_m(final n=1) "Connector of measurement input signal" annotation (extent=[20, -100; -20, -140], rotation=-90); OutPort outPort(final n=1) "Connector of actuator output signal" annotation (extent=[100, -10; 120, 10]); + output Real y "Scalar actuator output signal"; annotation ( Diagram( Text(extent=[-102, 34; -142, 24], string="(setpoint)"), @@ -420,6 +514,7 @@ output vector outPort.signal. All vectors have the same number of elements. u_m = inPort_m.signal[1]; y = outPort.signal[1]; end SVcontrol; + partial block MVcontrol "Multi-Variable continuous controller" extends BlockIcon; @@ -432,32 +527,18 @@ output vector outPort.signal. All vectors have the same number of elements. annotation (extent=[20, -100; -20, -140], rotation=-90); OutPort outPort(final n=ny) "Connector of actuator output signals" annotation (extent=[100, -10; 120, 10]); - annotation ( - Diagram( + annotation (Diagram( Text(extent=[-100, 36; -140, 26], string="(setpoint)"), Text(extent=[102, 24; 142, 14], string="(actuator)"), - Text(extent=[-75, -108; -25, -98], string=" (measurement)")), - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.26, - y=0.19, - width=0.6, - height=0.6)); + Text(extent=[-75, -108; -25, -98], string=" (measurement)"))); end MVcontrol; + partial block BooleanBlockIcon "Basic graphical layout of Boolean block" - annotation ( - Coordsys(extent=[-100, -100; 100, 100]), - Window( - x=0.1, - y=0.1, - width=0.6, - height=0.6), - Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=5, fillColor=7 - )), Text(extent=[-150, 150; 150, 110], string="%name"))); end - BooleanBlockIcon; + annotation (Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=5, + fillColor=7)), Text(extent=[-150, 150; 150, 110], string="%name") + )); + end BooleanBlockIcon; + partial block BooleanSISO "Single Input Single Output control block with signals of type Boolean" extends BooleanBlockIcon; @@ -467,21 +548,66 @@ output vector outPort.signal. All vectors have the same number of elements. annotation (extent=[-140, -20; -100, 20]); BooleanOutPort outPort(final n=1) "Connector of Boolean output signal" annotation (extent=[100, -10; 120, 10]); - annotation ( - Diagram, - Coordsys( + output Boolean y; + + annotation (Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], - component=[20, 20]), - Window( + component=[20, 20]), Window( x=0.37, y=0.14, width=0.6, height=0.6)); protected Boolean u=inPort.signal[1]; - Boolean y=outPort.signal[1]; + equation + y = outPort.signal[1]; end BooleanSISO; + + partial block BooleanMIMOs + "Multiple Input Multiple Output continuous control block with same number of inputs and outputs of boolean type" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Number of inputs (= number of outputs)"; + BooleanInPort inPort(final n=n) "Connector of Boolean input signals" + annotation (extent=[-140, -20; -100, 20]); + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals" + annotation (extent=[100, -10; 120, 10]); + output Boolean y[n] "Output signals"; + annotation (Documentation(info=" ++Block has a continuous input and a continuous output signal vector +where the signal sizes of the input and output vector are identical +and of type boolean. +
+ +")); + protected + Boolean u[:]=inPort.signal "Input signals"; + equation + y = outPort.signal; + end BooleanMIMOs; + + partial block MI2BooleanMOs + "2 Multiple Input / Boolean Multiple Output block with same signal lengths" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Dimension of input and output vectors."; + InPort inPort1(final n=n) "Connector 1 of Boolean input signals" + annotation (extent=[-140, 40; -100, 80]); + InPort inPort2(final n=n) "Connector 2 of Boolean input signals" + annotation (extent=[-140, -80; -100, -40]); + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals" + annotation (extent=[100, -10; 120, 10]); + annotation (Documentation(info=" +Block has two Boolean input vectors u1 and u2 and one Boolean output +vector y. All vectors have the same number of elements.
+ +")); + end MI2BooleanMOs; + partial block BooleanSignalSource "Base class for Boolean signal sources" extends BooleanBlockIcon; parameter Integer nout(min=1) = 1 "Number of Boolean outputs"; @@ -503,33 +629,361 @@ output vector outPort.signal. All vectors have the same number of elements. fillColor=8)), Line(points=[-90, -70; 68, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8))), - Diagram); + fillColor=8)))); end BooleanSignalSource; - partial block MI2BooleanMOs - "2 Multiple Input / Boolean Multiple Output block with same signal lengths" + + partial block IntegerBlockIcon "Basic graphical layout of Integer block" + annotation (Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=45, + fillColor=7)), Text(extent=[-150, 150; 150, 110], string="%name") + )); + end IntegerBlockIcon; + + partial block IntegerMO "Multiple Integer Output continuous control block" + extends IntegerBlockIcon; + + parameter Integer nout(min=1) = 1 "Number of outputs"; + IntegerOutPort outPort(final n=nout) "Connector of Integer output signals" + annotation (extent=[100, -10; 120, 10]); + output Integer y[nout]; + equation + y = outPort.signal; + end IntegerMO; + + partial block IntegerSignalSource + "Base class for continuous Integer signal source" + extends IntegerMO; + parameter Integer offset[:]={0} "offset of output signal"; + parameter SI.Time startTime[:]={0} "output = offset for time < startTime"; + end IntegerSignalSource; + + partial block IntegerMIBooleanMOs + "Multiple Integer Input Multiple Boolean Output continuous control block with same number of inputs and outputs" extends BooleanBlockIcon; - parameter Integer n=1 "Dimension of input and output vectors."; - InPort inPort1(final n=n) "Connector 1 of Boolean input signals" - annotation (extent=[-140, 40; -100, 80]); - InPort inPort2(final n=n) "Connector 2 of Boolean input signals" - annotation (extent=[-140, -80; -100, -40]); + parameter Integer n=1 "Number of inputs (= number of outputs)"; + IntegerInPort inPort(final n=n) "Connector of Integer input signals" + annotation (extent=[-140, -20; -100, 20]); BooleanOutPort outPort(final n=n) "Connector of Boolean output signals" annotation (extent=[100, -10; 120, 10]); + output Boolean y[n] "Boolean output signals"; + annotation (Documentation(info=" ++Block has a continuous integer input and a continuous boolean output signal vector +where the signal sizes of the input and output vector are identical. +
+ +")); + protected + Integer u[n]=inPort.signal "Input signals"; + equation + y = outPort.signal; + end IntegerMIBooleanMOs; + + connector RealPort "Real port (both input/output possible)" + replaceable type SignalType = Real; + extends SignalType; + end RealPort; + + /*connector RealPort "Connector with input signals of type Real" + parameter Integer n=1 "Dimension of signal vector"; + replaceable type SignalType = Real "type of signal"; + SignalType signal[n] "Real input signals"; + annotation ( - Coordsys(extent=[-100, -100; 100, 100]), - Window( - x=0.19, - y=0.16, - width=0.6, - height=0.6), - Documentation(info=" -Block has two Boolean input vectors u1 and u2 and one Boolean output vector y. -All vectors have the same number of elements. + Icon( + Polygon( + points=[-100, 100; 100, 0; -100, -100; -100, 100], + style(color=3, fillColor=3))), + Diagram( + Polygon( + points=[-100, 100; 100, 0; -100, -100; -100, 100], + style(color=3, fillColor=3)), + Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=3))), + Terminal( + Polygon( + points=[-100, 100; 100, 0; -100, -100; -100, 100], + style(color=3, fillColor=3)))); + end RealPort; */ + + connector BooleanPort = Boolean "Boolean port (both input/output possible)"; + + connector IntegerPort = Integer "Integer port (both input/output possible)"; + + package BusAdaptors + "Components to send signals to the bus or receive signals from the bus" + + extends Modelica.Icons.Library; + + block SendReal "Send Real signal to bus" + Internal.InputReal toBus annotation (extent=[100, -10; 120, 10]); + InPort inPort(final n=1) annotation (extent=[-140, -20; -100, 20]); + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=73, fillColor=7)) + , + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0)), + Text( + extent=[-100, 30; 100, -30], + string="send", + style(color=73, fillColor=42))), Documentation(info=" ++Converts an InPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the InPort connector. +
+ + ")); - end MI2BooleanMOs; -end Interfaces; + equation + toBus = inPort.signal[1]; + end SendReal; + + block SendBoolean "Send Boolean signal to bus" + Internal.InputBoolean toBus annotation (extent=[100, -10; 120, 10]); + BooleanInPort inPort(final n=1) annotation (extent=[-140, -20; -100, 20]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=81, fillColor=7)) + , + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0)), + Text( + extent=[-100, 30; 100, -30], + string="send", + style(color=81, fillColor=42))), Documentation(info=" ++Converts a BooleanInPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the BooleanInPort connector. +
+ + +")); + equation + toBus = inPort.signal[1]; + end SendBoolean; + + block SendInteger "Send Integer signal to bus" + Internal.InputInteger toBus annotation (extent=[100, -10; 120, 10]); + IntegerInPort inPort(final n=1) annotation (extent=[-140, -20; -100, 20]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=45, fillColor=7)) + , + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0)), + Text( + extent=[-100, 30; 100, -30], + string="send", + style(color=45, fillColor=42))), Documentation(info=" ++Converts an IntegerInPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the IntegerInPort connector. +
+ + +")); + equation + toBus = inPort.signal[1]; + end SendInteger; + + block ReceiveReal "Receive Real signal from bus" + Internal.OutputReal fromBus annotation (extent=[-120, -10; -100, 10]); + OutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]); + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=73, fillColor=7)) + , + Text( + extent=[-100, 30; 100, -30], + string="receive", + style(color=73, fillColor=42)), + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0))), Documentation(info=" ++Converts a signal from the signal bus to an OutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the OutPort connector. +
+ +")); + equation + fromBus = outPort.signal[1]; + end ReceiveReal; + + block ReceiveBoolean "Receive Boolean signal from bus" + Internal.OutputBoolean fromBus annotation (extent=[-120, -10; -100, 10]); + BooleanOutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=81, fillColor=7)) + , + Text( + extent=[-100, 30; 100, -30], + string="receive", + style(color=81, fillColor=42)), + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0))), Documentation(info=" ++Converts a signal from the signal bus to a BooleanOutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the BooleanOutPort connector. +
+ +")); + equation + fromBus = outPort.signal[1]; + end ReceiveBoolean; + + block ReceiveInteger "Receive Integer signal from bus" + Internal.OutputInteger fromBus annotation (extent=[-120, -10; -100, 10]); + IntegerOutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]) + ; + annotation (Icon( + Rectangle(extent=[-100, 40; 100, -40], style(color=45, fillColor=7)) + , + Text( + extent=[-100, 30; 100, -30], + string="receive", + style(color=45, fillColor=42)), + Text( + extent=[-144, 96; 144, 46], + string="%name", + style(color=0))), Documentation(info=" ++Converts a signal from the signal bus to an IntegerOutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the IntegerOutPort connector. +
+ + +")); + equation + fromBus = outPort.signal[1]; + end ReceiveInteger; + + package Internal + "Internal connector definitions only to be used from models of package BusAdaptors" + + + extends Modelica.Icons.Library; + + connector InputReal = input Real "'input Real' variable as connector" + annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector InputBoolean = input Boolean + "'input Boolean' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector InputInteger = input Integer + "'input Integer' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector OutputReal = output Real "'output Real' variable as connector" + annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector OutputBoolean = output Boolean + "'output Boolean' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + connector OutputInteger = output Integer + "'output Integer' variable as connector" annotation (Icon(Rectangle( + extent=[-100, 100; 100, -100], style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77))), Diagram(Rectangle(extent=[-100, 100; 100, -100] + , style( + color=77, + fillColor=77, + fillPattern=1)), Text( + extent=[-132, -100; 132, -198], + string="%name", + style(color=77)))); + end Internal; + end BusAdaptors; +end Interfaces; diff --git a/Blocks/Math.mo b/Blocks/Math.mo index 0a2d54bf6e..067e853961 100644 --- a/Blocks/Math.mo +++ b/Blocks/Math.mo @@ -1,21 +1,14 @@ +package Math "Mathematical functions as input/output blocks" - -package Math "Mathematical functions as input/output blocks" extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - package Interfaces = Modelica.Blocks.Interfaces ; - - annotation ( - Coordsys(extent=[0, 0; 200, 400], component=[20, 20]), - Window( - x=0.02, - y=0.02, - width=0.3, - height=0.7, - library=1, - autolayout=1), - Documentation(info=" - + + annotation (Window( + x=0.05, + y=0.09, + width=0.44, + height=0.71, + library=1, + autolayout=1),Documentation(info="This package contains basic mathematical operations, such as summation and multiplication, and basic mathematical @@ -26,36 +19,44 @@ In particular the following operations and functions are provided:
-- Gain Output the input multiplied by a scalar gain +TwoInputs Change causality of input signals. + TwoOutputs Change causality of output signals. + Gain Output the input multiplied by a scalar gain MatrixGain Output the product of a gain matrix with the input - Sum Output the sum of the elements of the input vector - Feedback Output difference between commanded and feedback input - Add Output the sum of the two inputs - Add3 Output the sum of the three inputs - Product Output product of the two inputs + Sum Output the sum of the elements of the input vector + Feedback Output difference between commanded and feedback input + Add Output the sum of the two inputs + Add3 Output the sum of the three inputs + Product Output product of the two inputs Division Output first input divided by second input Abs Output the absolute value of the input Sign Output the sign of the input Sqrt Output the square root of the input Sin Output the sine of the input Cos Output the cosine of the input - Tan Output the tangent of the input - Asin Output the arc sine of the input - Acos Output the arc cosine of the input - Atan Output the arc tangent of the input - Atan2 Output atan(u1/u2) of the inputs u1 and u2 - Sinh Output the hyperbolic sine of the input - Cosh Output the hyperbolic cosine of the input - Tanh Output the hyperbolic tangent of the input - Exp Output the exponential (base e) of the input - Log Output the natural (base e) logarithm of the input - Log10 Output the base 10 logarithm of the input + Tan Output the tangent of the input + Asin Output the arc sine of the input + Acos Output the arc cosine of the input + Atan Output the arc tangent of the input + Atan2 Output atan(u1/u2) of the inputs u1 and u2 + Sinh Output the hyperbolic sine of the input + Cosh Output the hyperbolic cosine of the input + Tanh Output the hyperbolic tangent of the input + Exp Output the exponential (base e) of the input + Log Output the natural (base e) logarithm of the input + Log10 Output the base 10 logarithm of the input + RealToInteger Output the nearest Integer value to the input + IntegerToReal Output the input as Real value + Max Output the maximum of the two inputs + Min Output the minimum of the two inputs + Edge Set output to true at rising edge of the input + BooleanChange Set output to true when Boolean input changes + IntegerChange Set output to true when Integer input changes
Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - - block Gain + + block TwoInputs "Change causality of input signals (e.g. for inverse models)" + + + extends Interfaces.BlockIcon; + parameter Integer n=1 "number of input signals"; + annotation (Documentation(info=" +This block is used to enable assignment of values to +variables preliminary defined as outputs (e.g. useful for +inverse model generation).
+ +Release Notes:
+This block is used to enable assignment of values to +variables preliminary defined as inputs (e.g. useful for +inverse model generation).
+ +Release Notes:
+-This blocks computes output y=outPort.signal as -element-wise product of gain k with the +This block computes the output y=outPort.signal as +element-wise product of gain k with the input u = inPort.signal:
-- y[i] = k[i] * u[i]; +y[i] = k[i] * u[i];Release Notes:
-This blocks computes output y=outPort.signal as product of the +This block computes the output y=outPort.signal as product of the gain matrix K with the input signal vector u = inPort.signal:
-- y = K * u; +y = K * u;-Example: +Example:
-- parameter: K = [0.12 2; 3 1.5] +parameter: K = [0.12 2; 3 1.5] results in the following equations: - | y[1] | | 0.12 2.00 | | u[1] | - | | = | | * | | + | y[1] | | 0.12 2.00 | | u[1] | + | | = | | * | | | y[2] | | 3.00 1.50 | | u[2] |Release Notes:
-This blocks computes output y=outPort.signal[1] as -sum of the elements of the input signal vector -u=inPort.signal: -
+ Documentation(info=" +This block computes the output y=outPort.signal[1] as +sum of the elements of the input signal vector +u=inPort.signal:
-- y = u[1] + u[2] + ...; +y = u[1] + u[2] + ... + u[nin];--Example: -
+Example: With parameter nin = 3 results the following equation:
-- parameter: nin = 3; +y = u[1] + u[2] + u[3]; +- results in the following equations: - - y = u[1] + u[2] + u[3]; +Optionally, the parameter Real k[nin]=ones(nin) could be +changed to weight the sum elements in order to calculate the scalar +product
+ +y = k*u = k[1]*u[1] + k[2]*u[2] + ... + k[nin]*u[nin] .Release Notes:
-This blocks computes output y=outPort.signal as difference of the -commanded input u1=inPort1.signal and the feedback +This block computes the output y=outPort.signal as difference of the +commanded input u1=inPort1.signal and the feedback input u2=inPort2.signal:
-- y = u1 - u2; +y = u1 - u2;-Example: +Example:
-- parameter: n = 2 +parameter: n = 2 results in the following equations: - - y[1] = u1[1] - u2[1] + + y[1] = u1[1] - u2[1] y[2] = u1[2] - u2[2]Release Notes:
-This blocks computes output y=outPort.signal as sum of the +This block computes the output y=outPort.signal as sum of the two input signals u1=inPort1.signal and u2=inPort2.signal:
-- y = k1*u1 + k2*u2; +y = k1*u1 + k2*u2;-Example: +Example:
-- parameter: n = 2, k1= +2, k2= -3 +parameter: n = 2, k1= +2, k2= -3 results in the following equations: - - y[1] = 2 * u1[1] - 3 * u2[1] + + y[1] = 2 * u1[1] - 3 * u2[1] y[2] = 2 * u1[2] - 3 * u2[2]Release Notes:
-This blocks computes output y=outPort.signal as sum of the +This block computes the output y=outPort.signal as sum of the three input signals u1=inPort1.signal, u2=inPort2.signal and u3=inPort3.signal:
-- y = k1*u1 + k2*u2 + k3*u3; +y = k1*u1 + k2*u2 + k3*u3;-Example: +Example:
-- parameter: n = 2, k1= +2, k2= -3, k3=1; +parameter: n = 2, k1= +2, k2= -3, k3=1; results in the following equations: - - y[1] = 2 * u1[1] - 3 * u2[1] + u3[1]; + + y[1] = 2 * u1[1] - 3 * u2[1] + u3[1]; y[2] = 2 * u1[2] - 3 * u2[2] + u3[2];Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as product of the corresponding elements of the two inputs u1=inPort1.signal and u2=inPort2.signal:
-- y[i] = u1[i] * u2[i]; +y[i] = u1[i] * u2[i];Release Notes:
This block computes the output y=outPort.signal element-wise by dividing the corresponding elements of the two inputs u1=inPort1.signal and u2=inPort2.signal:
-- y[i] = u1[i] / u2[i]; +y[i] = u1[i] / u2[i];Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as absolute value of the input u=inPort.signal:
-- y[i] = abs( u[i] ); +y[i] = abs( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as sign of the input u=inPort.signal:
-- 1 if u[i] > 0 +1 if u[i] > 0 y[i] = 0 if u[i] == 0 - -1 if u[i] < 0 + -1 if u[i] < 0Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as square root of the input u=inPort.signal:
-- y[i] = sqrt( u[i] ); +y[i] = sqrt( u[i] );@@ -918,951 +856,819 @@ Otherwise an error occurs.
Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as sine of the input u=inPort.signal:
-- y[i] = sin( u[i] ); +y[i] = sin( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as cos of the input u=inPort.signal:
-- y[i] = cos( u[i] ); +y[i] = cos( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise +This block computes the output y=outPort.signal element-wise as tan of the input u=inPort.signal:
-- y[i] = tan( u[i] ); +y[i] = tan( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -sine-inverse of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +sine-inverse of the input u=inPort.signal:
-- y[i] = asin( u[i] ); +y[i] = asin( u[i] );-The absolute values of the elements of the input u need to -be less or equal to one (abs( u[i] ) <= 1). +The absolute values of the elements of the input u need to +be less or equal to one (abs( u[i] ) <= 1). Otherwise an error occurs.
Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -cosine-inverse of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +cosine-inverse of the input u=inPort.signal:
-- y[i] = acos( u[i] ); +y[i] = acos( u[i] );-The absolute values of the elements of the input u need to -be less or equal to one (abs( u[i] ) <= 1). +The absolute values of the elements of the input u need to +be less or equal to one (abs( u[i] ) <= 1). Otherwise an error occurs.
Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -tangent-inverse of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +tangent-inverse of the input u=inPort.signal:
-- y[i] = atan( u[i] ); +y[i] = atan( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -tangent-inverse of the input u1=inPort1.signal divided by -input u2=inPort2.signal: +This block computes the output y=outPort.signal element-wise as the +tangent-inverse of the input u1=inPort1.signal divided by +input u2=inPort2.signal:
-- y[i] = atan2( u1[i], u2[i] ); +y[i] = atan2( u1[i], u2[i] );u1[i] and u2[i] shall not be zero at the same time instant. -Atan2 uses the sign of u1[i] and u2[i] in order to construct +Atan2 uses the sign of u1[i] and u2[i] in order to construct the solution in the range -180 deg <= y[i] <= 180 deg, whereas -block Atan gives a solution in the range +block Atan gives a solution in the range -90 deg <= y[i] <= 90 deg.
Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -hyperbolic sine of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +hyperbolic sine of the input u=inPort.signal:
-- y[i] = sinh( u[i] ); +y[i] = sinh( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -hyperbolic cosine of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +hyperbolic cosine of the input u=inPort.signal:
-- y[i] = cosh( u[i] ); +y[i] = cosh( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -hyperbolic tangent of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +hyperbolic tangent of the input u=inPort.signal:
-- y[i] = tanh( u[i] ); +y[i] = tanh( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -exponential (of base e) of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +exponential (of base e) of the input u=inPort.signal:
-- y[i] = exp( u[i] ); +y[i] = exp( u[i] );Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -natural (base e) logarithm of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +natural (base e) logarithm of the input u=inPort.signal:
-- y[i] = log( u[i] ); +y[i] = log( u[i] );@@ -1873,80 +1679,68 @@ zero or negative.
Release Notes:
-This blocks computes the output y=outPort.signal element-wise as the -base 10 logarithm of the input u=inPort.signal: +This block computes the output y=outPort.signal element-wise as the +base 10 logarithm of the input u=inPort.signal:
-- y[i] = log10( u[i] ); +y[i] = log10( u[i] );@@ -1957,24 +1751,188 @@ zero or negative.
Release Notes:
+This block computes the output y=outPort.signal element-wise +as nearest integer value of the input u=inPort.signal: +
+ +y[i] = integer( floor( u[i] + 0.5 ) ) for u[i] > 0; + y[i] = integer( ceil ( u[i] - 0.5 ) ) for u[i] < 0; ++ +")); + public + Interfaces.InPort inPort(final n=n) annotation (extent=[-140, -20; -100, 20 + ]); + Interfaces.IntegerOutPort outPort(final n=n) annotation (extent=[100, -10; + 120, 10]); + equation + u = inPort.signal; + for i in 1:n loop + outPort.signal[i] = if (u[i] > 0) then integer(floor(u[i] + 0.5)) else + integer(ceil(u[i] - 0.5)); + end for; + end RealToInteger; + + block IntegerToReal "Convert integer to real signals" + extends Interfaces.BlockIcon; + parameter Integer n=1 + "Number of input signals (= number of output signals)"; + annotation (Icon( + Text( + extent=[-120, 60; -20, -60], + string="I", + style(color=45)), + Text(extent=[0, 60; 100, -60], string="R"), + Polygon(points=[10, 0; -10, 20; -10, 10; -40, 10; -40, -10; -10, -10; - + 10, -20; 10, 0], style(fillColor=73))), Documentation(info=" +
+This block computes the output y=outPort.signal element-wise +as Real equivalent of the Integer input u=inPort.signal: +
+ +y[i] = u[i]; ++ +
where u is of Integer and y of Real type.
+ +")); + Interfaces.OutPort outPort(final n=n) annotation (extent=[100, -10; 120, 10 + ]); + Interfaces.IntegerInPort inPort(final n=n) annotation (extent=[-140, -20; - + 100, 20]); + equation + outPort.signal = inPort.signal; + end IntegerToReal; + + block Max "Pass through the largest signal" + extends Interfaces.MI2MO; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="max()")), Documentation(info=" ++This block computes the output y=outPort.signal element-wise +as maximum of the two inputs u1=inPort1.signal and u2=inPort2.signal: +
+ +y[i] = max ( u1[i] , u2[i] ); ++ +")); + equation + for i in 1:n loop + y[i] = max(u1[i], u2[i]); + end for; + end Max; + + block Min "Pass through the smallest signal" + extends Interfaces.MI2MO; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="min()")), Documentation(info=" +
+This block computes the output y=outPort.signal element-wise +as minimum of the two inputs u1=inPort1.signal and u2=inPort2.signal: +
+ +y[i] = min ( u1[i] , u2[i] ); ++ +")); + equation + for i in 1:n loop + y[i] = min(u1[i], u2[i]); + end for; + end Min; + + block Edge "Indicates rising edge of boolean signal" + extends Interfaces.BooleanMIMOs; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="edge()")), Documentation(info=" +
+This block sets the Boolean output y=outPort.signal element-wise +to true, when the Boolean input u=inPort.signal shows a rising edge: +
+ +y[i] = edge( u[i] ); ++ +")); + equation + for i in 1:n loop + y[i] = edge(u[i]); + end for; + annotation (Icon); + end Edge; + + block BooleanChange "Indicates boolean signal changing" + extends Interfaces.BooleanMIMOs; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="change()")), Documentation(info=" +
+This block sets the Boolean output y=outPort.signal element-wise +to true, when the Boolean input u=inPort.signal shows a rising +or falling edge, i.e., when the signal changes: +
+ +y[i] = change( u[i] ); ++ +")); + equation + for i in 1:n loop + y[i] = change(u[i]); + end for; + end BooleanChange; + + block IntegerChange "Indicates integer signal changing" + extends Interfaces.IntegerMIBooleanMOs; + annotation (Icon(Text( + extent=[-90, 36; 90, -36], + style(color=9), + string="change()")), Documentation(info=" +
+This block sets the Boolean output y=outPort.signal element-wise +to true, when the Integer input u=inPort.signal changes: +
+ +y[i] = change( u[i] ); ++ +")); + equation + for i in 1:n loop + y[i] = change(u[i]); + end for; + end IntegerChange; end Math; diff --git a/Blocks/Nonlinear.mo b/Blocks/Nonlinear.mo index 3e400b044a..b62dd3b320 100644 --- a/Blocks/Nonlinear.mo +++ b/Blocks/Nonlinear.mo @@ -1,22 +1,15 @@ -package Nonlinear - "Discontinuous or non-differentiable algebraic control blocks" +package Nonlinear + "Discontinuous or non-differentiable algebraic control blocks" + extends Modelica.Icons.Library; - package Interfaces = Modelica.Blocks.Interfaces ; - - annotation ( - Coordsys( - extent=[0, 0; 268, 370], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, + + annotation (Window( + x=0.05, + y=0.1, width=0.21, - height=0.41, + height=0.23, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1),Documentation(info="
This package contains discontinuous and non-differentiable, algebraic input/output blocks. @@ -24,13 +17,14 @@ In particular the following blocks are provided:
- Limiter Limit the range of a signal. - DeadZone Provide a region of zero output. + Limiter Limit the range of a signal to fixed limits. + VariableLimiter Limit the range of a signal to variable limits. + DeadZone Provide a region of zero output.
Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - block Limiter "Limit the range of a signal" + block Limiter "Limit the range of a signal" parameter Real uMax[:]={1} "Upper limits of input signals"; - parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax + parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax "Lower limits of input signals"; extends Interfaces.MIMOs(final n=size(uMax, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.22, - y=0.06, - width=0.43, - height=0.51), - Documentation(info=" - + x=0.22, + y=0.06, + width=0.43, + height=0.51), + Documentation(info="The Limiter block passes its input signal as output signal as long as the input is within the specified upper and lower -limits. If this is not the case, the corresponding limits are passed +limits. If this is not the case, the corresponding limit is passed as output.
-"), +"), Icon( - Line(points=[0, -90; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -70; -50, -70; 50, 70; 80, 70], style(color=0)), + Line(points=[0, -90; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -70; -50, -70; 50, 70; 80, 70], style(color=0)), Text( - extent=[-150, -150; 150, -110], - string="uMax=%uMax", - style(color=0)), - Text(extent=[-150, 150; 150, 110], string="%name")), + extent=[-150, -150; 150, -110], + string="uMax=%uMax", + style(color=0)), + Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( - Line(points=[0, -60; 0, 50], style(color=8)), - Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor - =8)), - Line(points=[-60, 0; 50, 0], style(color=8)), - Polygon(points=[60, 0; 50, -5; 50, 5; 60, 0], style(color=8, fillColor - =8)), - Line(points=[-50, -40; -30, -40; 30, 40; 50, 40], style(color=0)), + Line(points=[0, -60; 0, 50], style(color=8)), + Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor= + 8)), + Line(points=[-60, 0; 50, 0], style(color=8)), + Polygon(points=[60, 0; 50, -5; 50, 5; 60, 0], style(color=8, fillColor= + 8)), + Line(points=[-50, -40; -30, -40; 30, 40; 50, 40], style(color=0)), Text( - extent=[46, -6; 68, -18], - string="inPort", - style(color=10)), + extent=[46, -6; 68, -18], + string="inPort", + style(color=10)), Text( - extent=[-30, 70; -5, 50], - string="outPort", - style(color=10)), + extent=[-30, 70; -5, 50], + string="outPort", + style(color=10)), Text( - extent=[-58, -54; -28, -42], - string="uMin", - style(color=10)), + extent=[-58, -54; -28, -42], + string="uMin", + style(color=10)), Text( - extent=[26, 40; 66, 56], - string="uMax", + extent=[26, 40; 66, 56], + string="uMax", style(color=10)))); - equation + equation for i in 1:n loop - y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i - ] else u[i]; + y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i] + else u[i]; end for; end Limiter; - block DeadZone "Provide a region of zero output" + + block VariableLimiter "Limit the range of a signal with variable limits" + extends Interfaces.MIMOs; + + Interfaces.InPort limit1(final n=n) annotation (extent=[-140, 60; -100, 100 + ]); + Interfaces.InPort limit2(final n=n) annotation (extent=[-140, -100; -100, - + 60]); + protected + Real uMax[n]; + Real uMin[n]; + + annotation ( + Documentation(info=" ++The Limiter block passes its input signal as output signal +as long as the input is within the upper and lower +limits specified by the two additional inputs limit1 and +limit2. If this is not the case, the corresponding limit +is passed as output. +
+ +"), + Icon( + Line(points=[0, -90; 0, 68], style(color=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -70; -50, -70; 50, 70; 80, 70], style(color=0)), + Text(extent=[-150, 150; 150, 110], string="%name"), + Line(points=[-100, 80; 66, 80; 66, 70], style(fillPattern=1)), + Line(points=[-100, -80; -64, -80; -64, -70], style(fillPattern=1)), + Polygon(points=[-64, -70; -66, -74; -62, -74; -64, -70], style( + fillPattern=1)), + Polygon(points=[66, 70; 64, 74; 68, 74; 66, 70], style(fillPattern=1)) + , + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8))), + Diagram( + Line(points=[0, -60; 0, 50], style(color=8)), + Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor= + 8)), + Line(points=[-60, 0; 50, 0], style(color=8)), + Polygon(points=[60, 0; 50, -5; 50, 5; 60, 0], style(color=8, fillColor= + 8)), + Line(points=[-50, -40; -30, -40; 30, 40; 50, 40], style(color=0)), + Text( + extent=[46, -6; 68, -18], + string="inPort", + style(color=10)), + Text( + extent=[-30, 70; -5, 50], + string="outPort", + style(color=10)), + Text( + extent=[-66, -40; -26, -20], + string="uMin", + style(color=10)), + Text( + extent=[30, 20; 70, 40], + string="uMax", + style(color=10)), + Line(points=[-100, 80; 40, 80; 40, 40]), + Line(points=[-100, -80; -40, -80; -40, -40]), + Polygon(points=[40, 40; 35, 50; 45, 50; 40, 40], style(fillPattern=1)) + , + Polygon(points=[-40, -40; -45, -50; -35, -50; -40, -40], style( + fillPattern=1)))); + equation + for i in 1:n loop + uMax[i] = max(limit1.signal[i], limit2.signal[i]); + uMin[i] = min(limit1.signal[i], limit2.signal[i]); + y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i] + else u[i]; + end for; + end VariableLimiter; + + block DeadZone "Provide a region of zero output" parameter Real uMax[:]={1} "Upper limits of dead zones"; - parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax + parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax "Lower limits of dead zones"; extends Interfaces.MIMOs(final n=size(uMax, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.39, - y=0.18, - width=0.56, - height=0.6), - Documentation(info=" - -+ x=0.39, + y=0.18, + width=0.56, + height=0.6), + Documentation(info=" +
The DeadZone block defines a region of zero output.
@@ -157,49 +229,48 @@ is zero. Outside of this zone, the output is a linear function of the input with a slope of 1. -"), +"), Icon( - Line(points=[0, -90; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -60; -20, 0; 20, 0; 80, 60], style(color=0)), + Line(points=[0, -90; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor= + 8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, -8; 68, 8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -60; -20, 0; 20, 0; 80, 60], style(color=0)), Text( - extent=[-150, -150; 150, -110], - string="uMax=%uMax", - style(color=9)), - Text(extent=[-150, 150; 150, 110], string="%name")), + extent=[-150, -150; 150, -110], + string="uMax=%uMax", + style(color=9)), + Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( - Line(points=[0, -60; 0, 50], style(color=8)), - Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor - =8)), - Line(points=[-76, 0; 74, 0], style(color=8)), - Polygon(points=[84, 0; 74, -5; 74, 5; 84, 0], style(color=8, fillColor - =8)), - Line(points=[-81, -40; -38, 0; 40, 0; 80, 40], style(color=0)), + Line(points=[0, -60; 0, 50], style(color=8)), + Polygon(points=[0, 60; -5, 50; 5, 50; 0, 60], style(color=8, fillColor= + 8)), + Line(points=[-76, 0; 74, 0], style(color=8)), + Polygon(points=[84, 0; 74, -5; 74, 5; 84, 0], style(color=8, fillColor= + 8)), + Line(points=[-81, -40; -38, 0; 40, 0; 80, 40], style(color=0)), Text( - extent=[62, -7; 88, -25], - string="inPort", - style(color=10)), + extent=[62, -7; 88, -25], + string="inPort", + style(color=10)), Text( - extent=[-36, 72; -5, 50], - string="outPort", - style(color=10)), + extent=[-36, 72; -5, 50], + string="outPort", + style(color=10)), Text( - extent=[-51, 1; -28, 19], - string="uMin", - style(color=10)), + extent=[-51, 1; -28, 19], + string="uMin", + style(color=10)), Text( - extent=[27, 21; 52, 5], - string="uMax", + extent=[27, 21; 52, 5], + string="uMax", style(color=10)))); - equation + equation for i in 1:n loop - y[i] = if u[i] > uMax[i] then u[i] - uMax[i] else if u[i] < uMin[i] - then u[i] - uMin[i] else 0; + y[i] = if u[i] > uMax[i] then u[i] - uMax[i] else if u[i] < uMin[i] then + u[i] - uMin[i] else 0; end for; end DeadZone; end Nonlinear; - diff --git a/Blocks/Sources.mo b/Blocks/Sources.mo index fb7312a6f7..f11420245e 100644 --- a/Blocks/Sources.mo +++ b/Blocks/Sources.mo @@ -1,32 +1,22 @@ +package Sources + "Signal source blocks generating Real, Integer and Boolean signals" - -package Sources "Signal source blocks generating Real and Boolean signals" extends Modelica.Icons.Library; - package Interfaces = Modelica.Blocks.Interfaces ; - package SIunits = Modelica.SIunits ; - - annotation ( - Coordsys( - extent=[0, 0; 289, 576], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, - width=0.29, - height=0.81, - library=1, - autolayout=1), - Documentation(info=" - + + annotation (Window( + x=0.06, + y=0.1, + width=0.43, + height=0.65, + library=1, + autolayout=1), + Documentation(info="This package contains source components, i.e., blocks which have only output signals. These blocks are used as signal generators.
--The following sources are provided to generate Real signals: -
+The following sources are provided to generate Real signals:
Clock Generate actual time. @@ -39,15 +29,13 @@ The following sources are provided to generate Real signals: Pulse Generate pulse signals. SawTooth Generate sawtooth signals. Trapezoid Generate trapezoidal signals. - KinematicPTP Generate an acceleration signal to move as fast as + KinematicPTP Generate an acceleration signal to move as fast as possible along a distance within given kinematic constraints. - TimeTable Generate a (possibly discontinuous) signal by + TimeTable Generate a (possibly discontinuous) signal by linear interpolation in a table. --
-The following sources are provided to generate Boolean signals: -
+The following sources are provided to generate Boolean signals:
BooleanConstant Generate constant signals. @@ -56,6 +44,13 @@ The following sources are provided to generate Boolean signals: SampleTrigger Generate sample triggers.+
The following sources are provided to generate Integer signals:
+ ++ IntegerConstant Generate constant signals. + IntegerStep Generate step signals. ++
All sources are vectorized. This means that the output is a vector of signals. The number of outputs is in correspondance @@ -92,7 +87,6 @@ have at least the following two parameters: offset Value which is added to all signal values. startTime Start time of signal. For time < startTime, the output is set to offset. -
@@ -104,7 +98,7 @@ usually requires a trimming calculation.
Release Notes:
Copyright (C) 1999, Modelica Design Group, DLR and Fraunhofer-Gesellschaft.
+Copyright © 1999-2002, Modelica Association, DLR and Fraunhofer-Gesellschaft.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - block Clock "Generate actual time signals " + block Clock "Generate actual time signals " parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(offset, 1); size(startTime, 1)] - )); - protected + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(offset, 1); size(startTime, 1)]) + ); + protected parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.26, - y=0, - width=0.49, - height=0.59), + x=0.26, + y=0, + width=0.36, + height=0.52), Icon( - Text(extent=[-150, 150; 150, 110], string="%name"), - Ellipse(extent=[-80, 80; 80, -80], style(color=9)), - Line(points=[0, 80; 0, 60], style(color=9)), - Line(points=[80, 0; 60, 0], style(color=9)), - Line(points=[0, -80; 0, -60], style(color=9)), - Line(points=[-80, 0; -60, 0], style(color=9)), - Line(points=[37, 70; 26, 50], style(color=9)), - Line(points=[70, 38; 49, 26], style(color=9)), - Line(points=[71, -37; 52, -27], style(color=9)), - Line(points=[39, -70; 29, -51], style(color=9)), - Line(points=[-39, -70; -29, -52], style(color=9)), - Line(points=[-71, -37; -50, -26], style(color=9)), - Line(points=[-71, 37; -54, 28], style(color=9)), - Line(points=[-38, 70; -28, 51], style(color=9)), - Line(points=[0, 0; -50, 50], style(color=0, thickness=2)), - Line(points=[0, 0; 40, 0], style(color=0, thickness=2)), - Text( - extent=[-150, -150; 150, -110], - string="startTime=%startTime", - style(color=0))), + Ellipse(extent=[-80, 80; 80, -80], style(color=9)), + Line(points=[0, 80; 0, 60], style(color=9)), + Line(points=[80, 0; 60, 0], style(color=9)), + Line(points=[0, -80; 0, -60], style(color=9)), + Line(points=[-80, 0; -60, 0], style(color=9)), + Line(points=[37, 70; 26, 50], style(color=9)), + Line(points=[70, 38; 49, 26], style(color=9)), + Line(points=[71, -37; 52, -27], style(color=9)), + Line(points=[39, -70; 29, -51], style(color=9)), + Line(points=[-39, -70; -29, -52], style(color=9)), + Line(points=[-71, -37; -50, -26], style(color=9)), + Line(points=[-71, 37; -54, 28], style(color=9)), + Line(points=[-38, 70; -28, 51], style(color=9)), + Line(points=[0, 0; -50, 50], style(color=0, thickness=2)), + Line(points=[0, 0; 40, 0], style(color=0, thickness=2)), + Text( + extent=[-150, -150; 150, -110], + string="startTime=%startTime", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, 0; -10, 0; 60, 70], style(color=0, thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, 0; -10, 0; 60, 70], style(color=0, thickness=2)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 0; -37, -13; -30, -13; -34, 0], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -13; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -69; -37, -56; -31, -56; -34, -69; -34, -69], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -69; -37, -56; -31, -56; -34, -69; -34, -69], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-81, -25; -35, -43], - string="offset", - style(color=9)), - Text( - extent=[-33, -71; 13, -89], - string="startTime", - style(color=9)), - Text( - extent=[-66, 92; -25, 72], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 0; 50, 0], style(color=8, pattern=2)), - Line(points=[50, 0; 50, 60], style(color=8, pattern=2)), - Text( - extent=[35, 33; 50, 23], - string="1", - style(color=9)), - Text( - extent=[14, 13; 32, 1], - string="1", + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-81, -25; -35, -43], + string="offset", + style(color=9)), + Text( + extent=[-33, -71; 13, -89], + string="startTime", + style(color=9)), + Text( + extent=[-66, 92; -25, 72], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 0; 50, 0], style(color=8, pattern=2)), + Line(points=[50, 0; 50, 60], style(color=8, pattern=2)), + Text( + extent=[35, 33; 50, 23], + string="1", + style(color=9)), + Text( + extent=[14, 13; 32, 1], + string="1", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else time - p_startTime[i]); end for; end Clock; - block Constant "Generate constant signals of type Real" + + block Constant "Generate constant signals of type Real" parameter Real k[:]={1} "Constant output values"; extends Interfaces.MO(final nout=size(k, 1)); - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.29, - y=0.19, - width=0.6, - height=0.6), + x=0.29, + y=0.19, + width=0.6, + height=0.6), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Line(points=[-80, 0; 80, 0], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="k=%k", - style(color=0))), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Line(points=[-80, 0; 80, 0], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="k=%k", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[-75, 94; -22, 76], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-101, 8; -81, -12], - string="k", + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, 0; 80, 0], style(color=0, thickness=2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[-75, 94; -22, 76], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-101, 8; -81, -12], + string="k", style(color=9)))); - equation + equation outPort.signal = k; end Constant; - block Step "Generate step signals of type Real" + + block Step "Generate step signals of type Real" parameter Real height[:]={1} "Heights of steps"; - parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(height, 1); size(offset, 1); - size(startTime, 1)])); - protected + extends Interfaces.SignalSource(final nout=max([size(height, 1); size( + offset, 1); size(startTime, 1)])); + protected parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)* height[1] else height); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.38, - y=0.11, - width=0.6, - height=0.6), - Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="startTime=%startTime", - style(color=0))), - Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, - thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-21, -72; 25, -90], - string="startTime", - style(color=9)), - Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), - Text( - extent=[-68, -36; -22, -54], - string="offset", - style(color=9)), + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation (Icon( + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Line(points=[-80, -70; 0, -70; 0, 50; 80, 50], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="startTime=%startTime", + style(color=0))), Diagram( + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-21, -72; 25, -90], + string="startTime", + style(color=9)), + Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), + Text( + extent=[-68, -36; -22, -54], + string="offset", + style(color=9)), Line(points=[-13, 50; -13, -17], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), - Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), + Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-13, 50; -16, 37; -9, 37; -13, 50], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-68, 26; -22, 8], - string="height", - style(color=9)), - Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-68, 26; -22, 8], + string="height", + style(color=9)), + Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-13, -18; -13, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-13, -18; -16, -31; -9, -31; -13, -18], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-72, 100; -31, 80], - string="outPort", + extent=[-72, 100; -31, 80], + string="outPort", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else p_height[i]); end for; end Step; - block Ramp "Generate ramp signals" + + block Ramp "Generate ramp signals" parameter Real height[:]={1} "Heights of ramps"; - parameter Real duration[:](min=Modelica.Constants.SMALL) = {2} - "Durations of ramps"; + parameter Real duration[:](min=Modelica.Constants.small) = {2} "Durations of ramps"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(height, 1); size(duration, 1); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(height, 1); size(duration, 1); size(offset, 1); size(startTime, 1)])); - protected + protected parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)* height[1] else height); - parameter Real p_duration[nout]=(if size(duration, 1) == 1 then ones(nout) - *duration[1] else duration); + parameter Real p_duration[nout]=(if size(duration, 1) == 1 then ones(nout)* + duration[1] else duration); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.19, - y=0.02, - width=0.59, - height=0.77), + x=0.19, + y=0.02, + width=0.59, + height=0.77), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -70; -40, -70; 31, 38], style(color=0)), - Text( - extent=[-150, -150; 150, -110], - string="duration=%duration", - style(color=0)), - Line(points=[31, 38; 86, 38], style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -70; -40, -70; 31, 38], style(color=0)), + Text( + extent=[-150, -150; 150, -110], + string="duration=%duration", + style(color=0)), + Line(points=[31, 38; 86, 38], style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), Line(points=[-80, -20; -20, -20; 50, 50], style(color=0, thickness=2)) - , - Line(points=[-90, -70; 82, -70], style(color=8)), + , + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-40, -20; -42, -30; -37, -30; -40, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -20; -40, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-80, -33; -41, -49], - string="offset", - style(color=9)), - Text( - extent=[-40, -70; 6, -88], - string="startTime", - style(color=9)), - Text( - extent=[-66, 92; -25, 72], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-80, -33; -41, -49], + string="offset", + style(color=9)), + Text( + extent=[-40, -70; 6, -88], + string="startTime", + style(color=9)), + Text( + extent=[-66, 92; -25, 72], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), Line(points=[-19, -20; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), Line(points=[50, 50; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[50, -20; 42, -18; 42, -22; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-20, -20; -11, -18; -11, -22; -20, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 50; 48, 40; 53, 40; 50, 50], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, -20; 47, -10; 52, -10; 50, -20; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[53, 25; 82, 7], - string="height", - style(color=9)), + extent=[53, 25; 82, 7], + string="height", + style(color=9)), Text( - extent=[0, -17; 35, -37], - string="duration", + extent=[0, -17; 35, -37], + string="duration", style(color=9)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else if time < (p_startTime[i] + p_duration[i]) then (time - p_startTime[i]) *p_height[i]/p_duration[i] else p_height[i]); end for; end Ramp; - block Sine "Generate sine signals" + + block Sine "Generate sine signals" parameter Real amplitude[:]={1} "Amplitudes of sine waves"; - parameter SIunits.Frequency freqHz[:]={1} "Frequencies of sine waves"; - parameter SIunits.Angle phase[:]={0} "Phases of sine waves"; + parameter SI.Frequency freqHz[:]={1} "Frequencies of sine waves"; + parameter SI.Angle phase[:]={0} "Phases of sine waves"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1) - ; size(phase, 1); size(offset, 1); size(startTime, 1)])); - protected - constant Real pi=Modelica.Constants.PI; - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1); + size(phase, 1); size(offset, 1); size(startTime, 1)])); + protected + constant Real pi=Modelica.Constants.pi; + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); parameter Real p_freqHz[nout]=(if size(freqHz, 1) == 1 then ones(nout)* freqHz[1] else freqHz); - parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase - [1] else phase); + parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[ + 1] else phase); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.23, - y=0.08, - width=0.66, - height=0.68), + x=0.23, + y=0.08, + width=0.66, + height=0.68), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, - 74.6; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, - 59.4; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, - - 64.2; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5 - ; 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="freqHz=%freqHz", - style(color=0))), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, 74.6 + ; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, 59.4 + ; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, -64.2 + ; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5; + 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), + Text( + extent=[-147, -152; 153, -112], + string="freqHz=%freqHz", + style(color=0))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, - 74.6; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, - 59.4; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2 - ; 42, -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; - 63.1, -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, - thickness=2)), - Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), - Text( - extent=[-128, 7; -82, -11], - string="offset", - style(color=9)), - Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), - Text( - extent=[-60, -43; -14, -61], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Text( - extent=[-74, 106; -33, 86], - string="outPort", - style(color=9)), - Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), - Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, 74.6 + ; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, 59.4 + ; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2; 42 + , -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; 63.1, + -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, thickness=2 + )), + Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), + Text( + extent=[-128, 7; -82, -11], + string="offset", + style(color=9)), + Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), + Text( + extent=[-60, -43; -14, -61], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Text( + extent=[-74, 106; -33, 86], + string="outPort", + style(color=9)), + Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), + Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), Polygon(points=[33, 80; 30, 67; 37, 67; 33, 80], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[37, 57; 83, 39], - string="amplitude", - style(color=9)), + extent=[37, 57; 83, 39], + string="amplitude", + style(color=9)), Polygon(points=[33, 1; 30, 14; 36, 14; 33, 1; 33, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[33, 79; 33, 0], style( - color=8, - pattern=1, - thickness=1, + color=8, + pattern=1, + thickness=1, arrow=0)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else - p_amplitude[i]*Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i - ]) + p_phase[i])); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_amplitude[i]*Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i]) + + p_phase[i])); end for; end Sine; - block ExpSine "Generate exponentially damped sine signals" + + block ExpSine "Generate exponentially damped sine signals" parameter Real amplitude[:]={1} "Amplitudes of sine waves"; - parameter SIunits.Frequency freqHz[:]={2} "Frequencies of sine waves"; - parameter SIunits.Angle phase[:]={0} "Phases of sine waves"; - parameter SIunits.Damping damping[:]={1} - "Damping coefficients of sine waves"; + parameter SI.Frequency freqHz[:]={2} "Frequencies of sine waves"; + parameter SI.Angle phase[:]={0} "Phases of sine waves"; + parameter SI.Damping damping[:]={1} "Damping coefficients of sine waves"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1) - ; size(phase, 1); size(damping, 1); size(offset, 1); size(startTime, - 1)])); - protected - constant Real pi=Modelica.Constants.PI; - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1); + size(phase, 1); size(damping, 1); size(offset, 1); size(startTime, 1) + ])); + protected + constant Real pi=Modelica.Constants.pi; + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); parameter Real p_freqHz[nout]=(if size(freqHz, 1) == 1 then ones(nout)* freqHz[1] else freqHz); - parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase - [1] else phase); + parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[ + 1] else phase); parameter Real p_damping[nout]=(if size(damping, 1) == 1 then ones(nout)* damping[1] else damping); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.18, - y=0.05, - width=0.6, - height=0.63), + x=0.18, + y=0.05, + width=0.6, + height=0.63), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 0; -75.2, 32.3; -72, 50.3; -68.7, 64.5; -65.5, 74.2 - ; -62.3, 79.3; -59.1, 79.6; -55.9, 75.3; -52.7, 67.1; -48.6, 52.2 - ; -43, 25.8; -35, -13.9; -30.2, -33.7; -26.1, -45.9; -22.1, -53.2 - ; -18.1, -55.3; -14.1, -52.5; -10.1, -45.3; -5.23, -32.1; 8.44, - 13.7; 13.3, 26.4; 18.1, 34.8; 22.1, 38; 26.9, 37.2; 31.8, 31.8; - 38.2, 19.4; 51.1, -10.5; 57.5, -21.2; 63.1, -25.9; 68.7, -25.9; - 75.2, -20.5; 80, -13.8], style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="freqHz=%freqHz", - style(color=0))), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 0; -75.2, 32.3; -72, 50.3; -68.7, 64.5; -65.5, 74.2; + -62.3, 79.3; -59.1, 79.6; -55.9, 75.3; -52.7, 67.1; -48.6, 52.2; + -43, 25.8; -35, -13.9; -30.2, -33.7; -26.1, -45.9; -22.1, -53.2; + -18.1, -55.3; -14.1, -52.5; -10.1, -45.3; -5.23, -32.1; 8.44, + 13.7; 13.3, 26.4; 18.1, 34.8; 22.1, 38; 26.9, 37.2; 31.8, 31.8; + 38.2, 19.4; 51.1, -10.5; 57.5, -21.2; 63.1, -25.9; 68.7, -25.9; + 75.2, -20.5; 80, -13.8], style(color=0)), + Text( + extent=[-147, -152; 153, -112], + string="freqHz=%freqHz", + style(color=0))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9 - ; -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - -19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, - - 46.5; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, - 12; 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46 - , 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - -18; 80, -12.1], style(color=0, thickness=2)), - Text( - extent=[-106, 10; -83, -10], - string="offset", - style(color=9)), - Text( - extent=[-72, -36; -26, -54], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Text( - extent=[-79, 104; -39, 87], - string="outPort", - style(color=9)), - Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), - Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), - Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), - Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), - Line(points=[18, 73; -50, 73], style(color=8)), - Text( - extent=[-42, 88; 9, 74], - string="1/freqHz", - style(color=9)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9; + -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - + 19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, -46.5 + ; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, 12; + 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46, + 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - + 18; 80, -12.1], style(color=0, thickness=2)), + Text( + extent=[-106, 10; -83, -10], + string="offset", + style(color=9)), + Text( + extent=[-72, -36; -26, -54], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Text( + extent=[-79, 104; -39, 87], + string="outPort", + style(color=9)), + Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), + Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), + Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), + Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), + Line(points=[18, 73; -50, 73], style(color=8)), + Text( + extent=[-42, 88; 9, 74], + string="1/freqHz", + style(color=9)), Polygon(points=[-49, 73; -40, 75; -40, 71; -49, 73], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[18, 73; 10, 75; 10, 71; 18, 73], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-50, -61; -19, -61], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-50, -61; -19, -61], style(color=8)), Polygon(points=[-18, -61; -26, -59; -26, -63; -18, -61], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-51, -63; -27, -75], - string="t", - style(color=9)), - Text( - extent=[-82, -67; 108, -96], - string="amplitude*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", - style(color=9)), - Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), - Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-51, -63; -27, -75], + string="t", + style(color=9)), + Text( + extent=[-82, -67; 108, -96], + string="amplitude*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", + style(color=9)), + Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), + Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), Line(points=[-15, -77; -1, -48], style(color=8, pattern=2)))); - equation + equation for i in 1:nout loop - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else - p_amplitude[i]*Modelica.Math.exp(-(time - p_startTime[i])*p_damping[i]) - *Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i]) + p_phase[i - ])); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_amplitude[i]*Modelica.Math.exp(-(time - p_startTime[i])*p_damping[i])*Modelica.Math.sin + (2*pi*p_freqHz[i]*(time - p_startTime[i]) + p_phase[i])); end for; end ExpSine; - model Exponentials "Generate a rising and falling exponential signal" + + block Exponentials "Generate a rising and falling exponential signal" parameter Real outMax[:]={1} "Height of output for infinite riseTime"; - parameter SIunits.Time riseTime[:](min=0) = {0.5} "Rise time"; - parameter SIunits.Time riseTimeConst[:](min=Modelica.Constants.SMALL) = { - 0.1} "Rise time constant"; - parameter SIunits.Time fallTimeConst[:](min=Modelica.Constants.SMALL) = - riseTimeConst "Fall time constant"; + parameter SI.Time riseTime[:](min=0) = {0.5} "Rise time"; + parameter SI.Time riseTimeConst[:](min=Modelica.Constants.small) = {0.1} + "Rise time constant"; + parameter SI.Time fallTimeConst[:](min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(outMax, 1); size(riseTime, 1); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(outMax, 1); size(riseTime, 1); size(riseTimeConst, 1); size(fallTimeConst, 1); size(offset, 1); size (startTime, 1)])); - protected + protected parameter Real p_outMax[nout]=(if size(outMax, 1) == 1 then ones(nout)* outMax[1] else outMax); - parameter SIunits.Time p_riseTime[nout]=(if size(riseTime, 1) == 1 then - ones(nout)*riseTime[1] else riseTime); - parameter SIunits.Time p_riseTimeConst[nout]=(if size(riseTimeConst, 1) - == 1 then ones(nout)*riseTimeConst[1] else riseTimeConst); - parameter SIunits.Time p_fallTimeConst[nout]=(if size(fallTimeConst, 1) - == 1 then ones(nout)*fallTimeConst[1] else fallTimeConst); + parameter SI.Time p_riseTime[nout]=(if size(riseTime, 1) == 1 then ones( + nout)*riseTime[1] else riseTime); + parameter SI.Time p_riseTimeConst[nout]=(if size(riseTimeConst, 1) == 1 + then ones(nout)*riseTimeConst[1] else riseTimeConst); + parameter SI.Time p_fallTimeConst[nout]=(if size(fallTimeConst, 1) == 1 + then ones(nout)*fallTimeConst[1] else fallTimeConst); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); Real y_riseTime[nout]; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.03, - y=0.05, - width=0.85, - height=0.74), + x=0.03, + y=0.05, + width=0.85, + height=0.74), Icon( - Line(points=[-90, -70; 68, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), + Line(points=[-90, -70; 68, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), Line(points=[-80, -70; -77.2, -55.3; -74.3, -42.1; -70.8, -27.6; -67.3 - , -15; -63.7, -4.08; -59.5, 7.18; -55.3, 16.7; -50.3, 26; -44.6, + , -15; -63.7, -4.08; -59.5, 7.18; -55.3, 16.7; -50.3, 26; -44.6, 34.5; -38.3, 42.1; -31.2, 48.6; -22.7, 54.3; -12.1, 59.2; -10, 60 ; -7.88, 47.5; -5.05, 32.7; -2.22, 19.8; 0.606, 8.45; 4.14, -3.7 - ; 7.68, -14; 11.9, -24.2; 16.2, -32.6; 21.1, -40.5; 26.8, -47.4; + ; 7.68, -14; 11.9, -24.2; 16.2, -32.6; 21.1, -40.5; 26.8, -47.4; 33.1, -53.3; 40.9, -58.5; 50.8, -62.8; 60, -65.4], style(color=0) - ), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-150, -150; 150, -110], - string="riseTime=%riseTime", - style(color=0))), + ), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-150, -150; 150, -110], + string="riseTime=%riseTime", + style(color=0))), Diagram( - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-70, 91; -29, 71], - string="outPort", - style(color=9)), - Text( - extent=[-78, -43; -46, -56], - string="offset", - style(color=9)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-70, 91; -29, 71], + string="outPort", + style(color=9)), + Text( + extent=[-78, -43; -46, -56], + string="offset", + style(color=9)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), Text( - extent=[78, -76; 102, -96], - string="time", - style(color=9)), + extent=[78, -76; 102, -96], + string="time", + style(color=9)), Line(points=[30, 100; 30, -34], style(color=8, pattern=2)))); - equation + equation for i in 1:nout loop - y_riseTime[i] = p_outMax[i]*(1 - Modelica.Math.exp(-p_riseTime[i]/ - p_riseTimeConst[i])); + y_riseTime[i] = p_outMax[i]*(1 - Modelica.Math.exp(-p_riseTime[i]/p_riseTimeConst[ + i])); outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i]) then 0 else if (time < (p_startTime[i] + p_riseTime[i])) then p_outMax[i]*(1 - - exp(-(time - p_startTime[i])/p_riseTimeConst[i])) else y_riseTime[i] - *Modelica.Math.exp(-(time - p_startTime[i] - p_riseTime[i])/ - p_fallTimeConst[i])); + - Modelica.Math.exp(-(time - p_startTime[i])/p_riseTimeConst[i])) else y_riseTime[i] + *Modelica.Math.exp(-(time - p_startTime[i] - p_riseTime[i])/p_fallTimeConst[i])) + ; end for; - + end Exponentials; - block Pulse "Generate pulse signals of type Real" + + block Pulse "Generate pulse signals of type Real" parameter Real amplitude[:]={1} "Amplitudes of pulses"; parameter Real width[:]( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, final max=100) = {50} "Widths of pulses in % of periods"; - parameter SIunits.Time period[:](final min=Modelica.Constants.SMALL) = {1} - "Times for one period"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(width, 1); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(width, 1); size(period, 1); size(offset, 1); size(startTime, 1)])); - protected - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period); - parameter SIunits.Time p_width[nout]=diagonal(p_period)*(if size(width, 1) - == 1 then ones(nout)*width[1] else width)/100 "Width of one pulse"; + protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period); + parameter SI.Time p_width[nout]=diagonal(p_period)*(if size(width, 1) == 1 + then ones(nout)*width[1] else width)/100 "Width of one pulse"; parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.29, - y=0.05, - width=0.59, - height=0.72), + x=0.29, + y=0.05, + width=0.59, + height=0.72), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -70; -40, -70; -40, 44; 0, 44; 0, -70; 40, -70; 40, - 44; 79, 44], style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="period=%period", - style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -70; -40, -70; -40, 44; 0, 44; 0, -70; 40, -70; 40, + 44; 79, 44], style(color=0)), + Text( + extent=[-147, -152; 153, -112], + string="period=%period", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, -12; -30, -12; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -1; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), Line(points=[-80, 0; -10, 0; -10, 50; 30, 50; 30, 0; 50, 0; 50, 50; 90 - , 50], style(color=0, thickness=2)), - Line(points=[-10, 88; -10, 49], style(color=8, pattern=2)), - Line(points=[30, 74; 30, 50], style(color=9, pattern=2)), - Line(points=[50, 88; 50, 50], style(color=8, pattern=2)), - Line(points=[-10, 83; 51, 83], style(color=8)), - Line(points=[-10, 69; 30, 69], style(color=8)), - Text( - extent=[0, 97; 46, 85], - string="period", - style(color=9)), - Text( - extent=[-9, 81; 30, 69], - string="width", - style(color=9)), - Line(points=[-43, 50; -10, 50], style(color=8, pattern=2)), + , 50], style(color=0, thickness=2)), + Line(points=[-10, 88; -10, 49], style(color=8, pattern=2)), + Line(points=[30, 74; 30, 50], style(color=9, pattern=2)), + Line(points=[50, 88; 50, 50], style(color=8, pattern=2)), + Line(points=[-10, 83; 51, 83], style(color=8)), + Line(points=[-10, 69; 30, 69], style(color=8)), + Text( + extent=[0, 97; 46, 85], + string="period", + style(color=9)), + Text( + extent=[-9, 81; 30, 69], + string="width", + style(color=9)), + Line(points=[-43, 50; -10, 50], style(color=8, pattern=2)), Line(points=[-34, 50; -34, 1], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="amplitude", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="amplitude", + style(color=9)), Polygon(points=[-34, 49; -37, 36; -30, 36; -34, 49], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, 14; -31, 14; -34, 1; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[90, 50; 90, 0; 100, 0], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[90, 50; 90, 0; 100, 0], style(color=0, thickness=2)), Polygon(points=[-10, 69; -1, 71; -1, 67; -10, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 69; 22, 71; 22, 67; 30, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 83; 42, 85; 42, 81; 50, 83], style( - color=8, - fillColor=8, + color=8, + fillColor=8, fillPattern=1)))); - equation + equation for i in 1:nout loop when sample(p_startTime[i], p_period[i]) then T0[i] = time; end when; - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] or time >= - T0[i] + p_width[i] then 0 else p_amplitude[i]); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] or time >= T0 + [i] + p_width[i] then 0 else p_amplitude[i]); end for; end Pulse; - block SawTooth "Generate saw tooth signals" + + block SawTooth "Generate saw tooth signals" parameter Real amplitude[:]={1} "Amplitudes of saw tooths"; - parameter SIunits.Time period[:](final min=Modelica.Constants.SMALL) = {1} - "Times for one period"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(period, 1) - ; size(offset, 1); size(startTime, 1)])); - protected - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period); + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(period, 1); + size(offset, 1); size(startTime, 1)])); + protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period); parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.21, - y=0.11, - width=0.55, - height=0.71), + x=0.21, + y=0.11, + width=0.55, + height=0.71), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -70; -60, -70; 0, 40; 0, -70; 60, 41; 60, -70], - style(color=0)), - Text( - extent=[-147, -152; 153, -112], - string="period=%period", - style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -70; -60, -70; 0, 40; 0, -70; 60, 41; 60, -70], style + (color=0)), + Text( + extent=[-147, -152; 153, -112], + string="period=%period", + style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, -19; -37, -32; -30, -32; -34, -19], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -20; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), - Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), - Line(points=[-10, 83; 30, 83], style(color=8)), - Text( - extent=[-12, 97; 34, 85], - string="period", - style(color=9)), - Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), + Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), + Line(points=[-10, 83; 30, 83], style(color=8)), + Text( + extent=[-12, 97; 34, 85], + string="period", + style(color=9)), + Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), Line(points=[-34, 47; -34, -7], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="amplitude", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="amplitude", + style(color=9)), Polygon(points=[-34, 60; -37, 47; -30, 47; -34, 60], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 83; 22, 85; 22, 81; 30, 83], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], style(color=0, thickness=2)))); - equation + equation for i in 1:nout loop when sample(p_startTime[i], p_period[i]) then T0[i] = time; end when; - outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else - (p_amplitude[i]/p_period[i])*(time - T0[i])); + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else ( + p_amplitude[i]/p_period[i])*(time - T0[i])); end for; end SawTooth; - block Trapezoid "Generate trapezoidal signals of type Real" + + block Trapezoid "Generate trapezoidal signals of type Real" parameter Real amplitude[:]={1} "Amplitudes of trapezoids"; - parameter SIunits.Time rising[:](final min=0) = {0} + parameter SI.Time rising[:](final min=0) = {0} "Rising durations of trapezoids"; - parameter SIunits.Time width[:](final min=0) = {0.5} + parameter SI.Time width[:](final min=0) = {0.5} "Width durations of trapezoids"; - parameter SIunits.Time falling[:](final min=0) = {0} + parameter SI.Time falling[:](final min=0) = {0} "Falling durations of trapezoids"; - parameter SIunits.Time period[:](final min=Modelica.Constants.small) = {1} - "Time for one period"; - parameter Integer nperiod[:]={-1} + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Time for one period"; + parameter Integer nperiod[:]={-1} "Number of periods (< 0 means infinite number of periods)"; parameter Real offset[:]={0} "Offsets of output signals"; - parameter SIunits.Time startTime[:]={0} - "Output = offset for time < startTime"; - extends Interfaces.MO(final nout=max([size(amplitude, 1); size(rising, 1) - ; size(width, 1); size(falling, 1); size(period, 1); size(nperiod, 1) - ; size(offset, 1); size(startTime, 1)])); - protected - parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones( - nout)*amplitude[1] else amplitude); - parameter SIunits.Time T_rising[nout]=(if size(rising, 1) == 1 then ones( - nout)*rising[1] else rising) - "End time of rising phase within one period"; - parameter SIunits.Time T_width[nout]=T_rising + (if size(width, 1) == 1 - then ones(nout)*width[1] else width) + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(rising, 1); + size(width, 1); size(falling, 1); size(period, 1); size(nperiod, 1); + size(offset, 1); size(startTime, 1)])); + protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout + )*amplitude[1] else amplitude); + parameter SI.Time T_rising[nout]=(if size(rising, 1) == 1 then ones(nout)* + rising[1] else rising) "End time of rising phase within one period"; + parameter SI.Time T_width[nout]=T_rising + (if size(width, 1) == 1 then + ones(nout)*width[1] else width) "End time of width phase within one period"; - parameter SIunits.Time T_falling[nout]=T_width + (if size(falling, 1) == 1 - then ones(nout)*falling[1] else falling) + parameter SI.Time T_falling[nout]=T_width + (if size(falling, 1) == 1 then + ones(nout)*falling[1] else falling) "End time of falling phase within one period"; - parameter SIunits.Time p_period[nout]=(if size(period, 1) == 1 then ones( - nout)*period[1] else period) "Duration of one period"; + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)* + period[1] else period) "Duration of one period"; parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* offset[1] else offset); - parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then - ones(nout)*startTime[1] else startTime); - discrete SIunits.Time T0[nout](final start=p_startTime) - "Start time of current period"; - discrete Integer counter[nout](start=(if size(nperiod, 1) == 1 then ones( - nout)*nperiod[1] else nperiod)) "Period counter"; - discrete Integer counter2[nout](start=(if size(nperiod, 1) == 1 then ones( - nout)*nperiod[1] else nperiod)); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones( + nout)*startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; + Integer counter[nout](start=(if size(nperiod, 1) == 1 then ones(nout)* + nperiod[1] else nperiod)) "Period counter"; + Integer counter2[nout](start=(if size(nperiod, 1) == 1 then ones(nout)* + nperiod[1] else nperiod)); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.35, - y=0, - width=0.49, - height=0.58), + x=0.35, + y=0, + width=0.49, + height=0.58), Icon( - Line(points=[-80, 68; -80, -80], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-147, -152; 153, -112], - string="period=%period", - style(color=0)), - Line(points=[-81, -70; -60, -70; -30, 40; 9, 40; 39, -70; 61, -70; 90 - , 40], style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-147, -152; 153, -112], + string="period=%period", + style(color=0)), + Line(points=[-81, -70; -60, -70; -30, 40; 9, 40; 39, -70; 61, -70; 90, + 40], style(color=0))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-45, -30; -47, -41; -43, -41; -45, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-45, -31; -45, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-86, -43; -43, -55], - string="offset", - style(color=9)), - Text( - extent=[-47, -69; -1, -87], - string="startTime", - style(color=9)), - Text( - extent=[-76, 99; -35, 79], - string="outPort", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-29, 82; -30, -70], style(color=8, pattern=2)), - Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), - Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), - Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), - Line(points=[-20, 76; 61, 76], style(color=8)), - Line(points=[-29, 56; 40, 56], style(color=8)), - Text( - extent=[-2, 86; 25, 77], - string="period", - style(color=9)), - Text( - extent=[-8, 70; 21, 60], - string="width", - style(color=9)), - Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-86, -43; -43, -55], + string="offset", + style(color=9)), + Text( + extent=[-47, -69; -1, -87], + string="startTime", + style(color=9)), + Text( + extent=[-76, 99; -35, 79], + string="outPort", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-29, 82; -30, -70], style(color=8, pattern=2)), + Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), + Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), + Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), + Line(points=[-20, 76; 61, 76], style(color=8)), + Line(points=[-29, 56; 40, 56], style(color=8)), + Text( + extent=[-2, 86; 25, 77], + string="period", + style(color=9)), + Text( + extent=[-8, 70; 21, 60], + string="width", + style(color=9)), + Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), Line(points=[-39, 40; -39, -19], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-77, 14; -40, 0], - string="amplitude", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-77, 14; -40, 0], + string="amplitude", + style(color=9)), Polygon(points=[-29, 56; -22, 58; -22, 54; -29, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 56; -17, 58; -17, 54; -10, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-29, 76; -20, 78; -20, 74; -29, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[61, 76; 53, 78; 53, 74; 61, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-80, -30; -30, -30; -10, 40; 20, 40; 40, -30; 60, -30; 80 - , 40; 100, 40], style(color=0, thickness=2)), + , 40; 100, 40], style(color=0, thickness=2)), Polygon(points=[-39, 40; -41, 29; -37, 29; -39, 40], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[61, 84; 60, -30], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[61, 84; 60, -30], style(color=8, pattern=2)), Polygon(points=[39, 56; 32, 58; 32, 54; 39, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 27, 58; 27, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 13, 58; 13, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-12, 56; -5, 58; -5, 54; -12, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-34, 70; -5, 60], - string="rising", - style(color=9)), + extent=[-34, 70; -5, 60], + string="rising", + style(color=9)), Text( - extent=[16, 70; 45, 60], - string="falling", + extent=[16, 70; 45, 60], + string="falling", style(color=9)))); - equation + equation for i in 1:nout loop - when (pre(counter2[i]) <> 0 and sample(p_startTime[i], p_period[i])) - then + when pre(counter2[i]) <> 0 and sample(p_startTime[i], p_period[i]) then T0[i] = time; counter2[i] = pre(counter[i]); counter[i] = pre(counter[i]) - (if pre(counter[i]) > 0 then 1 else 0); end when; - outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i] or counter2 - [i] == 0 or time >= T0[i] + T_falling[i]) then 0 else if (time < T0[i] - + T_rising[i]) then (time - T0[i])*p_amplitude[i]/T_rising[i] else if + outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i] or counter2[ + i] == 0 or time >= T0[i] + T_falling[i]) then 0 else if (time < T0[i] + + T_rising[i]) then (time - T0[i])*p_amplitude[i]/T_rising[i] else if (time < T0[i] + T_width[i]) then p_amplitude[i] else (T0[i] + T_falling [i] - time)*p_amplitude[i]/(T_falling[i] - T_width[i])); end for; end Trapezoid; - block KinematicPTP + + block KinematicPTP "Move as fast as possible along a distance within given kinematic constraints" - - + + parameter Real deltaq[:]={1} "Distance to move"; - parameter Real qd_max[:](final min=Modelica.Constants.SMALL) = {1} + parameter Real qd_max[:](final min=Modelica.Constants.small) = {1} "Maximum velocities der(q)"; - parameter Real qdd_max[:](final min=Modelica.Constants.SMALL) = {1} + parameter Real qdd_max[:](final min=Modelica.Constants.small) = {1} "Maximum accelerations der(qd)"; - parameter SIunits.Time startTime=0 "Time instant at which movement starts" - ; - - extends Interfaces.MO(final nout=max([size(deltaq, 1); size(qd_max, 1); + parameter SI.Time startTime=0 "Time instant at which movement starts"; + + extends Interfaces.MO(final nout=max([size(deltaq, 1); size(qd_max, 1); size(qdd_max, 1)])); - - protected + + protected parameter Real p_deltaq[nout]=(if size(deltaq, 1) == 1 then ones(nout)* deltaq[1] else deltaq); parameter Real p_qd_max[nout]=(if size(qd_max, 1) == 1 then ones(nout)* @@ -1389,81 +1365,79 @@ Modelica in file \"Modelica/package.mo\". Real sdd; Real aux1[nout]; Real aux2[nout]; - SIunits.Time Ta1; - SIunits.Time Ta2; - SIunits.Time Tv; - SIunits.Time Te; + SI.Time Ta1; + SI.Time Ta2; + SI.Time Tv; + SI.Time Te; Boolean noWphase; - // constants annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.32, - y=0.05, - width=0.48, - height=0.6), + x=0.17, + y=0.05, + width=0.69, + height=0.72), Icon( - Line(points=[-80, 78; -80, -82], style(color=8)), + Line(points=[-80, 78; -80, -82], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, 0; 82, 0], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, 0; 82, 0], style(color=8)), Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70 - ; 60, -70; 60, 0; 68, 0], style(color=0, thickness=1)), - Text( - extent=[2, 80; 80, 20], - string="acc", - style(color=8)), - Text( - extent=[-150, -150; 150, -110], - string="deltaq=%deltaq", - style(color=0))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70; + 60, -70; 60, 0; 68, 0], style(color=0, thickness=1)), + Text( + extent=[2, 80; 80, 20], + string="acc", + style(color=8)), + Text( + extent=[-150, -150; 150, -110], + string="deltaq=%deltaq", + style(color=0))), Diagram( Rectangle(extent=[-100, -100; 100, 100], style( - color=3, - gradient=0, - fillColor=0, - fillPattern=0)), - Line(points=[-80, 78; -80, -82], style(color=8)), + color=3, + gradient=0, + fillColor=0, + fillPattern=0)), + Line(points=[-80, 78; -80, -82], style(color=8)), Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 88; -80, 90], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-90, 0; 82, 0], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-90, 0; 82, 0], style(color=8)), Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70 - ; 60, -70; 60, 0; 68, 0], style(color=0, thickness=2)), - Text( - extent=[-76, 98; -19, 83], - string="acceleration", - style(color=8)), - Text( - extent=[69, 24; 91, 12], - string="time", - style(color=8))), - Documentation(info=" - + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, 0; -70, 0; -70, 70; -30, 70; -30, 0; 20, 0; 20, -70; + 60, -70; 60, 0; 68, 0], style(color=0, thickness=2)), + Text( + extent=[-76, 98; -19, 83], + string="acceleration", + style(color=8)), + Text( + extent=[69, 24; 91, 12], + string="time", + style(color=8))), + Documentation(info="The goal is to move as fast as possible along a distance deltaq -under given kinematical constraints. The distance can be a positional or +under given kinematical constraints. The distance can be a positional or angular range. In robotics such a movement is called PTP (Point-To-Point). -This source block generates the acceleration of this signal -as output. After integrating the output two times, the position is +This source block generates the acceleration qdd of this signal +as output. After integrating the output two times, the position q is obtained. The signal is constructed in such a way that it is not possible -to move faster, given the maximally allowed velocity qd_max and -the maximally allowed angular acceleration qdd_max. +to move faster, given the maximally allowed velocity qd_max and +the maximally allowed acceleration qdd_max.
@@ -1476,157 +1450,151 @@ that the end point is reached at the same time instant.
-This element is useful to generate a reference signal for a controller -which controls a drive train or in combination with model -Modelica.Mechanics.Rotationa.Accelerate to drive +This element is useful to generate a reference signal for a controller +which controls a drive train or in combination with model +Modelica.Mechanics.Rotational.Accelerate to drive a flange according to a given acceleration.
Release Notes:
This block generates an output signal by linear interpolation in -a table. The time points and function values are stored in a matrix -table[i,j], where the first column table[:,1] contains the -time points and the second column contains the data to be interpolated. +a table. The time points and function values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the data to be interpolated. The table interpolation has the following proporties:
@@ -1634,17 +1602,17 @@ The table interpolation has the following proporties:Release Notes:
+ parameter Real table[:, :]=[0, 0; 1, 1; 2, 4]; ++ to +
+ parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4]; ++
This library contains input/output blocks to build up block diagrams. The library is structured in the following sublibraries: @@ -36,6 +34,7 @@ The library is structured in the following sublibraries:
Interfaces Connectors and partial models for block diagram components + Examples Demonstration examples Continuous Basic continuous input/output blocks Discrete Discrete control blocks (not yet available) Logical Logical and relational operations on Boolean signals @@ -48,8 +47,8 @@ The library is structured in the following sublibraries:
Release Notes:
+ replaceable type SignalType = Real ++ in order that the type of the signal of an input/output block + can be changed to a physical type, for example: + +
+ Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque)) ++
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
diff --git a/Constants.mo b/Constants.mo index 933250e601..35fe90dd27 100644 --- a/Constants.mo +++ b/Constants.mo @@ -1,40 +1,48 @@ -package Constants "Mathematical constants and constants of nature" +package Constants "Mathematical constants and constants of nature" + + import SI = Modelica.SIunits; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + extends Modelica.Icons.Library2; - package SIunits = Modelica.SIunits; - + // Mathematical constants - // (the definition is a temporary fix since not adapted to the - // machine where the Modelica translator is running) constant Real e=Modelica.Math.exp(1.0); - constant Real pi=2*Modelica.Math.asin(1.0); // 3.14159265358979; - + constant Real pi=2*Modelica.Math.asin(1.0); + // 3.14159265358979; + constant Real D2R=pi/180 "Degree to Radian"; + constant Real R2D=180/pi "Radian to Degree"; + // Machine dependent constants // (the definition is a temporary fix since not adapted to the // machine where the Modelica translator is running) - constant Real eps=1.e-15 "Biggest number such that 1.0 + EPS = 1.0"; - constant Real small=1.e-60 + constant Real eps=1.e-15 "Biggest number such that 1.0 + eps = 1.0"; + constant Real small=1.e-60 "Smallest number such that small and -small are representable on the machine" ; - constant Real inf=1.e+60 + constant Real inf=1.e+60 "Biggest Real number such that inf and -inf are representable on the machine" ; - constant Integer Integer_inf=2147483647 + constant Integer Integer_inf=2147483647 "Biggest Integer number such that Integer_inf and -Integer_inf are representable on the machine" ; - - // Constants of nature + + // Constants of nature // (name, value, description from http://physics.nist.gov/cuu/Constants/) - constant Modelica.SIunits.Velocity c = 299792458 "Speed of light in vacuum"; - constant Modelica.SIunits.Acceleration g_n = 9.80665 "Standard acceleration of gravity on earth"; - constant Real G(final unit="m3/(kg.s2)") = 6.673e-11 "Newtonian constant of gravitation"; + constant SI.Velocity c=299792458 "Speed of light in vacuum"; + constant SI.Acceleration g_n=9.80665 + "Standard acceleration of gravity on earth"; + constant Real G(final unit="m3/(kg.s2)") = 6.673e-11 + "Newtonian constant of gravitation"; constant Real h(final unit="J.s") = 6.62606876e-34 "Planck constant"; constant Real k(final unit="J/K") = 1.3806503e-23 "Boltzmann constant"; constant Real R(final unit="J/(mol.K)") = 8.314472 "Molar gas constant"; - constant Real sigma(final unit="W/(m2.K4)") = 5.670400e-8 "Stefan-Boltzmann constant"; + constant Real sigma(final unit="W/(m2.K4)") = 5.670400e-8 + "Stefan-Boltzmann constant"; constant Real N_A(final unit="1/mol") = 6.02214199e23 "Avogadro constant"; constant Real mue_0(final unit="N/A2") = 4*pi*1.e-7 "Magnetic constant"; - constant Real epsilon_0(final unit="F/m") = 1/(mue_0*c*c) "Electric constant"; - constant Modelica.SIunits.CelsiusTemperature T_zero = -273.15 "Absolute zero temperature"; + constant Real epsilon_0(final unit="F/m") = 1/(mue_0*c*c) "Electric constant" + ; + constant NonSI.Temperature_degC T_zero=-273.15 "Absolute zero temperature"; // For compatibility with previous versions (do not use in new models) constant Real E=e; @@ -50,10 +58,9 @@ package Constants "Mathematical constants and constants of nature" constant Real SIGMA=sigma; constant Real G_EARTH=g_n; constant Real T_ZERO=T_zero; - + annotation ( - Documentation(info=" - + Documentation(info="This package provides often needed constants from mathematics, machine dependent constants and constants from nature. The latter constants @@ -63,7 +70,7 @@ dependent constants and constants from nature. The latter constants
Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
-"), - Coordsys( - extent=[0, 0; 658, 516], - grid=[2, 2], - component=[20, 20]), +"), Window( - x=0.16, - y=0.01, - width=0.65, - height=0.81, - library=1, - autolayout=1), + x=0.16, + y=0.01, + width=0.65, + height=0.81, + library=1, + autolayout=1), + Invisible=true, Icon( - Line(points=[-34, -38; 12, -38], style(color=0, thickness=2)), - Line(points=[-20, -38; -24, -48; -28, -56; -34, -64], style(color=0, - thickness=2)), - Line(points=[-2, -38; 2, -46; 8, -56; 14, -64], style(color=0, thickness - =2))), + Line(points=[-34, -38; 12, -38], style(color=0, thickness=2)), + Line(points=[-20, -38; -24, -48; -28, -56; -34, -64], style(color=0, + thickness=2)), + Line(points=[-2, -38; 2, -46; 8, -56; 14, -64], style(color=0, thickness= + 2))), Diagram( - Rectangle(extent=[200, 162; 380, 312], style(fillColor=30, fillPattern=1 - )), - Polygon(points=[200, 312; 220, 332; 400, 332; 380, 312; 200, 312], style - (fillColor=30, fillPattern=1)), - Polygon(points=[400, 332; 400, 182; 380, 162; 380, 312; 400, 332], style - (fillColor=30, fillPattern=1)), + Rectangle(extent=[200, 162; 380, 312], style(fillColor=30, fillPattern=1) + ), + Polygon(points=[200, 312; 220, 332; 400, 332; 380, 312; 200, 312], style( + fillColor=30, fillPattern=1)), + Polygon(points=[400, 332; 400, 182; 380, 162; 380, 312; 400, 332], style( + fillColor=30, fillPattern=1)), Text( - extent=[210, 302; 370, 272], - string="Library", + extent=[210, 302; 370, 272], + string="Library", style( - color=9, - fillColor=0, - fillPattern=1)), - Line(points=[266, 224; 312, 224], style(color=0, thickness=4)), - Line(points=[280, 224; 276, 214; 272, 206; 266, 198], style(color=0, - thickness=4)), - Line(points=[298, 224; 302, 216; 308, 206; 314, 198], style(color=0, - thickness=4)), + color=9, + fillColor=0, + fillPattern=1)), + Line(points=[266, 224; 312, 224], style(color=0, thickness=4)), + Line(points=[280, 224; 276, 214; 272, 206; 266, 198], style(color=0, + thickness=4)), + Line(points=[298, 224; 302, 216; 308, 206; 314, 198], style(color=0, + thickness=4)), Text( - extent=[152, 412; 458, 334], - string="Modelica.Constants", + extent=[152, 412; 458, 334], + string="Modelica.Constants", style(color=1)))); end Constants; diff --git a/Documentation/ChangeNotes1.5.html b/Documentation/ChangeNotes1.5.html new file mode 100644 index 0000000000..7a20299797 --- /dev/null +++ b/Documentation/ChangeNotes1.5.html @@ -0,0 +1,347 @@ + + +Modelica.Blocks. | |
Continuous.Der | Derivative of input (= analytic differentations) |
Examples | Demonstration examples of the components of this package |
Nonlinear.VariableLimiter | Limit the range of a signal with variable limits |
Modelica.Blocks.Interfaces. | |
RealPort | Real port (both input/output possible) |
IntegerPort | Integer port (both input/output possible) |
BooleanPort | Boolean port (both input/output possible) |
SIMO | Single Input Multiple Output continuous control block |
IntegerBlockIcon | Basic graphical layout of Integer block |
IntegerMO | Multiple Integer Output continuous control block |
IntegerSignalSource | Base class for continuous Integer signal source |
IntegerMIBooleanMOs | Multiple Integer Input Multiple Boolean Output continuous control block with same number of inputs and outputs |
BooleanMIMOs | Multiple Input Multiple Output continuous control block with same number of inputs and outputs of boolean type |
BusAdaptors | Components to send signals to the bus or receive signals from the bus |
Modelica.Blocks.Math. | |
RealToInteger | Convert real to integer signals |
IntegerToReal | Convert integer to real signals |
Max | Pass through the largest signal |
Min | Pass through the smallest signal |
Edge | Indicates rising edge of boolean signal |
BooleanChange | Indicates boolean signal changing |
IntegerChange | Indicates integer signal changing |
Modelica.Blocks.Sources. | |
IntegerConstant | Generate constant signals of type Integer |
IntegerStep | Generate step signals of type Integer |
Modelica.Electrical.Analog.Basic. | |
HeatingResistor | Temperature dependent electrical resistor |
OpAmp | Simple nonideal model of an OpAmp with limitation |
Modelica.Electrical.Analog.Ideal. | |
IdealCommutingSwitch | Ideal commuting switch |
IdealIntermediateSwitch | Ideal intermediate switch |
ControlledIdealCommutingSwitch | Controlled ideal commuting switch |
ControlledIdealIntermediateSwitch | Controlled ideal intermediate switch |
IdealOpAmpLimited | Ideal operational amplifier with limitation |
IdealOpener | Ideal opener |
IdealCloser | Ideal closer |
ControlledIdealOpener | Controlled ideal opener |
ControlledIdealCloser | Controlled ideal closer |
Modelica.Electrical.Analog.Lines. | |
TLine1 | Lossless transmission line (Z0, TD) |
TLine2 | Lossless transmission line (Z0, F, NL) |
TLine2 | Lossless transmission line (Z0, F) |
Modelica.Icons. | |
Function | Icon for a function |
Record | Icon for a record |
Enumeration | Icon for an enumeration |
Modelica.Math. | |
tempInterpol2 | temporary routine for vectorized linear interpolation (will be removed) |
Modelica.Mechanics.Rotational. | |
Examples.LossyGearDemo1 | Example to show that gear efficiency may lead to stuck motion |
Examples.LossyGearDemo2 | Example to show combination of LossyGear and BearingFriction |
LossyGear | Gear with mesh efficiency and bearing friction (stuck/rolling possible) |
Gear2 | Realistic model of a gearbox (based on LossyGear) |
Modelica.SIunits. | |
Conversions | Conversion functions to/from non SI units and type definitions of non SI units |
EnergyFlowRate | Same definition as Power |
EnthalpyFlowRate | Real (final quantity="EnthalpyFlowRate", final unit="W") |
Modelica. | |
Thermal.HeatTransfer | 1-dimensional heat transfer with lumped elements |
ModelicaAdditions.Blocks.Discrete. | |
TriggeredSampler | Triggered sampling of continuous signals |
TriggeredMax | Compute maximum, absolute value of continuous signal at trigger instants |
ModelicaAdditions.Blocks.Logical.Interfaces. | |
BooleanMIRealMOs | Multiple Boolean Input Multiple Real Output continuous control block with same number of inputs and outputs |
RealMIBooleanMOs | Multiple Real Input Multiple Boolean Output continuous control block with same number of inputs and outputs |
ModelicaAdditions.Blocks.Logical. | |
TriggeredTrapezoid | Triggered trapezoid generator |
Hysteresis | Transform Real to Boolean with Hysteresis |
OnOffController | On-off controller |
Compare | True, if signal of inPort1 is larger than signal of inPort2 |
ZeroCrossing | Trigger zero crossing of input signal |
ModelicaAdditions. | |
Blocks.Multiplexer.Extractor | Extract scalar signal out of signal vector dependent on IntegerInPort index |
Tables.CombiTable1Ds | Table look-up in one dimension (matrix/file) with only single input |
Removed final from quantity attribute for Mass and MassFlowRate.
+ +Implemented avoiding algorithm section, which would lead to expensive function calls.
+ ++ block Step "Generate step signals of type Real" + parameter Real height[:]={1} "Heights of steps"; + // parameter Real offset[:]={0} "Offsets of output signals"; + // parameter SIunits.Time startTime[:]={0} "Output = offset for time < startTime"; + // extends Interfaces.MO (final nout=max([size(height, 1); size(offset, 1); size(startTime, 1)])); + extends Interfaces.SignalSource(final nout=max([size(height, 1); size(offset, 1); size(startTime, 1)])); + protected + parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)* + height[1] else height); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* + offset[1] else offset); + parameter SIunits.Time p_startTime[nout]=(if size(startTime, 1) == 1 then + ones(nout)*startTime[1] else startTime); + equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_height[i]); + end for; + end Step; ++ +
Replaced usage of built-in function exp by Modelica.Math.exp. + +
Interface definition changed from
+ +parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column)"; ++ +
to
+ +parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column)"; ++ +
Did the same for subfunction getInterpolationCoefficients.
+ +Bug in getInterpolationCoefficients for startTime <> 0 fixed:
+ +... + end if; + end if; + // Take into account startTime "a*(time - startTime) + b" + b := b - a*startTime; + end getInterpolationCoefficients; ++ +
+ block BooleanStep "Generate step signals of type Boolean" + parameter SIunits.Time startTime[:]={0} "Time instants of steps"; + parameter Boolean startValue[size(startTime, 1)]=fill(false, size(startTime, 1)) "Output before startTime"; + extends Interfaces.BooleanSignalSource(final nout=size(startTime, 1)); + equation + for i in 1:nout loop + // outPort.signal[i] = time >= startTime[i]; + outPort.signal[i] = if time >= startTime[i] then not startValue[i] else startValue[i]; + end for; + end BooleanStep; ++ +
Corrected table of values and default for Beta by dividing them by 1000 +(consistent with the values used in the NAND-example model): +
+Corrected parameter defaults, unit and description for TrapezoidCurrent. +This makes the parameters consistent with their use in the model. + +Models specifying parameter values are not changed. +Models not specifying parameter values did not generate trapezoids previously. +
+ +Icon layer background changed from transparent to white:
+ +Basic.Transformer: Replaced invalid escape characters '\ ' and '\[newline]' in documentation by '|'.
+ +Removed arrows and names documentation from flanges in diagram layer
+ ++ partial model FrictionBase "Base class of Coulomb friction elements" + parameter SIunits.AngularVelocity w_small=1 + "Relative angular velocity near to zero (see model info text)"; + + + // Equations to define the following variables have to be defined in subclasses + SIunits.AngularVelocity w_relfric + "Relative angular velocity between frictional surfaces"; + SIunits.AngularAcceleration a_relfric + "Relative angular acceleration between frictional surfaces"; + SIunits.Torque tau + "Friction torque (positive, if directed in opposite direction of w_rel)" + ; + SIunits.Torque tau0 "Friction torque for w=0 and forward sliding"; + SIunits.Torque tau0_max "Maximum friction torque for w=0 and locked"; + Boolean free "true, if frictional element is not active"; + + // Equations to define the following variables are given in this class + Real sa "Path parameter of friction characteristic tau = f(a_relfric)"; + + Boolean startForward(start=false, fixed=true) + "true, if w_rel=0 and start of forward sliding or w_rel > w_small"; + Boolean startBackward(start=false, fixed=true) + "true, if w_rel=0 and start of backward sliding or w_rel < -w_small"; + Boolean locked "true, if w_rel=0 and not sliding"; + + constant Integer Unknown=3 "Value of mode is not known"; + constant Integer Free=2 "Element is not active"; + constant Integer Forward=1 "w_rel > 0 (forward sliding)"; + constant Integer Stuck=0 + "w_rel = 0 (forward sliding, locked or backward sliding)"; + constant Integer Backward=-1 "w_rel < 0 (backward sliding)"; + Integer mode( + final min=Backward, + final max=Unknown, + start=Unknown, + fixed=true); + equation + /* Friction characteristic + (locked is introduced to help the Modelica translator determining + the different structural configurations, if for each configuration + special code shall be generated) + */ + + startForward = pre(mode) == Stuck and (sa > tau0_max or pre(startForward) + and sa > tau0) or pre(mode) == Backward and w_relfric > w_small or + initial() and (w_relfric > 0); + startBackward = pre(mode) == Stuck and (sa < -tau0_max or pre( + startBackward) and sa < -tau0) or pre(mode) == Forward and w_relfric < + -w_small or initial() and (w_relfric < 0); + locked = not free and not (pre(mode) == Forward or startForward or pre( + mode) == Backward or startBackward); + + a_relfric = if locked then 0 else if free then sa else if startForward + then sa - tau0 else if startBackward then sa + tau0 else if pre(mode) + == Forward then sa - tau0 else sa + tau0; + + /* Friction torque has to be defined in a subclass. Example for a clutch: + tau = if locked then sa else if free then 0 else cgeo*fn* + (if startForward then Math.tempInterpol1( w_relfric, mue_pos, 2) + else if startBackward then -Math.tempInterpol1(-w_relfric, mue_pos, 2) + else if pre(mode) == Forward then Math.tempInterpol1(w_relfric, mue_pos, 2) + else -Math.tempInterpol1(-w_relfric, mue_pos, 2)); + */ + + // finite state machine to determine configuration + mode = if free then Free else (if (pre(mode) == Forward or pre(mode) == + Free or startForward) and w_relfric > 0 then Forward else if (pre(mode) + == Backward or pre(mode) == Free or startBackward) and w_relfric < 0 + then Backward else Stuck); + end FrictionBase; ++ +
Replaced reinit by initial equation
+ +Bug corrected by using modifier stateSelect = StateSelect.prefer as implementation
+ +Attribute fillColor=7 added to Rectangle on Icon layer, i.e. it is now +filled with white and not transparent any more.
+ +Replaced reinit by initial equation
+ +Bug corrected by using modifier stateSelect = StateSelect.prefer as implementation
+ +Use stateSelect = StateSelect.prefer.
+ +Improved documentation and coordinate system used for example.
+ +Replaced reinit by initial equation
+ +Definition of connectors Surface_a and Surface_b:
+flow SIunits.HeatFlux q; changed to flow SIunits.HeatFlowRate q;
Icon corrected.
+ + + diff --git a/Electrical/Analog/Basic.mo b/Electrical/Analog/Basic.mo index 3beb57e19a..02d83787e5 100644 --- a/Electrical/Analog/Basic.mo +++ b/Electrical/Analog/Basic.mo @@ -1,31 +1,29 @@ package Basic + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.03, - y=0.04, - width=0.50, - height=0.24, - library=1, - autolayout=1), - Documentation(info=" - + annotation (Window( + x=0.03, + y=0.04, + width=0.54, + height=0.35, + library=1, + autolayout=1), +Documentation(info="This package contains basic analog electrical components:
Ground of an electrical circuit. The potential at the ground node is zero. Every electrical circuit has to contain @@ -80,7 +77,7 @@ at least one ground object. Line(points=[-40, 30; 40, 30]), Line(points=[-20, 10; 20, 10]), Line(points=[0, 90; 0, 50]), - Text(extent=[-100, -40; 100, -10], string="%name")), + Text(extent=[-100, -68; 100, -10], string="%name")), Diagram( Line(points=[-60, 50; 60, 50], style(thickness=2)), Line(points=[-40, 30; 40, 30], style(thickness=2)), @@ -92,20 +89,19 @@ at least one ground object. y=0.23, width=0.59, height=0.63)); - Modelica.Electrical.Analog.Interfaces.Pin p annotation (extent=[-10, 110; - 10, 90], rotation=-90); + Interfaces.Pin p annotation (extent=[-10, 110; 10, 90], rotation=-90); equation p.v = 0; end Ground; + model Resistor "Ideal linear electrical resistor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance R=1 "Resistance"; + extends Interfaces.OnePort; + parameter SI.Resistance R=1 "Resistance"; annotation ( - Documentation(info=" - + Documentation(info="
The linear resistor connects the branch voltage v with the -branch current i by i*R = v. +branch current i by i*R = v. The Resistance R is allowed to be positive, zero, or negative.
@@ -122,10 +118,10 @@ The Resistance R is allowed to be positive, zero, or negative. Line(points=[-90, 0; -70, 0]), Line(points=[70, 0; 90, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-98, -58; 102, -120], string="R=%R", style(color=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 100], string="%name")), Diagram( Rectangle(extent=[-70, 30; 70, -30]), Line(points=[-90, 0; -70, 0]), @@ -138,15 +134,106 @@ The Resistance R is allowed to be positive, zero, or negative. equation R*i = v; end Resistor; + + model HeatingResistor "Temperature dependent electrical resistor" + extends Interfaces.OnePort; + + parameter SI.Resistance R_ref "Resistance at temperature T_ref"; + parameter SI.Temperature T_ref=300 "Reference temperature"; + parameter Real alpha(unit="1/K") = 0 + "Temperature coefficient of resistance"; + + SI.Resistance R "Resistance = R_ref*(1 + alpha*(heatPort.T - T_ref));"; + + annotation ( + Diagram( + Line(points=[-110, 20; -85, 20], style(color=9, fillColor=9)), + Polygon(points=[-95, 23; -85, 20; -95, 17; -95, 23], style( + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[90, 20; 115, 20], style(color=9, fillColor=9)), + Line(points=[-125, 0; -115, 0], style(color=9)), + Line(points=[-120, -5; -120, 5], style(color=9)), + Text( + extent=[-110, 25; -90, 45], + string="i", + style(color=9)), + Polygon(points=[105, 23; 115, 20; 105, 17; 105, 23], style( + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[115, 0; 125, 0], style(color=9)), + Text( + extent=[90, 45; 110, 25], + string="i", + style(color=9)), + Rectangle(extent=[-70, 30; 70, -30]), + Line(points=[-90, 0; -70, 0]), + Line(points=[70, 0; 90, 0]), + Line(points=[0, -30; 0, -90], style(color=42)), + Line(points=[-52, -50; 48, 50], style(color=73, fillColor=73)), + Polygon(points=[40, 52; 50, 42; 54, 56; 40, 52], style(color=73, + fillColor=73))), + Icon( + Text(extent=[-143, 60; 143, 98], string="%name"), + Line(points=[-90, 0; -70, 0]), + Line(points=[70, 0; 90, 0]), + Rectangle(extent=[-70, 30; 70, -30], style( + color=3, + fillColor=7, + fillPattern=1)), + Line(points=[0, -30; 0, -91], style(color=42)), + Line(points=[-52, -50; 48, 50], style(color=73, fillColor=73)), + Polygon(points=[40, 52; 50, 42; 54, 56; 40, 52], style(color=73, + fillColor=73))), + Documentation(info=" +This is a model for an electrical resistor where the generated heat +is dissipated to the environment via connector heatPort and where +the resistance R is temperature dependent according to the following +equation:
+ +R = R_ref*(1 + alpha*(heatPort.T - T_ref)) ++ +
alpha is the temperature coefficient of resistance, which +is often abbreviated as TCR. In resistor catalogues, it is usually +defined as X [ppm/K] (parts per million, similarly to per centage) +meaning X*1.e-6 [1/K]. Resistors are available for 1 .. 7000 ppm/K, +i.e., alpha = 1e-6 .. 7e-3 1/K;
+ +When connector heatPort is not connected, the temperature +dependent behaviour is switched off by setting heatPort.T = T_ref. +Additionally, the equation heatPort.Q_dot = 0 is implicitly present +due to a special rule in Modelica that flow variables of not connected +connectors are set to zero.
+ +")); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort annotation ( + extent=[-10, -90; 10, -110], rotation=-90); + equation + v = R*i; + + if cardinality(heatPort) > 0 then + R = R_ref*(1 + alpha*(heatPort.T - T_ref)); + heatPort.Q_dot = -v*i; + else + /* heatPort is not connected resulting in the + implicit equation 'heatPort.Q_dot = 0' + */ + R = R_ref; + heatPort.T = T_ref; + end if; + end HeatingResistor; + model Conductor "Ideal linear electrical conductor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Conductance G=1 "Conductance"; + extends Interfaces.OnePort; + parameter SI.Conductance G=1 "Conductance"; annotation ( - Documentation(info=" - + Documentation(info="The linear conductor connects the branch voltage v with the -branch current i by i = v*G. +branch current i by i = v*G. The Conductance G is allowed to be positive, zero, or negative.
@@ -156,28 +243,29 @@ The Conductance G is allowed to be positive, zero, or negative. grid=[2, 2], component=[20, 20]), Icon( - Rectangle(extent=[-70, 30; 70, -30], style(fillColor=7, fillPattern=1) - ), + Rectangle(extent=[-70, 30; 70, -30], style(fillColor=7, fillPattern=1)) + , Rectangle(extent=[-70, 30; 70, -30]), Line(points=[-90, 0; -70, 0]), Line(points=[70, 0; 90, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-100, -60; 100, -122], string="G=%G", style(color=0, pattern=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 98], string="%name")), Diagram(Line(points=[-90, 0; -70, 0]), Line(points=[70, 0; 90, 0])), Window( - x=0.17, - y=0.29, - width=0.6, - height=0.6)); + x=0, + y=0.2, + width=0.63, + height=0.68)); equation i = G*v; end Conductor; + model Capacitor "Ideal linear electrical capacitor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Capacitance C=1 "Capacitance"; + extends Interfaces.OnePort; + parameter SI.Capacitance C=1 "Capacitance"; annotation ( Coordsys( extent=[-100, -100; 100, 100], @@ -188,11 +276,10 @@ The Conductance G is allowed to be positive, zero, or negative. y=0.33, width=0.48, height=0.58), - Documentation(info=" - + Documentation(info="The linear capacitor connects the branch voltage v with the -branch current i by i = C * dv/dt. +branch current i by i = C * dv/dt. The Capacitance C is allowed to be positive, zero, or negative.
@@ -203,10 +290,10 @@ The Capacitance C is allowed to be positive, zero, or negative. Line(points=[-90, 0; -14, 0]), Line(points=[14, 0; 90, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-100, -60; 100, -120], string="C=%C", style(color=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 100], string="%name")), Diagram( Line(points=[-20, 40; -20, -40], style(thickness=2)), Line(points=[20, 40; 20, -40], style(thickness=2)), @@ -215,19 +302,19 @@ The Capacitance C is allowed to be positive, zero, or negative. equation i = C*der(v); end Capacitor; + model Inductor "Ideal linear electrical inductor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Inductance L=1 "Inductance"; + extends Interfaces.OnePort; + parameter SI.Inductance L=1 "Inductance"; annotation ( Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], component=[20, 20]), - Documentation(info=" - + Documentation(info="The linear inductor connects the branch voltage v with the -branch current i by v = L * di/dt. +branch current i by v = L * di/dt. The Inductance L is allowed to be positive, zero, or negative.
@@ -241,10 +328,10 @@ The Inductance L is allowed to be positive, zero, or negative. Line(points=[60, 0; 90, 0]), Line(points=[-90, 0; -60, 0]), Text( - extent=[-100, -60; 100, -80], + extent=[-100, -60; 100, -120], string="L=%L", style(color=0)), - Text(extent=[-100, 60; 100, 80], string="%name")), + Text(extent=[-100, 40; 100, 100], string="%name")), Diagram( Ellipse(extent=[-60, -15; -30, 15]), Ellipse(extent=[-30, -15; 0, 15]), @@ -261,37 +348,29 @@ The Inductance L is allowed to be positive, zero, or negative. equation L*der(i) = v; end Inductor; + model Transformer "Transformer with two ports" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; - parameter SIunits.Inductance L1=1 "Primary inductance"; - parameter SIunits.Inductance L2=1 "Secondary inductance"; - parameter SIunits.Inductance M=1 "Coupling inductance"; + extends Interfaces.TwoPort; + parameter SI.Inductance L1=1 "Primary inductance"; + parameter SI.Inductance L2=1 "Secondary inductance"; + parameter SI.Inductance M=1 "Coupling inductance"; annotation ( - Documentation(info=" - --The transformer is a two port. The left port voltage v1, left port current i1, + Documentation(info=" +
The transformer is a two port. The left port voltage v1, left port current i1, right port voltage v2 and right port current i2 are connected by the following -relation: -
-- - / v1 \ / L1 M \ / i1' \ - | | = | | | | - \ v2 / \ M L2 / \ i2' / - --
-L1, L2, and M are the primary, secondary, and coupling inductances resp.. -
- +relation: +| v1 | | L1 M | | i1' | + | | = | | | | + | v2 | | M L2 | | i2' |+
L1, L2, and M are the primary, secondary, and coupling inductances respectively.
+ "), Coordsys( extent=[-100, -100; 100, 100], grid=[1, 1], component=[20, 20]), Icon( - Text(extent=[-100, 100; 100, 80], string="%name"), + Text(extent=[-100, 128; 100, 70], string="%name"), Ellipse(extent=[-45, -50; -20, -25]), Ellipse(extent=[-45, -25; -20, 0]), Ellipse(extent=[-45, 0; -20, 25]), @@ -306,9 +385,9 @@ relation: Rectangle(extent=[33, -60; 72, 60], style(color=7, fillColor=7)), Line(points=[32, 50; 90, 50]), Line(points=[32, -50; 90, -50]), - Text(extent=[-80, 10; -60, -10], string="L1"), - Text(extent=[60, 10; 80, -10], string="L2"), - Text(extent=[-10, -70; 10, -90], string="M")), + Text(extent=[-89, 18; -60, -10], string="L1"), + Text(extent=[64, 18; 90, -10], string="L2"), + Text(extent=[-18, -70; 20, -98], string="M")), Diagram( Ellipse(extent=[-45, -50; -20, -25]), Ellipse(extent=[-45, -25; -20, 0]), @@ -325,20 +404,22 @@ relation: Line(points=[32, 50; 90, 50]), Line(points=[32, -50; 90, -50])), Window( - x=0.28, - y=0.13, + x=0.26, + y=0.43, width=0.6, height=0.6)); equation v1 = L1*der(i1) + M*der(i2); v2 = M*der(i1) + L2*der(i2); end Transformer; + model Gyrator "Gyrator" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; + parameter SI.Conductance G1=1 "Gyration conductance"; + parameter SI.Conductance G2=1 "Gyration conductance"; annotation ( - Documentation(info=" - -+ Documentation(info=" +
A gyrator is a two-port element defined by the following equations:
@@ -355,23 +436,23 @@ where the constants G1, G2 are called the gyration conductance. grid=[1, 1], component=[20, 20]), Icon( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), Line(points=[-90, 50; -60, 50]), Line(points=[-90, -50; -60, -50]), Line(points=[60, 50; 90, 50]), Line(points=[60, -50; 90, -50]), Line(points=[-40, 30; 40, 30]), - Line(points=[-20, -30; 20, -30]), + Line(points=[-20, -20; 20, -20]), Polygon(points=[30, 34; 40, 30; 30, 26; 30, 34], style(fillColor=3, fillPattern=1)), - Polygon(points=[-20, -30; -10, -26; -10, -34; -20, -30], style( + Polygon(points=[-26, -19; -16, -15; -16, -23; -26, -19], style( fillColor=3, fillPattern=1)), - Line(points=[-4, 5; -6, -5], style(thickness=2)), - Line(points=[3, 5; 1, -5], style(thickness=2)), - Line(points=[-8, 5; 7, 5], style(thickness=2)), - Text(extent=[-100, 100; 100, 70], string="%name"), - Text(extent=[-20, 50; 20, 35], string="G1"), - Text(extent=[-20, -35; 20, -50], string="G2")), + Line(points=[-5, 10; -10, -10], style(thickness=2)), + Line(points=[9, 10; 4, -9], style(thickness=2)), + Line(points=[-14, 9; 16, 10], style(thickness=2)), + Text(extent=[-100, 130; 100, 69], string="%name"), + Text(extent=[-29, 59; 30, 30], string="G1"), + Text(extent=[-29, -29; 29, -58], string="G2")), Diagram( Rectangle(extent=[-60, 60; 60, -60]), Line(points=[-90, 50; -60, 50]), @@ -379,7 +460,7 @@ where the constants G1, G2 are called the gyration conductance. Line(points=[60, 50; 90, 50]), Line(points=[60, -50; 90, -50]), Line(points=[-40, 30; 40, 30]), - Line(points=[-20, -30; 20, -30]), + Line(points=[-21, -22; 19, -22]), Polygon(points=[30, 34; 40, 30; 30, 26; 30, 34], style(fillColor=3, fillPattern=1)), Polygon(points=[-20, -30; -10, -26; -10, -34; -20, -30], style( @@ -388,19 +469,23 @@ where the constants G1, G2 are called the gyration conductance. Line(points=[3, 5; 1, -5], style(thickness=4)), Line(points=[-8, 5; 7, 5], style(thickness=4)), Text(extent=[-20, 50; 20, 35], string="G1"), - Text(extent=[-20, -35; 20, -50], string="G2"))); - parameter SIunits.Conductance G1=1 "Gyration conductance"; - parameter SIunits.Conductance G2=1 "Gyration conductance"; + Text(extent=[-20, -35; 20, -50], string="G2")), + Window( + x=0.4, + y=0.4, + width=0.6, + height=0.6)); equation i1 = G2*v2; i2 = -G1*v1; end Gyrator; + model EMF "Electromotoric force (electric/mechanic transformer)" parameter Real k(final unit="N.m/A") = 1 "Transformation coefficient"; - SIunits.Voltage v "Voltage drop between the two pins"; - SIunits.Current i "Current flowing from positive to negative pin"; - SIunits.AngularVelocity w "Angular velocity of flange_b"; + SI.Voltage v "Voltage drop between the two pins"; + SI.Current i "Current flowing from positive to negative pin"; + SI.AngularVelocity w "Angular velocity of flange_b"; annotation ( Coordsys( extent=[-100, -100; 100, 100], @@ -412,11 +497,11 @@ where the constants G1, G2 are called the gyration conductance. gradient=2, fillColor=8, fillPattern=1)), - Ellipse(extent=[-40, 40; 40, -40]), + Ellipse(extent=[-40, 40; 40, -40], style(fillColor=7)), Line(points=[0, -90; 0, -40]), Text(extent=[20, -40; 100, -100], string="%name"), Text( - extent=[40, 79; 119, 50], + extent=[30, 100; 119, 40], string="k=%k", style(color=9))), Diagram( @@ -450,8 +535,8 @@ where the constants G1, G2 are called the gyration conductance. Line(points=[14, 80; 14, 70], style(color=8)), Line(points=[140, 0; 110, 0], style(color=0, fillColor=0)), Text(extent=[114, -4; 148, -14], string="flange_b.phi"), - Polygon(points=[140, 3; 150, 0; 140, -3; 140, 3; 140, 3], style(color= - 0, fillColor=0)), + Polygon(points=[140, 3; 150, 0; 140, -3; 140, 3; 140, 3], style(color=0 + , fillColor=0)), Text(extent=[112, 16; 148, 6], string="flange_b.tau"), Polygon(points=[120, 35; 100, 40; 100, 30; 120, 35], style(color=10, fillColor=10)), @@ -467,17 +552,18 @@ where the constants G1, G2 are called the gyration conductance. height=0.66), Documentation(info="-Transforms electrical energy into rotational mechanical energy. -Is used as basic building block of an electrical motor. The mechanical -connector flange_b can be connected to elements of the -Modelica.Mechanics.Rotational library. +EMF transforms electrical energy into rotational mechanical energy. +It is used as basic building block of an electrical motor. The mechanical +connector flange_b can be connected to elements of the +Modelica.Mechanics.Rotational library. flange_b.tau is the cut-torque, +flange_b.phi is the angle at the rotational connection.
- + ")); - Modelica.Electrical.Analog.Interfaces.PositivePin p annotation (extent=[- - 10, 90; 10, 110], rotation=90); - Modelica.Electrical.Analog.Interfaces.NegativePin n annotation (extent=[- - 10, -110; 10, -90], rotation=90); + Interfaces.PositivePin p annotation (extent=[-10, 90; 10, 110], rotation=90 + ); + Interfaces.NegativePin n annotation (extent=[-10, -110; 10, -90], rotation= + 90); Modelica.Mechanics.Rotational.Interfaces.Flange_b flange_b annotation ( extent=[90, -10; 110, 10]); equation @@ -489,19 +575,26 @@ Modelica.Mechanics.Rotational library. k*w = v; flange_b.tau = -k*i; end EMF; + model VCV "Linear voltage-controlled voltage source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; parameter Real gain=1 "Voltage gain"; annotation ( - Documentation(info=" - -Linear voltage-controlled voltage source + Documentation(info=" ++The linear voltage-controlled voltage source is a TwoPort. +The right port voltage v2 is controlled by the left port voltage v1 +via +
- The linear voltage-controlled voltage source is a TwoPort. - The right port voltage vr is controlled by the left port voltage vl - via v2 = v1 * gain. - The left port current is zero. Any voltage gain can be chosen. ++ v2 = v1 * gain. +++The left port current is zero. Any voltage gain can be chosen. +
+ "), Coordsys( extent=[-100, -100; 100, 100], @@ -510,14 +603,14 @@ Linear voltage-controlled voltage source Window( x=0.28, y=0.02, - width=0.56, - height=0.83), + width=0.59, + height=0.92), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-99, -79; 100, -129], string="%name"), Line(points=[-90, 50; -30, 50]), Line(points=[-30, -50; -90, -50]), - Line(points=[90, 50; 30, 50; 30, -50; 90, -50]), + Line(points=[100, 50; 30, 50; 30, -50; 100, -50]), Ellipse(extent=[10, 20; 50, -20]), Line(points=[-20, 60; 20, 60]), Polygon(points=[20, 60; 10, 63; 10, 57; 20, 60], style(fillColor=3, @@ -535,20 +628,24 @@ Linear voltage-controlled voltage source v2 = v1*gain; i1 = 0; end VCV; + model VCC "Linear voltage-controlled current source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; - parameter Modelica.SIunits.Conductance transConductance=1 - "Transconductance"; + extends Interfaces.TwoPort; + parameter SI.Conductance transConductance=1 "Transconductance"; annotation ( - Documentation(info=" - -Linear voltage-controlled current source - - The linear voltage-controlled current source is a TwoPort. - The right port current ir is controlled by the left port voltage vl - via i2 = v1 * transConductance. - The left port current is zero. Any transConductance can be chosen. - + Documentation(info=" ++The linear voltage-controlled current source is a TwoPort. +The right port current i2 is controlled by the left port voltage v1 +via +
++ i2 = v1 * transConductance. +++The left port current is zero. Any transConductance can be chosen. +
+ "), Coordsys( extent=[-100, -100; 100, 100], @@ -556,7 +653,7 @@ Linear voltage-controlled current source component=[20, 20]), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-99, -80; 100, -129], string="%name"), Line(points=[-90, 50; -30, 50]), Line(points=[-30, -50; -90, -50]), Ellipse(extent=[10, 20; 50, -20]), @@ -586,20 +683,25 @@ Linear voltage-controlled current source i2 = v1*transConductance; i1 = 0; end VCC; + model CCV "Linear current-controlled voltage source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; - parameter Modelica.SIunits.Resistance transResistance=1 "Transresistance"; + parameter SI.Resistance transResistance=1 "Transresistance"; annotation ( - Documentation(info=" - -Linear current-controlled voltage source - - The linear current-controlled voltage source is a TwoPort. - The right port voltage vr is controlled by the left port current i1 - via v2 = i1 * transResistance. - The left port voltage is zero. Any transResistance can be chosen. - + Documentation(info=" ++The linear current-controlled voltage source is a TwoPort. +The right port voltage v2 is controlled by the left port current i1 +via +
++ v2 = i1 * transResistance. +++The left port voltage is zero. Any transResistance can be chosen. +
+ "), Coordsys( extent=[-100, -100; 100, 100], @@ -607,13 +709,13 @@ Linear current-controlled voltage source component=[20, 20]), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-99, -80; 100, -130], string="%name"), + Line(points=[100, 50; 30, 50; 30, -50; 100, -50]), Ellipse(extent=[10, 20; 50, -20]), Line(points=[-20, 60; 20, 60]), Polygon(points=[20, 60; 10, 63; 10, 57; 20, 60], style(fillColor=3, fillPattern=1)), - Line(points=[90, 50; 30, 50; 30, -50; 90, -50]), - Line(points=[-90, 50; -30, 50; -30, -50; -90, -50])), + Line(points=[-90, 50; -20, 50; -20, -50; -90, -50])), Diagram( Ellipse(extent=[10, 20; 50, -20]), Rectangle(extent=[-70, 70; 70, -70]), @@ -631,19 +733,26 @@ Linear current-controlled voltage source v2 = i1*transResistance; v1 = 0; end CCV; + model CCC "Linear current-controlled current source" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; parameter Real gain=1 "Current gain"; annotation ( - Documentation(info=" - -Linear current-controlled current source + Documentation(info=" ++The linear current-controlled current source is a TwoPort. +The right port current i2 is controlled by the left port current i1 +via +
- The linear current-controlled current source is a TwoPort. - The right port current ir is controlled by the left port current il - via ir = il * gain. - The left port voltage is zero. Any current gain can be chosen. ++ i2 = i1 * gain. +++The left port voltage is zero. Any current gain can be chosen. +
+ "), Coordsys( extent=[-100, -100; 100, 100], @@ -651,15 +760,15 @@ Linear current-controlled current source component=[20, 20]), Icon( Rectangle(extent=[-70, 70; 70, -70], style(fillColor=7)), - Text(extent=[-100, -80; 100, -100], string="%name"), + Text(extent=[-104, -76; 97, -127], string="%name"), + Line(points=[-100, 50; -30, 50; -30, -50; -100, -50]), Ellipse(extent=[10, 20; 50, -20]), Line(points=[-20, 60; 20, 60]), Polygon(points=[20, 60; 10, 63; 10, 57; 20, 60], style(fillColor=3, fillPattern=1)), Line(points=[90, 50; 30, 50; 30, 20]), Line(points=[91, -50; 30, -50; 30, -20]), - Line(points=[10, 0; 50, 0]), - Line(points=[-90, 50; -30, 50; -30, -50; -91, -50])), + Line(points=[10, 0; 50, 0])), Diagram( Ellipse(extent=[10, 20; 50, -20]), Rectangle(extent=[-70, 70; 70, -70]), @@ -679,5 +788,110 @@ Linear current-controlled current source i2 = i1*gain; v1 = 0; end CCC; + + model OpAmp "Simple nonideal model of an OpAmp with limitation" + annotation ( + Documentation(info=" ++The OpAmp is a simle nonideal model with a smooth out.v = f(vin) characteristic, +where \"vin = in_p.v - in_n.v\". +The characteristic is limited by VMax.v and VMin.v. Its slope at vin=0 +is the parameter Slope, which must be positive. (Therefore, the absolute +value of Slope is taken into calculation.) +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Text(extent=[-95, 88; 115, 146], string="%name"), + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -20, -10; -14, -9; -11, -7; -9, 7; -6, 9; 0, 10 + ; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-48, 32; -28, 32]), + Line(points=[-39, -20; -39, -41]), + Line(points=[-50, -31; -28, -31])), + Diagram( + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -20, -10; -14, -9; -11, -7; -9, 7; -6, 9; 0, 10 + ; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-55, 50; -45, 50]), + Line(points=[-50, -45; -50, -55]), + Line(points=[-55, -50; -45, -50]), + Text( + extent=[-112, -93; -91, -73], + style(color=9, fillColor=9), + string="in_p.i=0"), + Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), + Line(points=[111, 0; 136, 0], style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[118, 2; 135, 17], + string="i2", + style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[-111, 60; -85, 80], + style(color=9, fillColor=9), + string="in_n.i=0"), + Line(points=[-100, -35; -100, 23; -100, 24], style(color=9, arrow=1)), + Text( + extent=[-97, -16; -74, 4], + style(color=9, fillColor=9), + string="vin")), + Window( + x=0.28, + y=0.19, + width=0.71, + height=0.59)); + parameter Real Slope=1 "Slope of the out.v/vin characteristic at vin=0"; + Modelica.Electrical.Analog.Interfaces.PositivePin in_p + "Positive pin of the input port" annotation (extent=[-110, -60; -90, -40] + ); + Modelica.Electrical.Analog.Interfaces.NegativePin in_n + "Negative pin of the input port" annotation (extent=[-110, 40; -90, 60]); + Modelica.Electrical.Analog.Interfaces.PositivePin out "Output pin" + annotation (extent=[90, -10; 110, 10]); + Modelica.Electrical.Analog.Interfaces.PositivePin VMax + "Positive output voltage limitation" annotation (extent=[-10, 60; 10, 80] + ); + Modelica.Electrical.Analog.Interfaces.NegativePin VMin + "Negative output voltage limitation" annotation (extent=[-10, -80; 10, - + 60]); + SI.Voltage vin "input voltagae"; + protected + Real f "auxiliary variable"; + Real absSlope; + equation + in_p.i = 0; + in_n.i = 0; + VMax.i = 0; + VMin.i = 0; + vin = in_p.v - in_n.v; + f = 2/(VMax.v - VMin.v); + absSlope = if (Slope < 0) then -Slope else Slope; + out.v = (VMax.v + VMin.v)/2 + absSlope*vin/(1 + absSlope*noEvent(if (f*vin + < 0) then -f*vin else f*vin)); + end OpAmp; + end Basic; - diff --git a/Electrical/Analog/Examples/CauerFilter.mo b/Electrical/Analog/Examples/CauerFilter.mo index 18117cdb12..38c858d2a6 100644 --- a/Electrical/Analog/Examples/CauerFilter.mo +++ b/Electrical/Analog/Examples/CauerFilter.mo @@ -1,28 +1,22 @@ -// Example: Modelica.Electrical.Analog.Examples.CauerFilter +encapsulated model CauerFilter "CAUER Switched Capacitor Filter" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; -// Version: $Id$ - - -model CauerFilter "CAUER Switched Capacitor Filter" annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Icon(Rectangle(extent=[-60, 60; 60, -60], style( - color=10, - thickness=2, - gradient=0, - fillColor=8, + Icon(Rectangle(extent=[-90, 90; 90, -90], style( + color=10, + thickness=2, + gradient=0, + fillColor=8, fillPattern=1)), Text( - extent=[-50, 20; 50, -20], - string="CauerFilter", - style(color=0))), - Documentation(info=" - + extent=[-50, 20; 50, -20], + string="CauerFilter", + style(color=0))), + Documentation(info="The example Cauer Filter is a low-pass-filter of the fifth order. It is realized -using a switched-capacitor network. The voltage source V is the input voltage, +using a switched-capacitor network. The voltage source V is the input voltage, and the Op5.p2.v is the filter output voltage. The pulse response is calculated.
The simulation end time should be 2e5. Please plot the output voltage Op5.p2.v. @@ -31,9 +25,9 @@ The simulation end time should be 2e5. Please plot the output voltage Op5.p2.v.
Chua's circuit is the most simple nonlinear circuit which shows chaotic behaviour. The circuit consists of linear basic elements (capacitors, resistor, conductor, inductor), and one nonlinear element, which is called Chua's diode. The chaotic behaviour is simulated.
@@ -30,9 +32,9 @@ Kennedy, M.P.: Three Steps to Chaos - Part I: Evolution. IEEE Transactions on CA
It is a simple NPN transistor amplifier circuit. The voltage difference between R1.p and R3.n is amplified. The output signal is the voltage between R2.n and R4.n. In this example the voltage at V1 is amplified because R3.n is grounded.
@@ -35,9 +33,9 @@ Tietze, U.; Schenk, Ch.: Halbleiter-Schaltungstechnik. Springer-Verlag Berlin He
-The nand gate is a basic CMOS building block. It consists of four CMOS transistors. -The output voltage Nand.y.v is low if and only if the two input voltages at Nand.x1.v and Nand.x2.v +The nand gate is a basic CMOS building block. It consists of four CMOS transistors. +The output voltage Nand.y.v is low if and only if the two input voltages at Nand.x1.v and Nand.x2.v are both high. In this way the nand functionality is realized.
-The simulation end time should be set to 1e-7. Please plot the input voltages Nand.x1.v, +The simulation end time should be set to 1e-7. Please plot the input voltages Nand.x1.v, d Nand.x2.v, and the output voltage Nand.y.v.
-The nand gate is a basic CMOS building block. It consists of four CMOS transistors. +The nand gate is a basic CMOS building block. It consists of four CMOS transistors.
This package contains utilities ...
@@ -24,9 +20,9 @@ This package contains utilities ...
This package contains examples for the analog electrical packages.
-This package contains ideal components: +This package contains electrical components with idealized behaviour: +
@@ -64,18 +65,17 @@ Modelica in file \"Modelica/package.mo\".
"));
model IdealThyristor "Ideal thyristor"
- extends Modelica.Electrical.Analog.Interfaces.OnePort;
- parameter SIunits.Resistance Roff(final min=0) = 1.E-5
+ extends Interfaces.OnePort;
+ parameter SI.Resistance Roff(final min=0) = 1.E-5
"Closed thyristor resistance";
- parameter SIunits.Conductance Gon(final min=0) = 1.E-5
+ parameter SI.Conductance Gon(final min=0) = 1.E-5
"Opened thyristor conductance";
protected
Real s "Auxiliary variable";
Boolean off(start=true);
Boolean fire(start=true);
annotation (
- Documentation(info="
-
+ Documentation(info="
Ideal thyristor ... < description will be added >
@@ -121,19 +121,19 @@ Ideal thyristor ... < description will be added > v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealThyristor; + model IdealGTOThyristor "Ideal GTO thyristor" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed thyristor resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened thyristor conductance"; protected Real s "Auxiliary variable"; Boolean off(start=true) "Position of switch"; Boolean fire; annotation ( - Documentation(info=" - + Documentation(info="Ideal GTO thyristor ...
@@ -179,11 +179,12 @@ Ideal GTO thyristor ... v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealGTOThyristor; + model IdealSwitch "Ideal electrical switch" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed switch resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened switch conductance"; protected Real s "Auxiliary variable"; @@ -193,20 +194,19 @@ Ideal GTO thyristor ... false})) "true/false opened/closed switch" annotation (extent=[-10 , 50; 10, 70], rotation=-90); annotation ( - Documentation(info=" - + Documentation(info="Ideal electrical switch. In order to prevent singularities during switching, the opened switch has a high resistance -and the closed switch has a low resistance. +and the closed switch has a low resistance.
-If the actual circuit has an appropriate structure, the +If the actual circuit has an appropriate structure, the limiting case is also allowed, i.e., the resistance of the closed switch could be exactly zero and the conductance of the open switch could be also exactly zero (i.e. the resistance is -infinity). Note, there are circuits, where a description -with zero/infinity resistances is not possible. +infinite). Note, there are circuits, where a description +with zero/infinity resistances is not possible.
"), @@ -238,19 +238,190 @@ with zero/infinity resistances is not possible. v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealSwitch; - model ControlledIdealSwitch - parameter SIunits.Voltage level "Switch level"; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 + + model IdealCommutingSwitch "Ideal commuting switch" + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance"; + annotation ( + Documentation(info=" ++The commuting switch has a positive pin p and two negative pins n1 and n2. +The switching behaviour is controlled +by the control signal. If the control signal is true, the pin p is connected +with the negative pin n2. Otherwise, the pin p is connected to the negative pin n1. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0])), + Window( + x=0.21, + y=0.05, + width=0.6, + height=0.6)); + public + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => p--n2 connected, false => p--n1 connected" annotation (extent=[- + 10, 70; 10, 90], rotation=-90); + protected + Real s1; + Real s2 "Auxiliary variables"; + Boolean off; + equation + off = control.signal[1]; + 0 = p.i + n2.i + n1.i; + + p.v - n1.v = s1*(if (off) then 1 else Ron); + n1.i = -s1*(if (off) then Goff else 1); + p.v - n2.v = s2*(if (off) then Ron else 1); + n2.i = -s2*(if (off) then 1 else Goff); + end IdealCommutingSwitch; + + model IdealIntermediateSwitch "Ideal intermediate switch" + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance"; + annotation ( + Documentation(info=" ++The intermediate switch has four switching contact pins p1, p2, n1, and n2. +The switching behaviour is controlled by the control signal. If the control +signal is true, the pin p1 is connected to pin n2, and the pin p2 is +connected to the pin n2. Otherwise, the pin p1 is connected to n1, and +p2 is connected to n2. +
+ + + ++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +
+ + + ++The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0])), + Window( + x=0.21, + y=0.05, + width=0.6, + height=0.6)); + public + Interfaces.PositivePin p1 annotation (extent=[-110, 40; -90, 60]); + Interfaces.PositivePin p2 annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) "true => p1--n2, p2--n1 connected, + otherwise p1--n1, p2--n2 connected" annotation (extent=[-10, 70; 10, + 90], rotation=-90); + protected + Real s1; + Real s2; + Real s3; + Real s4 "Auxiliary variables"; + Boolean off; + equation + off = control.signal[1]; + p1.v - n1.v = s1*(if (off) then 1 else Ron); + p2.v - n2.v = s2*(if (off) then 1 else Ron); + p1.v - n2.v = s3*(if (off) then Ron else 1); + p2.v - n1.v = s4*(if (off) then Ron else 1); + + p1.i = if (off) then s1*Goff + s3 else s1 + s3*Goff; + p2.i = if (off) then s2*Goff + s4 else s2 + s4*Goff; + n1.i = if (off) then -s1*Goff - s4 else -s1 - s4*Goff; + n2.i = if (off) then -s2*Goff - s3 else -s2 - s3*Goff; + end IdealIntermediateSwitch; + + model ControlledIdealSwitch "Controlled ideal switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed switch resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened switch conductance"; protected Real s "Auxiliary variable"; annotation ( - Documentation(info=" - + Documentation(info="-The ideal switch is a three-pole. If the third pin voltage exceeds the given +The ideal switch is a three-pole. If the third pin voltage exceeds the given parameter Voltage, the pins p and n are open (no current flowing, any voltage possible). Otherwise, p and n are short cut.
@@ -279,33 +450,41 @@ possible). Otherwise, p and n are short cut. Line(points=[40, 0; 90, 0]), Line(points=[0, 90; 0, 25]))); public - Modelica.Electrical.Analog.Interfaces.Pin p "Positive pin" annotation ( - extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin n "Negative pin" annotation ( - extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.Pin control + Interfaces.Pin p "Positive pin" annotation (extent=[-110, -10; -90, 10]); + Interfaces.Pin n "Negative pin" annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control "Control pin: control.v > level open, otherwise closed" annotation ( extent=[-10, 90; 10, 110], rotation=90); equation control.i = 0; 0 = p.i + n.i; - p.v - n.v = s * (if (control.v < level) then Roff else 1); - n.i = s * (if (control.v < level) then 1 else Gon); + p.v - n.v = s*(if (control.v < level) then Roff else 1); + n.i = s*(if (control.v < level) then 1 else Gon); end ControlledIdealSwitch; - model ControlledIdealCommutingSwitch "Ideal commuting switch" - parameter SIunits.Voltage level "Switch level"; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 - "Closed switch resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + + model ControlledIdealCommutingSwitch "Controlled ideal commuting switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; annotation ( - Documentation(info=" - + Documentation(info=" ++The commuting switch has a positive pin p and two negative pins n1 and n2. +The switching behaviour is controlled +by the control pin. If its voltage exceeds the value of the parameter level, +the pin p is connected with the negative pin n2. Otherwise, the pin p is +connected the negative pin n1. +
-The commuting switch is a four pole. The switching behaviour is controlled -by the fourth pin. If its voltage exceeds the parameter Voltage value, -the first pin p is chort cut to the second pin ng. Otherwise, the pin p -is short cut to the third pin n1. +In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible.
"), @@ -315,6 +494,9 @@ is short cut to the third pin n1. component=[20, 20]), Icon( Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), Line(points=[-90, 0; -44, 0]), Line(points=[-37, 2; 40, 50]), Line(points=[40, 50; 90, 50]), @@ -323,6 +505,9 @@ is short cut to the third pin n1. Text(extent=[-100, -70; 100, -100], string="%name")), Diagram( Ellipse(extent=[-44, 4; -36, -4]), + Text(extent=[-80, 0; -60, 22], string="p"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), Line(points=[-90, 0; -44, 0]), Line(points=[-37, 2; 40, 50]), Line(points=[40, 50; 90, 50]), @@ -334,39 +519,135 @@ is short cut to the third pin n1. width=0.6, height=0.6)); public - Modelica.Electrical.Analog.Interfaces.Pin p "Positive pin" annotation ( - extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.Pin n2 "Negative pin 2" annotation ( - extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.Pin n1 "Negative pin 1" annotation ( - extent=[90, 40; 110, 60]); - Modelica.Electrical.Analog.Interfaces.Pin control - "Control pin: control.v > level p--n2, otherwise p--n1" annotation ( - extent=[-10, 90; 10, 110], rotation=90); - protected - Real s1, s2 "Auxiliary variables"; + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Interfaces.Pin control + "Control pin: if control.v > level p--n2 connected, otherwise p--n1 connected" + annotation (extent=[-10, 90; 10, 110], rotation=90); + protected + Real s1; + Real s2 "Auxiliary variables"; equation control.i = 0; 0 = p.i + n2.i + n1.i; - - p.v - n1.v = s1 * (if (control.v > level) then 1 else Roff); - n1.i = s1 * (if (control.v > level) then Gon else 1); - p.v - n2.v = s2 * (if (control.v > level) then Roff else 1); - n2.i = s2 * (if (control.v > level) then 1 else Gon); + + p.v - n1.v = s1*(if (control.v > level) then 1 else Ron); + n1.i = -s1*(if (control.v > level) then Goff else 1); + p.v - n2.v = s2*(if (control.v > level) then Ron else 1); + n2.i = -s2*(if (control.v > level) then 1 else Goff); end ControlledIdealCommutingSwitch; - model IdealOpAmp "Ideal opamp (norator-nullator pair)" - SIunits.Voltage v1 "Voltage drop over the left port"; - SIunits.Voltage v2 "Voltage drop over the right port"; - SIunits.Current i1 - "Current flowing from pos. to neg. pin of the left port"; - SIunits.Current i2 - "Current flowing from pos. to neg. pin of the right port"; + + model ControlledIdealIntermediateSwitch + "Controlled ideal intermediate switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + ; + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance"; annotation ( - Documentation(info=" - + Documentation(info=" ++The intermediate switch has four switching contact pins p1, p2, n1, and n2. +The switching behaviour is controlled +by the control pin. If its voltage exceeds the value of the +parameter level, the pin p1 is connected to pin n2, and the pin p2 is +connected to the pin n2. Otherwise, the pin p1 is connected to n1, and +p2 is connected to n2. +
+ + + ++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +
+ + + ++The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-4, 30; 4, 22]), + Text(extent=[-80, 50; -60, 72], string="p1"), + Text(extent=[-80, 0; -60, 22], string="p2"), + Text(extent=[60, 50; 80, 72], string="n1"), + Text(extent=[60, 0; 80, 22], string="n2"), + Line(points=[-90, 0; -44, 0]), + Line(points=[-90, 50; -44, 50]), + Line(points=[-44, 0; 40, 50]), + Line(points=[-44, 50; 40, 0]), + Line(points=[40, 50; 90, 50]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 0; 90, 0])), + Window( + x=0.21, + y=0.05, + width=0.6, + height=0.6)); + + public + Interfaces.PositivePin p1 annotation (extent=[-110, 40; -90, 60]); + Interfaces.PositivePin p2 annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n1 annotation (extent=[90, 40; 110, 60]); + Interfaces.NegativePin n2 annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control "Control pin: if control.v > level p1--n2, p2--n1 connected, + otherwise p1--n1, p2--n2 connected" annotation (extent=[-10, 90; 10, + 110], rotation=90); + protected + Real s1; + Real s2; + Real s3; + Real s4 "Auxiliary variables"; + equation + control.i = 0; + + p1.v - n1.v = s1*(if (control.v > level) then 1 else Ron); + p2.v - n2.v = s2*(if (control.v > level) then 1 else Ron); + p1.v - n2.v = s3*(if (control.v > level) then Ron else 1); + p2.v - n1.v = s4*(if (control.v > level) then Ron else 1); + + p1.i = if (control.v > level) then s1*Goff + s3 else s1 + s3*Goff; + p2.i = if (control.v > level) then s2*Goff + s4 else s2 + s4*Goff; + n1.i = if (control.v > level) then -s1*Goff - s4 else -s1 - s4*Goff; + n2.i = if (control.v > level) then -s2*Goff - s3 else -s2 - s3*Goff; + end ControlledIdealIntermediateSwitch; + + model IdealOpAmp "Ideal operational amplifier (norator-nullator pair)" + SI.Voltage v1 "Voltage drop over the left port"; + SI.Voltage v2 "Voltage drop over the right port"; + SI.Current i1 "Current flowing from pos. to neg. pin of the left port"; + SI.Current i2 "Current flowing from pos. to neg. pin of the right port"; + annotation ( + Documentation(info="The ideal OpAmp is a two-port. The left port is fixed to v1=0 and i1=0 -(nullator). At the right port both any voltage v2 and any current i2 +(nullator). At the right port both any voltage v2 and any current i2 are possible (norator).
@@ -377,8 +658,7 @@ are possible (norator). component=[20, 20]), Icon( Text(extent=[-100, 80; 100, 100], string="%name"), - Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)) - , + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), Line(points=[-90, 50; -60, 50]), Line(points=[-90, -50; -60, -50]), Line(points=[60, 0; 90, 0]), @@ -387,8 +667,7 @@ are possible (norator). Line(points=[-39, -20; -39, -41]), Line(points=[-50, -31; -28, -31])), Diagram( - Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)) - , + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), Line(points=[-90, 50; -60, 50]), Line(points=[-90, -50; -60, -50]), Line(points=[60, 0; 90, 0]), @@ -437,16 +716,14 @@ are possible (norator). y=0.19, width=0.71, height=0.59)); - Modelica.Electrical.Analog.Interfaces.PositivePin p1 - "Positive pin of the left port" annotation (extent=[-110, -60; -90, -40]) - ; - Modelica.Electrical.Analog.Interfaces.NegativePin n1 - "Negative pin of the left port" annotation (extent=[-110, 40; -90, 60]); - Modelica.Electrical.Analog.Interfaces.PositivePin p2 - "Positive pin of the right port" annotation (extent=[90, -10; 110, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n2 - "Negative pin of the right port" annotation (extent=[-10, -90; 10, -110] - , rotation=-90); + Interfaces.PositivePin p1 "Positive pin of the left port" annotation ( + extent=[-110, -60; -90, -40]); + Interfaces.NegativePin n1 "Negative pin of the left port" annotation ( + extent=[-110, 40; -90, 60]); + Interfaces.PositivePin p2 "Positive pin of the right port" annotation ( + extent=[90, -10; 110, 10]); + Interfaces.NegativePin n2 "Negative pin of the right port" annotation ( + extent=[-10, -90; 10, -110], rotation=-90); equation v1 = p1.v - n1.v; v2 = p2.v - n2.v; @@ -457,33 +734,200 @@ are possible (norator). v1 = 0; i1 = 0; end IdealOpAmp; + + model IdealOpAmp3Pin + "Ideal operational amplifier (norator-nullator pair), but 3 pins" + annotation ( + Documentation(info=" ++The ideal OpAmp with three pins is of exactly the same behaviour as the ideal +OpAmp with four pins. Only the negative output pin is left out. +Both the input voltage and current are fixed to zero (nullator). +At the output pin both any voltage v2 and any current i2 +are possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Text(extent=[-100, 80; 100, 100], string="%name"), + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-48, 32; -28, 32]), + Line(points=[-39, -20; -39, -41]), + Line(points=[-50, -31; -28, -31])), + Diagram( + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-55, 50; -45, 50]), + Line(points=[-50, -45; -50, -55]), + Line(points=[-55, -50; -45, -50]), + Text( + extent=[-111, -39; -90, -19], + string="p1.i=0", + style(color=9, fillColor=9)), + Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), + Line(points=[111, 0; 136, 0], style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[118, 2; 135, 17], + string="i2", + style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[-111, 60; -90, 80], + string="n1.i=0", + style(color=9, fillColor=9))), + Window( + x=0.28, + y=0.19, + width=0.71, + height=0.59)); + Interfaces.PositivePin in_p "Positive pin of the input port" annotation ( + extent=[-110, -60; -90, -40]); + Interfaces.NegativePin in_n "Negative pin of the input port" annotation ( + extent=[-110, 40; -90, 60]); + Interfaces.PositivePin out "Output pin" annotation (extent=[90, -10; 110, + 10]); + equation + in_p.v = in_n.v; + in_p.i = 0; + in_n.i = 0; + end IdealOpAmp3Pin; + + model IdealOpAmpLimited "Ideal operational amplifier with limitation" + annotation ( + Documentation(info=" ++The ideal OpAmp with limitation behaves like an ideal OpAmp without limitation, +if the output voltage is within the limits (VMin < out.v < VMax). In this case +the input voltage vin=in_p.v - in_n.v is zero. +If the input voltage is vin < 0, the output voltage is out.v = VMin. +If the input voltage is vin > 0, the output voltage is out.v = VMax. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Icon( + Text(extent=[-110, 80; 100, 90], string="%name"), + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -10, -10; -10, 10; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-48, 32; -28, 32]), + Line(points=[-39, -20; -39, -41]), + Line(points=[-50, -31; -28, -31])), + Diagram( + Polygon(points=[60, 0; -60, 70; -60, -70; 60, 0], style(fillColor=7)), + Line(points=[-45, -10; -10, -10; -10, 10; 20, 10]), + Line(points=[0, 35; 0, 80]), + Line(points=[0, -35; 0, -80]), + Line(points=[-90, 50; -60, 50]), + Line(points=[-90, -50; -60, -50]), + Line(points=[60, 0; 90, 0]), + Line(points=[-55, 50; -45, 50]), + Line(points=[-50, -45; -50, -55]), + Line(points=[-55, -50; -45, -50]), + Text( + extent=[-111, -39; -90, -19], + string="p1.i=0", + style(color=9, fillColor=9)), + Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), + Line(points=[111, 0; 136, 0], style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[118, 2; 135, 17], + string="i2", + style( + color=9, + gradient=2, + fillColor=9)), + Text( + extent=[-111, 60; -90, 80], + string="n1.i=0", + style(color=9, fillColor=9))), + Window( + x=0.28, + y=0.19, + width=0.71, + height=0.59)); + Interfaces.PositivePin in_p "Positive pin of the input port" annotation ( + extent=[-110, -60; -90, -40]); + Interfaces.NegativePin in_n "Negative pin of the input port" annotation ( + extent=[-110, 40; -90, 60]); + Interfaces.PositivePin out "Output pin" annotation (extent=[90, -10; 110, + 10]); + Interfaces.PositivePin VMax "Positive output voltage limitation" + annotation (extent=[-10, 60; 10, 80]); + Interfaces.NegativePin VMin "Negative output voltage limitation" + annotation (extent=[-10, -80; 10, -60]); + SI.Voltage vin "input voltage"; + protected + Real s "Auxiliary variable"; + equation + in_p.i = 0; + in_n.i = 0; + VMax.i = 0; + VMin.i = 0; + vin = in_p.v - in_n.v; + in_p.v - in_n.v = if (s < -1) then s + 1 else if (s > 1) then s - 1 else 0; + out.v = if (s < -1) then VMin.v else if (s > 1) then VMax.v else (VMax.v - + VMin.v)*s/2 + (VMax.v + VMin.v)/2; + end IdealOpAmpLimited; + model IdealDiode "Ideal electrical diode" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - parameter SIunits.Resistance Roff(final min=0) = 1.E-5 - "Closed diode resistance"; - parameter SIunits.Conductance Gon(final min=0) = 1.E-5 + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed diode resistance" + ; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened diode conductance"; Boolean off(start=true) "Switching state of diode"; protected Real s "Auxiliary variable"; annotation ( - Documentation(info=" - + Documentation(info="Ideal electrical diode. This is an ideal switch which is open, when it is reversed biased (voltage drop < 0) and which is closed, when it is conducting (current > 0). In order to prevent singularities during switching, the opened -diode has a high resistance and the closed diode has a low -resistance. +diode has a high resistance and the closed diode has a low +resistance.
-If the actual circuit has an appropriate structure, the +If the actual circuit has an appropriate structure, the limiting case is also allowed, i.e., the resistance of the closed diode could be exactly zero and the conductance of the open diode could be also exactly zero (i.e. the resistance is infinity). Note, there are circuits, where a description -with zero/infinity resistances is not possible. +with zero/infinity resistances is not possible.
"), @@ -519,16 +963,16 @@ with zero/infinity resistances is not possible. v = s*(if off then 1 else Roff); i = s*(if off then Gon else 1); end IdealDiode; + model IdealTransformer "Ideal electrical transformer" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; parameter Real n=1 "Turns ratio"; annotation ( Coordsys( extent=[-100, -100; 100, 100], grid=[2, 2], component=[20, 20]), - Documentation(info=" - + Documentation(info="The ideal transformer is an ideal two-port resistive circuit element which is characterized by the following two equations: @@ -584,12 +1028,12 @@ where n is a real number called the turns ratio. v1 = n*v2; i2 = -n*i1; end IdealTransformer; + model IdealGyrator "Ideal gyrator" - extends Modelica.Electrical.Analog.Interfaces.TwoPort; + extends Interfaces.TwoPort; annotation ( - Documentation(info=" - -
+ Documentation(info=" +
A gyrator is an ideal two-port element defined by the following equations:
@@ -637,16 +1081,16 @@ where the constant G is called the gyration conductance. Ellipse(extent=[10, -30; 70, 30]), Rectangle(extent=[80, -40; 40, 40], style(color=7, fillColor=7)), Line(points=[90, 50; 40, 50; 40, -50; 90, -50]))); - parameter SIunits.Conductance G=1 "Gyration conductance"; + parameter SI.Conductance G=1 "Gyration conductance"; equation i1 = G*v2; i2 = -G*v1; end IdealGyrator; + model Idle "Idle branch" - extends Modelica.Electrical.Analog.Interfaces.OnePort; + extends Interfaces.OnePort; annotation ( - Documentation(info=" - + Documentation(info="The model Idle is a simple idle running branch.
@@ -657,7 +1101,7 @@ The model Idle is a simple idle running branch. grid=[1, 1], component=[20, 20]), Icon( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), Line(points=[-90, 0; -41, 0]), Line(points=[91, 0; 40, 0]), Text(extent=[-100, 100; 100, 70], string="%name")), @@ -675,11 +1119,11 @@ The model Idle is a simple idle running branch. i = 0; end Idle; + model Short "Short cut branch" - extends Modelica.Electrical.Analog.Interfaces.OnePort; + extends Interfaces.OnePort; annotation ( - Documentation(info=" - + Documentation(info="The model Short is a simple short cut branch.
@@ -690,7 +1134,7 @@ The model Short is a simple short cut branch. grid=[1, 1], component=[20, 20]), Icon( - Rectangle(extent=[-60, 60; 60, -60]), + Rectangle(extent=[-60, 60; 60, -60], style(fillColor=7)), Line(points=[91, 0; -90, 0]), Text(extent=[-100, 100; 100, 70], string="%name")), Diagram( @@ -705,4 +1149,267 @@ The model Short is a simple short cut branch. equation v = 0; end Short; + + model IdealOpener "Ideal electrical opener" + extends Interfaces.OnePort; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[-56.6667, 10; -10, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[10, 10; 56.6667, 56.6667] + ); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => switch open, false => p--n connected" annotation (extent=[-10, + 50; 10, 70], rotation=-90); + protected + Real s "Auxiliary variable"; + Boolean off; + + annotation ( + Documentation(info=" ++The ideal opener has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control signal. +If the control signal is true, pin p is not connected +with negative pin n. Otherwise, pin p is connected +with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.45, + y=0.01, + width=0.44, + height=0.65), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name"), + Line(points=[0, 51; 0, 26]), + Line(points=[40, 20; 40, 0])), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -40; 100, -79], string="%name"), + Line(points=[0, 51; 0, 26]), + Line(points=[40, 20; 40, 0]))); + equation + off = control.signal[1]; + v = s*(if off then 1 else Ron); + i = s*(if off then Goff else 1); + end IdealOpener; + + model IdealCloser "Ideal electrical closer" + extends Interfaces.OnePort; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[-56.6667, 10; -10, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[10, 10; 56.6667, 56.6667] + ); + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => switch open, false => p--n connected" annotation (extent=[-10, + 50; 10, 70], rotation=-90); + protected + Real s "Auxiliary variable"; + Boolean on; + + annotation ( + Documentation(info=" ++The ideal opener has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control signal. +If the control signal is true, pin p is not connected +with negative pin n. Otherwise, pin p is connected +with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.24, + y=0.01, + width=0.65, + height=0.77), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -70; 100, -100], string="%name"), + Line(points=[0, 51; 0, 26])), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Text(extent=[-100, -40; 100, -79], string="%name"), + Line(points=[0, 51; 0, 26]))); + equation + on = control.signal[1]; + v = s*(if not on then 1 else Ron); + i = s*(if not on then Goff else 1); + end IdealCloser; + + model ControlledIdealOpener "Controlled ideal electrical opener" + parameter SI.Voltage level=0.5 "Switch level" annotation (extent=[-56.6667 + , 10; -10, 56.6667]); + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[10, 10; 56.6667, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[-56.6667, -56.6667; -10, + -10]); + protected + Real s "Auxiliary variable"; + annotation ( + Documentation(info=" + ++The ideal switch has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control pin. +If its voltage exceeds the voltage of the parameter level, +pin p is not connected with negative pin n. +Otherwise, pin p is connected with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.45, + y=0.01, + width=0.44, + height=0.65), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]), + Text(extent=[-100, -70; 100, -100], string="%name"), + Line(points=[40, 20; 40, 0])), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]), + Line(points=[40, 20; 40, 0]))); + public + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control + "Control pin: control.v > level switch open, otherwise p--n connected" + annotation (extent=[-10, 90; 10, 110], rotation=90); + equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v > level) then 1 else Ron); + p.i = s*(if (control.v > level) then Goff else 1); + end ControlledIdealOpener; + + model ControlledIdealCloser "Controlled ideal electrical closer" + parameter SI.Voltage level=0.5 "Switch level" annotation (extent=[-56.6667 + , 10; -10, 56.6667]); + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance" + annotation (extent=[10, 10; 56.6667, 56.6667]); + parameter SI.Conductance Goff(final min=0) = 1.E-5 + "Opened switch conductance" annotation (extent=[-56.6667, -56.6667; -10, + -10]); + protected + Real s "Auxiliary variable"; + annotation ( + Documentation(info=" + ++The ideal switch has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control pin. +If its voltage exceeds the voltage of the parameter level, +pin p is not connected with negative pin n. +Otherwise, pin p is connected with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+ +"), + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.45, + y=0.01, + width=0.44, + height=0.65), + Icon( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]), + Text(extent=[-100, -70; 100, -100], string="%name")), + Diagram( + Ellipse(extent=[-44, 4; -36, -4]), + Line(points=[-90, 0; -44, 0]), + Line(points=[-37, 2; 40, 50]), + Line(points=[40, 0; 90, 0]), + Line(points=[0, 90; 0, 25]))); + public + Interfaces.PositivePin p annotation (extent=[-110, -10; -90, 10]); + Interfaces.NegativePin n annotation (extent=[90, -10; 110, 10]); + Interfaces.Pin control + "Control pin: control.v > level switch open, otherwise p--n connected" + annotation (extent=[-10, 90; 10, 110], rotation=90); + equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v > level) then Ron else 1); + p.i = s*(if (control.v > level) then 1 else Goff); + end ControlledIdealCloser; + end Ideal; diff --git a/Electrical/Analog/Interfaces.mo b/Electrical/Analog/Interfaces.mo index d311cfda73..41bdda4087 100644 --- a/Electrical/Analog/Interfaces.mo +++ b/Electrical/Analog/Interfaces.mo @@ -1,21 +1,13 @@ -package Interfaces - extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits; +package Interfaces - annotation ( - Coordsys( - extent=[0, 0; 210, 333], - grid=[1, 1], - component=[20, 20]), - Window( + extends Modelica.Icons.Library; + annotation (Window( x=0.03, y=0.04, width=0.21, height=0.49, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1),Documentation(info="This package contains connectors and interfaces (partial models) for analog electrical components. @@ -25,9 +17,9 @@ analog electrical components.
")); - connector Pin "Pin of an electrical component" - SIunits.Voltage v "Potential at the pin"; - flow SIunits.Current i "Current flowing into the pin"; + + connector Pin "Pin of an electrical component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Documentation(info=" -"), - Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3 - ))), - Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3)), Text( - extent=[-100, -120; 100, -220], - string="%name", - style(color=3))), - Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3))), - Window( - x=0.21, - y=0.11, - width=0.6, - height=0.63)); + Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3) + )), + Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor + =3)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=3))), + Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, + fillColor=3)))); end Pin; - connector PositivePin "Positive pin of an electric component" - SIunits.Voltage v "Potential at the pin"; - flow SIunits.Current i "Current flowing into the pin"; + + connector PositivePin "Positive pin of an electric component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Documentation(info="Connectors PositivePin and NegativePin are nearly identical. + Documentation(info="
Connectors PositivePin +and NegativePin are nearly identical. The only difference is that the icons are different in order to identify more easily the pins of a component. Usually, connector PositivePin is used for the positive and connector NegativePin for the negative pin of an electrical -component. - -"), - Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3 - ))), - Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3)), Text( - extent=[-100, -120; 100, -220], - string="%name", - style(color=3))), - Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, - fillColor=3))), - Window( - x=0.21, - y=0.08, - width=0.6, - height=0.6)); +component.
"), + Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor=3) + )), + Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=3, fillColor + =3)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=3))), + Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3, + fillColor=3)))); end PositivePin; - connector NegativePin "Negative pin of an electric component" - SIunits.Voltage v "Potential at the pin"; - flow SIunits.Current i "Current flowing into the pin"; + + connector NegativePin "Negative pin of an electric component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Documentation(info="Connectors PositivePin and NegativePin are nearly identical. + Documentation(info="Connectors PositivePin +and NegativePin are nearly identical. The only difference is that the icons are different in order to identify more easily the pins of a component. Usually, connector PositivePin is used for the positive and connector NegativePin for the negative pin of an electrical -component. - - -"), +component.
"), Icon(Rectangle(extent=[-100, 100; 100, -100], style( - color=3, - gradient=0, - fillColor=7, - fillPattern=1))), + color=3, + gradient=0, + fillColor=7, + fillPattern=1))), Diagram(Rectangle(extent=[-100, 100; 100, -100], style( - color=3, - fillColor=7, + color=3, + fillColor=7, fillPattern=1)), Text(extent=[-100, -120; 100, -220], string= - "%name")), - Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3))), - Window( - x=0.33, - y=0.01, - width=0.56, - height=0.67)); + "%name")), + Terminal(Rectangle(extent=[-100, 100; 100, -100], style(color=3)))); end NegativePin; - partial model TwoPin "Component with one electrical port" - SIunits.Voltage v - "Voltage drop between the two pins (= p.v - n.v)"; - Modelica.Electrical.Analog.Interfaces.PositivePin p "Positive pin" - annotation (extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n "Negative pin" - annotation (extent=[90, -10; 110, 10]); + partial model TwoPin "Component with one electrical port" + SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)"; + PositivePin p "Positive pin" annotation (extent=[-110, -10; -90, 10]); + NegativePin n "Negative pin" annotation (extent=[90, -10; 110, 10]); annotation ( Diagram( Polygon(points=[-120, 3; -110, 0; -120, -3; -120, 3], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[-136, 0; -111, 0], style(color=9, fillColor=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[-136, 0; -111, 0], style(color=9, fillColor=9)), Text( - extent=[-134, 5; -117, 20], - string="p.i", - style(color=9, fillColor=9)), - Line(points=[110, 0; 135, 0], style(color=9, fillColor=9)), + extent=[-134, 5; -117, 20], + string="p.i", + style(color=9, fillColor=9)), + Line(points=[110, 0; 135, 0], style(color=9, fillColor=9)), Polygon(points=[120, 3; 110, 0; 120, -3; 120, 3], style( - color=9, - fillColor=9, - fillPattern=1)), + color=9, + fillColor=9, + fillPattern=1)), Text( - extent=[117, 3; 134, 18], - string="n.i", - style(color=9, fillColor=9))), + extent=[117, 3; 134, 18], + string="n.i", + style(color=9, fillColor=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.11, - y=0.14, - width=0.55, + x=0.11, + y=0.14, + width=0.55, height=0.64)); - equation + equation v = p.v - n.v; end TwoPin; - partial model OnePort - "Component with two electrical pins p and n and current i from p to n" - SIunits.Voltage v - "Voltage drop between the two pins (= p.v - n.v)"; - SIunits.Current i "Current flowing from pin p to pin n"; + + partial model OnePort + "Component with two electrical pins p and n and current i from p to n" + SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)"; + SI.Current i "Current flowing from pin p to pin n"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Documentation(info="Superclass of elements which have two electrical pins: @@ -201,115 +161,111 @@ into pin p is identical to the current flowing out of pin n. This current is provided explicitly as current i.
-"), +"), Diagram( - Line(points=[-110, 20; -85, 20], style(color=9, fillColor=9)), + Line(points=[-110, 20; -85, 20], style(color=9, fillColor=9)), Polygon(points=[-95, 23; -85, 20; -95, 17; -95, 23], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[90, 20; 115, 20], style(color=9, fillColor=9)), - Line(points=[-125, 0; -115, 0], style(color=9)), - Line(points=[-120, -5; -120, 5], style(color=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[90, 20; 115, 20], style(color=9, fillColor=9)), + Line(points=[-125, 0; -115, 0], style(color=9)), + Line(points=[-120, -5; -120, 5], style(color=9)), Text( - extent=[-110, 25; -90, 45], - string="i", - style(color=9)), + extent=[-110, 25; -90, 45], + string="i", + style(color=9)), Polygon(points=[105, 23; 115, 20; 105, 17; 105, 23], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[115, 0; 125, 0], style(color=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[115, 0; 125, 0], style(color=9)), Text( - extent=[90, 45; 110, 25], - string="i", - style(color=9))), + extent=[90, 45; 110, 25], + string="i", + style(color=9))), Window( - x=0.33, - y=0.04, - width=0.63, + x=0.33, + y=0.04, + width=0.63, height=0.67)); - Modelica.Electrical.Analog.Interfaces.PositivePin p annotation (extent=[ - -110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n annotation (extent=[ - 110, -10; 90, 10]); - equation + PositivePin p annotation (extent=[-110, -10; -90, 10]); + NegativePin n annotation (extent=[110, -10; 90, 10]); + equation v = p.v - n.v; 0 = p.i + n.i; i = p.i; end OnePort; - partial model TwoPort - "Component with two electrical ports, including current" - SIunits.Voltage v1 "Voltage drop over the left port"; - SIunits.Voltage v2 "Voltage drop over the right port"; - SIunits.Current i1 - "Current flowing from pos. to neg. pin of the left port"; - SIunits.Current i2 - "Current flowing from pos. to neg. pin of the right port"; - Modelica.Electrical.Analog.Interfaces.PositivePin p1 - "Positive pin of the left port" annotation (extent=[-110, 40; -90, 60]); - Modelica.Electrical.Analog.Interfaces.NegativePin n1 - "Negative pin of the left port" annotation (extent=[-110, -60; -90, -40]) - ; - Modelica.Electrical.Analog.Interfaces.PositivePin p2 - "Positive pin of the right port" annotation (extent=[90, 40; 110, 60]); - Modelica.Electrical.Analog.Interfaces.NegativePin n2 - "Negative pin of the right port" annotation (extent=[90, -60; 110, -40]); + + partial model TwoPort + "Component with two electrical ports, including current" + SI.Voltage v1 "Voltage drop over the left port"; + SI.Voltage v2 "Voltage drop over the right port"; + SI.Current i1 "Current flowing from pos. to neg. pin of the left port"; + SI.Current i2 "Current flowing from pos. to neg. pin of the right port"; + PositivePin p1 "Positive pin of the left port" annotation (extent=[-110, 40 + ; -90, 60]); + NegativePin n1 "Negative pin of the left port" annotation (extent=[-110, - + 60; -90, -40]); + PositivePin p2 "Positive pin of the right port" annotation (extent=[90, 40 + ; 110, 60]); + NegativePin n2 "Negative pin of the right port" annotation (extent=[90, -60 + ; 110, -40]); annotation ( Diagram( Polygon(points=[-120, 53; -110, 50; -120, 47; -120, 53], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[-136, 50; -111, 50], style(color=9, fillColor=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[-136, 50; -111, 50], style(color=9, fillColor=9)), Polygon(points=[127, -47; 137, -50; 127, -53; 127, -47], style( - color=9, - fillColor=9, - fillPattern=1)), - Line(points=[111, -50; 136, -50], style(color=9, fillColor=9)), + color=9, + fillColor=9, + fillPattern=1)), + Line(points=[111, -50; 136, -50], style(color=9, fillColor=9)), Text( - extent=[112, -44; 128, -29], - string="i2", - style(color=9, fillColor=9)), + extent=[112, -44; 128, -29], + string="i2", + style(color=9, fillColor=9)), Text( - extent=[118, 52; 135, 67], - string="i2", + extent=[118, 52; 135, 67], + string="i2", style( - color=9, - gradient=2, - fillColor=9)), + color=9, + gradient=2, + fillColor=9)), Polygon(points=[120, 53; 110, 50; 120, 47; 120, 53], style( - color=9, - gradient=2, - fillColor=9, - fillPattern=1)), + color=9, + gradient=2, + fillColor=9, + fillPattern=1)), Line(points=[111, 50; 136, 50], style( - color=9, - gradient=2, - fillColor=9)), - Line(points=[-136, -49; -111, -49], style(color=9, fillColor=9)), + color=9, + gradient=2, + fillColor=9)), + Line(points=[-136, -49; -111, -49], style(color=9, fillColor=9)), Polygon(points=[-126, -46; -136, -49; -126, -52; -126, -46], style( - color=9, - fillColor=9, - fillPattern=1)), + color=9, + fillColor=9, + fillPattern=1)), Text( - extent=[-127, -46; -110, -31], - string="i1", - style(color=9, fillColor=9)), + extent=[-127, -46; -110, -31], + string="i1", + style(color=9, fillColor=9)), Text( - extent=[-136, 53; -119, 68], - string="i1", - style(color=9, fillColor=9))), + extent=[-136, 53; -119, 68], + string="i1", + style(color=9, fillColor=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.16, - y=0.12, - width=0.6, + x=0.16, + y=0.12, + width=0.6, height=0.6)); - equation + equation v1 = p1.v - n1.v; v2 = p2.v - n2.v; 0 = p1.i + n1.i; @@ -318,113 +274,108 @@ This current is provided explicitly as current i. i2 = p2.i; end TwoPort; - partial model AbsoluteSensor - "Base class to measure the absolute value of a pin variable" + partial model AbsoluteSensor + "Base class to measure the absolute value of a pin variable" extends Modelica.Icons.RotationalSensor; - - Modelica.Electrical.Analog.Interfaces.PositivePin p "pin to be measured" - annotation (extent=[-110, -10; -90, 10]); - Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[ - 100, -10; 120, 10]); + + PositivePin p "pin to be measured" annotation (extent=[-110, -10; -90, 10]) + ; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[100, -10; 120, 10]); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.31, - y=0.04, - width=0.6, - height=0.6), + x=0.31, + y=0.04, + width=0.6, + height=0.6), Icon( - Line(points=[-70, 0; -90, 0], style(color=0)), - Line(points=[70, 0; 100, 0]), - Text(extent=[-110, 80; 110, 120], string="%name")), - Diagram(Line(points=[-70, 0; -90, 0], style(color=0)), Line(points=[70, - 0; 100, 0]))); + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 100, 0]), + Text(extent=[-110, 80; 110, 120], string="%name")), + Diagram(Line(points=[-70, 0; -90, 0], style(color=0)), Line(points=[70, 0 + ; 100, 0]))); end AbsoluteSensor; - model RelativeSensor - "Base class to measure a relative variable between two pins" + + partial model RelativeSensor + "Base class to measure a relative variable between two pins" extends Modelica.Icons.RotationalSensor; - - Modelica.Electrical.Analog.Interfaces.PositivePin p "positive pin" - annotation (extent=[-110, -10; -90, 10]); - Modelica.Electrical.Analog.Interfaces.NegativePin n "negative pin" - annotation (extent=[90, -10; 110, 10]); - Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[ - -10, -90; 10, -110], rotation=90); + + PositivePin p "positive pin" annotation (extent=[-110, -10; -90, 10]); + NegativePin n "negative pin" annotation (extent=[90, -10; 110, 10]); + Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent=[-10, -90; 10, -110], + rotation=90); + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.21, - y=0.04, - width=0.6, - height=0.6), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Line(points=[-70, 0; -90, 0], style(color=0)), - Line(points=[70, 0; 90, 0], style(color=0)), - Line(points=[0, -90; 0, -70]), - Text(extent=[-110, 80; 110, 120], string="%name")), + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 90, 0], style(color=0)), + Line(points=[0, -90; 0, -70]), + Text(extent=[-110, 80; 110, 120], string="%name")), Diagram( - Line(points=[-70, 0; -90, 0], style(color=0)), - Line(points=[0, -90; 0, -70]), + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[0, -90; 0, -70]), Line(points=[70, 0; 90, 0], style(color=0)))); + end RelativeSensor; - partial model VoltageSource "Interface for voltage sources" + + partial model VoltageSource "Interface for voltage sources" extends OnePort; - parameter SIunits.Voltage offset=0 "Voltage offset"; - parameter SIunits.Time startTime=0 "Time offset"; + parameter SI.Voltage offset=0 "Voltage offset"; + parameter SI.Time startTime=0 "Time offset"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Text(extent=[-100, -120; 100, -80], string="%name=%V"), - Line(points=[-50, 0; 50, 0])), + Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Text(extent=[-100, -120; 100, -80], string="%name=%V"), + Line(points=[-50, 0; 50, 0])), Window( - x=0.31, - y=0.09, - width=0.6, + x=0.31, + y=0.09, + width=0.6, height=0.6)); - replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final - offset={offset}, final startTime={startTime}) annotation (extent=[70, - 70; 90, 90]); - equation + replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final offset={offset}, final + startTime={startTime}) annotation (extent=[70, 70; 90, 90]); + equation v = signalSource.outPort.signal[1]; end VoltageSource; - partial model CurrentSource "Interface for current sources" + + partial model CurrentSource "Interface for current sources" extends OnePort; - - parameter SIunits.Current offset=0 "Current offset"; - parameter SIunits.Time startTime=0 "Time offset"; + + parameter SI.Current offset=0 "Current offset"; + parameter SI.Time startTime=0 "Time offset"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Line(points=[0, -50; 0, 50]), - Text(extent=[-100, -120; 100, -80], string="%name=%I")), + Ellipse(extent=[-50, 50; 50, -50], style(color=3, fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Line(points=[0, -50; 0, 50]), + Text(extent=[-100, -120; 100, -80], string="%name=%I")), Window( - x=0.33, - y=0.24, - width=0.6, + x=0.33, + y=0.24, + width=0.6, height=0.6)); - replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final - offset={offset}, final startTime={startTime}) annotation (extent=[69, - 70; 90, 90]); - equation + replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final offset={offset}, final + startTime={startTime}) annotation (extent=[69, 70; 90, 90]); + equation i = signalSource.outPort.signal[1]; end CurrentSource; end Interfaces; diff --git a/Electrical/Analog/Lines.mo b/Electrical/Analog/Lines.mo index fb9a72f5e5..5a3825dd40 100644 --- a/Electrical/Analog/Lines.mo +++ b/Electrical/Analog/Lines.mo @@ -1,31 +1,29 @@ -package Lines +package Lines + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits; annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, width=0.50, height=0.24, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1), + Documentation(info="-This package contains lossy and lossless tranmission lines. +This package contains lossy and lossless segmented transmission lines, +and LC distributed line models.
-Lossy Transmission Line +Lossy Transmission Line. The lossy transmission line OLine consists of segments of lumped resistances and inductances in series and conductances and capacitances that are - connected with the reference pin g. The precision + connected with the reference pin p3. The precision of the model depends on the number N of lumped segments.
@@ -99,7 +94,7 @@ Lossy Transmission Line-The lossy RC line ULine consists of segments of +The lossy RC line ULine consists of segments of lumped series resistances and capacitances that are -connected with the reference pin g. The precision +connected with the reference pin p3. The precision of the model depends on the number N of lumped segments.
@@ -187,7 +180,7 @@ lumped segments.-The simple diode is a two pole. It consists of the diode itself and an parallel ohmic -resistance R. The diode formula is simple: +The simple diode is a one port. It consists of the diode itself and an parallel ohmic +resistance R. The diode formula is:
v/vt @@ -94,6 +90,10 @@ continued to avoid overflow. Line(points=[-90, 0; 40, 0]), Line(points=[40, 0; 90, 0]), Line(points=[30, 40; 30, -40], style(color=3)), + Text( + extent=[-98, -58; 102, -100], + string="Vt=%Vt", + style(color=0)), Text(extent=[-100, 100; 100, 70], string="%name")), Diagram( Polygon(points=[30, 0; -30, 40; -30, -40; 30, 0], style( @@ -110,11 +110,12 @@ continued to avoid overflow. width=0.75, height=0.63)); equation - //assert (R <> 0, "R must not be zero"); - i = if (v/Vt > Maxexp) then Ids*(exp(Maxexp)*(1 + v/Vt - Maxexp) - 1) + v/ - R else Ids*(exp(v/Vt) - 1) + v/R; + i = if (v/Vt > Maxexp) then Ids*(exp(Maxexp)*(1 + v/Vt - Maxexp) - 1) + + v/R else Ids*(exp(v/Vt) - 1) + v/R; end Diode; model PMOS "Simple MOS Transistor" +// 6.12.2001 parameter RDS added, Clauss + annotation ( Documentation(info=" @@ -124,8 +125,8 @@ FET. It differs slightly from the device used in the SPICE simulator. For more details please care for H. Spiro.-The model does not consider capacitances. A small fixed drain-source resistance -is included (to avoid numerical difficulties). +The model does not consider capacitances. A high drain-source resistance RDS +is included to avoid numerical difficulties.
- W L Beta Vt K2 K5 DW DL - m m A/V^2 V - - m m + W L Beta Vt K2 K5 DW DL + m m A/V^2 V - - m m - 50.e-6 8.e-6 .0085 -.15 .41 .839 -3.8e-6 -4.0e-6 - 20.e-6 6.e-6 .0105 -1.0 .41 .839 -2.5e-6 -2.1e-6 - 30.e-6 5.e-6 .0059 -.3 .98 1.01 0 -3.9e-6 - 30.e-6 5.e-6 .0152 -.69 .104 1.1 -.8e-6 -.4e-6 - 30.e-6 5.e-6 .0163 -.69 .104 1.1 -.8e-6 -.4e-6 - 30.e-6 5.e-6 .0182 -.69 .086 1.06 -.1e-6 -.6e-6 - 20.e-6 6.e-6 .0074 -1. .4 .59 0 0 + 50.e-6 8.e-6 .0085e-3 -.15 .41 .839 -3.8e-6 -4.0e-6 + 20.e-6 6.e-6 .0105e-3 -1.0 .41 .839 -2.5e-6 -2.1e-6 + 30.e-6 5.e-6 .0059e-3 -.3 .98 1.01 0 -3.9e-6 + 30.e-6 5.e-6 .0152e-3 -.69 .104 1.1 -.8e-6 -.4e-6 + 30.e-6 5.e-6 .0163e-3 -.69 .104 1.1 -.8e-6 -.4e-6 + 30.e-6 5.e-6 .0182e-3 -.69 .086 1.06 -.1e-6 -.6e-6 + 20.e-6 6.e-6 .0074e-3 -1. .4 .59 0 0"), @@ -187,15 +188,16 @@ Some typical parameter sets are: Interfaces.Pin S "Source" annotation (extent=[90, -40; 110, -60]); Interfaces.Pin B "Bulk" annotation (extent=[90, -10; 110, 10]); - parameter SIunits.Length W=50.0e-6 "Width"; - parameter SIunits.Length L=8.0e-6 "Length"; - parameter SIunits.Transconductance Beta=0.0085 + parameter SIunits.Length W=20.0e-6 "Width"; + parameter SIunits.Length L=6.0e-6 "Length"; + parameter SIunits.Transconductance Beta=0.0105e-3 "Transconductance parameter"; - parameter SIunits.Voltage Vt=-0.15 "Zero bias threshold voltage"; + parameter SIunits.Voltage Vt=-1.0 "Zero bias threshold voltage"; parameter Real K2=0.41 "Bulk threshold parameter"; parameter Real K5=0.839 "Reduction of pinch-off region"; - parameter SIunits.Length dW=-3.8e-6 "Narrowing of channel"; - parameter SIunits.Length dL=-4.0e-6 "Shortening of channel"; + parameter SIunits.Length dW=-2.5e-6 "Narrowing of channel"; + parameter SIunits.Length dL=-2.1e-6 "Shortening of channel"; + parameter SIunits.Resistance RDS=1.e+7 "Drain-Source-Resistance"; protected Real v; Real uds; @@ -204,24 +206,26 @@ Some typical parameter sets are: Real ud; Real us; Real id; + Real gds; equation //assert (L + dL > 0, "Effective length must be positive"); //assert (W + dW > 0, "Effective width must be positive"); + gds = if (RDS < 1.e-20 and RDS > -1.e-20) then 1.e20 else 1/RDS; v = Beta*(W + dW)/(L + dL); ud = if (D.v > S.v) then S.v else D.v; us = if (D.v > S.v) then D.v else S.v; uds = ud - us; ubs = if (B.v < us) then 0 else B.v - us; ugst = (G.v - us - Vt + K2*ubs)*K5; - id = if (ugst >= 0) then v*uds*1.e-7 else if (ugst < uds) then -v*uds*( - ugst - uds/2 - 1.e-7) else -v*(ugst*ugst/2 - uds*1.e-7); + id = if (ugst >= 0) then v*uds*gds else if (ugst < uds) then -v*uds*( + ugst - uds/2 - gds) else -v*(ugst*ugst/2 - uds*gds); G.i = 0; D.i = if (D.v > S.v) then -id else id; S.i = if (D.v > S.v) then id else -id; B.i = 0; end PMOS; model NMOS "Simple MOS Transistor" - +// 6.12.2001 parameter RDS added, Clauss annotation ( Documentation(info=" @@ -231,32 +235,32 @@ FET. It differs slightly from the device used in the SPICE simulator. For more details please care for H. Spiro.
-The model does not consider capacitances. A small fixed drain-source resistance -is included (to avoid numerical difficulties). +The model does not consider capacitances. A high drain-source resistance RDS +is included to avoid numerical difficulties.
- W L Beta Vt K2 K5 DW DL - m m A/V^2 V - - m m + W L Beta Vt K2 K5 DW DL + m m A/V^2 V - - m m - 12.e-6 4.e-6 .062 -4.5 .24 .61 -1.2e-6 -.9e-6 depletion - 60.e-6 3.e-6 .048 .1 .08 .68 -1.2e-6 -.9e-6 enhancement - 12.e-6 4.e-6 .0625 -.8 .21 .78 -1.2e-6 -.9e-6 zero - 50.e-6 8.e-6 .0299 .24 1.144 .7311 -5.4e-6 -4.e-6 - 20.e-6 6.e-6 .041 .8 1.144 .7311 -2.5e-6 -1.5e-6 - 30.e-6 9.e-6 .025 -4. .861 .878 -3.4e-6 -1.74e-6 - 30.e-6 5.e-6 .031 .6 1.5 .72 0 -3.9e-6 - 50.e-6 6.e-6 .0414 -3.8 .34 .8 -1.6e-6 -2.e-6 depletion - 50.e-6 5.e-6 .03 .37 .23 .86 -1.6e-6 -2.e-6 enhancement - 50.e-6 6.e-6 .038 -.9 .23 .707 -1.6e-6 -2.e-6 zero - 20.e-6 4.e-6 .06776 .5409 .065 .71 -.8e-6 -.2e-6 - 20.e-6 4.e-6 .06505 .6209 .065 .71 -.8e-6 -.2e-6 - 20.e-6 4.e-6 .05365 .6909 .03 .8 -.3e-6 -.2e-6 - 20.e-6 4.e-6 .05365 .4909 .03 .8 -.3e-6 -.2e-6 - 12.e-6 4.e-6 .023 -4.5 .29 .6 0 0 depletion - 60.e-6 3.e-6 .022 .1 .11 .65 0 0 enhancement - 12.e-6 4.e-6 .038 -.8 .33 .6 0 0 zero - 20.e-6 6.e-6 .022 .8 1 .66 0 0 + 12.e-6 4.e-6 .062e-3 -4.5 .24 .61 -1.2e-6 -.9e-6 depletion + 60.e-6 3.e-6 .048e-3 .1 .08 .68 -1.2e-6 -.9e-6 enhancement + 12.e-6 4.e-6 .0625e-3 -.8 .21 .78 -1.2e-6 -.9e-6 zero + 50.e-6 8.e-6 .0299e-3 .24 1.144 .7311 -5.4e-6 -4.e-6 + 20.e-6 6.e-6 .041e-3 .8 1.144 .7311 -2.5e-6 -1.5e-6 + 30.e-6 9.e-6 .025e-3 -4. .861 .878 -3.4e-6 -1.74e-6 + 30.e-6 5.e-6 .031e-3 .6 1.5 .72 0 -3.9e-6 + 50.e-6 6.e-6 .0414e-3 -3.8 .34 .8 -1.6e-6 -2.e-6 depletion + 50.e-6 5.e-6 .03e-3 .37 .23 .86 -1.6e-6 -2.e-6 enhancement + 50.e-6 6.e-6 .038e-3 -.9 .23 .707 -1.6e-6 -2.e-6 zero + 20.e-6 4.e-6 .06776e-3 .5409 .065 .71 -.8e-6 -.2e-6 + 20.e-6 4.e-6 .06505e-3 .6209 .065 .71 -.8e-6 -.2e-6 + 20.e-6 4.e-6 .05365e-3 .6909 .03 .8 -.3e-6 -.2e-6 + 20.e-6 4.e-6 .05365e-3 .4909 .03 .8 -.3e-6 -.2e-6 + 12.e-6 4.e-6 .023e-3 -4.5 .29 .6 0 0 depletion + 60.e-6 3.e-6 .022e-3 .1 .11 .65 0 0 enhancement + 12.e-6 4.e-6 .038e-3 -.8 .33 .6 0 0 zero + 20.e-6 6.e-6 .022e-3 .8 1 .66 0 0
-
"), Coordsys( @@ -442,17 +445,17 @@ stability problems within the solver. vbc = B.v - C.v; vbe = B.v - E.v; qbk = 1 - vbc*Vak; - - ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc* - Gbc else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc - *Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; - ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe* - Gbe else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe - *Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; - Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - - vbc/Phic, -Mc); - Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - - vbe/Phie, -Me); + + ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc*Gbc + else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc* + Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; + ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe*Gbe + else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe* + Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; + Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - vbc + /Phic, -Mc); + Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - vbe + /Phie, -Me); cbc = if (vbc/Vt < EMin) then Taur*Is/Vt*ExMin*(vbc/Vt - EMin + 1) + Capcjc else if (vbc/Vt > EMax) then Taur*Is/Vt*ExMax*(vbc/Vt - EMax + 1) + Capcjc else Taur*Is/Vt*exp(vbc/Vt) + Capcjc; @@ -467,23 +470,19 @@ stability problems within the solver. model PNP "Simple BJT according to Ebers-Moll" parameter Real Bf=50 "Forward beta"; parameter Real Br=0.1 "Reverse beta"; - parameter SIunits.Current Is=1.e-16 - "Transport saturation current"; - parameter SIunits.InversePotential Vak=0.02 + parameter SIunits.Current Is=1.e-16 "Transport saturation current"; + parameter SIunits.InversePotential Vak=0.02 "Early voltage (inverse), 1/Volt"; parameter SIunits.Time Tauf=0.12e-9 "Ideal forward transit time"; parameter SIunits.Time Taur=5e-9 "Ideal reverse transit time"; - parameter SIunits.Capacitance Ccs=1e-12 - "Collector-substrat(ground) cap."; - parameter SIunits.Capacitance Cje=0.4e-12 + parameter SIunits.Capacitance Ccs=1e-12 "Collector-substrat(ground) cap."; + parameter SIunits.Capacitance Cje=0.4e-12 "Base-emitter zero bias depletion cap."; parameter SIunits.Capacitance Cjc=0.5e-12 "Base-coll. zero bias depletion cap."; - parameter SIunits.Voltage Phie=0.8 - "Base-emitter diffusion voltage"; + parameter SIunits.Voltage Phie=0.8 "Base-emitter diffusion voltage"; parameter Real Me=0.4 "Base-emitter gradation exponent"; - parameter SIunits.Voltage Phic=0.8 - "Base-collector diffusion voltage"; + parameter SIunits.Voltage Phic=0.8 "Base-collector diffusion voltage"; parameter Real Mc=0.333 "Base-collector gradation exponent"; parameter SIunits.Conductance Gbc=1e-15 "Base-collector conductance"; parameter SIunits.Conductance Gbe=1e-15 "Base-emitter conductance"; @@ -502,6 +501,13 @@ stability problems within the solver. Real ExMax; Real Capcje; Real Capcjc; + function pow "Just a helper function for x^y" + input Real x; + input Real y; + output Real z; + algorithm + z:=x^y; + end pow; annotation ( Documentation(info=" @@ -525,12 +531,6 @@ Van Nostrand Reinhold, New York 1983 on page 317 ff.
-
"), Coordsys( @@ -569,27 +569,28 @@ stability problems within the solver. vbc = C.v - B.v; vbe = E.v - B.v; qbk = 1 - vbc*Vak; - - ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc* - Gbc else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc - *Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; - ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe* - Gbe else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe - *Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; + ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc*Gbc + else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc* + Gbc else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; + + ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe*Gbe + else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe* + Gbe else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; - Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - - vbc/Phic, -Mc); - Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - - vbe/Phie, -Me); + Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - vbc + /Phic, -Mc); + Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - vbe + /Phie, -Me); cbc = if (vbc/Vt < EMin) then Taur*Is/Vt*ExMin*(vbc/Vt - EMin + 1) + Capcjc else if (vbc/Vt > EMax) then Taur*Is/Vt*ExMax*(vbc/Vt - EMax + 1) + Capcjc else Taur*Is/Vt*exp(vbc/Vt) + Capcjc; cbe = if (vbe/Vt < EMin) then Tauf*Is/Vt*ExMin*(vbe/Vt - EMin + 1) + Capcje else if (vbe/Vt > EMax) then Tauf*Is/Vt*ExMax*(vbe/Vt - EMax + 1) + Capcje else Tauf*Is/Vt*exp(vbe/Vt) + Capcje; - C.i = -((ibe - ibc)*qbk - ibc/Br - cbc*der(vbc) + Ccs*der(C.v)); + C.i = -((ibe - ibc)*qbk - ibc/Br - cbc*der(vbc) - Ccs*der(C.v)); B.i = -(ibe/Bf + ibc/Br + cbe*der(vbe) + cbc*der(vbc)); - E.i = -B.i - C.i - Ccs*der(C.v); + E.i = -B.i - C.i + Ccs*der(C.v); end PNP; end Semiconductors; + diff --git a/Electrical/Analog/Sensors.mo b/Electrical/Analog/Sensors.mo index 8b3199b9ac..16bbcbff3d 100644 --- a/Electrical/Analog/Sensors.mo +++ b/Electrical/Analog/Sensors.mo @@ -1,12 +1,8 @@ -package Sensors +package Sensors + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - + annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, @@ -14,8 +10,7 @@ package Sensors height=0.24, library=1, autolayout=1), - Documentation(info=" - + Documentation(info="
This package contains potential, voltage, and current sensors.
@@ -24,9 +19,9 @@ This package contains potential, voltage, and current sensors.")); - - model PotentialSensor "Sensor to measure the potential" - extends Modelica.Electrical.Analog.Interfaces.AbsoluteSensor; - SIunits.ElectricPotential phi "Absolute voltage potential"; + + model PotentialSensor "Sensor to measure the potential" + extends Interfaces.AbsoluteSensor; + SI.ElectricPotential phi "Absolute voltage potential"; annotation ( - Diagram, Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon(Text( - extent=[-29, -11; 30, -70], - string="V", - style(color=0))), + extent=[-29, -11; 30, -70], + string="V", + style(color=0))), Window( - x=0.4, - y=0.32, - width=0.6, + x=0.4, + y=0.32, + width=0.6, height=0.6)); - equation + equation p.i = 0; phi = p.v; phi = outPort.signal[1]; end PotentialSensor; - - model VoltageSensor "Sensor to measure the voltage between two pins" - extends Modelica.Electrical.Analog.Interfaces.RelativeSensor; - SIunits.Voltage v "Voltage between pin p and n (= p.v - n.v)"; + + model VoltageSensor "Sensor to measure the voltage between two pins" + extends Interfaces.RelativeSensor; + SI.Voltage v "Voltage between pin p and n (= p.v - n.v)"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.28, - y=0.29, - width=0.6, - height=0.6), + x=0.28, + y=0.29, + width=0.6, + height=0.6), Icon(Text( - extent=[-29, -11; 30, -70], - string="V", + extent=[-29, -11; 30, -70], + string="V", style(color=0)))); - equation + equation p.i = 0; n.i = 0; v = p.v - n.v; v = outPort.signal[1]; end VoltageSensor; - - model CurrentSensor "Sensor to measure the current in a branch" - extends Modelica.Electrical.Analog.Interfaces.RelativeSensor; - SIunits.Current i "current in the branch from p to n"; + + model CurrentSensor "Sensor to measure the current in a branch" + extends Interfaces.RelativeSensor; + SI.Current i "current in the branch from p to n"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.23, - y=0.07, - width=0.6, - height=0.6), + x=0.23, + y=0.07, + width=0.6, + height=0.6), Icon(Text( - extent=[-29, -11; 30, -70], - string="A", + extent=[-29, -11; 30, -70], + string="A", style(color=0)))); - equation + equation p.v = n.v; p.i = i; n.i = -i; i = outPort.signal[1]; end CurrentSensor; - + end Sensors; diff --git a/Electrical/Analog/Sources.mo b/Electrical/Analog/Sources.mo index e88583045b..3d509a0d79 100644 --- a/Electrical/Analog/Sources.mo +++ b/Electrical/Analog/Sources.mo @@ -1,19 +1,15 @@ -package Sources +package Sources + extends Modelica.Icons.Library; + annotation ( - Coordsys( - extent=[0, 0; 400, 500], - grid=[1, 1], - component=[20, 20]), Window( x=0.03, y=0.04, width=0.50, height=0.60, library=1, - autolayout=1), - Documentation(info=" - + autolayout=1),Documentation(info="
This package contains time-dependend and controlled voltage and current sources.
@@ -22,9 +18,9 @@ This package contains time-dependend and controlled voltage and current sources.")); - - model SignalVoltage - "Generic voltage source using the input signal as source voltage" - extends Modelica.Electrical.Analog.Interfaces.OnePort; - + + model SignalVoltage + "Generic voltage source using the input signal as source voltage" + extends Interfaces.OnePort; + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-50, 50; 50, -50], style(fillColor=7)), - Line(points=[-90, 0; -50, 0]), - Line(points=[50, 0; 90, 0]), - Line(points=[-50, 0; 50, 0]), - Text(extent=[-100, -120; 100, -80], string="%name")), + Ellipse(extent=[-50, 50; 50, -50], style(fillColor=7)), + Line(points=[-90, 0; -50, 0]), + Line(points=[50, 0; 90, 0]), + Line(points=[-50, 0; 50, 0]), + Text(extent=[-100, -120; 100, -80], string="%name")), Window( - x=0.36, - y=0.03, - width=0.62, + x=0.36, + y=0.03, + width=0.62, height=0.76)); - Modelica.Blocks.Interfaces.InPort inPort(final n=1) annotation (extent=[- - 20, 50; 20, 90], rotation=-90); - equation + Modelica.Blocks.Interfaces.InPort inPort(final n=1) annotation (extent=[-20, 50; 20, 90], rotation + =-90); + equation inPort.signal[1] = v; end SignalVoltage; - - model ConstantVoltage "Source for constant voltage" - parameter Modelica.SIunits.Voltage V=1 "Value of constant voltage"; - extends Modelica.Electrical.Analog.Interfaces.OnePort; + + model ConstantVoltage "Source for constant voltage" + parameter SI.Voltage V=1 "Value of constant voltage"; + extends Interfaces.OnePort; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.33, - y=0.18, - width=0.6, - height=0.6), + x=0.33, + y=0.18, + width=0.6, + height=0.6), Icon( - Line(points=[-90, 0; -10, 0]), - Line(points=[-10, 60; -10, -60]), - Line(points=[0, 30; 0, -30]), - Line(points=[0, 0; 90, 0]), - Text(extent=[-100, -120; 100, -80], string="%name=%V")), + Line(points=[-90, 0; -10, 0]), + Line(points=[-10, 60; -10, -60]), + Line(points=[0, 30; 0, -30]), + Line(points=[0, 0; 90, 0]), + Text(extent=[-100, -120; 100, -80], string="%name=%V")), Diagram( - Line(points=[-90, 0; -10, 0]), - Line(points=[-10, 60; -10, -60]), - Line(points=[0, 30; 0, -30]), + Line(points=[-90, 0; -10, 0]), + Line(points=[-10, 60; -10, -60]), + Line(points=[0, 30; 0, -30]), Line(points=[0, 0; 90, 0]))); - equation + equation v = V; end ConstantVoltage; - - model StepVoltage "Step voltage source" - parameter Modelica.SIunits.Voltage V=1 "Height of step"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Step signalSource(height={V})); + + model StepVoltage "Step voltage source" + parameter SI.Voltage V=1 "Height of step"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Step signalSource(height={V} + )); annotation ( - Icon(Line(points=[-70, -70; 0, -70; 0, 70; 69, 70], style(color=8))), + Icon(Line(points=[-70, -70; 0, -70; 0, 70; 69, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, - thickness=2)), - Line(points=[-90, -70; 82, -70], style(color=8)), - Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, - fillColor=8)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Text( - extent=[-21, -72; 25, -90], - string="startTime", - style(color=9)), - Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), - Text( - extent=[-68, -36; -22, -54], - string="offset", - style(color=9)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-80, -18; 0, -18; 0, 50; 80, 50], style(color=0, thickness + =2)), + Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style(color=8, + fillColor=8)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Text( + extent=[-21, -72; 25, -90], + string="startTime", + style(color=9)), + Line(points=[0, -17; 0, -71], style(color=8, pattern=2)), + Text( + extent=[-68, -36; -22, -54], + string="offset", + style(color=9)), Line(points=[-13, 50; -13, -17], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), - Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[2, 50; -19, 50; 2, 50], style(color=8, pattern=2)), + Polygon(points=[-13, -17; -16, -4; -10, -4; -13, -17; -13, -17], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-13, 50; -16, 37; -9, 37; -13, 50], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-68, 26; -22, 8], - string="V", - style(color=9)), - Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-68, 26; -22, 8], + string="V", + style(color=9)), + Polygon(points=[-13, -69; -16, -56; -10, -56; -13, -69; -13, -69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-13, -18; -13, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-13, -18; -16, -31; -9, -31; -13, -18], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-67, 93; -2, 67], - string="v = p.v - n.v", - style(color=9))), + extent=[-67, 93; -2, 67], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.28, - y=0, - width=0.72, + x=0.28, + y=0, + width=0.72, height=0.73)); end StepVoltage; - - model RampVoltage "Ramp voltage source" - parameter Modelica.SIunits.Voltage V=1 "Height of ramp"; - parameter Modelica.SIunits.Time duration(min=Modelica.Constants.SMALL) = 2 - "Duration of ramp"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Ramp signalSource(final height={V}, final - duration={duration})); + + model RampVoltage "Ramp voltage source" + parameter SI.Voltage V=1 "Height of ramp"; + parameter SI.Time duration(min=Modelica.Constants.small) = 2 "Duration of ramp"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Ramp signalSource(final + height={V}, final duration={duration})); annotation ( Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), Line(points=[-80, -20; -20, -20; 50, 50], style(color=0, thickness=2)) - , - Line(points=[-90, -70; 82, -70], style(color=8)), + , + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-40, -20; -42, -30; -37, -30; -40, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -20; -40, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-80, -33; -41, -49], - string="offset", - style(color=9)), - Text( - extent=[-40, -70; 6, -88], - string="startTime", - style(color=9)), - Text( - extent=[-67, 93; -2, 67], - string="v = p.v - n.v", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-80, -33; -41, -49], + string="offset", + style(color=9)), + Text( + extent=[-40, -70; 6, -88], + string="startTime", + style(color=9)), + Text( + extent=[-67, 93; -2, 67], + string="v = p.v - n.v", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), Line(points=[-19, -20; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[50, 50; 101, 50], style(color=0, thickness=2)), Line(points=[50, 50; 50, -20], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[50, -20; 42, -18; 42, -22; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-20, -20; -11, -18; -11, -22; -20, -20], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, 50; 48, 40; 53, 40; 50, 50], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[50, -20; 47, -10; 52, -10; 50, -20; 50, -20], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[53, 25; 82, 7], - string="V", - style(color=9)), - Text( - extent=[0, -17; 35, -37], - string="duration", - style(color=9))), - Icon(Line(points=[-80, -60; -50, -60; 50, 60; 80, 60], style(color=8))) - , + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[53, 25; 82, 7], + string="V", + style(color=9)), + Text( + extent=[0, -17; 35, -37], + string="duration", + style(color=9))), + Icon(Line(points=[-80, -60; -50, -60; 50, 60; 80, 60], style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.29, - y=0.11, - width=0.6, + x=0.29, + y=0.11, + width=0.6, height=0.6)); end RampVoltage; - - model SineVoltage "Sine voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; - parameter Modelica.SIunits.Frequency freqHz=1 "Frequency of sine wave"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Sine signalSource( - amplitude={V}, - freqHz={freqHz}, - phase={phase}, - offset={offset}, - startTime={startTime})); + + model SineVoltage "Sine voltage source" + parameter SI.Voltage V=1 "Amplitude of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Frequency freqHz=1 "Frequency of sine wave"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Sine signalSource( + amplitude={V}, + freqHz={freqHz}, + phase={phase})); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.37, - y=0.06, - width=0.6, - height=0.6), - Icon(Line(points=[-70, 0; -60.2, 29.9; -53.8, 46.5; -48.2, 58.1; -43.3, - 65.2; -38.3, 69.2; -33.4, 69.8; -28.5, 67; -23.6, 61; -18.6, 52; + x=0.37, + y=0.06, + width=0.6, + height=0.6), + Icon(Line(points=[-70, 0; -60.2, 29.9; -53.8, 46.5; -48.2, 58.1; -43.3, + 65.2; -38.3, 69.2; -33.4, 69.8; -28.5, 67; -23.6, 61; -18.6, 52; -13, 38.6; -5.98, 18.6; 8.79, -26.9; 15.1, -44; 20.8, -56.2; 25.7 , -64; 30.6, -68.6; 35.5, -70; 40.5, -67.9; 45.4, -62.5; 50.3, - - 54.1; 55.9, -41.3; 63, -21.7; 70, 0], style(color=8))), + 54.1; 55.9, -41.3; 63, -21.7; 70, 0], style(color=8))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, - 74.6; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, - 59.4; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2 - ; 42, -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; - 63.1, -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, - thickness=2)), - Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), - Text( - extent=[-106, -11; -60, -29], - string="offset", - style(color=9)), - Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), - Text( - extent=[-60, -43; -14, -61], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), - Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-40, 0; -31.6, 34.2; -26.1, 53.1; -21.3, 66.4; -17.1, 74.6 + ; -12.9, 79.1; -8.64, 79.8; -4.42, 76.6; -0.201, 69.7; 4.02, 59.4 + ; 8.84, 44.1; 14.9, 21.2; 27.5, -30.8; 33, -50.2; 37.8, -64.2; 42 + , -73.1; 46.2, -78.4; 50.5, -80; 54.7, -77.6; 58.9, -71.5; 63.1, + -61.9; 67.9, -47.2; 74, -24.8; 80, 0], style(color=0, thickness=2 + )), + Line(points=[-41, -2; -80, -2], style(color=0, thickness=2)), + Text( + extent=[-106, -11; -60, -29], + string="offset", + style(color=9)), + Line(points=[-41, -2; -41, -40], style(color=8, pattern=2)), + Text( + extent=[-60, -43; -14, -61], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Line(points=[-9, 79; 43, 79], style(color=8, pattern=2)), + Line(points=[-42, -1; 50, 0], style(color=8, pattern=2)), Polygon(points=[33, 80; 30, 67; 37, 67; 33, 80], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[37, 57; 83, 39], - string="V", - style(color=9)), + extent=[37, 57; 83, 39], + string="V", + style(color=9)), Polygon(points=[33, 1; 30, 14; 36, 14; 33, 1; 33, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[33, 79; 33, 0], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Text( - extent=[-69, 109; -4, 83], - string="v = p.v - n.v", + extent=[-69, 109; -4, 83], + string="v = p.v - n.v", style(color=9)))); end SineVoltage; - - model ExpSineVoltage "Exponentially damped sine voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of sine wave"; - parameter Modelica.SIunits.Frequency freqHz=2 "Frequency of sine wave"; - parameter Modelica.SIunits.Angle phase=0 "Phase of sine wave"; - parameter Modelica.SIunits.Damping damping=1 - "Damping coefficient of sine wave"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.ExpSine signalSource( - amplitude={V}, - freqHz={freqHz}, - phase={phase}, - damping={damping}, - offset={offset}, - startTime={startTime})); + + model ExpSineVoltage "Exponentially damped sine voltage source" + parameter SI.Voltage V=1 "Amplitude of sine wave"; + parameter SI.Frequency freqHz=2 "Frequency of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Damping damping=1 "Damping coefficient of sine wave"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.ExpSine signalSource( + amplitude={V}, + freqHz={freqHz}, + phase={phase}, + damping={damping})); annotation ( - Icon(Line(points=[-80, -14; -75.2, 18.3; -72, 36.3; -68.7, 50.5; -65.5, - 60.2; -62.3, 65.3; -59.1, 65.6; -55.9, 61.3; -52.7, 53.1; -48.6, + Icon(Line(points=[-80, -14; -75.2, 18.3; -72, 36.3; -68.7, 50.5; -65.5, + 60.2; -62.3, 65.3; -59.1, 65.6; -55.9, 61.3; -52.7, 53.1; -48.6, 38.2; -43, 11.8; -35, -27.9; -30.2, -47.7; -26.1, -59.9; -22.1, - - 67.2; -18.1, -69.3; -14.1, -66.5; -10.1, -59.3; -5.23, -46.1; - 8.44, -0.3; 13.3, 12.4; 18.1, 20.8; 22.1, 24; 26.9, 23.2; 31.8, + 67.2; -18.1, -69.3; -14.1, -66.5; -10.1, -59.3; -5.23, -46.1; + 8.44, -0.3; 13.3, 12.4; 18.1, 20.8; 22.1, 24; 26.9, 23.2; 31.8, 17.8; 38.2, 5.4; 51.1, -24.5; 57.5, -35.2; 63.1, -39.9; 68.7, - - 39.9; 75.2, -34.5; 80, -27.8], style(color=8))), + 39.9; 75.2, -34.5; 80, -27.8], style(color=8))), Diagram( - Line(points=[-80, -90; -80, 84], style(color=8)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)), - Line(points=[-99, -40; 85, -40], style(color=8)), - Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, - fillColor=8)), - Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9 - ; -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - -19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, - - 46.5; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, - 12; 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46 - , 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - -18; 80, -12.1], style(color=0, thickness=2)), - Text( - extent=[-78, 1; -55, -19], - string="offset", - style(color=9)), - Text( - extent=[-72, -36; -26, -54], - string="startTime", - style(color=9)), - Text( - extent=[84, -52; 108, -72], - string="time", - style(color=9)), - Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), - Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), - Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), - Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), - Line(points=[18, 73; -50, 73], style(color=8)), - Text( - extent=[-42, 88; 9, 74], - string="1/freqHz", - style(color=9)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)), + Line(points=[-99, -40; 85, -40], style(color=8)), + Polygon(points=[101, -40; 85, -34; 85, -46; 101, -40], style(color=8, + fillColor=8)), + Line(points=[-50, 0; -46.1, 28.2; -43.5, 44; -40.9, 56.4; -38.2, 64.9; + -35.6, 69.4; -33, 69.6; -30.4, 65.9; -27.8, 58.7; -24.5, 45.7; - + 19.9, 22.5; -13.4, -12.2; -9.5, -29.5; -6.23, -40.1; -2.96, -46.5 + ; 0.302, -48.4; 3.57, -45.9; 6.83, -39.6; 10.8, -28.1; 21.9, 12; + 25.8, 23.1; 29.7, 30.5; 33, 33.3; 36.9, 32.5; 40.8, 27.8; 46, + 16.9; 56.5, -9.2; 61.7, -18.6; 66.3, -22.7; 70.9, -22.6; 76.1, - + 18; 80, -12.1], style(color=0, thickness=2)), + Text( + extent=[-78, 1; -55, -19], + string="offset", + style(color=9)), + Text( + extent=[-72, -36; -26, -54], + string="startTime", + style(color=9)), + Text( + extent=[84, -52; 108, -72], + string="time", + style(color=9)), + Line(points=[-50, 0; 18, 0], style(color=8, pattern=2)), + Line(points=[-50, 0; -81, 0], style(color=0, thickness=2)), + Line(points=[-50, 77; -50, 0], style(color=8, pattern=2)), + Line(points=[18, -1; 18, 76], style(color=8, pattern=2)), + Line(points=[18, 73; -50, 73], style(color=8)), + Text( + extent=[-42, 88; 9, 74], + string="1/freqHz", + style(color=9)), Polygon(points=[-49, 73; -40, 75; -40, 71; -49, 73], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[18, 73; 10, 75; 10, 71; 18, 73], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-50, -61; -19, -61], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-50, -61; -19, -61], style(color=8)), Polygon(points=[-18, -61; -26, -59; -26, -63; -18, -61], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-51, -63; -27, -75], - string="t", - style(color=9)), - Text( - extent=[-82, -67; 108, -96], - string="V*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", - style(color=9)), - Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), - Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), - Line(points=[18, -76; -1, -48], style(color=8, pattern=2)), - Text( - extent=[-77, 105; -38, 92], - string="v = p.v - n.v", - style(color=9))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-51, -63; -27, -75], + string="t", + style(color=9)), + Text( + extent=[-82, -67; 108, -96], + string="V*exp(-damping*t)*sin(2*pi*freqHz*t+phase)", + style(color=9)), + Line(points=[-50, 0; -50, -40], style(color=8, pattern=2)), + Line(points=[-50, -54; -50, -72], style(color=8, pattern=2)), + Line(points=[18, -76; -1, -48], style(color=8, pattern=2)), + Text( + extent=[-77, 105; -38, 92], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.33, - y=0.06, - width=0.6, + x=0.33, + y=0.06, + width=0.6, height=0.75)); end ExpSineVoltage; - - model ExponentialsVoltage " Rising and falling exponential voltage source" + + model ExponentialsVoltage " Rising and falling exponential voltage source" parameter Real vMax=1 "Upper bound for rising edge"; - parameter Modelica.SIunits.Time riseTime(min=0) = 0.5 "Rise time"; - parameter Modelica.SIunits.Time riseTimeConst(min=Modelica.Constants.SMALL - ) = 0.1 "Rise time constant"; - parameter Modelica.SIunits.Time fallTimeConst(min=Modelica.Constants.SMALL - ) = riseTimeConst "Fall time constant"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Exponentials signalSource( - outMax={vMax}, - riseTime={riseTime}, - riseTimeConst={riseTimeConst}, + parameter SI.Time riseTime(min=0) = 0.5 "Rise time"; + parameter SI.Time riseTimeConst(min=Modelica.Constants.small) = 0.1 + "Rise time constant"; + parameter SI.Time fallTimeConst(min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Exponentials signalSource( + outMax={vMax}, + riseTime={riseTime}, + riseTimeConst={riseTimeConst}, fallTimeConst={fallTimeConst})); annotation ( Icon(Line(points=[-76, -59; -73.2, -44.3; -70.3, -31.1; -66.8, -16.6; - 63.3, -4; -59.7, 6.92; -55.5, 18.18; -51.3, 27.7; -46.3, 37; - 40.6, 45.5; -34.3, 53.1; -27.2, 59.6; -18.7, 65.3; -8.1, 70.2; -6 - , 71; -3.88, 58.5; -1.05, 43.7; 1.78, 30.8; 4.606, 19.45; 8.14, + , 71; -3.88, 58.5; -1.05, 43.7; 1.78, 30.8; 4.606, 19.45; 8.14, 7.3; 11.68, -3; 15.9, -13.2; 20.2, -21.6; 25.1, -29.5; 30.8, - 36.4; 37.1, -42.3; 44.9, -47.5; 54.8, -51.8; 64, -54.4], style( - color=8))), + color=8))), Diagram( - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-70, 91; -29, 71], - string="outPort", - style(color=9)), - Text( - extent=[-78, -43; -46, -56], - string="offset", - style(color=9)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-70, 91; -29, 71], + string="outPort", + style(color=9)), + Text( + extent=[-78, -43; -46, -56], + string="offset", + style(color=9)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), - Text( - extent=[78, -76; 102, -96], - string="time", - style(color=9)), - Line(points=[-100, -70; 84, -70], style(color=8)), - Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, - fillColor=8)), - Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, - 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, - 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), + Text( + extent=[78, -76; 102, -96], + string="time", + style(color=9)), + Line(points=[-100, -70; 84, -70], style(color=8)), + Polygon(points=[100, -70; 84, -64; 84, -76; 100, -70], style(color=8, + fillColor=8)), + Line(points=[-40, -30; -37.2, -15.3; -34.3, -2.1; -30.8, 12.4; -27.3, + 25; -23.7, 35.92; -19.5, 47.18; -15.3, 56.7; -10.3, 66; -4.6, + 74.5; 1.7, 82.1; 8.8, 88.6; 17.3, 94.3; 27.9, 99.2; 30, 100; 32.12, 87.5; 34.95, 72.7; 37.78, 59.8; 40.606, 48.45; 44.14, 36.3 ; 47.68, 26; 51.9, 15.8; 56.2, 7.4; 61.1, -0.5; 66.8, -7.4; 73.1 - , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, - thickness=2)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Text( - extent=[-70, 91; -29, 71], - string="outPort", - style(color=9)), - Text( - extent=[-78, -43; -46, -56], - string="offset", - style(color=9)), - Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], + , -13.3; 80.9, -18.5; 90.8, -22.8; 100, -25.4], style(color=0, + thickness=2)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Text( + extent=[-70, 91; -29, 71], + string="outPort", + style(color=9)), + Text( + extent=[-78, -43; -46, -56], + string="offset", + style(color=9)), + Polygon(points=[-40, -70; -43, -60; -38, -60; -40, -70; -40, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -29; -40, -60], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[-40, -30; -42, -40; -37, -40; -40, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), - Text( - extent=[-59, -71; -13, -89], - string="startTime", - style(color=9)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-39, -30; -80, -30], style(color=0, thickness=2)), + Text( + extent=[-59, -71; -13, -89], + string="startTime", + style(color=9)), Polygon(points=[-41, -30; -32, -28; -32, -32; -41, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-40, -30; 29, -30], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), + color=8, + pattern=1, + thickness=1, + arrow=0)), Polygon(points=[29, -30; 21, -28; 21, -32; 29, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-26, -12; 19, -28], - string="riseTime", - style(color=9)), - Text( - extent=[78, -76; 102, -96], - string="time", - style(color=9)), - Line(points=[30, 100; 30, -34], style(color=8, pattern=2))), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-26, -12; 19, -28], + string="riseTime", + style(color=9)), + Text( + extent=[78, -76; 102, -96], + string="time", + style(color=9)), + Line(points=[30, 100; 30, -34], style(color=8, pattern=2))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.11, - y=0.12, - width=0.78, + x=0.11, + y=0.12, + width=0.78, height=0.83)); end ExponentialsVoltage; - - model PulseVoltage "Pulse voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of pulse"; + + model PulseVoltage "Pulse voltage source" + parameter SI.Voltage V=1 "Amplitude of pulse"; parameter Real width( - final min=Modelica.Constants.SMALL, + final min=Modelica.Constants.small, final max=100) = 50 "Width of pulse in % of period"; - parameter Modelica.SIunits.Time period(final min=Modelica.Constants.SMALL) - = 1 "Time for one period"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Pulse signalSource( - amplitude={V}, - width={width}, + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Pulse signalSource( + amplitude={V}, + width={width}, period={period})); annotation ( - Icon(Line(points=[-70, -70; -40, -70; -40, 70; 0, 70; 0, -70; 40, -70; - 41, 70; 80, 70], style(color=8))), + Icon(Line(points=[-70, -70; -40, -70; -40, 70; 0, 70; 0, -70; 40, -70; 41 + , 70; 80, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, -12; -30, -12; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -1; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-33, -70; -36, -57; -30, -57; -33, -70; -33, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), - Line(points=[-80, 0; -20, 0; -21, 50; 21, 50; 20, -1; 41, 0; 40, 50; - 80, 51], style(color=0, thickness=2)), - Line(points=[-19, 88; -19, 49], style(color=8, pattern=2)), - Line(points=[21, 74; 21, 50], style(color=9, pattern=2)), - Line(points=[41, 88; 41, 50], style(color=8, pattern=2)), - Line(points=[-19, 83; 42, 83], style(color=8)), - Line(points=[-19, 69; 21, 69], style(color=8)), - Text( - extent=[-9, 97; 37, 85], - string="period", - style(color=9)), - Text( - extent=[-18, 81; 21, 69], - string="width", - style(color=9)), - Line(points=[-52, 50; -19, 50], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, 0; -10, -70], style(color=8, pattern=2)), + Line(points=[-80, 0; -20, 0; -21, 50; 21, 50; 20, -1; 41, 0; 40, 50; 80 + , 51], style(color=0, thickness=2)), + Line(points=[-19, 88; -19, 49], style(color=8, pattern=2)), + Line(points=[21, 74; 21, 50], style(color=9, pattern=2)), + Line(points=[41, 88; 41, 50], style(color=8, pattern=2)), + Line(points=[-19, 83; 42, 83], style(color=8)), + Line(points=[-19, 69; 21, 69], style(color=8)), + Text( + extent=[-9, 97; 37, 85], + string="period", + style(color=9)), + Text( + extent=[-18, 81; 21, 69], + string="width", + style(color=9)), + Line(points=[-52, 50; -19, 50], style(color=8, pattern=2)), Line(points=[-34, 50; -34, 1], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="V", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="V", + style(color=9)), Polygon(points=[-34, 49; -37, 36; -30, 36; -34, 49], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, 1; -37, 14; -31, 14; -34, 1; -34, 1], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[80, 51; 80, 0; 90, -1], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[80, 51; 80, 0; 90, -1], style(color=0, thickness=2)), Polygon(points=[-19, 69; -10, 71; -10, 67; -19, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[21, 69; 13, 71; 13, 67; 21, 69], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-19, 83; -10, 85; -10, 81; -19, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[41, 83; 33, 85; 33, 81; 41, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-78, 103; -24, 89], - string="v = p.v - n.v", - style(color=9))), + extent=[-78, 103; -24, 89], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.4, - y=0.23, - width=0.6, + x=0.4, + y=0.23, + width=0.6, height=0.6)); end PulseVoltage; - - model SawToothVoltage "Saw tooth voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of saw tooth"; - parameter Modelica.SIunits.Time period=1 "Time for one period"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.SawTooth signalSource(amplitude={V}, period={ - period})); + + model SawToothVoltage "Saw tooth voltage source" + parameter SI.Voltage V=1 "Amplitude of saw tooth"; + parameter SI.Time period=1 "Time for one period"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.SawTooth signalSource( + amplitude={V}, period={period})); annotation ( - Icon(Line(points=[-70, -71; -50, -71; 10, 70; 10, -71; 70, 70; 70, -71] - , style(color=8))), + Icon(Line(points=[-70, -71; -50, -71; 10, 70; 10, -71; 70, 70; 70, -71], + style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-34, -19; -37, -32; -30, -32; -34, -19], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-34, -20; -34, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-34, -70; -37, -57; -31, -57; -34, -70; -34, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-78, -24; -35, -36], - string="offset", - style(color=9)), - Text( - extent=[-31, -69; 15, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), - Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), - Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), - Line(points=[-10, 83; 30, 83], style(color=8)), - Text( - extent=[-12, 97; 34, 85], - string="period", - style(color=9)), - Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-78, -24; -35, -36], + string="offset", + style(color=9)), + Text( + extent=[-31, -69; 15, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-10, -20; -10, -70], style(color=8, pattern=2)), + Line(points=[-10, 88; -10, -20], style(color=8, pattern=2)), + Line(points=[30, 88; 30, 59], style(color=8, pattern=2)), + Line(points=[-10, 83; 30, 83], style(color=8)), + Text( + extent=[-12, 97; 34, 85], + string="period", + style(color=9)), + Line(points=[-44, 60; 30, 60], style(color=8, pattern=2)), Line(points=[-34, 47; -34, -7], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-78, 34; -37, 20], - string="V", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-78, 34; -37, 20], + string="V", + style(color=9)), Polygon(points=[-34, 60; -37, 47; -30, 47; -34, 60], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style - ( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-34, -20; -37, -7; -31, -7; -34, -20; -34, -20], style( + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 83; -1, 85; -1, 81; -10, 83], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[30, 83; 22, 85; 22, 81; 30, 83], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], - style(color=0, thickness=2)), - Text( - extent=[-77, 100; -27, 88], - string="v = p.v - n.v", - style(color=9))), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -20; -10, -20; 30, 60; 30, -20; 72, 60; 72, -20], + style(color=0, thickness=2)), + Text( + extent=[-77, 100; -27, 88], + string="v = p.v - n.v", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.37, - y=0.04, - width=0.6, + x=0.37, + y=0.04, + width=0.6, height=0.6)); end SawToothVoltage; - - model TrapezoidVoltage "Trapezoidal voltage source" - parameter Modelica.SIunits.Voltage V=1 "Amplitude of trapezoid"; - parameter SIunits.Time rising(final min=0) = 0 - "Rising duration of trapezoid"; - parameter SIunits.Time width(final min=0) = 0.5 - "Width duration of trapezoid"; - parameter SIunits.Time falling(final min=0) = 0 - "Falling duration of trapezoid"; - parameter SIunits.Time period(final min=Modelica.Constants.small) = 1 - "Time for one period"; - parameter Integer nperiod=-1 + + model TrapezoidVoltage "Trapezoidal voltage source" + parameter SI.Voltage V=1 "Amplitude of trapezoid"; + parameter SI.Time rising(final min=0) = 0 "Rising duration of trapezoid"; + parameter SI.Time width(final min=0) = 0.5 "Width duration of trapezoid"; + parameter SI.Time falling(final min=0) = 0 "Falling duration of trapezoid"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + parameter Integer nperiod=-1 "Number of periods (< 0 means infinite number of periods)"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.Trapezoid signalSource( - amplitude={V}, - rising={rising}, - width={width}, - falling={falling}, - period={period}, + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Trapezoid signalSource( + amplitude={V}, + rising={rising}, + width={width}, + falling={falling}, + period={period}, nperiod={nperiod})); annotation ( - Icon(Line(points=[-81, -70; -60, -70; -30, 70; 1, 70; 30, -70; 51, -70; - 80, 70], style(color=8))), + Icon(Line(points=[-81, -70; -60, -70; -30, 70; 1, 70; 30, -70; 51, -70; + 80, 70], style(color=8))), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-45, -30; -47, -41; -43, -41; -45, -30], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-45, -31; -45, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], + color=8, + pattern=1, + thickness=1, + arrow=0)), + Polygon(points=[-45, -70; -47, -60; -43, -60; -45, -70; -45, -70], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-86, -43; -43, -55], - string="offset", - style(color=9)), - Text( - extent=[-47, -69; -1, -87], - string="startTime", - style(color=9)), - Text( - extent=[70, -80; 94, -100], - string="time", - style(color=9)), - Line(points=[-30, 81; -30, -70], style(color=8, pattern=2)), - Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), - Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), - Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), - Line(points=[-29, 56; 40, 56], style(color=8)), - Text( - extent=[-8, 70; 21, 60], - string="width", - style(color=9)), - Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-86, -43; -43, -55], + string="offset", + style(color=9)), + Text( + extent=[-47, -69; -1, -87], + string="startTime", + style(color=9)), + Text( + extent=[70, -80; 94, -100], + string="time", + style(color=9)), + Line(points=[-30, 81; -30, -70], style(color=8, pattern=2)), + Line(points=[-10, 59; -10, 40], style(color=8, pattern=2)), + Line(points=[20, 59; 20, 39], style(color=9, pattern=2)), + Line(points=[40, 59; 40, -30], style(color=8, pattern=2)), + Line(points=[-29, 56; 40, 56], style(color=8)), + Text( + extent=[-8, 70; 21, 60], + string="width", + style(color=9)), + Line(points=[-42, 40; -10, 40], style(color=8, pattern=2)), Line(points=[-39, 40; -39, -19], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Text( - extent=[-77, 14; -40, 0], - string="V", - style(color=9)), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Text( + extent=[-77, 14; -40, 0], + string="V", + style(color=9)), Polygon(points=[-29, 56; -22, 58; -22, 54; -29, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-10, 56; -17, 58; -17, 54; -10, 56], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[-80, -30; -30, -30; -9, 46; 21, 46; 40, -30; 60, -30; 80 - , 46; 100, 46], style(color=0, thickness=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[-80, -30; -30, -30; -9, 46; 21, 46; 40, -30; 60, -30; 80, + 46; 100, 46], style(color=0, thickness=2)), Polygon(points=[-39, 40; -41, 29; -37, 29; -39, 40], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-39, -29; -41, -19; -37, -19; -39, -29; -39, -29], style( - color=8, - fillColor=8, - fillPattern=1)), - Line(points=[60, 81; 60, -30], style(color=8, pattern=2)), + color=8, + fillColor=8, + fillPattern=1)), + Line(points=[60, 81; 60, -30], style(color=8, pattern=2)), Polygon(points=[39, 56; 32, 58; 32, 54; 39, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 27, 58; 27, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[20, 56; 13, 58; 13, 54; 20, 56], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[-12, 56; -5, 58; -5, 54; -12, 56], style( - color=8, - fillColor=8, - fillPattern=1)), - Text( - extent=[-34, 70; -5, 60], - string="rising", - style(color=9)), - Text( - extent=[16, 70; 45, 60], - string="falling", - style(color=9)), - Text( - extent=[-77, 103; -23, 91], - string="v = p.v - n.v", - style(color=9)), - Line(points=[-20, 76; 61, 76], style(color=8)), + color=8, + fillColor=8, + fillPattern=1)), + Text( + extent=[-34, 70; -5, 60], + string="rising", + style(color=9)), + Text( + extent=[16, 70; 45, 60], + string="falling", + style(color=9)), + Text( + extent=[-77, 103; -23, 91], + string="v = p.v - n.v", + style(color=9)), + Line(points=[-20, 76; 61, 76], style(color=8)), Polygon(points=[-29, 76; -20, 78; -20, 74; -29, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Polygon(points=[61, 76; 53, 78; 53, 74; 61, 76], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Text( - extent=[-2, 86; 25, 77], - string="period", - style(color=9))), + extent=[-2, 86; 25, 77], + string="period", + style(color=9))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.21, - y=0.22, - width=0.6, + x=0.21, + y=0.22, + width=0.6, height=0.63)); end TrapezoidVoltage; - - model TableVoltage "Voltage source by linear interpolation in a table" - parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] + + model TableVoltage "Voltage source by linear interpolation in a table" + parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] "Table matrix (time = first column, voltage = second column)"; - extends Modelica.Electrical.Analog.Interfaces.VoltageSource(redeclare - Modelica.Blocks.Sources.TimeTable signalSource(table=table)); + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.TimeTable signalSource(table + =table)); annotation ( - Icon(Line(points=[-66, -36; -66, 84; 34, 84; 34, -36; -66, -36; -66, -6 - ; 34, -6; 34, 24; -66, 24; -66, 54; 34, 54; 34, 84; -16, 84; -16 - , -37], style(color=8))), + Icon(Line(points=[-66, -36; -66, 84; 34, 84; 34, -36; -66, -36; -66, -6; + 34, -6; 34, 24; -66, 24; -66, 54; 34, 54; 34, 84; -16, 84; -16, - + 37], style(color=8))), Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.25, - y=0.01, - width=0.72, - height=0.86), + x=0.25, + y=0.01, + width=0.72, + height=0.86), Diagram( - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Line(points=[-80, 68; -80, -80], style(color=8)), - Line(points=[-90, -70; 82, -70], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Line(points=[-80, 68; -80, -80], style(color=8)), + Line(points=[-90, -70; 82, -70], style(color=8)), Polygon(points=[90, -70; 68, -62; 68, -78; 90, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Rectangle(extent=[-20, 90; 30, -30], style( - color=7, - fillColor=8, - fillPattern=1)), - Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80 - , 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], - style(color=0)), - Text( - extent=[-77, -42; -38, -58], - string="offset", - style(color=9)), + color=7, + fillColor=8, + fillPattern=1)), + Line(points=[-20, -30; -20, 90; 80, 90; 80, -30; -20, -30; -20, 0; 80, + 0; 80, 30; -20, 30; -20, 60; 80, 60; 80, 90; 30, 90; 30, -31], + style(color=0)), + Text( + extent=[-77, -42; -38, -58], + string="offset", + style(color=9)), Polygon(points=[-31, -30; -33, -40; -28, -40; -31, -30], style( - color=8, - fillColor=8, - fillPattern=1)), - Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], + color=8, + fillColor=8, + fillPattern=1)), + Polygon(points=[-30, -70; -33, -60; -28, -60; -30, -70; -30, -70], style( - color=8, - fillColor=8, - fillPattern=1)), + color=8, + fillColor=8, + fillPattern=1)), Line(points=[-31, -31; -31, -70], style( - color=8, - pattern=1, - thickness=1, - arrow=0)), - Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), - Text( - extent=[-38, -70; 8, -88], - string="startTime", - style(color=9)), - Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), - Text( - extent=[66, -81; 91, -93], - string="time", - style(color=9)), - Text( - extent=[-15, 83; 24, 68], - string="time", - style(color=0)), - Text( - extent=[33, 83; 76, 67], - string="v", - style(color=0)), - Text( - extent=[-81, 98; -31, 85], - string="v = p.v - n.v", - style(color=9))), + color=8, + pattern=1, + thickness=1, + arrow=0)), + Line(points=[-20, -20; -20, -70], style(color=8, pattern=2)), + Text( + extent=[-38, -70; 8, -88], + string="startTime", + style(color=9)), + Line(points=[-20, -30; -80, -30], style(color=8, pattern=2)), + Text( + extent=[66, -81; 91, -93], + string="time", + style(color=9)), + Text( + extent=[-15, 83; 24, 68], + string="time", + style(color=0)), + Text( + extent=[33, 83; 76, 67], + string="v", + style(color=0)), + Text( + extent=[-81, 98; -31, 85], + string="v = p.v - n.v", + style(color=9))), Documentation(info="
This block generates a voltage source by linear interpolation in -a table. The time points and voltage values are stored in a matrix -table[i,j], where the first column table[:,1] contains the -time points and the second column contains the voltage to be interpolated. +a table. The time points and voltage values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the voltage to be interpolated. The table interpolation has the following proporties:
@@ -1056,17 +1033,17 @@ The table interpolation has the following proporties:This block generates a current source by linear interpolation in -a table. The time points and current values are stored in a matrix -table[i,j], where the first column table[:,1] contains the -time points and the second column contains the current to be interpolated. +a table. The time points and current values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the current to be interpolated. The table interpolation has the following proporties:
@@ -2030,17 +1985,17 @@ The table interpolation has the following proporties:This package contains packages for analog electrical components:
diff --git a/Electrical/package.mo b/Electrical/package.mo index b8a4c04fd3..50465d0486 100644 --- a/Electrical/package.mo +++ b/Electrical/package.mo @@ -1,9 +1,11 @@ package Electrical "Library for electrical models" + + extends Modelica.Icons.Library2; + annotation ( - Documentation(info=" - + Documentation(info="
This library contains electrical components to build up analog and digital circuits. The library is currently structured in the following sublibraries: @@ -17,9 +19,9 @@ The library is currently structured in the following sublibraries:
-"),
- Coordsys(
- extent=[0, 0; 120, 175],
- grid=[2, 2],
- component=[20, 20]),
- Window(
+"),Window(
x=0.03,
y=0.03,
width=0.13,
@@ -56,12 +53,12 @@ Modelica in file \"Modelica/package.mo\".
library=1,
autolayout=1),
Icon(
- Rectangle(extent=[-29, -13; 3, -27], style(color=0)),
- Line(points=[37, -58; 62, -58], style(color=0)),
- Line(points=[36, -49; 61, -49], style(color=0)),
- Line(points=[-78, -50; -43, -50], style(color=0)),
- Line(points=[-67, -55; -55, -55], style(color=0)),
- Line(points=[-61, -50; -61, -20; -29, -20], style(color=0)),
- Line(points=[3, -20; 48, -20; 48, -49], style(color=0)),
+ Rectangle(extent=[-29, -13; 3, -27], style(color=0)),
+ Line(points=[37, -58; 62, -58], style(color=0)),
+ Line(points=[36, -49; 61, -49], style(color=0)),
+ Line(points=[-78, -50; -43, -50], style(color=0)),
+ Line(points=[-67, -55; -55, -55], style(color=0)),
+ Line(points=[-61, -50; -61, -20; -29, -20], style(color=0)),
+ Line(points=[3, -20; 48, -20; 48, -49], style(color=0)),
Line(points=[48, -58; 48, -78; -61, -78; -61, -55], style(color=0))));
end Electrical;
diff --git a/Icons.mo b/Icons.mo
index da7b6701f7..0a5fcfa51b 100644
--- a/Icons.mo
+++ b/Icons.mo
@@ -1,70 +1,64 @@
-package Icons "Icon definitions"
-
+package Icons "Icon definitions"
+
annotation (
- Coordsys(
- extent=[0, 0; 606, 355],
- grid=[2, 2],
- component=[20, 20]),
Window(
- x=0.17,
- y=0.09,
- width=0.6,
- height=0.6,
+ x=0.08,
+ y=0.08,
+ width=0.28,
+ height=0.51,
library=1,
autolayout=1),
Icon(
- Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern=1
- )),
+ Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern=1)
+ ),
Polygon(points=[-100, 50; -80, 70; 100, 70; 80, 50; -100, 50], style(
- fillColor=30, fillPattern=1)),
+ fillColor=30, fillPattern=1)),
Polygon(points=[100, 70; 100, -80; 80, -100; 80, 50; 100, 70], style(
- fillColor=30, fillPattern=1)),
+ fillColor=30, fillPattern=1)),
Text(
- extent=[-120, 135; 120, 70],
- string="%name",
- style(color=1)),
+ extent=[-120, 135; 120, 70],
+ string="%name",
+ style(color=1)),
Text(
- extent=[-90, 40; 70, 10],
- string="Library",
+ extent=[-90, 40; 70, 10],
+ string="Library",
style(
- color=9,
- fillColor=0,
- fillPattern=1)),
- Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern=1
- )),
+ color=9,
+ fillColor=0,
+ fillPattern=1)),
+ Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern=1)
+ ),
Polygon(points=[-100, 50; -80, 70; 100, 70; 80, 50; -100, 50], style(
- fillColor=30, fillPattern=1)),
+ fillColor=30, fillPattern=1)),
Polygon(points=[100, 70; 100, -80; 80, -100; 80, 50; 100, 70], style(
- fillColor=30, fillPattern=1)),
+ fillColor=30, fillPattern=1)),
Text(
- extent=[-90, 40; 70, 10],
- string="Library",
+ extent=[-90, 40; 70, 10],
+ string="Library",
style(
- color=9,
- fillColor=0,
- fillPattern=1)),
- Polygon(points=[-64, -20; -50, -4; 50, -4; 36, -20; -64, -20; -64, -20]
- , style(
- color=0,
- fillColor=8,
- fillPattern=1)),
+ color=9,
+ fillColor=0,
+ fillPattern=1)),
+ Polygon(points=[-64, -20; -50, -4; 50, -4; 36, -20; -64, -20; -64, -20],
+ style(
+ color=0,
+ fillColor=8,
+ fillPattern=1)),
Rectangle(extent=[-64, -20; 36, -84], style(
- color=0,
- fillColor=8,
- fillPattern=1)),
+ color=0,
+ fillColor=8,
+ fillPattern=1)),
Text(
- extent=[-60, -24; 32, -38],
- string="Library",
+ extent=[-60, -24; 32, -38],
+ string="Library",
style(
- color=10,
- fillColor=10,
- fillPattern=1)),
+ color=10,
+ fillColor=10,
+ fillPattern=1)),
Polygon(points=[50, -4; 50, -70; 36, -84; 36, -20; 50, -4], style(
- color=0,
- fillColor=8,
- fillPattern=1))),
- Documentation(info="
-
+ color=0,
+ fillColor=8,
+ fillPattern=1))), Documentation(info="
This package contains definitions for the graphical layout of components which may be used in different libraries. @@ -75,7 +69,7 @@ using \"extends\".
Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - model Info "Icon for an information class" annotation ( + partial model Info "Icon for an information class" + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Rectangle(extent=[-100, 80; 80, -90], style(color=3)), + Rectangle(extent=[-100, 80; 80, -90], style(color=3)), Polygon(points=[-100, 80; -90, 90; 90, 90; 80, 80; -100, 80], style( - fillColor=3)), + fillColor=3)), Polygon(points=[80, -90; 90, -80; 90, 90; 80, 80; 80, -90], style( - fillColor=3)), - Text(extent=[-80, 70; 60, -70], string="Info")), + fillColor=3)), + Text(extent=[-80, 70; 60, -70], string="Info")), Diagram( - Rectangle(extent=[-100, 80; 80, -90], style(color=3)), + Rectangle(extent=[-100, 80; 80, -90], style(color=3)), Polygon(points=[-100, 80; -90, 90; 90, 90; 80, 80; -100, 80], style( - fillColor=3)), + fillColor=3)), Polygon(points=[80, -90; 90, -80; 90, 90; 80, 80; 80, -90], style( - fillColor=3)), - Text(extent=[-80, 70; 60, -70], string="Info"))); end Info; - model Library "Icon for library" annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.33, - y=0.34, - width=0.6, - height=0.55), - Icon( - Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern - =1)), + fillColor=3)), + Text(extent=[-80, 70; 60, -70], string="Info"))); + end Info; + + partial package Library "Icon for library" + annotation (Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( + Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern= + 1)), Polygon(points=[-100, 50; -80, 70; 100, 70; 80, 50; -100, 50], style( - fillColor=30, fillPattern=1)), + fillColor=30, fillPattern=1)), Polygon(points=[100, 70; 100, -80; 80, -100; 80, 50; 100, 70], style( - fillColor=30, fillPattern=1)), + fillColor=30, fillPattern=1)), Text( - extent=[-85, 35; 65, -85], - string="Library", - style(color=3)), + extent=[-85, 35; 65, -85], + string="Library", + style(color=3)), Text( - extent=[-120, 135; 120, 70], - string="%name", - style(color=1)))); end Library; - model Library2 - "Icon for library where additional icon elements shall be added" - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.29, - y=0.29, - width=0.6, - height=0.6), - Icon( - Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern - =1)), + extent=[-120, 122; 120, 73], + string="%name", + style(color=1)))); + end Library; + + partial package Library2 + "Icon for library where additional icon elements shall be added" + annotation (Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( + Rectangle(extent=[-100, -100; 80, 50], style(fillColor=30, fillPattern= + 1)), Polygon(points=[-100, 50; -80, 70; 100, 70; 80, 50; -100, 50], style( - fillColor=30, fillPattern=1)), + fillColor=30, fillPattern=1)), Polygon(points=[100, 70; 100, -80; 80, -100; 80, 50; 100, 70], style( - fillColor=30, fillPattern=1)), + fillColor=30, fillPattern=1)), Text( - extent=[-120, 135; 120, 70], - string="%name", - style(color=1)), + extent=[-120, 125; 120, 70], + string="%name", + style(color=1)), Text( - extent=[-90, 40; 70, 10], - string="Library", + extent=[-90, 40; 70, 10], + string="Library", style( - color=9, - fillColor=0, - fillPattern=1)))); end Library2; - model Example "Icon for an example model" annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.35, - y=0.28, - width=0.6, - height=0.6), - Icon( - Rectangle(extent=[-100, -100; 80, 50]), - Polygon(points=[-100, 50; -80, 70; 100, 70; 80, 50; -100, 50]), - Polygon(points=[100, 70; 100, -80; 80, -100; 80, 50; 100, 70]), + color=9, + fillColor=0, + fillPattern=1)))); + end Library2; + + partial model Example "Icon for an example model" + annotation (Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( + Rectangle(extent=[-100, -100; 80, 50], style(fillColor=7)), + Polygon(points=[-100, 50; -80, 70; 100, 70; 80, 50; -100, 50], style( + fillColor=7)), + Polygon(points=[100, 70; 100, -80; 80, -100; 80, 50; 100, 70], style( + fillColor=7)), + Text( + extent=[-96, 3; 77, -49], + string="Example", + style(color=3)), Text( - extent=[-84, 34; 64, -84], - string="Example", - style(color=3)), + extent=[-120, 132; 120, 73], + string="%name", + style(color=1)))); + end Example; + + partial function Function "Icon for a function" + annotation (Icon( + Text(extent=[-134, 104; 142, 44], string="%name"), + Ellipse(extent=[-100, 40; 100, -100], style(color=45, fillColor=7)), Text( - extent=[-120, 135; 120, 70], - string="%name", - style(color=1)))); end Example; - model TranslationalSensor - "Icon representing translational measurement device" annotation ( + extent=[-84, -4; 84, -52], + string="function", + style(color=45)))); + end Function; + + partial record Record "Icon for a record" + annotation (Icon( + Rectangle(extent=[-100, 50; 100, -100], style(fillColor=51, fillPattern + =1)), + Text(extent=[-127, 115; 127, 55], string="%name"), + Line(points=[-100, -50; 100, -50], style(color=0)), + Line(points=[-100, 0; 100, 0], style(color=0)), + Line(points=[0, 50; 0, -100], style(color=0)))); + end Record; + + partial function Enumeration "Icon for an enumeration" + annotation (Icon( + Text(extent=[-134, 104; 142, 44], string="%name"), + Ellipse(extent=[-100, 40; 100, -100], style(color=85, fillColor=7)), + Text( + extent=[-84, -4; 84, -52], + string="enumeration", + style(color=85, fillColor=88)))); + end Enumeration; + + partial model TranslationalSensor + "Icon representing translational measurement device" + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Rectangle(extent=[-70, -60; 70, 20], style(color=0, fillColor=7)), + Rectangle(extent=[-70, -60; 70, 20], style(color=0, fillColor=7)), Polygon(points=[0, -40; -10, -16; 10, -16; 0, -40], style( - color=0, - fillColor=0, - fillPattern=1)), - Line(points=[0, 0; 0, -16], style(color=0)), - Line(points=[-70, 0; 0, 0], style(color=0)), - Line(points=[-50, -40; -50, -60], style(color=0)), - Line(points=[-30, -40; -30, -60], style(color=0)), - Line(points=[-10, -40; -10, -60], style(color=0)), - Line(points=[10, -40; 10, -60], style(color=0)), - Line(points=[30, -40; 30, -60], style(color=0)), - Line(points=[50, -40; 50, -60], style(color=0))), + color=0, + fillColor=0, + fillPattern=1)), + Line(points=[0, 0; 0, -16], style(color=0)), + Line(points=[-70, 0; 0, 0], style(color=0)), + Line(points=[-50, -40; -50, -60], style(color=0)), + Line(points=[-30, -40; -30, -60], style(color=0)), + Line(points=[-10, -40; -10, -60], style(color=0)), + Line(points=[10, -40; 10, -60], style(color=0)), + Line(points=[30, -40; 30, -60], style(color=0)), + Line(points=[50, -40; 50, -60], style(color=0))), Diagram( - Rectangle(extent=[-70, -60; 70, 20], style(color=0, fillColor=7)), + Rectangle(extent=[-70, -60; 70, 20], style(color=0, fillColor=7)), Polygon(points=[0, -40; -10, -16; 10, -16; 0, -40], style( - color=0, - fillColor=0, - fillPattern=1)), - Line(points=[0, 0; 0, -16], style(color=0)), - Line(points=[-70, 0; 0, 0], style(color=0)), - Line(points=[-50, -40; -50, -60], style(color=0)), - Line(points=[-30, -40; -30, -60], style(color=0)), - Line(points=[-10, -40; -10, -60], style(color=0)), - Line(points=[10, -40; 10, -60], style(color=0)), - Line(points=[30, -40; 30, -60], style(color=0)), - Line(points=[50, -40; 50, -60], style(color=0)))); end - TranslationalSensor; - model RotationalSensor "Icon representing rotational measurement device" - annotation ( + color=0, + fillColor=0, + fillPattern=1)), + Line(points=[0, 0; 0, -16], style(color=0)), + Line(points=[-70, 0; 0, 0], style(color=0)), + Line(points=[-50, -40; -50, -60], style(color=0)), + Line(points=[-30, -40; -30, -60], style(color=0)), + Line(points=[-10, -40; -10, -60], style(color=0)), + Line(points=[10, -40; 10, -60], style(color=0)), + Line(points=[30, -40; 30, -60], style(color=0)), + Line(points=[50, -40; 50, -60], style(color=0)))); + end TranslationalSensor; + + partial model RotationalSensor + "Icon representing rotational measurement device" + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( - Ellipse(extent=[-70, 70; 70, -70], style(color=0, fillColor=7)), - Line(points=[0, 70; 0, 40], style(color=0)), - Line(points=[22.9, 32.8; 40.2, 57.3], style(color=0)), - Line(points=[-22.9, 32.8; -40.2, 57.3], style(color=0)), - Line(points=[37.6, 13.7; 65.8, 23.9], style(color=0)), - Line(points=[-37.6, 13.7; -65.8, 23.9], style(color=0)), - Line(points=[0, 0; 9.02, 28.6], style(color=0)), + Ellipse(extent=[-70, 70; 70, -70], style(color=0, fillColor=7)), + Line(points=[0, 70; 0, 40], style(color=0)), + Line(points=[22.9, 32.8; 40.2, 57.3], style(color=0)), + Line(points=[-22.9, 32.8; -40.2, 57.3], style(color=0)), + Line(points=[37.6, 13.7; 65.8, 23.9], style(color=0)), + Line(points=[-37.6, 13.7; -65.8, 23.9], style(color=0)), + Line(points=[0, 0; 9.02, 28.6], style(color=0)), Polygon(points=[-0.48, 31.6; 18, 26; 18, 57.2; -0.48, 31.6], style( - color=0, - fillColor=0, - fillPattern=1)), + color=0, + fillColor=0, + fillPattern=1)), Ellipse(extent=[-5, 5; 5, -5], style( - color=0, - gradient=0, - fillColor=0, - fillPattern=1))), + color=0, + gradient=0, + fillColor=0, + fillPattern=1))), Diagram( - Ellipse(extent=[-70, 70; 70, -70], style(color=0, fillColor=7)), - Line(points=[0, 70; 0, 40], style(color=0)), - Line(points=[22.9, 32.8; 40.2, 57.3], style(color=0)), - Line(points=[-22.9, 32.8; -40.2, 57.3], style(color=0)), - Line(points=[37.6, 13.7; 65.8, 23.9], style(color=0)), - Line(points=[-37.6, 13.7; -65.8, 23.9], style(color=0)), - Line(points=[0, 0; 9.02, 28.6], style(color=0)), + Ellipse(extent=[-70, 70; 70, -70], style(color=0, fillColor=7)), + Line(points=[0, 70; 0, 40], style(color=0)), + Line(points=[22.9, 32.8; 40.2, 57.3], style(color=0)), + Line(points=[-22.9, 32.8; -40.2, 57.3], style(color=0)), + Line(points=[37.6, 13.7; 65.8, 23.9], style(color=0)), + Line(points=[-37.6, 13.7; -65.8, 23.9], style(color=0)), + Line(points=[0, 0; 9.02, 28.6], style(color=0)), Polygon(points=[-0.48, 31.6; 18, 26; 18, 57.2; -0.48, 31.6], style( - color=0, - fillColor=0, - fillPattern=1)), + color=0, + fillColor=0, + fillPattern=1)), Ellipse(extent=[-5, 5; 5, -5], style( - color=0, - gradient=0, - fillColor=0, - fillPattern=1)))); end RotationalSensor; + color=0, + gradient=0, + fillColor=0, + fillPattern=1)))); + end RotationalSensor; + + partial model GearIcon "Icon for gearbox" + annotation (Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Icon( + Rectangle(extent=[-90, 10; -60, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Polygon(points=[-60, 10; -60, 20; -40, 40; -40, -40; -60, -20; -60, 10] + , style( + color=10, + gradient=2, + fillColor=10, + fillPattern=1)), + Rectangle(extent=[-40, 60; 40, -60], style( + color=3, + pattern=1, + thickness=1, + gradient=2, + arrow=0, + fillColor=8, + fillPattern=1)), + Polygon(points=[60, 20; 40, 40; 40, -40; 60, -20; 60, 20], style( + color=10, + fillColor=10, + fillPattern=1)), + Rectangle(extent=[60, 10; 90, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Polygon(points=[-60, -90; -50, -90; -20, -30; 20, -30; 48, -90; 60, -90 + ; 60, -100; -60, -100; -60, -90], style( + color=0, + fillColor=0, + fillPattern=1)))); + end GearIcon; + + partial model MotorIcon "Icon for electrical motor" + annotation (Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Icon( + Rectangle(extent=[-100, 50; 30, -50], style( + color=1, + gradient=2, + fillColor=1, + fillPattern=1)), + Polygon(points=[-100, -90; -90, -90; -60, -20; -10, -20; 20, -90; 30, - + 90; 30, -100; -100, -100; -100, -90], style( + color=0, + gradient=0, + fillColor=0, + fillPattern=1)), + Rectangle(extent=[30, 10; 90, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)))); + end MotorIcon; end Icons; diff --git a/Images/ControlledIdealIntermediateSwitch1.png b/Images/ControlledIdealIntermediateSwitch1.png new file mode 100644 index 0000000000..594a0b362d Binary files /dev/null and b/Images/ControlledIdealIntermediateSwitch1.png differ diff --git a/Images/ControlledIdealIntermediateSwitch2.png b/Images/ControlledIdealIntermediateSwitch2.png new file mode 100644 index 0000000000..a40ce3ddc8 Binary files /dev/null and b/Images/ControlledIdealIntermediateSwitch2.png differ diff --git a/Images/Fig.translational.examples.InitialConditions.gif b/Images/Fig.translational.examples.InitialConditions.gif new file mode 100644 index 0000000000..bb76e7b11a Binary files /dev/null and b/Images/Fig.translational.examples.InitialConditions.gif differ diff --git a/Images/IdealIntermediateSwitch1.png b/Images/IdealIntermediateSwitch1.png new file mode 100644 index 0000000000..2406b36959 Binary files /dev/null and b/Images/IdealIntermediateSwitch1.png differ diff --git a/Images/IdealIntermediateSwitch2.png b/Images/IdealIntermediateSwitch2.png new file mode 100644 index 0000000000..cb860cc841 Binary files /dev/null and b/Images/IdealIntermediateSwitch2.png differ diff --git a/Images/PreLoad.gif b/Images/PreLoad.gif new file mode 100644 index 0000000000..0cc673abc7 Binary files /dev/null and b/Images/PreLoad.gif differ diff --git a/Images/PreLoad.png b/Images/PreLoad.png new file mode 100644 index 0000000000..d83856cb54 Binary files /dev/null and b/Images/PreLoad.png differ diff --git a/Images/Preload2.gif b/Images/Preload2.gif new file mode 100644 index 0000000000..def639d09e Binary files /dev/null and b/Images/Preload2.gif differ diff --git a/Images/Preload2.png b/Images/Preload2.png new file mode 100644 index 0000000000..2fbef3576c Binary files /dev/null and b/Images/Preload2.png differ diff --git a/Images/Preload3.png b/Images/Preload3.png new file mode 100644 index 0000000000..b36e8a81a4 Binary files /dev/null and b/Images/Preload3.png differ diff --git a/Images/Preload4.png b/Images/Preload4.png new file mode 100644 index 0000000000..09935a5661 Binary files /dev/null and b/Images/Preload4.png differ diff --git a/Images/Stribeck.gif b/Images/Stribeck.gif new file mode 100644 index 0000000000..20f1e3fcfc Binary files /dev/null and b/Images/Stribeck.gif differ diff --git a/Images/_readme.txt b/Images/_readme.txt new file mode 100644 index 0000000000..a5543b52dc --- /dev/null +++ b/Images/_readme.txt @@ -0,0 +1,2 @@ +This directory contains gif-pictures which are referenced in the +documentation of the Modelica package. diff --git a/Images/drive1.gif b/Images/drive1.gif new file mode 100644 index 0000000000..b8821c556b Binary files /dev/null and b/Images/drive1.gif differ diff --git a/Images/drive2.gif b/Images/drive2.gif new file mode 100644 index 0000000000..992a0cf1e4 Binary files /dev/null and b/Images/drive2.gif differ diff --git a/Images/drive3.gif b/Images/drive3.gif new file mode 100644 index 0000000000..26e6cea759 Binary files /dev/null and b/Images/drive3.gif differ diff --git a/Images/drive4.gif b/Images/drive4.gif new file mode 100644 index 0000000000..e803147c42 Binary files /dev/null and b/Images/drive4.gif differ diff --git a/Images/driveAxis.gif b/Images/driveAxis.gif new file mode 100644 index 0000000000..a6eef1e2f3 Binary files /dev/null and b/Images/driveAxis.gif differ diff --git a/Images/driveConnections.gif b/Images/driveConnections.gif new file mode 100644 index 0000000000..90e85dd554 Binary files /dev/null and b/Images/driveConnections.gif differ diff --git a/Images/driveConnections2.gif b/Images/driveConnections2.gif new file mode 100644 index 0000000000..4864ba5bc6 Binary files /dev/null and b/Images/driveConnections2.gif differ diff --git a/Images/driveWithHeatTransfer.png b/Images/driveWithHeatTransfer.png new file mode 100644 index 0000000000..980dfc89ce Binary files /dev/null and b/Images/driveWithHeatTransfer.png differ diff --git a/Images/inertias.gif b/Images/inertias.gif new file mode 100644 index 0000000000..b1decd0b6b Binary files /dev/null and b/Images/inertias.gif differ diff --git a/Images/relativeStates.gif b/Images/relativeStates.gif new file mode 100644 index 0000000000..4893ba102d Binary files /dev/null and b/Images/relativeStates.gif differ diff --git a/Images/relativeStates2.gif b/Images/relativeStates2.gif new file mode 100644 index 0000000000..ac1347551b Binary files /dev/null and b/Images/relativeStates2.gif differ diff --git a/Math.mo b/Math.mo deleted file mode 100644 index 6a6059439e..0000000000 --- a/Math.mo +++ /dev/null @@ -1,749 +0,0 @@ -package Math "Mathematical functions" - extends Modelica.Icons.Library2; - type Angle = Modelica.SIunits.Angle ; - - annotation ( - Coordsys( - extent=[0, 0; 299, 630], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.01, - y=0.01, - width=0.24, - height=0.66, - library=1, - autolayout=1), - Icon(Text( - extent=[-59, -9; 42, -56], - string="f(x)", - style(color=0))), - Documentation(info=" --This package contains the following basic mathematical functions: -
- -- sin(u) sine - cos(u) cosine - tan(u) tangent (u shall not be -pi/2, pi/2, 3*pi/2, ...) - asin(u) inverse sine (-1 <= u <= 1) - acos(u) inverse cosine (-1 <= u <= 1) - atan(u) inverse tangent - atan2(u1,u2) four quadrant inverse tangent - sinh(u) hyperbolic sine - cosh(u) hyperbolic cosine - tanh(u) hyperbolic tangent - exp(u) exponential, base e - log(u) natural (base e) logarithm (u > 0) - log10(u) base 10 logarithm (u > 0) -- -
-These functions are used by calling them directly -with a full name (e.g. y = Modelica.Math.asin(0.5)). -
- -Release Notes:
-Copyright (C) 1999, Modelica Design Group and DLR.
- --The Modelica package is free software; it can be redistributed and/or modified -under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package -Modelica in file \"Modelica/package.mo\". -
- - -")); - partial function baseIcon1 - "Basic icon for mathematical function with y-axis on left side" annotation - (Icon( - Rectangle(extent=[-100, 100; 100, -100], style(color=0, fillColor=7)) - , - Line(points=[-80, -80; -80, 68], style(color=8)), - Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, - fillColor=8)), - Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( - Line(points=[-80, 80; -88, 80], style(color=8)), - Line(points=[-80, -80; -88, -80], style(color=8)), - Line(points=[-80, -90; -80, 84], style(color=8)), - Text( - extent=[-75, 110; -55, 90], - string="y", - style(color=9)), - Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, - fillColor=8)))); end baseIcon1; - partial function baseIcon2 - "Basic icon for mathematical function with y-axis in middle" annotation ( - Icon( - Rectangle(extent=[-100, 100; 100, -100], style(color=0, fillColor=7)) - , - Line(points=[0, -80; 0, 68], style(color=8)), - Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor - =8)), - Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( - Line(points=[0, 80; -8, 80], style(color=8)), - Line(points=[0, -80; -8, -80], style(color=8)), - Line(points=[0, -90; 0, 84], style(color=8)), - Text( - extent=[5, 110; 25, 90], - string="y", - style(color=9)), - Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, - fillColor=8)))); end baseIcon2; - function sin "sine" - extends baseIcon1; - input Angle u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.02, - y=0.21, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, - 74.6; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, - 59.4; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, - - 64.2; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5 - ; 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), - Text( - extent=[12, 84; 84, 36], - string="sin", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, - 74.6; -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, - 59.4; -14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, - - 64.2; 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5 - ; 57.5, -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), - Text(extent=[-105, 72; -85, 88], string="1"), - Text(extent=[70, 25; 90, 5], string="2*pi"), - Text(extent=[-105, -72; -85, -88], string="-1"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = sin(u); - end sin; - function cos "cosine" - extends baseIcon1; - input Angle u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.28, - y=0.06, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, 80; -74.4, 78.1; -68.7, 72.3; -63.1, 63; -56.7, 48.7 - ; -48.6, 26.6; -29.3, -32.5; -22.1, -51.7; -15.7, -65.3; -10.1, - - 73.8; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, - -60.6; 24.5, -45.7; 32.6, -23; 50.3, 31.3; 57.5, 50.7; 63.9, 64.6 - ; 69.5, 73.4; 75.2, 78.6; 80, 80], style(color=0)), - Text( - extent=[-36, 82; 36, 34], - string="cos", - style(color=8))), - Diagram( - Text(extent=[-105, 72; -85, 88], string="1"), - Text(extent=[-105, -72; -85, -88], string="-1"), - Text(extent=[70, 25; 90, 5], string="2*pi"), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, 80; -74.4, 78.1; -68.7, 72.3; -63.1, 63; -56.7, 48.7 - ; -48.6, 26.6; -29.3, -32.5; -22.1, -51.7; -15.7, -65.3; -10.1, - - 73.8; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, - -60.6; 24.5, -45.7; 32.6, -23; 50.3, 31.3; 57.5, 50.7; 63.9, 64.6 - ; 69.5, 73.4; 75.2, 78.6; 80, 80], style(color=0)), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = cos(u); - end cos; - function tan "tangent (u shall not be -pi/2, pi/2, 3*pi/2, ...)" - extends baseIcon2; - input Angle u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.31, - y=0.01, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - -40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; - - 4.42, -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4 - , 39.1; 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0) - ), - Text( - extent=[-90, 72; -18, 24], - string="tan", - style(color=8))), - Diagram( - Text(extent=[-37, -72; -17, -88], string="-5.8"), - Text(extent=[-33, 86; -13, 70], string=" 5.8"), - Text(extent=[70, 25; 90, 5], string="1.4"), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - -40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; - - 4.42, -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4 - , 39.1; 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0) - ), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = tan(u); - end tan; - function asin "inverse sine (-1 <= u <= 1)" - extends baseIcon2; - input Real u; - output Angle y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.29, - y=0.02, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; -79.2, -72.8; -77.6, -67.5; -73.6, -59.4; -66.3 - , -49.8; -53.5, -37.3; -30.2, -19.7; 37.4, 24.8; 57.5, 40.8; 68.7 - , 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), - Text( - extent=[-88, 78; -16, 30], - string="asin", - style(color=8))), - Diagram( - Text(extent=[-40, -72; -15, -88], string="-pi/2"), - Text(extent=[-38, 88; -13, 72], string=" pi/2"), - Text(extent=[70, 25; 90, 5], string="+1"), - Text(extent=[-90, 21; -70, 1], string="-1"), - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -79.2, -72.8; -77.6, -67.5; -73.6, -59.4; -66.3 - , -49.8; -53.5, -37.3; -30.2, -19.7; 37.4, 24.8; 57.5, 40.8; 68.7 - , 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = asin(u); - end asin; - function acos "inverse cosine (-1 <= u <= 1)" - extends baseIcon2; - input Real u; - output Angle y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.37, - y=0.09, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, -80; 68, -80], style(color=8)), - Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, - fillColor=8)), - Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, - 49.8; -53.5, 37.3; -30.2, 19.7; 37.4, -24.8; 57.5, -40.8; 68.7, - - 52.7; 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), - Text( - extent=[-86, -14; -14, -62], - string="acos", - style(color=8))), - Diagram( - Line(points=[-100, -80; 84, -80], style(color=8)), - Polygon(points=[100, -80; 84, -74; 84, -86; 100, -80], style(color=8, - fillColor=8)), - Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, - 49.8; -53.5, 37.3; -30.2, 19.7; 37.4, -24.8; 57.5, -40.8; 68.7, - - 52.7; 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), - Text(extent=[-30, 88; -5, 72], string=" pi"), - Text(extent=[-94, -57; -74, -77], string="-1"), - Text(extent=[80, -45; 100, -65], string="+1"), - Text( - extent=[90, -82; 110, -102], - string="u", - style(color=9)))); - external "C" y = acos(u); - end acos; - function atan "inverse tangent" - extends baseIcon2; - input Real u; - output Angle y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - -55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; - 5.23, 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, - 67.6; 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), - Text( - extent=[-86, 68; -14, 20], - string="atan", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - -55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; - 5.23, 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, - 67.6; 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), - Text(extent=[-32, 91; -12, 71], string="1.4"), - Text(extent=[-32, -71; -12, -91], string="-1.4"), - Text(extent=[73, 26; 93, 10], string=" 5.8"), - Text(extent=[-103, 20; -83, 4], string="-5.8"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = atan(u); - end atan; - function atan2 "four quadrant inverse tangent" - extends baseIcon2; - input Real u1; - input Real u2; - output Angle y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, - - 49.4; 69.9, -45.8; 80, -45.1], style(color=0)), - Line(points=[-80, -34.9; -46.1, -31.4; -29.4, -27.1; -18.3, -21.5; - - 10.3, -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, - 30; 62.1, 33.5; 80, 34.9], style(color=0)), - Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, - 65.8; -1.82, 77.2; 0, 80], style(color=0)), - Text( - extent=[-90, -46; -18, -94], - string="atan2", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, - - 49.4; 69.9, -45.8; 80, -45.1], style(color=0)), - Line(points=[-80, -34.9; -46.1, -31.4; -29.4, -27.1; -18.3, -21.5; - - 10.3, -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, - 30; 62.1, 33.5; 80, 34.9], style(color=0)), - Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, - 65.8; -1.82, 77.2; 0, 80], style(color=0)), - Text(extent=[-30, 89; -10, 70], string="pi"), - Text(extent=[-30, -69; -10, -88], string="-pi"), - Text(extent=[-30, 49; -10, 30], string="pi/2"), - Line(points=[0, 40; -8, 40], style(color=8)), - Line(points=[0, -40; -8, -40], style(color=8)), - Text(extent=[-30, -31; -10, -50], string="-pi/2"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9))), - Documentation(info=" -y = atan2(u1,u2) computes y such that tan(y) = u1/u2 and -y is in the range -pi < y < pi. u2 may be zero, provided -u1 is not zero. - -")); - external "C" y = atan2(u1, u2); - end atan2; - function sinh "hyperbolic sine" - extends baseIcon2; - input Real u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - -28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; - 24.5, 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, - 47.4; 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), - Text( - extent=[-88, 80; -16, 32], - string="sinh", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - -28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; - 24.5, 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, - 47.4; 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), - Text(extent=[-31, 72; -11, 88], string="27"), - Text(extent=[-35, -88; -15, -72], string="-27"), - Text(extent=[70, 25; 90, 5], string="4"), - Text(extent=[-98, 21; -78, 1], string="-4"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = sinh(u); - end sinh; - function cosh "hyperbolic cosine" - extends baseIcon2; - input Real u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.4, - y=0.05, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, -86.083; 68, -86.083], style(color=8)), - Polygon(points=[90, -86.083; 68, -78.083; 68, -94.083; 90, -86.083], - style(color=8, fillColor=8)), - Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, - 1.29; -63.1, -14.6; -58.3, -29.8; -52.7, -43.5; -46.2, -55.1; -39 - , -64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; - 23.7, -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; - 59.1, -27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; - 77.6, 61.1; 80, 80], style(color=0)), - Text( - extent=[4, 66; 66, 20], - string="cosh", - style(color=8))), - Diagram( - Line(points=[-100, -86.083; 84, -86.083], style(color=8)), - Polygon(points=[100, -86.083; 84, -80.083; 84, -92.083; 100, -86.083] - , style(color=8, fillColor=8)), - Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, - 1.29; -63.1, -14.6; -58.3, -29.8; -52.7, -43.5; -46.2, -55.1; -39 - , -64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; - 23.7, -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; - 59.1, -27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; - 77.6, 61.1; 80, 80], style(color=0)), - Text(extent=[-31, 72; -11, 88], string="27"), - Text(extent=[76, -61; 96, -81], string="4"), - Text(extent=[-104, -63; -84, -83], string="-4"), - Text( - extent=[90, -88; 110, -108], - string="u", - style(color=9)))); - external "C" y = cosh(u); - end cosh; - function tanh "hyperbolic tangent" - extends baseIcon2; - input Real u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; -47.8, -78.7; -35.8, -75.7; -27.7, -70.6; -22.1 - , -64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; - 6.83, 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, - 75; 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), - Text( - extent=[-88, 72; -16, 24], - string="atanh", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -47.8, -78.7; -35.8, -75.7; -27.7, -70.6; -22.1 - , -64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; - 6.83, 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, - 75; 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), - Text(extent=[70, 25; 90, 5], string="4"), - Text(extent=[-106, 21; -86, 1], string="-4"), - Text(extent=[-29, 72; -9, 88], string="1"), - Text(extent=[3, -72; 23, -88], string="-1"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = tanh(u); - end tanh; - function exp "exponential, base e" - extends baseIcon2; - input Real u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, -80.3976; 68, -80.3976], style(color=8)), - Polygon(points=[90, -80.3976; 68, -72.3976; 68, -88.3976; 90, -80.3976 - ], style(color=8, fillColor=8)), - Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61 - ; 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; - 67.1, 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), - Text( - extent=[-86, 50; -14, 2], - string="exp", - style(color=8))), - Diagram( - Line(points=[-100, -80.3976; 84, -80.3976], style(color=8)), - Polygon(points=[100, -80.3976; 84, -74.3976; 84, -86.3976; 100, - - 80.3976], style(color=8, fillColor=8)), - Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61 - ; 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; - 67.1, 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), - Text(extent=[-31, 72; -11, 88], string="20"), - Text(extent=[-92, -83; -72, -103], string="-3"), - Text(extent=[70, -83; 90, -103], string="3"), - Text(extent=[-18, -53; 2, -73], string="1"), - Text( - extent=[96, -82; 116, -102], - string="u", - style(color=9)))); - external "C" y = exp(u); - end exp; - function log "natural (base e) logarithm (u shall be > 0)" - extends baseIcon1; - input Real u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-80, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - - 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5 - , 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80 - , 80], style(color=0)), - Text( - extent=[-6, -24; 66, -72], - string="log", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-80, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - - 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5 - , 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80 - , 80], style(color=0)), - Text(extent=[-105, 72; -85, 88], string="3"), - Text(extent=[-109, -88; -89, -72], string="-3"), - Text(extent=[70, -3; 90, -23], string="20"), - Text(extent=[-78, -1; -58, -21], string="1"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = log(u); - end log; - function log10 "base 10 logarithm (u shall be > 0)" - extends baseIcon1; - input Real u; - output Real y; - annotation ( - Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.36, - y=0.07, - width=0.6, - height=0.6), - Icon( - Line(points=[-90, 0; 68, 0], style(color=8)), - Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor - =8)), - Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - -21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; - - 57.5, 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1 - ; 80, 80], style(color=0)), - Text( - extent=[-30, -22; 60, -70], - string="log10", - style(color=8))), - Diagram( - Line(points=[-100, 0; 84, 0], style(color=8)), - Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, - fillColor=8)), - Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - -21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; - - 57.5, 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1 - ; 80, 80], style(color=0)), - Text(extent=[70, -3; 90, -23], string="20"), - Text(extent=[-78, -1; -58, -21], string="1"), - Text(extent=[-109, 72; -89, 88], string=" 1.3"), - Text(extent=[-109, -88; -89, -72], string="-1.3"), - Text( - extent=[92, -2; 112, -22], - string="u", - style(color=9)))); - external "C" y = log10(u); - end log10; - function tempInterpol1 - "temporary routine for linear interpolation (will be removed)" - input Real u "in1;put value (first column of table)"; - input Real table[:, :] "table to be interpolated"; - input Integer icol "column of table to be interpolated"; - output Real y "interpolated input value (icol column of table)"; - protected - Integer i; - Integer n "number of rows of table"; - Real u1; - Real u2; - Real y1; - Real y2; - algorithm - n := size(table, 1); - if n <= 1 then - y := table[1, icol]; - else - // Search interval - if u <= table[1, 1] then - i := 1; - else - i := 2; - while i < n and u > table[i, 1] loop - i := i + 1; - end while; - i := i - 1; - end if; - - // Get interpolation data - u1 := table[i, 1]; - u2 := table[i + 1, 1]; - y1 := table[i, icol]; - y2 := table[i + 1, icol]; - - // Interpolate - if u1 >= u2 then - y := y1; - // since not possible to throw error - else - y := y1 + (y2 - y1)*(u - u1)/(u2 - u1); - end if; - end if; - end tempInterpol1; -end Math; diff --git a/Math/package.mo b/Math/package.mo new file mode 100644 index 0000000000..e65d457f75 --- /dev/null +++ b/Math/package.mo @@ -0,0 +1,829 @@ +package Math "Mathematical functions" + +import SI = Modelica.SIunits; + +extends Modelica.Icons.Library2; + + +annotation ( + Window( + x=0.04, + y=0.05, + width=0.44, + height=0.68, + library=1, + autolayout=1), + Invisible=true, + Icon(Text( + extent=[-59, -9; 42, -56], + string="f(x)", + style(color=0))), + Documentation(info=" ++This package contains the following basic mathematical functions: +
+ ++ sin(u) sine + cos(u) cosine + tan(u) tangent (u shall not be -pi/2, pi/2, 3*pi/2, ...) + asin(u) inverse sine (-1 <= u <= 1) + acos(u) inverse cosine (-1 <= u <= 1) + atan(u) inverse tangent + atan2(u1,u2) four quadrant inverse tangent + sinh(u) hyperbolic sine + cosh(u) hyperbolic cosine + tanh(u) hyperbolic tangent + exp(u) exponential, base e + log(u) natural (base e) logarithm (u > 0) + log10(u) base 10 logarithm (u > 0) ++ +
+These functions are used by calling them directly +with a full name (e.g. y = Modelica.Math.asin(0.5)). +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file \"Modelica/package.mo\". +
+ + +")); + + +partial function baseIcon1 + "Basic icon for mathematical function with y-axis on left side" + annotation (Icon( + Rectangle(extent=[-100, 100; 100, -100], style(color=0, fillColor=7)), + Line(points=[-80, -80; -80, 68], style(color=8)), + Polygon(points=[-80, 90; -88, 68; -72, 68; -80, 90], style(color=8, + fillColor=8)), + Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( + Line(points=[-80, 80; -88, 80], style(color=8)), + Line(points=[-80, -80; -88, -80], style(color=8)), + Line(points=[-80, -90; -80, 84], style(color=8)), + Text( + extent=[-75, 110; -55, 90], + string="y", + style(color=9)), + Polygon(points=[-80, 100; -86, 84; -74, 84; -80, 100], style(color=8, + fillColor=8)))); +end baseIcon1; + + +partial function baseIcon2 + "Basic icon for mathematical function with y-axis in middle" + annotation (Icon( + Rectangle(extent=[-100, 100; 100, -100], style(color=0, fillColor=7)), + Line(points=[0, -80; 0, 68], style(color=8)), + Polygon(points=[0, 90; -8, 68; 8, 68; 0, 90], style(color=8, fillColor=8) + ), + Text(extent=[-150, 150; 150, 110], string="%name")), Diagram( + Line(points=[0, 80; -8, 80], style(color=8)), + Line(points=[0, -80; -8, -80], style(color=8)), + Line(points=[0, -90; 0, 84], style(color=8)), + Text( + extent=[5, 110; 25, 90], + string="y", + style(color=9)), + Polygon(points=[0, 100; -6, 84; 6, 84; 0, 100], style(color=8, fillColor= + 8)))); +end baseIcon2; + + +function sin "sine" + extends baseIcon1; + input SI.Angle u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.02, + y=0.21, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, 74.6; + -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, 59.4; - + 14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, -64.2; + 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5; 57.5, + -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), + Text( + extent=[12, 84; 84, 36], + string="sin", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 0; -68.7, 34.2; -61.5, 53.1; -55.1, 66.4; -49.4, 74.6; + -43.8, 79.1; -38.2, 79.8; -32.6, 76.6; -26.9, 69.7; -21.3, 59.4; - + 14.9, 44.1; -6.83, 21.2; 10.1, -30.8; 17.3, -50.2; 23.7, -64.2; + 29.3, -73.1; 35, -78.4; 40.6, -80; 46.2, -77.6; 51.9, -71.5; 57.5, + -61.9; 63.9, -47.2; 72, -24.8; 80, 0], style(color=0)), + Text(extent=[-105, 72; -85, 88], string="1"), + Text(extent=[70, 25; 90, 5], string="2*pi"), + Text(extent=[-105, -72; -85, -88], string="-1"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = sin(u); +end sin; + + +function cos "cosine" + extends baseIcon1; + input SI.Angle u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.28, + y=0.06, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, 80; -74.4, 78.1; -68.7, 72.3; -63.1, 63; -56.7, 48.7; - + 48.6, 26.6; -29.3, -32.5; -22.1, -51.7; -15.7, -65.3; -10.1, -73.8 + ; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, -60.6 + ; 24.5, -45.7; 32.6, -23; 50.3, 31.3; 57.5, 50.7; 63.9, 64.6; 69.5 + , 73.4; 75.2, 78.6; 80, 80], style(color=0)), + Text( + extent=[-36, 82; 36, 34], + string="cos", + style(color=8))), + Diagram( + Text(extent=[-105, 72; -85, 88], string="1"), + Text(extent=[-105, -72; -85, -88], string="-1"), + Text(extent=[70, 25; 90, 5], string="2*pi"), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, 80; -74.4, 78.1; -68.7, 72.3; -63.1, 63; -56.7, 48.7; - + 48.6, 26.6; -29.3, -32.5; -22.1, -51.7; -15.7, -65.3; -10.1, -73.8 + ; -4.42, -78.8; 1.21, -79.9; 6.83, -77.1; 12.5, -70.6; 18.1, -60.6 + ; 24.5, -45.7; 32.6, -23; 50.3, 31.3; 57.5, 50.7; 63.9, 64.6; 69.5 + , 73.4; 75.2, 78.6; 80, 80], style(color=0)), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = cos(u); +end cos; + + +function tan "tangent (u shall not be -pi/2, pi/2, 3*pi/2, ...)" + extends baseIcon2; + input SI.Angle u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.31, + y=0.01, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - + 40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; -4.42, + -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4, 39.1; + 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0)), + Text( + extent=[-90, 72; -18, 24], + string="tan", + style(color=8))), + Diagram( + Text(extent=[-37, -72; -17, -88], string="-5.8"), + Text(extent=[-33, 86; -13, 70], string=" 5.8"), + Text(extent=[70, 25; 90, 5], string="1.4"), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; -78.4, -68.4; -76.8, -59.7; -74.4, -50; -71.2, - + 40.9; -67.1, -33; -60.7, -24.8; -51.1, -17.2; -35.8, -9.98; -4.42, + -1.07; 33.4, 9.12; 49.4, 16.2; 59.1, 23.2; 65.5, 30.6; 70.4, 39.1; + 73.6, 47.4; 76, 56.1; 77.6, 63.8; 80, 80], style(color=0)), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = tan(u); +end tan; + + +function asin "inverse sine (-1 <= u <= 1)" + extends baseIcon2; + input Real u; + output SI.Angle y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.29, + y=0.02, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, -80; -79.2, -72.8; -77.6, -67.5; -73.6, -59.4; -66.3, - + 49.8; -53.5, -37.3; -30.2, -19.7; 37.4, 24.8; 57.5, 40.8; 68.7, + 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), + Text( + extent=[-88, 78; -16, 30], + string="asin", + style(color=8))), + Diagram( + Text(extent=[-40, -72; -15, -88], string="-pi/2"), + Text(extent=[-38, 88; -13, 72], string=" pi/2"), + Text(extent=[70, 25; 90, 5], string="+1"), + Text(extent=[-90, 21; -70, 1], string="-1"), + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; -79.2, -72.8; -77.6, -67.5; -73.6, -59.4; -66.3, - + 49.8; -53.5, -37.3; -30.2, -19.7; 37.4, 24.8; 57.5, 40.8; 68.7, + 52.7; 75.2, 62.2; 77.6, 67.5; 80, 80], style(color=0)), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = asin(u); +end asin; + + +function acos "inverse cosine (-1 <= u <= 1)" + extends baseIcon2; + input Real u; + output SI.Angle y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.37, + y=0.09, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, -80; 68, -80], style(color=8)), + Polygon(points=[90, -80; 68, -72; 68, -88; 90, -80], style(color=8, + fillColor=8)), + Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, 49.8 + ; -53.5, 37.3; -30.2, 19.7; 37.4, -24.8; 57.5, -40.8; 68.7, -52.7; + 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), + Text( + extent=[-86, -14; -14, -62], + string="acos", + style(color=8))), + Diagram( + Line(points=[-100, -80; 84, -80], style(color=8)), + Polygon(points=[100, -80; 84, -74; 84, -86; 100, -80], style(color=8, + fillColor=8)), + Line(points=[-80, 80; -79.2, 72.8; -77.6, 67.5; -73.6, 59.4; -66.3, 49.8 + ; -53.5, 37.3; -30.2, 19.7; 37.4, -24.8; 57.5, -40.8; 68.7, -52.7; + 75.2, -62.2; 77.6, -67.5; 80, -80], style(color=0)), + Text(extent=[-30, 88; -5, 72], string=" pi"), + Text(extent=[-94, -57; -74, -77], string="-1"), + Text(extent=[80, -45; 100, -65], string="+1"), + Text( + extent=[90, -82; 110, -102], + string="u", + style(color=9)))); +external "C" y = acos(u); +end acos; + + +function atan "inverse tangent" + extends baseIcon2; + input Real u; + output SI.Angle y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - + 55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; 5.23 + , 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, 67.6; + 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), + Text( + extent=[-86, 68; -14, 20], + string="atan", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; -52.7, -75.2; -37.4, -69.7; -26.9, -63; -19.7, - + 55.2; -14.1, -45.8; -10.1, -36.4; -6.03, -23.9; -1.21, -5.06; 5.23 + , 21; 9.25, 34.1; 13.3, 44.2; 18.1, 52.9; 24.5, 60.8; 33.4, 67.6; + 47, 73.6; 69.5, 78.6; 80, 80], style(color=0)), + Text(extent=[-32, 91; -12, 71], string="1.4"), + Text(extent=[-32, -71; -12, -91], string="-1.4"), + Text(extent=[73, 26; 93, 10], string=" 5.8"), + Text(extent=[-103, 20; -83, 4], string="-5.8"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = atan(u); +end atan; + + +function atan2 "four quadrant inverse tangent" + extends baseIcon2; + input Real u1; + input Real u2; + output SI.Angle y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, -49.4; + 69.9, -45.8; 80, -45.1], style(color=0)), + Line(points=[-80, -34.9; -46.1, -31.4; -29.4, -27.1; -18.3, -21.5; -10.3 + , -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, 30; + 62.1, 33.5; 80, 34.9], style(color=0)), + Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, + 65.8; -1.82, 77.2; 0, 80], style(color=0)), + Text( + extent=[-90, -46; -18, -94], + string="atan2", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[0, -80; 8.93, -67.2; 17.1, -59.3; 27.3, -53.6; 42.1, -49.4; + 69.9, -45.8; 80, -45.1], style(color=0)), + Line(points=[-80, -34.9; -46.1, -31.4; -29.4, -27.1; -18.3, -21.5; -10.3 + , -14.5; -2.03, -3.17; 7.97, 11.6; 15.5, 19.4; 24.3, 25; 39, 30; + 62.1, 33.5; 80, 34.9], style(color=0)), + Line(points=[-80, 45.1; -45.9, 48.7; -29.1, 52.9; -18.1, 58.6; -10.2, + 65.8; -1.82, 77.2; 0, 80], style(color=0)), + Text(extent=[-30, 89; -10, 70], string="pi"), + Text(extent=[-30, -69; -10, -88], string="-pi"), + Text(extent=[-30, 49; -10, 30], string="pi/2"), + Line(points=[0, 40; -8, 40], style(color=8)), + Line(points=[0, -40; -8, -40], style(color=8)), + Text(extent=[-30, -31; -10, -50], string="-pi/2"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9))), + Documentation(info=" +y = atan2(u1,u2) computes y such that tan(y) = u1/u2 and +y is in the range -pi < y < pi. u2 may be zero, provided +u1 is not zero. + +")); +external "C" y = atan2(u1, u2); +end atan2; + + +function sinh "hyperbolic sine" + extends baseIcon2; + input Real u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - + 28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; 24.5 + , 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, 47.4; + 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), + Text( + extent=[-88, 80; -16, 32], + string="sinh", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; -76, -65.4; -71.2, -51.4; -65.5, -38.8; -59.1, - + 28.1; -51.1, -18.7; -41.4, -11.4; -27.7, -5.5; -4.42, -0.653; 24.5 + , 4.57; 39, 10.1; 49.4, 17.2; 57.5, 25.9; 63.9, 35.8; 69.5, 47.4; + 74.4, 60.4; 78.4, 73.8; 80, 80], style(color=0)), + Text(extent=[-31, 72; -11, 88], string="27"), + Text(extent=[-35, -88; -15, -72], string="-27"), + Text(extent=[70, 25; 90, 5], string="4"), + Text(extent=[-98, 21; -78, 1], string="-4"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = sinh(u); +end sinh; + + +function cosh "hyperbolic cosine" + extends baseIcon2; + input Real u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.4, + y=0.05, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, -86.083; 68, -86.083], style(color=8)), + Polygon(points=[90, -86.083; 68, -78.083; 68, -94.083; 90, -86.083], + style(color=8, fillColor=8)), + Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, 1.29 + ; -63.1, -14.6; -58.3, -29.8; -52.7, -43.5; -46.2, -55.1; -39, - + 64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; 23.7, + -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; 59.1, - + 27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; 77.6, 61.1; + 80, 80], style(color=0)), + Text( + extent=[4, 66; 66, 20], + string="cosh", + style(color=8))), + Diagram( + Line(points=[-100, -86.083; 84, -86.083], style(color=8)), + Polygon(points=[100, -86.083; 84, -80.083; 84, -92.083; 100, -86.083], + style(color=8, fillColor=8)), + Line(points=[-80, 80; -77.6, 61.1; -74.4, 39.3; -71.2, 20.7; -67.1, 1.29 + ; -63.1, -14.6; -58.3, -29.8; -52.7, -43.5; -46.2, -55.1; -39, - + 64.3; -30.2, -71.7; -18.9, -77.1; -4.42, -79.9; 10.9, -79.1; 23.7, + -75.2; 34.2, -68.7; 42.2, -60.6; 48.6, -51.2; 54.3, -40; 59.1, - + 27.5; 63.1, -14.6; 67.1, 1.29; 71.2, 20.7; 74.4, 39.3; 77.6, 61.1; + 80, 80], style(color=0)), + Text(extent=[-31, 72; -11, 88], string="27"), + Text(extent=[76, -61; 96, -81], string="4"), + Text(extent=[-104, -63; -84, -83], string="-4"), + Text( + extent=[90, -88; 110, -108], + string="u", + style(color=9)))); +external "C" y = cosh(u); +end cosh; + + +function tanh "hyperbolic tangent" + extends baseIcon2; + input Real u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, -80; -47.8, -78.7; -35.8, -75.7; -27.7, -70.6; -22.1, - + 64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; 6.83 + , 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, 75; + 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), + Text( + extent=[-88, 72; -16, 24], + string="tanh", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; -47.8, -78.7; -35.8, -75.7; -27.7, -70.6; -22.1, - + 64.2; -17.3, -55.9; -12.5, -44.3; -7.64, -29.2; -1.21, -4.82; 6.83 + , 26.3; 11.7, 42; 16.5, 54.2; 21.3, 63.1; 26.9, 69.9; 34.2, 75; + 45.4, 78.4; 72, 79.9; 80, 80], style(color=0)), + Text(extent=[70, 25; 90, 5], string="4"), + Text(extent=[-106, 21; -86, 1], string="-4"), + Text(extent=[-29, 72; -9, 88], string="1"), + Text(extent=[3, -72; 23, -88], string="-1"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = tanh(u); +end tanh; + + +function exp "exponential, base e" + extends baseIcon2; + input Real u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, -80.3976; 68, -80.3976], style(color=8)), + Polygon(points=[90, -80.3976; 68, -72.3976; 68, -88.3976; 90, -80.3976], + style(color=8, fillColor=8)), + Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61; + 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; 67.1 + , 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), + Text( + extent=[-86, 50; -14, 2], + string="exp", + style(color=8))), + Diagram( + Line(points=[-100, -80.3976; 84, -80.3976], style(color=8)), + Polygon(points=[100, -80.3976; 84, -74.3976; 84, -86.3976; 100, -80.3976] + , style(color=8, fillColor=8)), + Line(points=[-80, -80; -31, -77.9; -6.03, -74; 10.9, -68.4; 23.7, -61; + 34.2, -51.6; 43, -40.3; 50.3, -27.8; 56.7, -13.5; 62.3, 2.23; 67.1 + , 18.6; 72, 38.2; 76, 57.6; 80, 80], style(color=0)), + Text(extent=[-31, 72; -11, 88], string="20"), + Text(extent=[-92, -83; -72, -103], string="-3"), + Text(extent=[70, -83; 90, -103], string="3"), + Text(extent=[-18, -53; 2, -73], string="1"), + Text( + extent=[96, -82; 116, -102], + string="u", + style(color=9)))); +external "C" y = exp(u); +end exp; + + +function log "natural (base e) logarithm (u shall be > 0)" + extends baseIcon1; + input Real u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-80, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, -21.3 + ; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5, 28; + -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80, 80], + style(color=0)), + Text( + extent=[-6, -24; 66, -72], + string="log", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-80, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, -21.3 + ; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5, 28; + -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80, 80], + style(color=0)), + Text(extent=[-105, 72; -85, 88], string="3"), + Text(extent=[-109, -88; -89, -72], string="-3"), + Text(extent=[70, -3; 90, -23], string="20"), + Text(extent=[-78, -1; -58, -21], string="1"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = log(u); +end log; + + +function log10 "base 10 logarithm (u shall be > 0)" + extends baseIcon1; + input Real u; + output Real y; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.36, + y=0.07, + width=0.6, + height=0.6), + Icon( + Line(points=[-90, 0; 68, 0], style(color=8)), + Polygon(points=[90, 0; 68, 8; 68, -8; 90, 0], style(color=8, fillColor=8) + ), + Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - + 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5, + 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80, 80 + ], style(color=0)), + Text( + extent=[-30, -22; 60, -70], + string="log10", + style(color=8))), + Diagram( + Line(points=[-100, 0; 84, 0], style(color=8)), + Polygon(points=[100, 0; 84, 6; 84, -6; 100, 0], style(color=8, fillColor= + 8)), + Line(points=[-79.8, -80; -79.2, -50.6; -78.4, -37; -77.6, -28; -76.8, - + 21.3; -75.2, -11.4; -72.8, -1.31; -69.5, 8.08; -64.7, 17.9; -57.5, + 28; -47, 38.1; -31.8, 48.1; -10.1, 58; 22.1, 68; 68.7, 78.1; 80, 80 + ], style(color=0)), + Text(extent=[70, -3; 90, -23], string="20"), + Text(extent=[-78, -1; -58, -21], string="1"), + Text(extent=[-109, 72; -89, 88], string=" 1.3"), + Text(extent=[-109, -88; -89, -72], string="-1.3"), + Text( + extent=[92, -2; 112, -22], + string="u", + style(color=9)))); +external "C" y = log10(u); +end log10; + + +function tempInterpol1 + "temporary routine for linear interpolation (will be removed)" + input Real u "input value (first column of table)"; + input Real table[:, :] "table to be interpolated"; + input Integer icol "column of table to be interpolated"; + output Real y "interpolated input value (icol column of table)"; +protected + Integer i; + Integer n "number of rows of table"; + Real u1; + Real u2; + Real y1; + Real y2; +algorithm + n := size(table, 1); + if n <= 1 then + y := table[1, icol]; + else + // Search interval + if u <= table[1, 1] then + i := 1; + else + i := 2; + // Supports duplicate table[i, 1] values + // in the interior to allow discontinuities. + // Interior means that + // if table[i, 1] = table[i+1, 1] we require i>1 and i+1
Content
1. Overview of library Modelica.Mechanics.Rotational
@@ -40,45 +31,45 @@ frictional elements, backlash, elements to measure angle, angular velocity,
angular acceleration and the cut-torque of a flange. In sublibrary
Examples several examples are present to demonstrate the usage of
the elements. Just open the corresponding example model and simulate
-the model according to the provided description.
+the model according to the provided description.
A unique feature of this library is the component-oriented modeling of Coulomb friction elements, such as friction in bearings, -clutches, brakes, and gear efficiency. Even (dynamically) coupled +clutches, brakes, and gear efficiency. Even (dynamically) coupled friction elements, e.g., as in automatic gearboxes, can be handeled without introducing stiffness which leads to fast simulations. The underlying theory is new and is based on the solution of mixed continuous/discrete systems of equations, i.e., equations where the unknowns are of type Real, Integer or Boolean. -Provided appropriate numerical algorithms for the solution of such types of +Provided appropriate numerical algorithms for the solution of such types of systems are available in the simulation tool, the simulation of -(dynamically) coupled friction elements of this library is +(dynamically) coupled friction elements of this library is efficient and reliable.
- +A simple example of the usage of this library is given in the -figure above. This drive consists of a shaft with inertia J1=0.2 which -is connected via an ideal gearbox with gear ratio=5 to a second shaft -with inertia J2=5. The left shaft is driven via an external, -sinusoidal torque. -The filled and non-filled grey squares at the left and +figure above. This drive consists of a shaft with inertia J1=0.2 which +is connected via an ideal gearbox with gear ratio=5 to a second shaft +with inertia J2=5. The left shaft is driven via an external, +sinusoidal torque. +The filled and non-filled grey squares at the left and right side of a component represent mechanical flanges. Drawing a line between such squares means that the corresponding -flanges are rigidly attached to each other. +flanges are rigidly attached to each other. By convention in this library, the connector characterized as a filled grey square is called flange_a and placed at the left side of the component in the \"design view\" and the connector characterized as a non-filled grey square is called flange_b and placed at the right side of the component in the \"design view\". -The two connectors are completely identical, with the only +The two connectors are completely identical, with the only exception that the graphical layout is a little bit different in order to distinguish them for easier access of the connector variables. -For example, J1.flange_a.tau is the cut-torque in the connector +For example, J1.flange_a.tau is the cut-torque in the connector flange_a of component J1.
@@ -89,7 +80,7 @@ possible to connect two springs or two shafts with inertia directly together, see figure below. - +3. Flange connectors
@@ -153,7 +146,7 @@ Both connector classes contain the following variables:- SIunits.Angle phi \"absolute rotation angle of flange\"; + SIunits.Angle phi \"absolute rotation angle of flange\"; flow SIunits.Torque tau \"cut-torque in the flange\";@@ -179,7 +172,7 @@ signs of variables shall be interpreted. The basic idea is explained at hand of the following figure: - +
In the figure, three identical drive trains are shown. The only @@ -190,8 +183,8 @@ The signs of variables are now interpreted in the following way: Due to the 1-dimensional nature of the model, all components are basically connected together along one line (more complicated cases are discussed below). First, one has to define -a positive direction of this line, called axis of rotation. -In the top part of the figure this is characterized by an arrow +a positive direction of this line, called axis of rotation. +In the top part of the figure this is characterized by an arrow defined as axis of rotation. The simple rule is now: If a variable of a component is positive and can be interpreted as the element of a vector (e.g. torque or angular velocity vector), the @@ -201,7 +194,7 @@ inertias of the figure above are displayed with the positive vector direction displayed according to this rule:
- +The cut-torques J2.flange_a.tau, J4.flange_a.tau, J6.flange_b.tau @@ -213,16 +206,16 @@ direction of rotation if the values are positive. Some special cases are shown in the next figure:
- +-In the upper part of the figure, two variants of the connection of an +In the upper part of the figure, two variants of the connection of an external torque and an inertia are shown. In both cases, a positive signal input into the torque component accelerates the inertias inertia1, inertia2 into the positive axis of rotation, i.e., the angular accelerations inertia1.a, inertia2.a are positive and are directed along the \"axis of rotation\" arrow. -In the lower part of the figure the connection of inertias with +In the lower part of the figure the connection of inertias with a planetary gear are shown. Note, that the three flanges of the planetary gearbox are located along the axis of rotation and that the axis direction determines the positive rotation along these @@ -234,7 +227,7 @@ is as indicated with the additional grey arrows.
5. User-defined components
-In this section some hints are given to define your own +In this section some hints are given to define your own 1-dimensional rotational components which are compatible with the elements of this package. It is convenient to define a new @@ -273,7 +266,7 @@ Examples for such a definition are given in the following figure for an inertia component and a planetary gearbox:
- +As can be seen, all vectors are directed into the direction @@ -290,7 +283,7 @@ coordinate system has an influence on the usage of the component. But this is not the case, as shown in the next figure:
- +In the figure the local axes of rotation of the components @@ -300,7 +293,7 @@ part is just a different drawing of the left part. This is due to the fact, that by a connection, the two local coordinate systems are made identical and the (automatically) generated connection equations (= angles are identical, cut-torques sum-up to zero) are also -expressed in this common coordinate system. Therefore, even if in +expressed in this common coordinate system. Therefore, even if in the left figure it seems to be that the angular velocity vector of J2 goes from right to left, in reality it goes from left to right as shown in the right part of the figure, where the @@ -330,27 +323,27 @@ diagram and is therefore less convenient to use. This library is designed in a fully object oriented way in order that components can be connected together in every meaningful combination (e.g. direct connection of two springs or two inertias). -As a consequence, most models lead to a system of -differential-algebraic equations of index 3 (= constraint +As a consequence, most models lead to a system of +differential-algebraic equations of index 3 (= constraint equations have to be differentiated twice in order to arrive at a state space representation) and the Modelica translator or the simulator has to cope with this system representation. According to our present knowledge, this requires that the Modelica translator is able to symbolically differentiate equations (otherwise it is e.g. not possible to provide consistent initial -conditions; even if consistent initial conditions are present, most -numerical DAE integrators can cope at most with index 2 DAEs). +conditions; even if consistent initial conditions are present, most +numerical DAE integrators can cope at most with index 2 DAEs).
The elements of this library can be connected together in an -arbitrary way. However, difficulties may occur, if the elements which can lock the -relative motion between two flanges are connected rigidly -together such that essentially the same relative motion can be locked. -The reason is -that the cut-torque in the locked phase is not uniquely defined if the -elements are locked at the same time instant (i.e., there does not exist a +arbitrary way. However, difficulties may occur, if the elements which can lock the +relative motion between two flanges are connected rigidly +together such that essentially the same relative motion can be locked. +The reason is +that the cut-torque in the locked phase is not uniquely defined if the +elements are locked at the same time instant (i.e., there does not exist a unique solution) and some simulation systems may not be able to handle this situation, since this leads to a singularity during simulation. Currently, this type of problem can occur with the @@ -358,7 +351,7 @@ Coulomb friction elements BearingFriction, Clutch, Brake when the elements become stuck: - +In the figure above two typical situations are shown: In the upper part of @@ -369,10 +362,10 @@ whereas the clutch element can lock the relative motion between the two connected flanges. Contrary, the drive train in the lower part of the figure may give rise to simulation problems, because the BearingFriction element and the Brake element can lock the relative motion between a flange and -the housing and these flanges are rigidly connected together, i.e., +the housing and these flanges are rigidly connected together, i.e., essentially the same relative motion can be locked. These difficulties may be solved by either introducing a compliance between these flanges -or by combining the BearingFriction and Brake element into +or by combining the BearingFriction and Brake element into one component and resolving the ambiguity of the frictional torque in the stuck mode. A tool may handle this situation also automatically, by picking one solution of the infinitely many, e.g., the one where @@ -383,9 +376,9 @@ as possible.
Release Notes:
+ IdealGearR2T Ideal gear transforming rotational in translational motion. + Position Forced movement of a flange with a reference angle + given as input signal + RelativeStates Definition of relative state variables ++ Icon of Rotational.Torque changed. + Elements Acceleration, Torque, Fixed, Sensors ordered according + to the Translational library.
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, 2000-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
-"), - Icon( - Line(points=[-83, -66; -63, -66], style(color=0)), - Line(points=[36, -68; 56, -68], style(color=0)), - Line(points=[-73, -66; -73, -91], style(color=0)), - Line(points=[46, -68; 46, -91], style(color=0)), - Line(points=[-83, -29; -63, -29], style(color=0)), - Line(points=[36, -32; 56, -32], style(color=0)), - Line(points=[-73, -9; -73, -29], style(color=0)), - Line(points=[46, -12; 46, -32], style(color=0)), - Line(points=[-73, -91; 46, -91], style(color=0)), +"), Icon( + Line(points=[-83, -66; -63, -66], style(color=0)), + Line(points=[36, -68; 56, -68], style(color=0)), + Line(points=[-73, -66; -73, -91], style(color=0)), + Line(points=[46, -68; 46, -91], style(color=0)), + Line(points=[-83, -29; -63, -29], style(color=0)), + Line(points=[36, -32; 56, -32], style(color=0)), + Line(points=[-73, -9; -73, -29], style(color=0)), + Line(points=[46, -12; 46, -32], style(color=0)), + Line(points=[-73, -91; 46, -91], style(color=0)), Rectangle(extent=[-47, -17; 27, -80], style( - color=0, - gradient=2, - fillColor=8)), + color=0, + gradient=2, + fillColor=8)), Rectangle(extent=[-87, -41; -47, -54], style( - color=0, - gradient=2, - fillColor=8)), + color=0, + gradient=2, + fillColor=8)), Rectangle(extent=[27, -42; 66, -56], style( - color=0, - gradient=2, + color=0, + gradient=2, fillColor=8)))); - package Examples "Demonstration examples of the components of this package" + package Examples "Demonstration examples of the components of this package" + extends Modelica.Icons.Library; - - package SIunits = Modelica.SIunits ; - annotation ( - Coordsys( - extent=[0, 0; 484, 316], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.01, - y=0.01, - width=0.48, - height=0.47, - library=1, - autolayout=1), - Documentation(info=" - + + annotation (Window( + x=0.07, + y=0.13, + width=0.59, + height=0.36, + library=1, + autolayout=1),Documentation(info="This package contains example models to demonstrate the usage of the Modelica.Mechanics.Rotational package. Open the models and @@ -489,14 +491,16 @@ The following demo models are present: Friction Example to demonstrate usage of a clutch and a brake CoupledClutches Example to demonstrate usage of 3 dynamically coupled clutches. + LossyGearDemo1 Example to demonstrate that gear efficiency may lead to stuck motion + LossyGearDemo2 Example to show combination of LossyGear and BearingFriction
Release Notes:
+Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - model First "First example: simple drive train" - extends Modelica.Icons.Example; - + encapsulated model First "First example: simple drive train" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Rotational; + import SI = Modelica.SIunits; + + extends Icons.Example; + parameter Real amplitude=10; - parameter SIunits.Frequency freqHz=5; - parameter SIunits.Inertia Jmotor=0.1; - parameter SIunits.Inertia Jload=2; + parameter SI.Frequency freqHz=5; + parameter SI.Inertia Jmotor=0.1; + parameter SI.Inertia Jload=2; parameter Real ratio=10; parameter Real damping=10; - annotation ( - Coordsys( - extent=[-140, -100; 220, 100], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.23, - y=0.02, - width=0.52, - height=0.64), - Documentation(info=" - --The drive train consists of a motor inertia which is driven by -a sine-wave motor torque. Via a gearbox the rotational energy is -transmitted to a load inertia. Elasticity in the gearbox is modelled -by a spring element. A linear damper is used to model the -damping in the gearbox bearing. -
--Note, that a force component (like the damper of this example) which is -acting between a shaft and the housing has to be fixed in the housing -on one side via component Fixed. -
+ annotation (Documentation(info=" +The drive train consists of a motor inertia which is driven by +a sine-wave motor torque. Via a gearbox the rotational energy is +transmitted to a load inertia. Elasticity in the gearbox is modeled +by a spring element. A linear damper is used to model the +damping in the gearbox bearing.
-
-Simulate for 1 second and plot the following variables:
- angular velocities of inertias inertia2 and 3: inertia2.w, inertia3.w
-
Note, that a force component (like the damper of this example) +which is acting between a shaft and the housing has to be fixed +in the housing on one side via component Fixed.
+Simulate for 1 second and plot the following variables:
+ angular velocities of inertias inertia2 and 3: inertia2.w, inertia3.w
Release Notes:
--This drive train contains a frictional clutch and a brake. + + encapsulated model Friction "Drive train with clutch and brake" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Blocks.Math; + import Modelica.Mechanics.Rotational; + import Modelica.Constants.pi; + import SI = Modelica.SIunits; + + extends Icons.Example; + + parameter SI.Time startTime=0.5 "Start time of step"; + + output SI.Torque tMotor "driving torque of inertia3"; + output SI.Torque tClutch "friction torque of clutch"; + output SI.Torque tBrake "friction torque of brake"; + output SI.Torque tSpring "spring torque"; + + annotation (Documentation(info=" +
This drive train contains a frictional clutch and a brake. Simulate the system for 1 second using the following initial -values (defined already in the model): -
+values (defined already in the model): -- inertia1.w = 90 (or brake.w) +inertia1.w = 90 (or brake.w) inertia2.w = 90 inertia3.w = 100--Plot the output signals -
+Plot the output signals
-- tMotor Torque of motor - tClutch Torque in clutch - tBrake Torque in brake - tSpring Torque in spring +tMotor Torque of motor + tClutch Torque in clutch + tBrake Torque in brake + tSpring Torque in spring--as well as the absolute angular velocities of the three inertia components -(inertia1.w, inertia2.w, inertia3.w). -
+as well as the absolute angular velocities of the three inertia components +(inertia1.w, inertia2.w, inertia3.w).
Release Notes:
-
This example demonstrates how variable structure +drive trains are handeled. The drive train consists +of 4 inertias and 3 clutches, where the clutches +are controlled by input signals. The system has +2^3=8 different configurations and 3^3 = 27 +different states (every clutch may be in forward +sliding, backward sliding or locked mode when the +relative angular velocity is zero). By invoking the +clutches at different time instances, the switching +of the configurations can be studied.
+ +Simulate the system for 1.2 seconds with the
+following initial values:
+J1.w = 10.
Plot the following variables:
+angular velocities of inertias (J1.w, J2.w, J3.w,
+J4.w), frictional torques of clutches (clutchX.tau),
+frictional mode of clutches (clutchX.mode) where
+mode = -1/0/+1 means backward sliding,
+locked, forward sliding.
Release Notes:
+ +-This example demonstrates how variable structure drive trains are handeled. -The drive train consists of 4 inertias and 3 clutches, where the clutches -are controlled by input signals. The system has 2^3=8 different configurations -and 3^3 = 27 different states (every clutch may be in forward sliding, -backward sliding or locked mode when the relative angular velocity is zero). -By invoking the clutches at different time instances, the switching of the -configurations can be studied. +This model contains two inertias which are connected by an ideal +gear where the friction between the teeth of the gear is modeled in +a physical meaningful way (friction may lead to stuck mode which +locks the motion of the gear). The friction is defined by an +efficiency factor (= 0.5) for forward and backward driving condition leading +to a torque dependent friction loss. Simulate for about 0.5 seconds. +The friction in the gear will take all modes +(forward and backward rolling, as well as stuck).
-Simulate the system for 1.2 seconds with the following initial values:
-J1.w = 10.
+You may plot:
+Inertia1.w, +Inertia2.w : angular velocities of inertias +powerLoss : power lost in the gear +gear.mode : 1 = forward rolling + 0 = stuck (w=0) + -1 = backward rolling ++ +")); + Rotational.LossyGear gear(i=2, lossTable=[0, 0.5, 0.5, 0, 0]) annotation + (extent=[-10, 0; 10, 20]); + Rotational.Inertia Inertia1 annotation (extent=[-40, 0; -20, 20]); + Rotational.Inertia Inertia2(J=1.5) annotation (extent=[20, 0; 40, 20]); + Rotational.Torque torque1 annotation (extent=[-70, 0; -50, 20]); + Rotational.Torque torque2 annotation (extent=[70, 0; 50, 20]); + Sources.Sine DriveSine(amplitude={10}, freqHz={1}) annotation (extent=[- + 100, 0; -80, 20]); + Sources.Ramp load( + height={5}, + duration={2}, + offset={-10}) annotation (extent=[100, 0; 80, 20]); + equation + connect(Inertia1.flange_b, gear.flange_a) annotation (points=[-20, 10; - + 10, 10], style(color=0)); + connect(gear.flange_b, Inertia2.flange_a) annotation (points=[10, 10; 20 + , 10], style(color=0)); + connect(torque1.flange_b, Inertia1.flange_a) annotation (points=[-50, 10 + ; -40, 10], style(color=0)); + connect(torque2.flange_b, Inertia2.flange_b) annotation (points=[50, 10; + 40, 10], style(color=0)); + connect(DriveSine.outPort, torque1.inPort) annotation (points=[-79, 10; - + 72, 10], style(color=3)); + connect(load.outPort, torque2.inPort) annotation (points=[79, 10; 72, 10] + , style(color=3)); + + PowerLoss = gear.flange_a.tau*der(gear.flange_a.phi) + gear.flange_b.tau* + der(gear.flange_b.phi); + end LossyGearDemo1; + + encapsulated model LossyGearDemo2 + "Example to show combination of LossyGear and BearingFriction" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Rotational; + import SI = Modelica.SIunits; + + extends Icons.Example; + SI.Power PowerLoss "power lost in the gear"; + + annotation (Documentation(info="
-Plot the following variables:
-angular velocities of inertias (J1.w, J2.w, J3.w, J4.w),
-frictional torques of clutches (clutchX.tau),
-frictional mode of clutches (clutchX.mode) where
-mode = -1/0/+1 means backward sliding, locked, forward sliding.
+This model contains bearing friction and gear friction (= efficiency).
+If both friction models are stuck, there is no unique solution.
+Still a reliable Modelica simulator, such as Dymola, should
+be able to handle this situation.
Release Notes:
-+Simulate for about 0.5 seconds. The friction elements are +in all modes (forward and backward rolling, as well as stuck). +
+ ++You may plot: +
+ ++Inertia1.w, +Inertia2.w : angular velocities of inertias +powerLoss : power lost in the gear +bearingFriction.mode: 1 = forward rolling + 0 = stuck (w=0) + -1 = backward rolling +gear.mode : 1 = forward rolling + 0 = stuck (w=0) + -1 = backward rolling ++ +
Note: This combination of LossyGear and BearingFriction is not recommended to use, +as component LossyGear includes the functionality of component BearingFriction +(only peak not supported).
+ + ")); - Modelica.Mechanics.Rotational.Inertia J1( - J=1, - phi(start=0), - w(start=10)) annotation (extent=[-20, 20; 0, 40]); - Modelica.Mechanics.Rotational.Torque torque annotation (extent=[-60, 20 - ; -40, 40]); - Modelica.Mechanics.Rotational.Clutch clutch1(peak=1.1, fn_max=20) - annotation (extent=[20, 20; 40, 40]); - Modelica.Blocks.Sources.Sine sin1(amplitude={10}, freqHz={5}) - annotation (extent=[-100, 20; -80, 40]); - Modelica.Blocks.Sources.Step step1(startTime={T2}) annotation (extent=[ - 100, 60; 120, 80], rotation=-90); - Modelica.Mechanics.Rotational.Inertia J2(J=1) annotation (extent=[60, 20 - ; 80, 40]); - Modelica.Mechanics.Rotational.Clutch clutch2(peak=1.1, fn_max=20) - annotation (extent=[100, 20; 120, 40]); - Modelica.Mechanics.Rotational.Inertia J3(J=1) annotation (extent=[140, - 20; 160, 40]); - Modelica.Mechanics.Rotational.Clutch clutch3(peak=1.1, fn_max=20) - annotation (extent=[180, 20; 200, 40]); - Modelica.Mechanics.Rotational.Inertia J4(J=1) annotation (extent=[220, - 20; 240, 40]); - Modelica.Blocks.Sources.Sine sin2( - amplitude={1}, - freqHz={freqHz}, - phase={1.57}) annotation (extent=[20, 60; 40, 80], rotation=-90); - Modelica.Blocks.Sources.Step step2(startTime={T3}) annotation (extent=[ - 180, 60; 200, 80], rotation=-90); - equation - connect(clutch1.flange_b, J2.flange_a) annotation (points=[40, 30; - 60, 30]); - equation - connect(J1.flange_b, clutch1.flange_a) annotation (points=[0, 30; 20 - , 30]); - equation - connect(clutch2.flange_b, J3.flange_a) annotation (points=[120, 30; - 140, 30]); - equation - connect(J2.flange_b, clutch2.flange_a) annotation (points=[80, 30; - 100, 30]); - equation - connect(clutch3.flange_b, J4.flange_a) annotation (points=[200, 30; - 220, 30]); - equation - connect(J3.flange_b, clutch3.flange_a) annotation (points=[160, 30; - 180, 30]); - equation - connect(sin1.outPort, torque.inPort) annotation (points=[-78, 30; - - 62, 30]); - equation - connect(torque.flange_b, J1.flange_a) annotation (points=[-40, 30; - - 20, 30]); - equation - connect(sin2.outPort, clutch1.inPort) annotation (points=[30, 58; 30 - , 40]); - equation - connect(step1.outPort, clutch2.inPort) annotation (points=[110, 58; - 110, 40]); - equation - connect(step2.outPort, clutch3.inPort) annotation (points=[190, 60; - 190, 40]); - end CoupledClutches; + Rotational.LossyGear gear(i=2, lossTable=[0, 0.5, 0.5, 0, 0]) annotation + (extent=[-10, 0; 10, 20]); + Rotational.Inertia Inertia1 annotation (extent=[-40, 0; -20, 20]); + Rotational.Inertia Inertia2(J=1.5) annotation (extent=[20, 0; 40, 20]); + Rotational.Torque torque1 annotation (extent=[-50, 60; -70, 80]); + Rotational.Torque torque2 annotation (extent=[70, 0; 50, 20]); + Sources.Sine DriveSine(amplitude={10}, freqHz={1}) annotation (extent=[- + 20, 60; -40, 80]); + Sources.Ramp load( + height={5}, + duration={2}, + offset={-10}) annotation (extent=[100, 0; 80, 20]); + Rotational.BearingFriction bearingFriction(tau_pos=[0, 0.5; 1, 1]) + annotation (extent=[-70, 0; -50, 20]); + equation + PowerLoss = gear.flange_a.tau*der(gear.flange_a.phi) + gear.flange_b.tau* + der(gear.flange_b.phi); + connect(load.outPort, torque2.inPort) annotation (points=[78, 10; 74, 10] + , style(color=3)); + connect(torque2.flange_b, Inertia2.flange_b) annotation (points=[50, 10; + 40, 10], style(color=0)); + connect(Inertia2.flange_a, gear.flange_b) annotation (points=[20, 10; 10 + , 10], style(color=0)); + connect(gear.flange_a, Inertia1.flange_b) annotation (points=[-10, 10; - + 20, 10], style(color=0)); + connect(Inertia1.flange_a, bearingFriction.flange_b) annotation (points=[ + -40, 10; -50, 10], style(color=0)); + connect(bearingFriction.flange_a, torque1.flange_b) annotation (points=[- + 70, 10; -80, 10; -80, 70; -70, 70], style(color=0)); + connect(DriveSine.outPort, torque1.inPort) annotation (points=[-42, 70; - + 46, 70], style(color=3)); + end LossyGearDemo2; end Examples; - package Interfaces - "Connectors and partial models for 1D rotational mechanical components" + + package Interfaces + "Connectors and partial models for 1D rotational mechanical components" + extends Modelica.Icons.Library; - package SIunits = Modelica.SIunits ; - - annotation ( - Coordsys( - extent=[0, 0; 442, 394], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.01, - y=0.01, - width=0.34, - height=0.4, - library=1, - autolayout=1), - Documentation(info=" - + + annotation (Window( + x=0.07, + y=0.13, + width=0.43, + height=0.52, + library=1, + autolayout=1),Documentation(info="This package contains connectors and partial models for 1D rotational mechanical components. In particular
- Flange_a flange_a flange of a component. - Flange_b Right flange of a component. + Flange_a Left flange of a component. + Flange_b Right flange of a component. Rigid Rigid connection of two rotational 1D flanges (used for elements with inertia). Compliant Compliant connection of two rotational 1D flanges @@ -893,9 +984,9 @@ components. In particular
Release Notes:
+Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
")); - - connector Flange_a "1D rotational flange (filled square icon)" - SIunits.Angle phi "Absolute rotation angle of flange"; - flow SIunits.Torque tau "Cut torque in the flange"; + connector Flange_a "1D rotational flange (filled square icon)" + SI.Angle phi "Absolute rotation angle of flange"; + flow SI.Torque tau "Cut torque in the flange"; annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[2, 2], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), Window( - x=0.23, - y=0.02, - width=0.56, - height=0.68), + x=0.23, + y=0.02, + width=0.56, + height=0.68), Documentation(info="This is a connector for 1D rotational mechanical systems and models @@ -961,9 +1054,9 @@ of the rotation angle, see the information text of package Rotational
-If needed, the absolute angular velocity w and the +If needed, the absolute angular velocity w and the absolute angular acceleration a of the flange can be determined by -differentiation of the flange angle phi: +differentiation of the flange angle phi:
@@ -973,38 +1066,38 @@ differentiation of the flange angle phi:Release Notes:
This is a connector for 1D rotational mechanical systems and models @@ -1026,9 +1119,9 @@ of the rotation angle, see the information text of package Rotational
-If needed, the absolute angular velocity w and the +If needed, the absolute angular velocity w and the absolute angular acceleration a of the flange can be determined by -differentiation of the flange angle phi: +differentiation of the flange angle phi:
@@ -1039,41 +1132,41 @@ differentiation of the flange angle phi:Release Notes:
This is a 1D rotational component with two rigidly connected flanges, i.e., flange_a.phi = flange_b.phi. It is used e.g. to built up components @@ -1083,66 +1176,56 @@ with inertia.
Release Notes:
This is a 1D rotational component with a compliant connection of two rotational 1D flanges where inertial effects between the two flanges are neglected. The basic assumption is that the cut-torques -of the two flanges sum-up to zero, i.e., they have the same absolute value +of the two flanges sum-up to zero, i.e., they have the same absolute value but opposite sign: flange_a.tau + flange_b.tau = 0. This base class is used to built up force elements such as springs, dampers, friction.
@@ -1150,37 +1233,26 @@ is used to built up force elements such as springs, dampers, friction.Release Notes:
This is a 1D rotational component with two flanges. It is used e.g. to built up parts of a drive train consisting @@ -1192,135 +1264,117 @@ for a compliant connection of flanges (Interfaces.Compliant).
Release Notes:
-This is the base class of a 1D rotational component with one flange and one + x=0.39, + y=0.05, + width=0.6, + height=0.6), + Documentation(info=" +
+This is the base class of a 1D rotational component with one flange and one output signal in order to measure an absolute kinematic quantity in the flange and to provide the measured signal as output signal for further processing with the blocks of package Modelica.Blocks. @@ -1329,51 +1383,45 @@ with the blocks of package Modelica.Blocks.
Release Notes:
This is a base class for 1D rotational components with two rigidly connected flanges and one output signal in order to measure relative kinematic quantities @@ -1385,674 +1433,276 @@ with the blocks of package Modelica.Blocks.
Release Notes:
-Measures the cut-torque between two flanges in an ideal way -and provides the result as output signal outPort.signal[1] = flange_a.tau -(to be further processed with blocks of the Modelica.Blocks library). -
-Release Notes:
--Measures the absolute angle phi of a flange in an ideal -way and provides the result as output signal outPort.signal[1] -(to be further processed with blocks of the Modelica.Blocks library). +Rotational component with inertia and two rigidly connected flanges.
-Release Notes:
-Measures the absolute angular velocity w of a flange in an ideal -way and provides the result as output signal outPort.signal[1] -(to be further processed with blocks of the Modelica.Blocks library). -
+"), + Icon( + Line(points=[-80, -25; -60, -25], style(color=0)), + Line(points=[60, -25; 80, -25], style(color=0)), + Line(points=[-70, -25; -70, -70], style(color=0)), + Line(points=[70, -25; 70, -70], style(color=0)), + Line(points=[-80, 25; -60, 25], style(color=0)), + Line(points=[60, 25; 80, 25], style(color=0)), + Line(points=[-70, 45; -70, 25], style(color=0)), + Line(points=[70, 45; 70, 25], style(color=0)), + Line(points=[-70, -70; 70, -70], style(color=0)), + Rectangle(extent=[-50, 50; 50, -50], style( + color=0, + gradient=2, + fillColor=8)), + Rectangle(extent=[-90, 10; -50, -10], style( + color=0, + gradient=2, + fillColor=8)), + Rectangle(extent=[50, 10; 90, -10], style( + color=0, + gradient=2, + fillColor=8)), + Text(extent=[0, 120; 0, 60], string="%name"), + Text( + extent=[0, -80; 0, -130], + string="J=%J", + style(color=0))), + Diagram( + Line(points=[-80, -25; -60, -25], style(color=0)), + Line(points=[60, -25; 80, -25], style(color=0)), + Line(points=[-70, -25; -70, -70], style(color=0)), + Line(points=[70, -25; 70, -70], style(color=0)), + Line(points=[-80, 25; -60, 25], style(color=0)), + Line(points=[60, 25; 80, 25], style(color=0)), + Line(points=[-70, 45; -70, 25], style(color=0)), + Line(points=[70, 45; 70, 25], style(color=0)), + Line(points=[-70, -70; 70, -70], style(color=0)), + Rectangle(extent=[-50, 50; 50, -50], style( + color=0, + gradient=2, + fillColor=8)), + Rectangle(extent=[-90, 10; -50, -10], style( + color=0, + gradient=2, + fillColor=8)), + Rectangle(extent=[50, 10; 90, -10], style( + color=0, + gradient=2, + fillColor=8)), + Polygon(points=[0, -90; -20, -85; -20, -95; 0, -90], style(color=10, + fillColor=10)), + Line(points=[-90, -90; -19, -90], style(color=10, fillColor=10)), + Text( + extent=[4, -83; 72, -96], + string="rotation axis", + style(color=10)), + Polygon(points=[9, 73; 19, 70; 9, 67; 9, 73], style(color=0, fillColor= + 0)), + Line(points=[9, 70; -21, 70], style(color=0, fillColor=0)), + Text(extent=[25, 77; 77, 65], string="w = der(phi) "))); + equation + w = der(phi); + a = der(w); + J*a = flange_a.tau + flange_b.tau; + end Inertia; -Release Notes:
--Measures the absolute angular acceleration a of a flange in an ideal -way and provides the result as output signal (to be further processed with -blocks of the Modelica.Blocks library). +This element characterices any type of gear box which is fixed in the +ground and which has one driving shaft and one driven shaft. +The gear is ideal, i.e., it does not have inertia, elasticity, damping +or backlash. If these effects have to be considered, the gear has to be +connected to other elements in an appropriate way.
Release Notes:
-Measures the relative angle phi_rel between two flanges -in an ideal way and provides the result as output signal outPort.signal[1] -(to be further processed with blocks of the Modelica.Blocks library). -
- -Release Notes:
--Measures the relative angular velocity w_rel between two flanges -in an ideal way and provides the result as output signal outPort.signal[1] -(to be further processed with blocks of the Modelica.Blocks library). -
- -Release Notes:
--Measures the relative angular acceleration a_rel between two flanges -in an ideal way and provides the result as output signal outPort.signal[1] -(to be further processed with blocks of the Modelica.Blocks library). -
- -Release Notes:
--Rotational component with inertia and two rigidly connected flanges. -
-Release Notes:
--This element characterices any type of gear box which is fixed in the -ground and which has one driving shaft and one driven shaft. -The gear is ideal, i.e., it does not have inertia, elasticity, damping -or backlash. If these effects have to be considered, the gear has to be -connected to other elements in an appropriate way. -
- -Release Notes:
--The IdealPlanetary gear box is an ideal gear without inertia, +The IdealPlanetary gear box is an ideal gear without inertia, elasticity, damping or backlash consisting of an inner sun wheel, an outer ring wheel and a planet wheel located between sun and ring wheel. The bearing of the planet wheel shaft is fixed in the planet carrier. The component can be connected to other elements at the sun, ring and/or carrier flanges. It is not possible to connect -to the planet wheel. If inertia shall not be neglected, +to the planet wheel. If inertia shall not be neglected, the sun, ring and carrier inertias can be easily added by attaching -inertias (= model Inertia) to the corresponding connectors. +inertias (= model Inertia) to the corresponding connectors. The inertias of the planet wheels are always neglected.
The icon of the planetary gear signals that the sun and carrier flanges are on the left side and the ring flange is on the right side -of the gear box. However, this component is generic and is valid -independantly how the flanges are actually placed (e.g. sun wheel +of the gear box. However, this component is generic and is valid +independantly how the flanges are actually placed (e.g. sun wheel may be placed on the right side instead on the left side in reality).
The ideal planetary gearbox is uniquely defined by the ratio of the number of ring teeth zr with respect to the number of -sun teeth zs. For example, if there are 100 ring teeth and +sun teeth zs. For example, if there are 100 ring teeth and 50 sun teeth then ratio = zr/zs = 2. The number of planet teeth zp has to fulfill the following relationship:
@@ -2067,430 +1717,256 @@ Therefore, in the above example zp = 25 is required.According to the overall convention, the positive direction of all -vectors, especially the absolute angular velocities and cut-torques +vectors, especially the absolute angular velocities and cut-torques in the flanges, are along the axis vector displayed in the icon.
Release Notes:
-The input signal inPort.signal[1] defines an external -torque tau in [Nm] which acts (with negative sign) at -a flange connector, i.e., the component connected to this -flange is driven by torque tau.
--The input signal can be provided from one of the signal generator -blocks of Modelica.Blocks.Sources. - -
Release Notes:
--The input signal inPort.signal[1] defines an angular acceleration -a in [rad/s2]. Flange flange_b is forced to move with -this acceleration. The angular velocity w and the rotation angle -phi of the flange are automatically determined by integration of -the acceleration. -
- --The input signal can be provided from one of the signal generator -blocks of the block library Modelica.Blocks.Sources. -
- -Release Notes:
--The flange of a 1D rotational mechanical system is fixed -at an angle phi0 in the housing. May be used: + x=0.35, + y=0.1, + width=0.6, + height=0.65), + Documentation(info=" +This is an ideal mass- and inertialess gearbox which transforms a +1D-rotational into a 1D-translational motion. If elasticity, damping +or backlash has to be considered, this ideal gearbox has to be +connected with corresponding elements.
-Release Notes:
-A linear 1D rotational spring. The component can be connected either + x=0.21, + y=0.02, + width=0.8, + height=0.69), + Documentation(info=" +
+A linear 1D rotational spring. The component can be connected either between two inertias/gears to describe the shaft elasticity, or between a inertia/gear and the housing (component Fixed), to describe a coupling of the element with the housing via a spring. @@ -2499,136 +1975,145 @@ a coupling of the element with the housing via a spring.
Release Notes:
-Linear, velocity dependent damper element. It can be either connected -between an inertia or gear and the housing (component Fixed), or + x=0.23, + y=0.05, + width=0.62, + height=0.65), + Documentation(info=" +
+Linear, velocity dependent damper element. It can be either connected +between an inertia or gear and the housing (component Fixed), or between two inertia/gear elements.
Release Notes:
-A spring and damper element connected in parallel. + x=0.45, + y=0.04, + width=0.44, + height=0.65), + Documentation(info=" +
+A spring and damper element connected in parallel. The component can be connected either between two inertias/gears to describe the shaft elasticity and damping, or between an inertia/gear and the housing (component Fixed), @@ -2638,97 +2123,98 @@ to describe a coupling of the element with the housing via a spring/damper.
Release Notes:
This element consists of a backlash element connected in series -to a spring and damper element which are connected in parallel. +to a spring and damper element which are connected in parallel. The spring constant shall be non-zero, otherwise the component cannot be used.
@@ -2741,154 +2227,153 @@ can be used to model a gear box with backlash, elasticity and damping.Release Notes:
This element describes Coulomb friction in bearings, -i.e., a frictional torque acting between a flange and the housing. -The positive sliding friction torque \"tau\" has to be defined +i.e., a frictional torque acting between a flange and the housing. +The positive sliding friction torque \"tau\" has to be defined by table \"tau_pos\" as function of the absolute angular velocity \"w\". E.g.
@@ -2907,10 +2392,7 @@ gives the following table:
- tau_pos = [0, 0 - 1, 2 - 2, 5 - 3, 8]; + tau_pos = [0, 0; 1, 2; 2, 5; 3, 8];
@@ -2922,7 +2404,7 @@ values. Friction is modelled in the following way:
-When the absolute angular velocity \"w\" is not zero, the friction torque +When the absolute angular velocity \"w\" is not zero, the friction torque is a function of w and of a constant normal force. This dependency is defined via table tau_pos and can be determined by measurements, e.g. by driving the gear with constant velocity and measuring the @@ -2932,10 +2414,10 @@ needed motor torque (= friction torque).
When the absolute angular velocity becomes zero, the elements connected by the friction element become stuck, i.e., the absolute -angle remains constant. In this phase the friction torque is -calculated from a torque balance due to the requirement, that -the absolute acceleration shall be zero. The elements begin -to slide when the friction torque exceeds a threshold value, +angle remains constant. In this phase the friction torque is +calculated from a torque balance due to the requirement, that +the absolute acceleration shall be zero. The elements begin +to slide when the friction torque exceeds a threshold value, called the maximum static friction torque, computed via:
@@ -2952,7 +2434,7 @@ numerical methods. The method is described in:Release Notes:
This component models a clutch, i.e., a component with two flanges where friction is present between the two flanges @@ -3225,7 +2708,7 @@ distributions:
- When plates are pressed together, where ri is the inner radius, + When plates are pressed together, where ri is the inner radius, ro is the outer radius and N is the number of friction interfaces, the geometry constant is calculated in the following way under the assumption of a uniform rate of wear at the interfaces: @@ -3246,10 +2729,10 @@ distributions:
When the relative angular velocity becomes zero, the elements connected by the friction element become stuck, i.e., the relative - angle remains constant. In this phase the friction torque is - calculated from a torque balance due to the requirement, that - the relative acceleration shall be zero. The elements begin - to slide when the friction torque exceeds a threshold value, + angle remains constant. In this phase the friction torque is + calculated from a torque balance due to the requirement, that + the relative acceleration shall be zero. The elements begin + to slide when the friction torque exceeds a threshold value, called the maximum static friction torque, computed via:
@@ -3265,7 +2748,7 @@ are dynamically coupled. The method is described in:Release Notes:
This component models a one-way clutch, i.e., a component with two flanges where friction is present between the two flanges and these flanges are pressed together via a normal force. These -flanges maybe sliding with respect to each other +flanges maybe sliding with respect to each other Parallel connection of ClutchCombi and of FreeWheel. The element is introduced to resolve the ambiguity @@ -3457,7 +2940,7 @@ A one-way-clutch is an element where a clutch is connected in parallel to a free wheel. This special element is provided, because such a parallel connection introduces an ambiguity into the model (the constraint torques are not uniquely defined when both -elements are stuck) and this element resolves it by introducing +elements are stuck) and this element resolves it by introducing one constraint torque and not two.
@@ -3495,7 +2978,7 @@ distributions:- When plates are pressed together, where ri is the inner radius, + When plates are pressed together, where ri is the inner radius, ro is the outer radius and N is the number of friction interfaces, the geometry constant is calculated in the following way under the assumption of a uniform rate of wear at the interfaces: @@ -3516,10 +2999,10 @@ distributions:
When the relative angular velocity becomes zero, the elements connected by the friction element become stuck, i.e., the relative - angle remains constant. In this phase the friction torque is - calculated from a torque balance due to the requirement, that - the relative acceleration shall be zero. The elements begin - to slide when the friction torque exceeds a threshold value, + angle remains constant. In this phase the friction torque is + calculated from a torque balance due to the requirement, that + the relative acceleration shall be zero. The elements begin + to slide when the friction torque exceeds a threshold value, called the maximum static friction torque, computed via:
@@ -3535,7 +3018,7 @@ are dynamically coupled. The method is described in:Release Notes:
Copyright (C) 1999, DLR.
+Copyright © 1999-2002, DLR.
")); - equation + equation // Constant auxiliary variable - mue0 = Math.tempInterpol1(0, mue_pos, 2); + mue0 = Modelica.Math.tempInterpol1(0, mue_pos, 2); tau0_max_low = eps0*mue0*cgeo*fn_max; - + // Relative quantities w_rel = der(phi_rel); a_rel = der(w_rel); - + // Normal force and friction torque for w_rel=0 u = inPort.signal[1]; free = u <= 0; fn = if free then 0 else fn_max*u; tau0 = mue0*cgeo*fn; tau0_max = if free then tau0_max_low else peak2*tau0; - + /* Friction characteristic (locked is introduced to help the Modelica translator determining the different structural configurations, if for each configuration special code shall be generated) */ - startForward = pre(stuck) and (sa > tau0_max or pre(startForward) and sa - > tau0 or w_rel > w_small) or initial() and noEvent(w_rel > 0); + startForward = pre(stuck) and (sa > tau0_max or pre(startForward) and sa > + tau0 or w_rel > w_small) or initial() and (w_rel > 0); locked = pre(stuck) and not startForward; - - // acceleration and friction torque + + // acceleration and friction torque a_rel = if locked then 0 else sa - tau0; tau = if locked then sa else (if free then 0 else cgeo*fn* - Math.tempInterpol1(w_rel, mue_pos, 2)); - + Modelica.Math.tempInterpol1(w_rel, mue_pos, 2)); + // Determine configuration stuck = locked or w_rel <= 0; end OneWayClutch; - model Brake "Brake based on Coulomb friction " + + model Brake "Brake based on Coulomb friction " extends Interfaces.Rigid; - - parameter Real mue_pos[:, :]=[0, 0.5] + + parameter Real mue_pos[:, :]=[0, 0.5] "[w,mue] positive sliding friction coefficient (w_rel>=0)"; - parameter Real peak(final min=1) = 1 + parameter Real peak(final min=1) = 1 "peak*mue_pos[1,2] = maximum value of mue for w_rel==0"; - parameter Real cgeo(final min=0) = 1 + parameter Real cgeo(final min=0) = 1 "Geometry constant containing friction distribution assumption"; - parameter SIunits.Force fn_max(final min=0) = 1 "Maximum normal force"; - + parameter SI.Force fn_max(final min=0) = 1 "Maximum normal force"; + extends Interfaces.FrictionBase; - - SIunits.AngularVelocity w - "Absolute angular velocity of flange_a and flange_b"; - SIunits.AngularAcceleration a + + SI.AngularVelocity w "Absolute angular velocity of flange_a and flange_b"; + SI.AngularAcceleration a "Absolute angular acceleration of flange_a and flange_b"; - + Real mue0 "Friction coefficient for w=0 and forward sliding"; - SIunits.Force fn "Normal force (=fn_max*inPort.signal)"; - + SI.Force fn "Normal force (=fn_max*inPort.signal)"; + // Constant auxiliary variable - Modelica.Blocks.Interfaces.InPort inPort(final n=1) + Modelica.Blocks.Interfaces.InPort inPort(final n=1) "Normalized force signal (= normal_force/fn_max; brake is active if > 0)" annotation (extent=[-20, 130; 20, 90], rotation=90); annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.05, - y=0.01, - width=0.74, - height=0.71), + x=0.05, + y=0.01, + width=0.74, + height=0.71), Icon( Rectangle(extent=[-90, 10; -18, -10], style( - gradient=2, - fillColor=8, - fillPattern=1)), + gradient=2, + fillColor=8, + fillPattern=1)), Rectangle(extent=[-18, 60; 20, -60], style( - gradient=2, - fillColor=8, - fillPattern=1)), + gradient=2, + fillColor=8, + fillPattern=1)), Rectangle(extent=[20, 10; 90, -10], style( - gradient=2, - fillColor=8, - fillPattern=1)), - Polygon(points=[40, 40; 70, 50; 70, 30; 40, 40], style(fillColor=3, - fillPattern=1)), + gradient=2, + fillColor=8, + fillPattern=1)), + Polygon(points=[40, 40; 70, 50; 70, 30; 40, 40], style(fillColor=3, + fillPattern=1)), Rectangle(extent=[30, 54; 40, 25], style( - color=0, - fillColor=0, - fillPattern=1)), + color=0, + fillColor=0, + fillPattern=1)), Polygon(points=[-40, 40; -70, 50; -70, 30; -40, 40], style(fillColor=3 - , fillPattern=1)), + , fillPattern=1)), Rectangle(extent=[-40, 55; -30, 25], style( - color=0, - fillColor=0, - fillPattern=1)), - Line(points=[0, 90; 90, 70; 90, 40; 70, 40]), + color=0, + fillColor=0, + fillPattern=1)), + Line(points=[0, 90; 90, 70; 90, 40; 70, 40]), Line(points=[0, 90; -90, 70; -90, 40; -70, 40], style( - pattern=1, - thickness=1, - arrow=0)), - Text(extent=[-100, -120; 100, -60], string="%name")), - Documentation(info=" - + pattern=1, + thickness=1, + arrow=0)), + Text(extent=[0, -130; 0, -70], string="%name")), + Documentation(info="This component models a brake, i.e., a component where a frictional torque is acting between the housing and a flange and a controlled normal force presses the flange to the housing in order to increase friction. The normal force fn has to be provided as input signal u in a normalized -form, fn = fn_max*u, where fn_max has to be provided as parameter. +form, fn = fn_max*u, where fn_max has to be provided as parameter. Friction in the brake is modelled in the following way:
-When the absolute angular velocity \"w\" is not zero, the friction torque +When the absolute angular velocity \"w\" is not zero, the friction torque is a function of the velocity dependent friction coefficient mue(w) , of the normal force \"fn\", and of a geometry constant \"cgeo\" which takes into account the geometry of the device and the assumptions on the friction @@ -3683,7 +3165,7 @@ distributions:
- When plates are pressed together, where ri is the inner radius, + When plates are pressed together, where ri is the inner radius, ro is the outer radius and N is the number of friction interfaces, the geometry constant is calculated in the following way under the assumption of a uniform rate of wear at the interfaces: @@ -3704,10 +3186,10 @@ distributions:
When the absolute angular velocity becomes zero, the elements connected by the friction element become stuck, i.e., the absolute - angle remains constant. In this phase the friction torque is - calculated from a torque balance due to the requirement, that - the absolute acceleration shall be zero. The elements begin - to slide when the friction torque exceeds a threshold value, + angle remains constant. In this phase the friction torque is + calculated from a torque balance due to the requirement, that + the absolute acceleration shall be zero. The elements begin + to slide when the friction torque exceeds a threshold value, called the maximum static friction torque, computed via:
@@ -3723,7 +3205,7 @@ are dynamically coupled. The method is described in:Release Notes:
+This component models the gear ratio and the losses of +a standard gear box in a reliable way including the stuck phases +that may occur at zero speed. The gear boxes that can +be handeled are fixed in the ground, have one input and one +output shaft, and are essentially described by the equations: +
+ +flange_a.phi = i*flange_b.phi + (-flange_b.tau) = i*(eta_mf*flange_a.tau - tau_bf) ++ +
+where +
+ +The loss terms \"eta_mf\" and \"tau_bf\" are functions of the +absolute value of the input shaft speed w_a and of the energy +flow direction. They are defined by parameter lossTable[:,5] + where the columns of this table have the following +meaning:
+ +|w_a| | +eta_mf1 | +eta_mf2 | +|tau_bf1| | +|tau_bf2| | +
... | +... | +... | +... | +... | +
... | +... | +... | +... | +... | +
with
+ +|w_a| | +Absolute value of angular velocity of input shaft flange_a | +
eta_mf1 | +Mesh efficiency in case of input shaft driving | +
eta_mf2 | +Mesh efficiency in case of output shaft driving | +
|tau_bf1| | +Absolute bearing friction torque in case of input shaft driving | +
|tau_bf2| | +Absolute bearing friction torque in case of output shaft driving | +
+With these variables, the mesh efficiency and the bearing friction +are formally defined as: +
+ +if flange_a.tau*w_a > 0 or flange_a.tau==0 and w_a > 0 then + eta_mf := eta_mf1 + tau_bf := tau_bf1 + elseif flange_a.tau*w_a < 0 or flange_a.tau==0 and w_a < 0 then + eta_mf := 1/eta_mf2 + tau_bf := tau_bf2 + else // w_a == 0 + eta_mf and tau_bf are computed such that der(w_a) = 0 + end if; ++ +
Note, that the losses are modeled in a physically meaningful way taking +into account that at zero speed the movement may be locked due +to the friction in the gear teeth and/or in the bearings. +Due to this important property, this component can be used in +situations where the combination of the components +Modelica.Mechanics.Rotational.IdealGear and +Modelica.Mechanics.Rotational.GearEfficiency will fail because, +e.g., chattering occurs when using the +Modelica.Mechanics.Rotational.GearEfficiency model. +
+ ++Acknowledgement: The essential idea to model efficiency +in this way is from Christoph Pelchen, ZF Friedrichshafen. +
+ +For detailed information:
+ +Pelchen C., +Schweiger C., +and Otter M.: +"Modeling +and Simulating the Efficiency of Gearboxes and of Planetary Gearboxes," in +Proceedings of the 2nd International Modelica Conference, Oberpfaffenhofen, Germany, +pp. 257-266, The Modelica Association and Institute of Robotics and Mechatronics, +Deutsches Zentrum für Luft- und Raumfahrt e. V., March 18-19, 2002.
+ + +"), + Icon( + Rectangle(extent=[-40, 20; -20, -20], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[-40, 140; -20, 20], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[20, 100; 40, 60], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[20, 60; 40, -60], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[40, 10; 90, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[-20, 90; 20, 70], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[-90, 10; -40, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Text( + extent=[163, 188; -126, 139], + string="i=%i", + style(color=0)), + Polygon(points=[-111, 30; -70, 30; -70, 100; -40, 100; -60, 121; -80, + 100; -49, 100; -49, 20; -111, 20; -111, 30], style( + color=1, + gradient=0, + fillColor=1, + fillPattern=1)), + Text(extent=[111, -65; -109, -125], string="%name")), + Diagram( + Rectangle(extent=[-40, 20; -20, -20], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[-40, 140; -20, 20], style( + color=0, + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[20, 100; 40, 60], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[20, 60; 40, -60], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[-90, 10; -40, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[40, 10; 90, -10], style( + gradient=2, + fillColor=8, + fillPattern=1)), + Rectangle(extent=[-20, 90; 20, 70], style( + color=0, + gradient=2, + fillColor=8, + fillPattern=1)), + Line(points=[-90, -90; -19, -90], style(color=10, fillColor=10)), + Polygon(points=[0, -90; -20, -85; -20, -95; 0, -90], style(color=10, + fillColor=10)), + Text( + extent=[5, -82; 73, -95], + string="rotation axis", + style(color=10)))); + + protected + function equal "Compare whether two Real matrices are identical" + + extends Modelica.Icons.Function; + input Real A[:, :]; + input Real B[:, :]; + input Real eps=Modelica.Constants.eps + "two numbers r1, r2 are identical if abs(r1-r2) <= eps"; + output Boolean result; + algorithm + result := false; + if size(A, 1) == size(B, 1) and size(A, 2) == size(B, 2) then + result := true; + for i in 1:size(A, 1) loop + for j in 1:size(A, 2) loop + if abs(A[i, j] - B[i, j]) >= eps then + result := false; + end if; + end for; + end for; + end if; + annotation (Documentation(info=" ++The function call +
+ +equal(A1, A2); ++ +
+returns true, if the two Real matrices A1 and A2 have the +same dimensions and the same elements. Otherwise the function +returns false. Two elements r1 and r2 of A1 and A2 respectively +are checked on equality by the test 'eps >= abs(r1-r2)', where 'eps' +can be provided as third argument of the function (the default is +Modelica.Constants.eps). +
+")); + end equal; + equation + + assert(abs(i) > 0, + "Error in initialization of LossyGear: i may not be zero"); + + ideal = equal(lossTable, [0, 1, 1, 0, 0]); + + interpolation_result = if ideal then [1, 1, 0, 0] else + Modelica.Math.tempInterpol2(noEvent(abs(w_a)), lossTable, {2,3,4,5}); + eta_mf1 = interpolation_result[1, 1]; + eta_mf2 = interpolation_result[1, 2]; + tau_bf1 = noEvent(abs(interpolation_result[1, 3])); + tau_bf2 = noEvent(abs(interpolation_result[1, 4])); + + flange_a.phi = i*flange_b.phi; + + // Torque balance (no inertias) + 0 = flange_b.tau + i*(flange_a.tau - tauLoss); + + // Speed for friction element + w_a = der(flange_a.phi); + a_a = der(w_a); + + quadrant1 = (1 - eta_mf1)*flange_a.tau + tau_bf1; + quadrant2 = (1 - 1/eta_mf2)*flange_a.tau + tau_bf2; + quadrant4 = (1 - 1/eta_mf2)*flange_a.tau - tau_bf2; + quadrant3 = (1 - eta_mf1)*flange_a.tau - tau_bf1; + + // Torque Losses + tau_aPos = ideal or (flange_a.tau >= 0); + tauLossMax = if tau_aPos then quadrant1 else quadrant2; + tauLossMin = if tau_aPos then quadrant4 else quadrant3; + + // Determine rolling/stuck mode when w_rel = 0 + startForward = pre(mode) == Stuck and sa > tauLossMax or initial() and w_a + > 0; + startBackward = pre(mode) == Stuck and sa < tauLossMin or initial() and w_a + < 0; + locked = not (ideal or pre(mode) == Forward or startForward or pre(mode) + == Backward or startBackward); + + /* Parameterized curve description a_a = f1(sa), tauLoss = f2(sa) + In comparison to Modelica.Mechanics.Rotational.FrictionBase it is possible + to simplify the following expression as mode == Stuck is assured in case + of startForward or startBackward */ + tauLoss = if ideal then 0 else (if locked then sa else (if (startForward + or pre(mode) == Forward) then tauLossMax else tauLossMin)); + + a_a = if locked then 0 else sa - tauLoss; + + /* Finite state machine to fix configuration after the computation above + The above equations are only dependent on pre(mode) and not on the actual + value of mode. This prevents loops. So mode can be determined in one step. */ + mode = if ideal then Free else (if (pre(mode) == Forward or startForward) + and w_a > 0 then Forward else if (pre(mode) == Backward or startBackward + ) and w_a < 0 then Backward else Stuck); + end LossyGear; + + model GearEfficiency "Obsolete component (use model LossyGear instead)" extends Interfaces.Rigid; - + parameter Real eta( - min=Modelica.Constants.SMALL, + min=Modelica.Constants.small, max=1) = 1 "Efficiency"; - SIunits.Power power_a "Energy flowing into flange_a (= power)"; - Boolean driving_a + SI.Power power_a "Energy flowing into flange_a (= power)"; + Boolean driving_a "True, if energy is flowing INTO and not out of flange flange_a"; - + annotation ( Coordsys( - extent=[-100, -100; 100, 100], - grid=[1, 1], - component=[20, 20]), + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), Window( - x=0.23, - y=0.06, - width=0.69, - height=0.62), + x=0.23, + y=0.06, + width=0.69, + height=0.62), Icon( - Text(extent=[-100, 120; 98, 60], string="%name=%eta"), + Text(extent=[0, 130; 0, 70], string="%name"), Rectangle(extent=[-90, 20; 90, -20], style( - gradient=2, - fillColor=8, - fillPattern=1)), - Line(points=[-60, -40; 0, -40], style(color=0)), - Line(points=[-30, 60; -30, 40], style(color=0)), - Line(points=[-59, 40; 0, 40], style(color=0)), - Line(points=[-30, -40; -30, -80], style(color=0)), - Polygon(points=[-60, -20; 30, -20; 30, -80; 40, -80; 20, -100; 0, -80 - ; 10, -80; 10, -30; -60, -30; -60, -20; -60, -20], style( - color=1, - gradient=0, - fillColor=1, - fillPattern=1))), - Documentation(info=" - + gradient=2, + fillColor=8, + fillPattern=1)), + Line(points=[-60, -40; 0, -40], style(color=0)), + Line(points=[-30, 60; -30, 40], style(color=0)), + Line(points=[-59, 40; 0, 40], style(color=0)), + Line(points=[-30, -40; -30, -80], style(color=0)), + Polygon(points=[-60, -20; 30, -20; 30, -80; 40, -80; 20, -100; 0, -80; + 10, -80; 10, -30; -60, -30; -60, -20; -60, -20], style( + color=1, + gradient=0, + fillColor=1, + fillPattern=1)), + Text( + extent=[0, -100; 0, -150], + string="eta=%eta", + style(color=0))), + obsolete="This model can get stuck due when the torque direction varies, use LossyGear instead.", + Documentation(info=" ++THIS COMPONENT IS OBSOLETE and should no longer be used. It is only +kept for backward compatibility purposes. Use model +Modelica.Mechanics.Rotational.LossyGear instead which implements +gear efficiency in a much more reliable way. +
+This component consists of two rigidly connected flanges flange_a and flange_b without inertia where an efficency coefficient eta reduces the driven @@ -3877,11 +3725,11 @@ gearbox. Note, that most gearbox manufacturers provide tables of the efficiency of a gearbox as function of the angular velocity (efficiency becomes zero, if the angular velocity is zero). -However, such a table is practically useless for simulation purposes, -because in gearboxes always two types of friction is present: +However, such a table is practically useless for simulation purposes, +because in gearboxes always two types of friction is present: (1) Friction in the bearings and (2) friction between -the teeth of the gear. (1) leads to a velocity dependent, additive -loss-torque, whereas (2) leads to a torque-dependent reduction of the +the teeth of the gear. (1) leads to a velocity dependent, additive +loss-torque, whereas (2) leads to a torque-dependent reduction of the driving torque. The gearbox manufacturers measure both effects together and determine the gear efficiency from it, although for simulation purposes the two effects need to be separated. @@ -3906,11 +3754,11 @@ Comparing (1) and (2) gives a formulat for the efficiency eta:
- eta = (1 - sign(w)*bearingTorque/motorTorque) + eta = (1 - sign(w)*bearingTorque/motorTorque)
-When the motorTorque becomes smaller as the bearingTorque, +When the motorTorque becomes smaller as the bearingTorque, (2) is useless, because the efficiency is zero. To summarize, be careful to determine the gear efficiency of this element from tables of the gear manufacturers. @@ -3919,73 +3767,63 @@ from tables of the gear manufacturers.
Release Notes:
This component models the essential effects of a gearbox, in particular gear efficiency due to friction between the teeth, bearing friction, @@ -3998,85 +3836,1189 @@ to the left and/or the right flange.
Release Notes:
This component models the essential effects of a gearbox, in +particular
+ +The inertia of the gear wheels is not modeled. If necessary, +inertia has to be taken into account by connecting components of +model Inertia to the left and/or the right flange of component +GearNew.
+ +Release Notes:
++The input signal inPort.signal[1] defines the reference +angle phi_ref(t) in [rad]. Flange flange_b is forced +to move according to this reference motion. According to parameter +exact (default = false), this is done in the following way: +
+The input signal can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ +Release Notes:
++The input signal inPort.signal[1] defines an angular acceleration +a in [rad/s2]. Flange flange_b is forced to move with +this acceleration. The angular velocity w and the rotation angle +phi of the flange are automatically determined by integration of +the acceleration. +
+ ++The input signal can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ +Release Notes:
++Flange flange_b is forced to move with a predefined motion +according to the input signals: +
+ ++ inPort.signal[1]: angle of flange + inPort.signal[2]: angular velocity of flange + inPort.signal[3]: angular acceleration of flange ++ +
+The user has to guarantee that the input signals are consistent to each other, +i.e., that inPort.signal[2] is the derivative of inPort.signal[1] and that +inPort.signal[3] is the derivative of inPort.signal[2]. There are, however, +also applications where by purpose these conditions do not hold. For example, +if only the position dependent terms of a mechanical system shall be +calculated, one may provide angle = angle(t) and set the angular velocity +and the angular acceleration to zero. +
+ ++The input signals can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ ++Note, this model utilizes the non-standard function constrain(..) +and assumes that this function is supported by the Modelica translator: +
++ Real r[:], rd[:], rdd[:]; + ... + r = .. + rd = ... + rdd = ... + constrain(r,rd,rdd); ++
+where r, rd and rdd are variables which need to be computed +somewhere else. A simple implementation of constrain() is: +
+ ++ r = 0; ++ +
+However, this implementation requires that r(t) is given as analytical, +smooth function in order that it can be differentiated and it does +not allow applications such as the one sketched above. +Function constrain() +is used to explicitly inform the Modelica translator that +rd is the derivative of r and rdd is the derivative of rd +and that all derivatives need to be identical to zero. +The Modelica translator can utilize this information to use +rd and rdd whenever the Pantelides algorithm requires to compute +the derivatives of r (and takes rd and rdd instead of actually +differentiating r). +
+ +Release Notes:
++The flange of a 1D rotational mechanical system is fixed +at an angle phi0 in the housing. May be used: +
+ +Release Notes:
++The input signal inPort.signal[1] defines an external +torque tau in [Nm] which acts (with negative sign) at +a flange connector, i.e., the component connected to this +flange is driven by torque tau.
++The input signal can be provided from one of the signal generator +blocks of Modelica.Blocks.Sources. +
+ +Release Notes:
++Usually, the absolute angle and the absolute angular velocity of +Modelica.Mechanics.Rotational.Inertia models are used as state variables. +In some circumstances, relative quantities are better suited, e.g., +because it may be easier to supply initial values. +In such cases, model RelativeStates allows the definition of state variables +in the following way: +
+ ++An example is given in the next figure +
+ + + ++Here, the relative angle and the relative angular velocity between +the two inertias are used as state variables. Additionally, the +simulator selects either the absolute angle and absolute angular +velocity of model inertia1 or of model inertia2 as state variables. +
+ +Release Notes:
++Measures the cut-torque between two flanges in an ideal way +and provides the result as output signal outPort.signal[1] = flange_a.tau +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
++Measures the absolute angle phi of a flange in an ideal +way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
++Measures the absolute angular velocity w of a flange in an ideal +way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
++Measures the absolute angular acceleration a of a flange in an ideal +way and provides the result as output signal (to be further processed with +blocks of the Modelica.Blocks library). +
+ +Release Notes:
++Measures the relative angle phi_rel between two flanges +in an ideal way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
++Measures the relative angular velocity w_rel between two flanges +in an ideal way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
++Measures the relative angular acceleration a_rel between two flanges +in an ideal way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
++This package contains components to model 1-dimensional translational +mechanical systems. +
+ ++The filled and non-filled green squares at the left and +right side of a component represent mechanical flanges. +Drawing a line between such squares means that the corresponding +flanges are rigidly attached to each other. The components of this +library can be usually connected together in an arbitrary way. E.g. it is +possible to connect two springs or two sliding masses with inertia directly +together. + +
The only connection restriction is that the Coulomb friction +elements (Stop) should be only connected +together provided a compliant element, such as a spring, is in between. +The reason is that otherwise the frictional force is not uniquely +defined if the elements are stuck at the same time instant (i.e., there +does not exist a unique solution) and some simulation systems may not be +able to handle this situation, since this leads to a singularity during +simulation. It can only be resolved in a \"clean way\" by combining the +two connected friction elements into +one component and resolving the ambiguity of the frictional force in the +stuck mode. +
+ +Another restriction arises if the hard stops in model Stop are used, i. e. +the movement of the mass is limited by a stop at smax or smin. + This requires the states Stop.s and Stop.v . If these states are eliminated during the index reduction +the model will not work. To avoid this any inertias should be connected via springs +to the Stop element, other sliding masses, dampers or hydraulic chambers must be avoided.
+ + ++In the icon of every component an arrow is displayed in grey +color. This arrow characterizes the coordinate system in which the vectors +of the component are resolved. It is directed into the positive +translational direction (in the mathematical sense). +In the flanges of a component, a coordinate system is rigidly attached +to the flange. It is called flange frame and is directed in parallel +to the component coordinate system. As a result, e.g., the positive +cut-force of a \"left\" flange (flange_a) is directed into the flange, whereas +the positive cut-force of a \"right\" flange (flange_b) is directed out of the +flange. A flange is described by a Modelica connector containing +the following variables: +
+ ++ SIunits.Position s \"absolute position of flange\"; + flow Force f \"cut-force in the flange\"; ++ +
+This package contains the following model components: +
+ ++ Interfaces Sublibrary containing interface definitions. + Examples Examples of library usage. + + SlidingMass Translational component with inertia. + Stop Sliding mass with Coulomb friction and hard stops. + Rod Massless rod. + Spring Linear spring. + Damper Linear damper. + SpringDamper Linear spring and linear damper in parallel connection. + ElastoGap Linear spring and linear damper that can lift off. + + Position Drive a flange with a reference position given as input signal. + Accelerate Drive a flange with an acceleration given as input signal. + Move Drive a flange with a reference position, velocity and + acceleration given as input signal. + Fixed Fixed flange at a predefined position. + Force External force defined as input signal. + + ForceSensor Ideal sensor to measure the force in a flange. + PositionSensor Ideal sensor to measure absolute position of a flange. + SpeedSensor Ideal sensor to measure absolute velocity of a flange. + AccSensor Ideal sensor to measure absolute acceleration of a flange. + ++ +
+This library is designed in a fully object oriented way in order that +components can be connected together in every meaningful combination +(e.g. direct connection of two springs or two shafts with inertia). +As a consequence, most models lead to a system of +differential-algebraic equations of index 3 (= constraint +equations have to be differentiated twice in order to arrive at +a state space representation) and the Modelica translator or +the simulator has to cope with this system representation. +According to our present knowledge, this requires that the +Modelica translator is able to symbolically differentiate equations +(otherwise it is e.g. not possible to provide consistent initial +conditions; even if consistent initial conditions are present, most +numerical DAE integrators can cope at most with index 2 DAEs). +
+ +Main Author:Release + Notes:
+Copyright © 2000-2002, Modelica Association and Universität Paderborn, FB 12.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license , see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file \"Modelica/package.mo\". +
+ +")); + package Examples "Demonstration examples of the components of this package" + + extends Modelica.Icons.Library; + + annotation ( + Window( + x=0.07, + y=0.14, + width=0.51, + height=0.4, + library=1, + autolayout=1), + Documentation(info=" ++This package contains example models to demonstrate the usage of the +Translational package. Open the models and +simulate them according to the provided description in the models. +The following examples are present: +
+ ++ SignConvention Examples for the used sign conventions using simple, basic elements + InitialConditions Setting of initial conditions + Accelerate Use of model accelerate + Damper Use of damper elements + Oscillator Oscillator demonstrates the use of initial conditions + Sensors Sensors for translational systems + Friction Stribeck friction characteristics + PreLoad Positioning of a spool using ElastoGap models ++ +
+If all arrows point in the same direction a positive force +results in a positive acceleration a, velocity v and position s. +
+For a force of 1 N and a mass of 1 Kg this leads to ++ a = 1 m/s2 + v = 1 m/s after 1 s (SlidingMass1.v) + s = 0.5 m after 1 s (SlidingMass1.s) ++The acceleration is not available for plotting. +
+
+System 1) and 2) are equivalent. It doesn't matter whether the +force pushes at flange_a in system 1 or pulls at flange_b in system 2. ++It is of course possible to ignore the arrows and connect the models +in an arbitrary way. But then it is hard see in what direction the +force acts. +
+In the third system the two arrows are opposed which means that the +force acts in the opposite direction (in the same direction as in +the two other examples). +
+ +Release Notes:
+Release Notes:
+Release Notes:
+Release Notes:
+Release Notes:
+Release Notes:
+Release Notes:
++The following variables are transported through this connector: +
+ + s: Absolute position of the flange in [m]. A positive translation + means that the flange is translated along the flange axis. + f: Cut-force in direction of the flange axis in [N]. ++ +"), + Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=58, fillColor + =58))), + Diagram(Rectangle(extent=[-100, -100; 100, 100], style(color=58, + fillColor=58)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=58))), + Terminal(Rectangle(extent=[-100, -100; 100, 100], style(color=58, + fillColor=58)))); + + SI.Position s "absolute position of flange"; + flow SI.Force f "cut force directed into flange"; + end Flange_a; + + connector Flange_b + "right 1D translational flange (flange axis directed OUT OF cut plane)" + SI.Position s "absolute position of flange"; + flow SI.Force f "cut force directed into flange"; + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[2, 2], + component=[20, 20]), + Window( + x=0.27, + y=0.05, + width=0.39, + height=0.83), + Documentation(info=" +This is a flange for 1D translational mechanical systems. In the cut plane of +the flange a unit vector n, called flange axis, is defined which is directed +OUT OF the cut plane. All vectors in the cut plane are resolved with respect to +this unit vector. E.g. force f characterizes a vector which is directed in +the direction of n with value equal to f. When this flange is connected to +other 1D translational flanges, this means that the axes vectors of the connected +flanges are identical. + +
+The following variables are transported through this connector: +
+ + s: Absolute position of the flange in [m]. A positive translation + means that the flange is translated along the flange axis. + f: Cut-force in direction of the flange axis in [N]. ++ +"), + Icon(Rectangle(extent=[-100, -100; 100, 100], style(color=58, fillColor + =7))), + Diagram(Rectangle(extent=[-100, -100; 100, 100], style(color=58, + fillColor=7)), Text( + extent=[-100, -120; 100, -220], + string="%name", + style(color=58))), + Terminal(Rectangle(extent=[-100, -100; 100, 100], style(color=58)))); + end Flange_b; + + partial model Rigid "Rigid connection of two translational 1D flanges " + SI.Position s + "absolute position of center of component (s = flange_a.s + L/2 = flange_b.s - L/2)" + ; + parameter SI.Length L=0 + "length of component from left flange to right flange (= flange_b.s - flange_a.s)" + ; + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane, i. e. from left to right)" + annotation (extent=[-110, -10; -90, 10]); + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane, i. e. from right to left)" + annotation (extent=[90, -10; 110, 10]); + annotation ( + Documentation(info=" +
+This is a 1D translational component with two rigidly connected flanges. +The distance between the left and the right flange is always constant, i. e. L. +The forces at the right and left flange can be different. +It is used e.g. to built up sliding masses. + +
Release Notes:
++This is a 1D translational component with a compliant connection of two +translational 1D flanges where inertial effects between the two +flanges are not included. The absolute value of the force at the left and the right +flange is the same. It is used to built up springs, dampers etc. +
Release Notes:
++This is a 1D translational component with two flanges. +It is used e.g. to built up parts of a drive train consisting +of several base components. +
+ +Release Notes:
++This is the superclass of a 1D translational component with one flange and one +output signal in order to measure an absolute kinematic quantity in the flange +and to provide the measured signal as output signal for further processing +with the Modelica.Blocks blocks. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ +"), + Icon( + Line(points=[-100, -90; -20, -90], style( + color=0, + fillColor=10, + fillPattern=1)), + Polygon(points=[10, -90; -20, -80; -20, -100; 10, -90], style( + color=10, + fillColor=10, + fillPattern=1)), + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 100, 0]), + Text(extent=[-118, 99; 118, 40], string="%name")), + Diagram(Line(points=[-70, 0; -90, 0], style(color=0)), Line(points=[70 + , 0; 100, 0]))); + end AbsoluteSensor; + + partial model RelativeSensor + "Device to measure a single relative variable between two flanges" + + extends Modelica.Icons.TranslationalSensor; + + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane, e. g. from left to right)" + annotation (extent=[-110, -10; -90, 10]); + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)" + annotation (extent=[90, -10; 110, 10]); + Modelica.Blocks.Interfaces.OutPort outPort(final n=1) annotation (extent= + [-10, -100; 10, -120], rotation=90); + annotation ( + Coordsys( + extent=[-100, -100; 100, 100], + grid=[1, 1], + component=[20, 20]), + Window( + x=0.04, + y=0.05, + width=0.6, + height=0.6), + Documentation(info=" ++This is a superclass for 1D translational components with two rigidly connected +flanges and one output signal in order to measure relative kinematic quantities +between the two flanges or the cut-force in the flange and +to provide the measured signal as output signal for further processing +with the Modelica.Blocks blocks. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ +"), + Icon( + Line(points=[-51, 34; 29, 34], style( + color=0, + fillColor=10, + fillPattern=1)), + Polygon(points=[59, 34; 29, 44; 29, 24; 59, 34], style( + color=0, + fillColor=10, + fillPattern=1)), + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 90, 0], style(color=0)), + Line(points=[0, -100; 0, -60]), + Text(extent=[-117, 116; 115, 52], string="%name")), + Diagram( + Line(points=[-70, 0; -90, 0], style(color=0)), + Line(points=[70, 0; 90, 0], style(color=0)), + Line(points=[0, -100; 0, -60]))); + end RelativeSensor; + + partial model FrictionBase "Base class of Coulomb friction elements" + extends Rigid; + parameter SI.Position smax=25 + "right stop for (right end of) sliding mass"; + parameter SI.Position smin=-25 "left stop for (left end of) sliding mass" + ; + parameter SI.Velocity v_small=1e-3 + "Relative velocity near to zero (see model info text)"; + + + // Equations to define the following variables have to be defined in subclasses + SI.Velocity v_relfric "Relative velocity between frictional surfaces"; + SI.Acceleration a_relfric + "Relative acceleration between frictional surfaces"; + SI.Force f + "Friction force (positive, if directed in opposite direction of v_rel)" + ; + SI.Force f0 "Friction force for v=0 and forward sliding"; + SI.Force f0_max "Maximum friction force for v=0 and locked"; + Boolean free "true, if frictional element is not active"; + + // Equations to define the following variables are given in this class + Real sa "Path parameter of friction characteristic f = f(a_relfric)"; + + Boolean startForward + "true, if v_rel=0 and start of forward sliding or v_rel > v_small"; + Boolean startBackward + "true, if v_rel=0 and start of backward sliding or v_rel < -v_small"; + Boolean locked "true, if v_rel=0 and not sliding"; + + constant Integer Unknown=3 "Value of mode is not known"; + constant Integer Free=2 "Element is not active"; + constant Integer Forward=1 "v_rel > 0 (forward sliding)"; + constant Integer Stuck=0 + "v_rel = 0 (forward sliding, locked or backward sliding)"; + constant Integer Backward=-1 "v_rel < 0 (backward sliding)"; + Integer mode( + final min=Backward, + final max=Unknown, + start=Unknown); + annotation (Documentation(info=" +Release Notes:
++Sliding mass with inertia, without friction and two rigidly connected flanges. +
++The sliding mass has the length L, the position coordinate s is in the middle. +Sign convention: A positive force at flange flange_a moves the sliding mass in the positive direction. +A negative force at flange flange_a moves the sliding mass to the negative direction. +
+Release Notes:
+This element describes the Stribeck friction characteristics of a sliding mass,
+i. e. the frictional force acting between the sliding mass and the support. Included is a
+hard stop for the position.
+The surface is fixed and there is friction between sliding mass and surface.
+The frictional force f is given for positive velocity v by:
+There are hard stops at smax and smin, i. e. if
+flange_a.s >= smin
+
+the sliding mass can move freely. and
+flange_b.s <= xmax
When the absolute velocity becomes zero, the sliding mass becomes stuck, i.e., the absolute position remains constant. In this phase the +friction force is calculated from a force balance due to the requirement that the +absolute acceleration shall be zero. The elements begin to slide when the friction +force exceeds a threshold value, called the maximum static friction force, computed via:
+ +For more details of the used friction model see the following reference:
+Beater P. (1999):
The friction model is implemented in a \"clean\" way by state events and leads to +continuous/discrete systems of equations which have to be solved by appropriate +numerical methods. The method is described in:
+More precise friction models take into account the elasticity of the material when +the two elements are \"stuck\", as well as other effects, like hysteresis. This has +the advantage that the friction element can be completely described by a differential +equation without events. The drawback is that the system becomes stiff (about 10-20 times +slower simulation) and that more material constants have to be supplied which requires more +sophisticated identification. For more details, see the following references, especially +(Armstrong and Canudas de Witt 1996):
+Release Notes:
++Rod without inertia and two rigidly connected flanges. +
+ +Release Notes:
++A linear 1D translational spring. The component can be connected either +between two sliding masses, or between +a sliding mass and the housing (components FixedLeft, FixedRight), to describe +a coupling of the slidin mass with the housing via a spring. +
+Release Notes:
++Linear, velocity dependent damper element. It can be either connected +between a sliding mass and the housing (FixedLeft, FixedRight elements), or +between two sliding masses. +
+Release Notes:
++A spring and damper element connected in parallel. +The component can be +connected either between two sliding masses to describe the elasticity +and damping, or between a sliding mass and the housing (FixedLeft, FixedRight elements), +to describe a coupling of the sliding mass with the housing via a spring/damper. +
Release Notes:
++A linear translational spring damper combination that can lift off. +The component can be connected +between between +a sliding mass and the housing (components FixedLeft, FixedRight), to describe +the contact of a sliding mass with the housing. +
+ +Release Notes:
++The input signal inPort.signal[1] defines the reference +position s_ref in [m]. Flange flange_b is forced +to move according to this reference motion. According to parameter +exact (default = false), this is done in the following way: +
+The input signal can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ +Release Notes:
++The input signal \"a\" in [m/s2] of connector \"i\" moves the 1D translational flange +connector flange_b with a predefined acceleration, i.e., the flange +is forced to move with this acceleration. The velocity and the +position of the flange are also predefined and are determined by +integration of the acceleration. +
+ ++The acceleration \"a(t)\" can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Source. +
+Release Notes:
++Flange flange_b is forced to move with a predefined motion +according to the input signals: +
+ ++ inPort.signal[1]: position of flange + inPort.signal[2]: velocity of flange + inPort.signal[3]: acceleration of flange ++ +
+The user has to guarantee that the input signals are consistent to each other, +i.e., that inPort.signal[2] is the derivative of inPort.signal[1] and that +inPort.signal[3] is the derivative of inPort.signal[2]. There are, however, +also applications where by purpose these conditions do not hold. For example, +if only the position dependent terms of a mechanical system shall be +calculated, one may provide position = position(t) and set the velocity +and the acceleration to zero. +
+ ++The input signals can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ ++Note, this model utilizes the non-standard function constrain(..) +and assumes that this function is supported by the Modelica translator: +
++ Real r[:], rd[:], rdd[:]; + ... + r = .. + rd = ... + rdd = ... + constrain(r,rd,rdd); ++
+where r, rd and rdd are variables which need to be computed +somewhere else. A simple implementation of constrain() is: +
+ ++ r = 0; ++ +
+However, this implementation requires that r(t) is given as analytical, +smooth function in order that it can be differentiated and it does +not allow applications such as the one sketched above. +Function constrain() +is used to explicitly inform the Modelica translator that +rd is the derivative of r and rdd is the derivative of rd +and that all derivatives need to be identical to zero. +The Modelica translator can utilize this information to use +rd and rdd whenever the Pantelides algorithm requires to compute +the derivatives of r (and takes rd and rdd instead of actually +differentiating r). +
+ +Release Notes:
++The flange of a 1D translational mechanical system fixed +at an position s0 in the housing. May be used: +
+ +Release Notes:
++The input signal \"s\" in [N] characterizes an external +force which acts (with positive sign) at a flange, +i.e., the component connected to the flange is driven by force f. +
+ + ++Input signal s can be provided from one of the signal generator +blocks of Modelica.Blocks.Source. +
+Release Notes:
++Usually, the absolute position and the absolute velocity of +Modelica.Mechanics.Translational.Inertia models are used as state variables. +In some circumstances, relative quantities are better suited, e.g., +because it may be easier to supply initial values. +In such cases, model RelativeStates allows the definition of state variables +in the following way: +
+ ++An example is given in the next figure +
+ + + ++Here, the relative position and the relative velocity between +the two masses are used as state variables. Additionally, the +simulator selects either the absolute position and absolute +velocity of model mass1 or of model mass2 as state variables. +
+ +Release Notes:
++Measures the cut-force between two flanges in an ideal way +and provides the result as output signal (to be further processed +with blocks of the Modelica.Blocks library). +
+Release Notes:
++Measures the absolute position s of a flange in an ideal way and provides the result as +output signals (to be further processed with blocks of the +Modelica.Blocks library). +
+Release Notes:
++Measures the absolute velocity v of a flange in an ideal way and provides the result as +output signals (to be further processed with blocks of the +Modelica.Blocks library). +
+Release Notes:
++Measures the absolute acceleration a +of a flange in an ideal way and provides the result as +output signals (to be further processed with blocks of the +Modelica.Blocks library). +
+Release Notes:
+This package contains components to model mechanical systems. Currently, the following subpackages are available:
@@ -45,9 +43,9 @@ model 3-dimensional mechanical systems.Release Notes:
Copyright (C) 1999, Modelica Design Group and DLR.
+Copyright © 1999-2002, Modelica Association and DLR.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package +and the accompanying disclaimer in the documentation of package Modelica in file \"Modelica/package.mo\".
diff --git a/SIunits.mo b/SIunits.mo index 7854cfa5e1..a40c80b579 100644 --- a/SIunits.mo +++ b/SIunits.mo @@ -1,186 +1,600 @@ package SIunits "Type definitions based on SI units according to ISO 31-1992" extends Modelica.Icons.Library2; - annotation ( - Coordsys( - extent=[0, 0; 714, 538], - grid=[1, 1], - component=[20, 20]), - Window( - x=0.08, - y=0.07, - width=0.71, - height=0.84, - library=1, - autolayout=1), - Icon(Text( - extent=[-63, -13; 45, -67], - string="[kg.m2]", - style(color=0))), - Documentation(info=" - + package Conversions + "Conversion functions to/from non SI units and type definitions of non SI units" + + + extends Modelica.Icons.Library2; + + package NonSIunits "Type definitions of non SI units" + + extends Modelica.Icons.Library2; + + type Temperature_degC = Real (final quantity="ThermodynamicTemperature", + final unit="degC"); + type Temperature_degF = Real (final quantity="ThermodynamicTemperature", + final unit="degF"); + type Temperature_degRk = Real (final quantity="ThermodynamicTemperature", + final unit="degRk"); + type Angle_deg = Real (final quantity="Angle", final unit="deg"); + type AngularVelocity_rpm = Real (final quantity="AngularVelocity", final + unit="rev/min"); + type Velocity_kmh = Real (final quantity="Velocity", final unit="km/h"); + type Time_day = Real (final quantity="Time", final unit="d"); + type Time_hour = Real (final quantity="Time", final unit="h"); + type Time_minute = Real (final quantity="Time", final unit="min"); + type Volume_litre = Real (final quantity="Volume", final unit="l"); + type Energy_kWh = Real (final quantity="Energy", final unit="kWh"); + type Pressure_bar = Real (final quantity="Pressure", final unit="bar"); + type MassFlowRate_gps = Real (final quantity="MassFlowRate", final unit= + "g/s"); + + annotation (Documentation(info="-This package provides predefined types, such as -Mass, Length, Time, based on the international -standard on units:
--For more information on units, see also the book of -Francois Cardarelli \"Scientific Unit Conversion - A Practical -Guide to Metrication\" -(Springer 1997). -
+This package provides predefined types, such as Angle_deg (angle in +degree), AngularVelocity_rpm (angular velocity in revolutions per +minute) or Temperature_degF (temperature in degree Fahrenheit), +which are in common use but are not part of the international standard on +units according to ISO 31-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\". --The following conventions are used in this package: -
+If possible, the types in this package should not be used. Use instead +types of package Modelica.SIunits. For more information on units, see also +the book of Francois Cardarelli Scientific Unit Conversion - A +Practical Guide to Metrication (Springer 1997).
+ +Some units, such as Temperature_degC/Temp_C are both defined in +Modelica.SIunits and in Modelica.Conversions.NonSIunits. The reason is that these +definitions have been placed erroneously in Modelica.SIunits although they +are not SIunits. For backward compatibility, these type definitions are +still kept in Modelica.SIunits.
+ + +"), Icon(Text( + extent=[-66, -13; 52, -67], + string="[rev/min]", + style(color=0)))); + end NonSIunits; + + function to_degC "Convert from Kelvin to °Celsius" + extends ConversionIcon; + input Temperature Kelvin "Kelvin value"; + output NonSIunits.Temperature_degC Celsius "Celsius value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="K"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="°C"))); + algorithm + Celsius := Kelvin + Modelica.Constants.T_zero; + end to_degC; + + function from_degC "Convert from °Celsius to Kelvin" + extends ConversionIcon; + input NonSIunits.Temperature_degC Celsius "Celsius value"; + output Temperature Kelvin "Kelvin value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="°C"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="K"))); + algorithm + Kelvin := Celsius - Modelica.Constants.T_zero; + end from_degC; + + function to_degF "Convert from Kelvin to °Fahrenheit" + extends ConversionIcon; + input Temperature Kelvin "Kelvin value"; + output NonSIunits.Temperature_degF Fahrenheit "Fahrenheit value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="K"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="°F"))); + algorithm + Fahrenheit := (Kelvin + Modelica.Constants.T_zero)*(9/5) + 32; + end to_degF; + + function from_degF "Convert from °Fahrenheit to Kelvin" + extends ConversionIcon; + input NonSIunits.Temperature_degF Fahrenheit "Fahrenheit value"; + output Temperature Kelvin "Kelvin value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="°F"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="K"))); + algorithm + Kelvin := (Fahrenheit - 32)*(5/9) - Modelica.Constants.T_zero; + end from_degF; + + function to_degRk "Convert from Kelvin to °Rankine" + extends ConversionIcon; + input Temperature Kelvin "Kelvin value"; + output NonSIunits.Temperature_degRk Rankine "Rankine value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="K"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="°Rk"))); + algorithm + Rankine := (9/5)*Kelvin; + end to_degRk; + + function from_degRk "Convert from °Rankine to Kelvin" + extends ConversionIcon; + input NonSIunits.Temperature_degRk Rankine "Rankine value"; + output Temperature Kelvin "Kelvin value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="°Rk"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="K"))); + algorithm + Kelvin := (5/9)*Rankine; + end from_degRk; + + function to_deg "Convert from radian to degree" + extends ConversionIcon; + input Angle radian "radian value"; + output NonSIunits.Angle_deg degree "degree value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="rad"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="deg"))); + algorithm + degree := (180.0/Modelica.Constants.pi)*radian; + end to_deg; + + function from_deg "Convert from degree to radian" + extends ConversionIcon; + input NonSIunits.Angle_deg degree "degree value"; + output Angle radian "radian value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="deg"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="rad"))); + algorithm + radian := (Modelica.Constants.pi/180.0)*degree; + end from_deg; + + function to_rpm "Convert from radian per second to revolutions per minute" + extends ConversionIcon; + input AngularVelocity rs "radian per second value"; + output NonSIunits.AngularVelocity_rpm rpm "revolutions per minute value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="rad/s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="rev/min"))); + algorithm + rpm := (30/Modelica.Constants.pi)*rs; + end to_rpm; + + function from_rpm + "Convert from revolutions per minute to radian per second" + extends ConversionIcon; + input NonSIunits.AngularVelocity_rpm rpm "revolutions per minute value"; + output AngularVelocity rs "radian per second value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="rev/min"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="rad/s"))); + algorithm + rs := (Modelica.Constants.pi/30)*rpm; + end from_rpm; + + function to_kmh "Convert from metre per second to kilometre per hour" + extends ConversionIcon; + input Velocity ms "metre per second value"; + output NonSIunits.Velocity_kmh kmh "kilometre per hour value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="m/s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="km/h"))); + algorithm + kmh := 3.6*ms; + end to_kmh; + + function from_kmh "Convert from kilometre per hour to metre per second" + extends ConversionIcon; + input NonSIunits.Velocity_kmh kmh "kilometre per hour value"; + output Velocity ms "metre per second value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="km/h"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="m/s"))); + algorithm + ms := kmh/3.6; + end from_kmh; + + function to_day "Convert from second to day" + extends ConversionIcon; + input Time s "second value"; + output NonSIunits.Time_day day "day value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="day"))); + algorithm + day := s/86400; + end to_day; + + function from_day "Convert from day to second" + extends ConversionIcon; + input NonSIunits.Time_day day "day value"; + output Time s "second value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="day"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="s"))); + algorithm + s := 86400*day; + end from_day; + + function to_hour "Convert from second to hour" + extends ConversionIcon; + input Time s "second value"; + output NonSIunits.Time_hour hour "hour value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="hour"))); + algorithm + hour := s/3600; + end to_hour; + + function from_hour "Convert from hour to second" + extends ConversionIcon; + input NonSIunits.Time_hour hour "hour value"; + output Time s "second value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="hour"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="s"))); + algorithm + s := 3600*hour; + end from_hour; + + function to_minute "Convert from second to minute" + extends ConversionIcon; + input Time s "second value"; + output NonSIunits.Time_minute minute "minute value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="minute"))); + algorithm + minute := s/60; + end to_minute; + + function from_minute "Convert from minute to second" + extends ConversionIcon; + input NonSIunits.Time_minute minute "minute value"; + output Time s "second value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="minute"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="s"))); + algorithm + s := 60*minute; + end from_minute; + + function to_litre "Convert from cubic metre to litre" + extends ConversionIcon; + input Volume m3 "cubic metre value"; + output NonSIunits.Volume_litre litre "litre value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="m3"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="litre"))); + algorithm + litre := 1000*m3; + end to_litre; + + function from_litre "Convert from litre to cubic metre" + extends ConversionIcon; + input NonSIunits.Volume_litre litre "litre value"; + output Volume m3 "cubic metre value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="litre"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="m3"))); + algorithm + m3 := litre/1000; + end from_litre; + + function to_kWh "Convert from Joule to kilo Watt hour" + extends ConversionIcon; + input Energy J "Joule value"; + output NonSIunits.Energy_kWh kWh "kWh value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="J"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="kWh"))); + algorithm + kWh := J/3.6e6; + end to_kWh; + + function from_kWh "Convert from kilo Watt hour to Joule" + extends ConversionIcon; + input NonSIunits.Energy_kWh kWh "kWh value"; + output Energy J "Joule value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="kWh"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="J"))); + algorithm + J := 3.6e6*kWh; + end from_kWh; + + function to_bar "Convert from Pascal to bar" + extends ConversionIcon; + input Pressure Pa "Pascal value"; + output NonSIunits.Pressure_bar bar "bar value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="Pa"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="bar"))); + algorithm + bar := Pa/1e5; + end to_bar; + + function from_bar "Convert from bar to Pascal" + extends ConversionIcon; + input NonSIunits.Pressure_bar bar "bar value"; + output Pressure Pa "Pascal value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="bar"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="Pa"))); + algorithm + Pa := 1e5*bar; + end from_bar; + + function to_gps "Convert from kilogram per second to gram per second" + extends ConversionIcon; + input MassFlowRate kgps "kg/s value"; + output NonSIunits.MassFlowRate_gps gps "g/s value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="kg/s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="g/s"))); + algorithm + gps := 1000*kgps; + end to_gps; + + function from_gps "Convert from gram per second to kilogram per second" + extends ConversionIcon; + input NonSIunits.MassFlowRate_gps gps "g/s value"; + output MassFlowRate kgps "kg/s value"; + annotation (Icon(Text( + extent=[-20, 100; -100, 20], + style(color=0), + string="g/s"), Text( + extent=[100, -20; 20, -100], + style(color=0), + string="kg/s"))); + algorithm + kgps := gps/1000; + end from_gps; + + partial function ConversionIcon "Base icon for conversion functions" + annotation (Icon( + Rectangle(extent=[-100, 100; 100, -100], style(color=42, fillColor=7) + ), + Line(points=[-90, 0; 30, 0], style(color=42)), + Polygon(points=[90, 0; 30, 20; 30, -20; 90, 0], style(color=42, + fillColor=42)), + Text(extent=[-115, 155; 115, 105], string="%name"))); + end ConversionIcon; + + annotation (Icon( + Text( + extent=[-33, -7; -92, -67], + string="°C", + style(color=0, thickness=4)), + Text( + extent=[82, -7; 22, -67], + string="K", + style(color=0)), + Line(points=[-26, -36; 6, -36], style(color=0)), + Polygon(points=[6, -28; 6, -45; 26, -37; 6, -28], style(pattern=0, + fillColor=0))), Documentation(info=" +This package provides conversion functions from the non SI Units +defined in package Modelica.SIunits.Conversions.NonSIunits to the +corresponding SI Units defined in package Modelica.SIunits and vice +versa. It is recommended to use these functions in the following +way:
-- Chapter 1: Space and Time - Chapter 2: Periodic and Related Phenomena - Chapter 3: Mechanics - Chapter 4: Heat - Chapter 5: Electricity and Magnetism - Chapter 6: Light and Related Electro-Magnetic Radiations - Chapter 7: Acoustics - Chapter 8: Physical Chemistry - Chapter 9: Atomic and Nuclear Physics - Chapter 10: Nuclear Reactions and Ionizing Radiations - Chapter 11: (not defined in ISO 31-1992) - Chapter 12: Characteristic Numbers - Chapter 13: Solid State Physics + import SI = Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + ... + parameter SI.Temperature T = from_degC(25); // convert 25 degree Celsius to Kelvin + parameter SI.Angle phi = from_deg(180); // convert 180 degree to radian + parameter SI.AngularVelocity w = from_rpm(3600); // convert 3600 revolutions per minutes + // to radian per seconds-
The following conversion functions are provided. Note, that all +of them have one Real input and one Real output argument:
-Function | +Description | +
---|---|
to_degC +from_degC |
+Convert from Kelvin to degree Celsius +Convert from degree Celsius to Kelvin |
+
to_degF +from_degF |
+Convert from Kelvin to degree Fahrenheit +Convert from degree Fahrenheit to Kelvin |
+
to_degRk +from_degRk |
+Convert from Kelvin to degree Rankine +Convert from degree Rankine to Kelvin |
+
to_deg +from_deg |
+Convert from radian to degree +Convert from degree to radian |
+
to_rpm +from_rpm |
+Convert from radian per second to revolutions per minute +Convert from revolutions per minute to radian per second |
+
to_kmh +from_kmh |
+Convert from metre per second to kilometre per hour +Convert from kilometre per hour to metre per second |
+
to_day +from_day |
+Convert from second to day +Convert from day to second |
+
to_hour +from_hour |
+Convert from second to hour +Convert from hour to second |
+
to_minute +from_minute |
+Convert from second to minute +Convert from minute to second |
+
to_litre +from_litre |
+Convert from cubic metre to litre +Convert from litre to cubic metre |
+
to_kWh +from_kWh |
+Convert from Joule to kilo Watt hour +Convert from kilo Watt hour to Joule |
+
to_bar +from_bar |
+Convert from Pascal to bar +Convert from bar to Pascal |
+
to_gps +from_gps |
+Convert from kilogram per second to gram per second +Convert from gram per second to kilogram per second |
+
There is the additional partial function ConversionIcon +in this package. It contains just the base icon for all the conversion +functions.
--The Modelica package is free software; it can be redistributed and/or modified -under the terms of the Modelica license, see the license conditions -and the accompanying disclaimer in the documentation of package -Modelica in file \"Modelica/package.mo\". -
-"), - Diagram( - Rectangle(extent=[169, 86; 349, 236], style(fillColor=30, fillPattern=1) - ), - Polygon(points=[169, 236; 189, 256; 369, 256; 349, 236; 169, 236], style - (fillColor=30, fillPattern=1)), - Polygon(points=[369, 256; 369, 106; 349, 86; 349, 236; 369, 256], style( - fillColor=30, fillPattern=1)), - Text( - extent=[179, 226; 339, 196], - string="Library", - style( - color=9, - fillColor=0, - fillPattern=1)), - Text( - extent=[206, 173; 314, 119], - string="[kg.m2]", - style(color=0)), - Text( - extent=[163, 320; 406, 264], - string="Modelica.SIunits", - style(color=1)))); +")); + end Conversions; // Space and Time (chapter 1 of ISO 31-1992) type Angle = Real ( @@ -189,24 +603,24 @@ Modelica in file \"Modelica/package.mo\". displayUnit="deg"); type SolidAngle = Real (final quantity="SolidAngle", final unit="sr"); type Length = Real (final quantity="Length", final unit="m"); - type PathLength = Length ; - type Position = Length ; - type Distance = Length (final min=0); - type Breadth = Distance ; - type Height = Distance ; - type Thickness = Distance ; - type Radius = Distance ; - type Diameter = Distance ; + type PathLength = Length; + type Position = Length; + type Distance = Length (min=0); + type Breadth = Distance; + type Height = Distance; + type Thickness = Distance; + type Radius = Distance; + type Diameter = Distance; type Area = Real (final quantity="Area", final unit="m2"); type Volume = Real (final quantity="Volume", final unit="m3"); type Time = Real (final quantity="Time", final unit="s"); - type Duration = Time ; + type Duration = Time; type AngularVelocity = Real ( final quantity="AngularVelocity", final unit="rad/s", displayUnit="rev/min"); - type AngularAcceleration = Real (final quantity="AngularAcceleration", - final unit="rad/s2"); + type AngularAcceleration = Real (final quantity="AngularAcceleration", final + unit="rad/s2"); type Velocity = Real (final quantity="Velocity", final unit="m/s"); type Acceleration = Real (final quantity="Acceleration", final unit="m/s2"); @@ -215,7 +629,9 @@ Modelica in file \"Modelica/package.mo\". type Frequency = Real (final quantity="Frequency", final unit="Hz"); type AngularFrequency = Real (final quantity="AngularFrequency", final unit= "s-1"); - type Wavelenght = Real (final quantity="Wavelength", final unit="m"); + type Wavelength = Real (final quantity="Wavelength", final unit="m"); + type Wavelenght = Wavelength; + // For compatibility reasons only type WaveNumber = Real (final quantity="WaveNumber", final unit="m-1"); type CircularWaveNumber = Real (final quantity="CircularWaveNumber", final unit="rad/m"); @@ -227,18 +643,18 @@ Modelica in file \"Modelica/package.mo\". unit="s-1"); type LogarithmicDecrement = Real (final quantity="LogarithmicDecrement", final unit="Np/S"); - type AttenuationCoefficient = Real (final quantity="AttenuationCoefficient" - , final unit="m-1"); + type AttenuationCoefficient = Real (final quantity="AttenuationCoefficient", + final unit="m-1"); type PhaseCoefficient = Real (final quantity="PhaseCoefficient", final unit= "m-1"); - type PropagationCoefficient = Real (final quantity="PropagationCoefficient" - , final unit="m-1"); + type PropagationCoefficient = Real (final quantity="PropagationCoefficient", + final unit="m-1"); // added to ISO-chapter - type Damping = DampingCoefficient ; + type Damping = DampingCoefficient; // Mechanics (chapter 3 of ISO 31-1992) type Mass = Real ( - final quantity="Mass", + quantity="Mass", final unit="kg", min=0); type Density = Real ( @@ -270,32 +686,32 @@ Modelica in file \"Modelica/package.mo\". "N.m.s"); type MomentOfInertia = Real (final quantity="MomentOfInertia", final unit= "kg.m2"); - type Inertia = MomentOfInertia ; + type Inertia = MomentOfInertia; type Force = Real (final quantity="Force", final unit="N"); - type Weight = Force ; + type Weight = Force; type Torque = Real (final quantity="Torque", final unit="N.m"); - type MomentOfForce = Torque ; + type MomentOfForce = Torque; type Pressure = Real ( final quantity="Pressure", final unit="Pa", displayUnit="bar"); - type AbsolutePressure = Pressure (final min=0); - type BulkModulus = AbsolutePressure ; - type Stress = Real (final quantity="Stress", final unit="Pa"); - type NormalStress = Stress ; - type ShearStress = Stress ; + type AbsolutePressure = Pressure (min=0); + type BulkModulus = AbsolutePressure; + type Stress = Real (final unit="Pa"); + type NormalStress = Stress; + type ShearStress = Stress; type Strain = Real (final quantity="Strain", final unit="1"); - type LinearStrain = Strain ; - type ShearStrain = Strain ; + type LinearStrain = Strain; + type ShearStrain = Strain; type VolumeStrain = Real (final quantity="VolumeStrain", final unit="1"); type PoissonNumber = Real (final quantity="PoissonNumber", final unit="1"); - type ModulusOfElasticity = Stress ; - type ShearModulus = Stress ; + type ModulusOfElasticity = Stress; + type ShearModulus = Stress; type SecondMomentOfArea = Real (final quantity="SecondMomentOfArea", final unit="m4"); - type SecondPolarMomentOfArea = SecondMomentOfArea ; - type SectionModulus = Real (final quantity="SectionModulus", final unit="m3" - ); + type SecondPolarMomentOfArea = SecondMomentOfArea; + type SectionModulus = Real (final quantity="SectionModulus", final unit="m3") + ; type CoefficientOfFriction = Real (final quantity="CoefficientOfFriction", final unit="1"); type DynamicViscosity = Real ( @@ -306,64 +722,66 @@ Modelica in file \"Modelica/package.mo\". final quantity="KinematicViscosity", final unit="m2/s", min=0); - type SurfaceTension = Real (final quantity="SurfaceTension", final unit= - "N/m"); + type SurfaceTension = Real (final quantity="SurfaceTension", final unit="N/m" + ); type Work = Real (final quantity="Work", final unit="J"); type Energy = Real (final quantity="Energy", final unit="J"); - type EnergyDensity = Real (final quantity="EnergyDensity", final unit="J/m3" - ); - type PotentialEnergy = Energy ; - type KineticEnergy = Energy ; + type EnergyDensity = Real (final quantity="EnergyDensity", final unit="J/m3") + ; + type PotentialEnergy = Energy; + type KineticEnergy = Energy; type Power = Real (final quantity="Power", final unit="W"); + type EnergyFlowRate = Power; + type EnthalpyFlowRate = Real (final quantity="EnthalpyFlowRate", final unit= + "W"); type Efficiency = Real ( final quantity="Efficiency", final unit="1", min=0); - type MassFlowRate = Real (final quantity="MassFlowRate", final unit="kg/s"); + type MassFlowRate = Real (quantity="MassFlowRate", final unit="kg/s"); type VolumeFlowRate = Real (final quantity="VolumeFlowRate", final unit= "m3/s"); - // added to ISO-chapter 3 - type MomentumFlux = Real(final quantity="MomentumFlux", final unit="N"); - type AngularMomentumFlux = Real(final quantity="AngularMomentumFlux", - final unit="N.m"); + type MomentumFlux = Real (final quantity="MomentumFlux", final unit="N"); + type AngularMomentumFlux = Real (final quantity="AngularMomentumFlux", final + unit="N.m"); // Heat (chapter 4 of ISO 31-1992) type ThermodynamicTemperature = Real ( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC"); - type Temp_K = ThermodynamicTemperature ; - type CelsiusTemperature = Real ( - final quantity="CelsiusTemperature", - final unit="degC"); - type Temp_C = CelsiusTemperature ; + type Temp_K = ThermodynamicTemperature; + type Temperature = ThermodynamicTemperature; + type CelsiusTemperature = Real (final quantity="CelsiusTemperature", final + unit="degC"); + type Temp_C = CelsiusTemperature; type LinearExpansionCoefficient = Real (final quantity= "LinearExpansionCoefficient", final unit="1/K"); type CubicExpansionCoefficient = Real (final quantity= "CubicExpansionCoefficient", final unit="1/K"); type RelativePressureCoefficient = Real (final quantity= "RelativePressureCoefficient", final unit="1/K"); - type PressureCoefficient = Real (final quantity="PressureCoefficient", - final unit="Pa/K"); + type PressureCoefficient = Real (final quantity="PressureCoefficient", final + unit="Pa/K"); type Compressibility = Real (final quantity="Compressibility", final unit= "1/Pa"); - type IsothermalCompressibility = Compressibility ; - type IsentropicCompressibility = Compressibility ; + type IsothermalCompressibility = Compressibility; + type IsentropicCompressibility = Compressibility; type Heat = Real (final quantity="Energy", final unit="J"); type HeatFlowRate = Real (final quantity="Power", final unit="W"); - type HeatFlux = HeatFlowRate ; + type HeatFlux = Real (final quantity="HeatFlux", final unit="W/m^2"); type DensityOfHeatFlowRate = Real (final quantity="DensityOfHeatFlowRate", final unit="W/m2"); - type ThermalConductivity = Real (final quantity="ThermalConductivity", - final unit="W/(m.K)"); + type ThermalConductivity = Real (final quantity="ThermalConductivity", final + unit="W/(m.K)"); type CoefficientOfHeatTransfer = Real (final quantity= "CoefficientOfHeatTransfer", final unit="W/(m2.K)"); - type SurfaceCoefficientOfHeatTransfer = CoefficientOfHeatTransfer ; + type SurfaceCoefficientOfHeatTransfer = CoefficientOfHeatTransfer; type ThermalInsulance = Real (final quantity="ThermalInsulance", final unit= "m2.K/W"); - type ThermalResistance = Real (final quantity="ThermalResistance", final - unit="K/W"); + type ThermalResistance = Real (final quantity="ThermalResistance", final unit + ="K/W"); type ThermalConductance = Real (final quantity="ThermalConductance", final unit="W/K"); type ThermalDiffusivity = Real (final quantity="ThermalDiffusivity", final @@ -371,9 +789,9 @@ Modelica in file \"Modelica/package.mo\". type HeatCapacity = Real (final quantity="HeatCapacity", final unit="J/K"); type SpecificHeatCapacity = Real (final quantity="SpecificHeatCapacity", final unit="J/(kg.K)"); - type SpecificHeatCapacityAtConstantPressure = SpecificHeatCapacity ; - type SpecificHeatCapacityAtConstantVolume = SpecificHeatCapacity ; - type SpecificHeatCapacityAtSaturation = SpecificHeatCapacity ; + type SpecificHeatCapacityAtConstantPressure = SpecificHeatCapacity; + type SpecificHeatCapacityAtConstantVolume = SpecificHeatCapacity; + type SpecificHeatCapacityAtSaturation = SpecificHeatCapacity; type RatioOfSpecificHeatCapacities = Real (final quantity= "RatioOfSpecificHeatCapacities", final unit="1"); type IsentropicExponent = Real (final quantity="IsentropicExponent", final @@ -381,28 +799,34 @@ Modelica in file \"Modelica/package.mo\". type Entropy = Real (final quantity="Entropy", final unit="J/K"); type SpecificEntropy = Real (final quantity="SpecificEntropy", final unit= "J/(kg.K)"); - type InternalEnergy = Heat ; - type Enthalpy = Heat ; - type HelmholtzFreeEnergy = Heat ; - type GibbsFreeEnergy = Heat ; + type InternalEnergy = Heat; + type Enthalpy = Heat; + type HelmholtzFreeEnergy = Heat; + type GibbsFreeEnergy = Heat; type SpecificEnergy = Real (final quantity="SpecificEnergy", final unit= "J/kg"); - type SpecificInternalEnergy = SpecificEnergy ; - type SpecificEnthalpy = SpecificEnergy ; - type SpecificHelmholtzFreeEnergy = SpecificEnergy ; - type SpecificGibbsFreeEnergy = SpecificEnergy ; + type SpecificInternalEnergy = SpecificEnergy; + type SpecificEnthalpy = SpecificEnergy; + type SpecificHelmholtzFreeEnergy = SpecificEnergy; + type SpecificGibbsFreeEnergy = SpecificEnergy; type MassieuFunction = Real (final quantity="MassieuFunction", final unit= "J/K"); - type PlanckFunction = Real (final quantity="PlanckFunction", final unit= - "J/K"); + type PlanckFunction = Real (final quantity="PlanckFunction", final unit="J/K" + ); + // added to ISO-chapter 4 + type DerDensityByEnthalpy = Real (final unit="kg.s^2/m^5"); + type DerDensityByPressure = Real (final unit="s^2/m^2"); + type DerDensityByTemperature = Real (final unit="kg/(m^3.K)"); + type DerEnthalpyByPressure = Real (final unit="J.m.s^2/kg^2"); + type DerEnergyByDensity = Real (final unit="J.m^3/kg"); + type DerEnergyByPressure = Real (final unit="J.m.s^2/kg"); // Electricity and Magnetism (chapter 5 of ISO 31-1992) - type ElectricCurrent = Real (final quantity="ElectricCurrent", final unit= - "A"); - type Current = ElectricCurrent ; - type ElectricCharge = Real (final quantity="ElectricCharge", final unit="C") - ; - type Charge = ElectricCharge ; + type ElectricCurrent = Real (final quantity="ElectricCurrent", final unit="A" + ); + type Current = ElectricCurrent; + type ElectricCharge = Real (final quantity="ElectricCharge", final unit="C"); + type Charge = ElectricCharge; type VolumeDensityOfCharge = Real ( final quantity="VolumeDensityOfCharge", final unit="C/m3", @@ -413,13 +837,13 @@ Modelica in file \"Modelica/package.mo\". min=0); type ElectricFieldStrength = Real (final quantity="ElectricFieldStrength", final unit="V/m"); - type ElectricPotential = Real (final quantity="ElectricPotential", final - unit="V"); - type Voltage = ElectricPotential ; - type PotentialDifference = ElectricPotential ; - type ElectromotiveForce = ElectricPotential ; - type ElectricFluxDensity = Real (final quantity="ElectricFluxDensity", - final unit="C/m2"); + type ElectricPotential = Real (final quantity="ElectricPotential", final unit + ="V"); + type Voltage = ElectricPotential; + type PotentialDifference = ElectricPotential; + type ElectromotiveForce = ElectricPotential; + type ElectricFluxDensity = Real (final quantity="ElectricFluxDensity", final + unit="C/m2"); type ElectricFlux = Real (final quantity="ElectricFlux", final unit="C"); type Capacitance = Real ( final quantity="Capacitance", @@ -429,15 +853,14 @@ Modelica in file \"Modelica/package.mo\". final quantity="Permittivity", final unit="F/m", min=0); - type PermittivityOfVacuum = Permittivity ; + type PermittivityOfVacuum = Permittivity; type RelativePermittivity = Real (final quantity="RelativePermittivity", final unit="1"); - type ElectricSusceptibility = Real (final quantity="ElectricSusceptibility" - , final unit="1"); + type ElectricSusceptibility = Real (final quantity="ElectricSusceptibility", + final unit="1"); type ElectricPolarization = Real (final quantity="ElectricPolarization", final unit="C/m2"); - type Electrization = Real (final quantity="Electrization", final unit="V/m") - ; + type Electrization = Real (final quantity="Electrization", final unit="V/m"); type ElectricDipoleMoment = Real (final quantity="ElectricDipoleMoment", final unit="C.m"); type CurrentDensity = Real (final quantity="CurrentDensity", final unit= @@ -450,35 +873,33 @@ Modelica in file \"Modelica/package.mo\". "MagneticPotentialDifference", final unit="A"); type MagnetomotiveForce = Real (final quantity="MagnetomotiveForce", final unit="A"); - type CurrentLinkage = Real (final quantity="CurrentLinkage", final unit="A") - ; - type MagneticFluxDensity = Real (final quantity="MagneticFluxDensity", - final unit="T"); + type CurrentLinkage = Real (final quantity="CurrentLinkage", final unit="A"); + type MagneticFluxDensity = Real (final quantity="MagneticFluxDensity", final + unit="T"); type MagneticFlux = Real (final quantity="MagneticFlux", final unit="Wb"); - type MagneticVectorPotential = Real (final quantity= - "MagneticVectorPotential", final unit="Wb/m"); + type MagneticVectorPotential = Real (final quantity="MagneticVectorPotential" + , final unit="Wb/m"); type Inductance = Real ( final quantity="Inductance", final unit="H", min=0); - type SelfInductance = Inductance ; - type MutualInductance = Inductance ; - type CouplingCoefficient = Real (final quantity="CouplingCoefficient", - final unit="1"); + type SelfInductance = Inductance; + type MutualInductance = Inductance; + type CouplingCoefficient = Real (final quantity="CouplingCoefficient", final + unit="1"); type LeakageCoefficient = Real (final quantity="LeakageCoefficient", final unit="1"); type Permeability = Real (final quantity="Permeability", final unit="H/m"); - type PermeabilityOfVacuum = Permeability ; + type PermeabilityOfVacuum = Permeability; type RelativePermeability = Real (final quantity="RelativePermeability", final unit="1"); - type MagneticSusceptibility = Real (final quantity="MagneticSusceptibility" - , final unit="1"); + type MagneticSusceptibility = Real (final quantity="MagneticSusceptibility", + final unit="1"); type ElectromagneticMoment = Real (final quantity="ElectromagneticMoment", final unit="A.m2"); type MagneticDipoleMoment = Real (final quantity="MagneticDipoleMoment", final unit="Wb.m"); - type Magnetization = Real (final quantity="Magnetization", final unit="A/m") - ; + type Magnetization = Real (final quantity="Magnetization", final unit="A/m"); type MagneticPolarization = Real (final quantity="MagneticPolarization", final unit="T"); type ElectromagneticEnergyDensity = Real (final quantity="EnergyDensity", @@ -497,9 +918,9 @@ Modelica in file \"Modelica/package.mo\". final quantity="Angle", final unit="rad", displayUnit="deg"); - type Impedance = Resistance ; - type ModulusOfImpedance = Resistance ; - type Reactance = Resistance ; + type Impedance = Resistance; + type ModulusOfImpedance = Resistance; + type Reactance = Resistance; type QualityFactor = Real (final quantity="QualityFactor", final unit="1"); type LossAngle = Real ( final quantity="Angle", @@ -509,15 +930,14 @@ Modelica in file \"Modelica/package.mo\". final quantity="Conductance", final unit="S", min=0); - type Admittance = Conductance ; - type ModulusOfAdmittance = Conductance ; - type Susceptance = Conductance ; + type Admittance = Conductance; + type ModulusOfAdmittance = Conductance; + type Susceptance = Conductance; type InstantaneousPower = Real (final quantity="Power", final unit="W"); type ActivePower = Real (final quantity="Power", final unit="W"); type ApparentPower = Real (final quantity="Power", final unit="VA"); type ReactivePower = Real (final quantity="Power", final unit="var"); type PowerFactor = Real (final quantity="PowerFactor", final unit="1"); - // added to ISO-chapter 5 type Transconductance = Real (final quantity="Transconductance", final unit= "A/(V*V)"); @@ -526,8 +946,8 @@ Modelica in file \"Modelica/package.mo\". // Light and Related Electromagnetic Radiations (chapter 6 of ISO 31-1992)" type RadiantEnergy = Real (final quantity="Energy", final unit="J"); - type RadiantEnergyDensity = Real (final quantity="EnergyDensity", final unit - ="J/m3"); + type RadiantEnergyDensity = Real (final quantity="EnergyDensity", final unit= + "J/m3"); type SpectralRadiantEnergyDensity = Real (final quantity= "SpectralRadiantEnergyDensity", final unit="J/m4"); type RadiantPower = Real (final quantity="Power", final unit="W"); @@ -544,8 +964,8 @@ Modelica in file \"Modelica/package.mo\". unit="1"); type DirectionalSpectralEmissivity = Real (final quantity= "DirectionalSpectralEmissivity", final unit="1"); - type LuminousIntensity = Real (final quantity="LuminousIntensity", final - unit="cd"); + type LuminousIntensity = Real (final quantity="LuminousIntensity", final unit + ="cd"); type LuminousFlux = Real (final quantity="LuminousFlux", final unit="lm"); type QuantityOfLight = Real (final quantity="QuantityOfLight", final unit= "lm.s"); @@ -553,8 +973,8 @@ Modelica in file \"Modelica/package.mo\". type LuminousExitance = Real (final quantity="LuminousExitance", final unit= "lm/m2"); type Illuminance = Real (final quantity="Illuminance", final unit="lx"); - type LightExposure = Real (final quantity="LightExposure", final unit="lx.s" - ); + type LightExposure = Real (final quantity="LightExposure", final unit="lx.s") + ; type LuminousEfficacy = Real (final quantity="LuminousEfficacy", final unit= "lm/W"); type SpectralLuminousEfficacy = Real (final quantity= @@ -573,16 +993,16 @@ Modelica in file \"Modelica/package.mo\". "SpectralReflectionFactor", final unit="1"); type SpectralTransmissionFactor = Real (final quantity= "SpectralTransmissionFactor", final unit="1"); - type SpectralRadianceFactor = Real (final quantity="SpectralRadianceFactor" - , final unit="1"); + type SpectralRadianceFactor = Real (final quantity="SpectralRadianceFactor", + final unit="1"); type LinearAttenuationCoefficient = Real (final quantity= "AttenuationCoefficient", final unit="m-1"); type LinearAbsorptionCoefficient = Real (final quantity= "LinearAbsorptionCoefficient", final unit="m-1"); type MolarAbsorptionCoefficient = Real (final quantity= "MolarAbsorptionCoefficient", final unit="m2/mol"); - type RefractiveIndex = Real (final quantity="RefractiveIndex", final unit= - "1"); + type RefractiveIndex = Real (final quantity="RefractiveIndex", final unit="1" + ); // Acoustics (chapter 7 of ISO 31-1992) type StaticPressure = Real ( @@ -590,7 +1010,7 @@ Modelica in file \"Modelica/package.mo\". final unit="Pa", displayUnit="bar", min=0); - type SoundPressure = StaticPressure ; + type SoundPressure = StaticPressure; type SoundParticleDisplacement = Real (final quantity="Length", final unit= "m"); type SoundParticleVelocity = Real (final quantity="Velocity", final unit= @@ -603,28 +1023,28 @@ Modelica in file \"Modelica/package.mo\". type SoundPower = Real (final quantity="Power", final unit="W"); type SoundIntensity = Real (final quantity="SoundIntensity", final unit= "W/m2"); - type AcousticImpedance = Real (final quantity="AcousticImpedance", final - unit="Pa.s/m3"); + type AcousticImpedance = Real (final quantity="AcousticImpedance", final unit + ="Pa.s/m3"); type SpecificAcousticImpedance = Real (final quantity= "SpecificAcousticImpedance", final unit="Pa.s/m"); - type MechanicalImpedance = Real (final quantity="MechanicalImpedance", - final unit="N.s/m"); + type MechanicalImpedance = Real (final quantity="MechanicalImpedance", final + unit="N.s/m"); type SoundPressureLevel = Real (final quantity="SoundPressureLevel", final unit="dB"); type SoundPowerLevel = Real (final quantity="SoundPowerLevel", final unit= "dB"); - type DissipationCoefficient = Real (final quantity="DissipationCoefficient" - , final unit="1"); + type DissipationCoefficient = Real (final quantity="DissipationCoefficient", + final unit="1"); type ReflectionCoefficient = Real (final quantity="ReflectionCoefficient", final unit="1"); - type TransmissionCoefficient = Real (final quantity= - "TransmissionCoefficient", final unit="1"); + type TransmissionCoefficient = Real (final quantity="TransmissionCoefficient" + , final unit="1"); type AcousticAbsorptionCoefficient = Real (final quantity= "AcousticAbsorptionCoefficient", final unit="1"); - type SoundReductionIndex = Real (final quantity="SoundReductionIndex", - final unit="dB"); - type EquivalentAbsorptionArea = Real (final quantity="Area", final unit="m2" - ); + type SoundReductionIndex = Real (final quantity="SoundReductionIndex", final + unit="dB"); + type EquivalentAbsorptionArea = Real (final quantity="Area", final unit="m2") + ; type ReverberationTime = Real (final quantity="Time", final unit="s"); type LoundnessLevel = Real (final quantity="LoundnessLevel", final unit= "phon"); @@ -635,34 +1055,33 @@ Modelica in file \"Modelica/package.mo\". unit="1"); type RelativeMolecularMass = Real (final quantity="RelativeMolecularMass", final unit="1"); - type NumberOfMolecules = Real (final quantity="NumberOfMolecules", final - unit="1"); + type NumberOfMolecules = Real (final quantity="NumberOfMolecules", final unit + ="1"); type AmountOfSubstance = Real ( final quantity="AmountOfSubstance", final unit="mol", min=0); type MolarMass = Real (final quantity="MolarMass", final unit="kg/mol"); type MolarVolume = Real (final quantity="MolarVolume", final unit="m3/mol"); - type MolarInternalEnergy = Real (final quantity="MolarInternalEnergy", - final unit="J/mol"); - type MolarHeatCapacity = Real (final quantity="MolarHeatCapacity", final - unit="J/(mol.K)"); + type MolarInternalEnergy = Real (final quantity="MolarInternalEnergy", final + unit="J/mol"); + type MolarHeatCapacity = Real (final quantity="MolarHeatCapacity", final unit + ="J/(mol.K)"); type MolarEntropy = Real (final quantity="MolarEntropy", final unit= "J/(mol.K)"); type NumberDensityOfMolecules = Real (final quantity= "NumberDensityOfMolecules", final unit="m-3"); - type MolecularConcentration = Real (final quantity="MolecularConcentration" - , final unit="m-3"); - type MassConcentration = Real (final quantity="MassConcentration", final - unit="kg/m3"); + type MolecularConcentration = Real (final quantity="MolecularConcentration", + final unit="m-3"); + type MassConcentration = Real (final quantity="MassConcentration", final unit + ="kg/m3"); type MassFraction = Real (final quantity="MassFraction", final unit="1"); type Concentration = Real (final quantity="Concentration", final unit= "mol/m3"); - type VolumeFraction = Real (final quantity="VolumeFraction", final unit="1") - ; + type VolumeFraction = Real (final quantity="VolumeFraction", final unit="1"); type MoleFraction = Real (final quantity="MoleFraction", final unit="1"); - type ChemicalPotential = Real (final quantity="ChemicalPotential", final - unit="J/mol"); + type ChemicalPotential = Real (final quantity="ChemicalPotential", final unit + ="J/mol"); type AbsoluteActivity = Real (final quantity="AbsoluteActivity", final unit= "1"); type PartialPressure = Real ( @@ -673,16 +1092,16 @@ Modelica in file \"Modelica/package.mo\". type Fugacity = Real (final quantity="Fugacity", final unit="Pa"); type StandardAbsoluteActivity = Real (final quantity= "StandardAbsoluteActivity", final unit="1"); - type ActivityCoefficient = Real (final quantity="ActivityCoefficient", - final unit="1"); + type ActivityCoefficient = Real (final quantity="ActivityCoefficient", final + unit="1"); type ActivityOfSolute = Real (final quantity="ActivityOfSolute", final unit= "1"); type ActivityCoefficientOfSolute = Real (final quantity= "ActivityCoefficientOfSolute", final unit="1"); type StandardAbsoluteActivityOfSolute = Real (final quantity= "StandardAbsoluteActivityOfSolute", final unit="1"); - type ActivityOfSolvent = Real (final quantity="ActivityOfSolvent", final - unit="1"); + type ActivityOfSolvent = Real (final quantity="ActivityOfSolvent", final unit + ="1"); type OsmoticCoefficientOfSolvent = Real (final quantity= "OsmoticCoefficientOfSolvent", final unit="1"); type StandardAbsoluteActivityOfSolvent = Real (final quantity= @@ -708,21 +1127,21 @@ Modelica in file \"Modelica/package.mo\". "GrandCanonicalPartitionFunction", final unit="1"); type MolecularPartitionFunction = Real (final quantity= "MolecularPartitionFunction", final unit="1"); - type StatisticalWeight = Real (final quantity="StatisticalWeight", final - unit="1"); - type MeanFreePath = Length ; + type StatisticalWeight = Real (final quantity="StatisticalWeight", final unit + ="1"); + type MeanFreePath = Length; type DiffusionCoefficient = Real (final quantity="DiffusionCoefficient", final unit="m2/s"); type ThermalDiffusionRatio = Real (final quantity="ThermalDiffusionRatio", final unit="1"); - type ThermalDiffusionFactor = Real (final quantity="ThermalDiffusionFactor" - , final unit="1"); + type ThermalDiffusionFactor = Real (final quantity="ThermalDiffusionFactor", + final unit="1"); type ThermalDiffusionCoefficient = Real (final quantity= "ThermalDiffusionCoefficient", final unit="m2/s"); type ElementaryCharge = Real (final quantity="ElementaryCharge", final unit= "C"); - type ChargeNumberOfIon = Real (final quantity="ChargeNumberOfIon", final - unit="1"); + type ChargeNumberOfIon = Real (final quantity="ChargeNumberOfIon", final unit + ="1"); type FaradayConstant = Real (final quantity="FaradayConstant", final unit= "C/mol"); type IonicStrength = Real (final quantity="IonicStrength", final unit= @@ -731,10 +1150,10 @@ Modelica in file \"Modelica/package.mo\". final unit="1"); type ElectrolyticConductivity = Real (final quantity= "ElectrolyticConductivity", final unit="S/m"); - type MolarConductivity = Real (final quantity="MolarConductivity", final - unit="S.m2/mol"); - type TransportNumberOfIonic = Real (final quantity="TransportNumberOfIonic" - , final unit="1"); + type MolarConductivity = Real (final quantity="MolarConductivity", final unit + ="S.m2/mol"); + type TransportNumberOfIonic = Real (final quantity="TransportNumberOfIonic", + final unit="1"); // Atomic and Nuclear Physics (chapter 9 of ISO 31-1992) type ProtonNumber = Real (final quantity="ProtonNumber", final unit="1"); @@ -747,21 +1166,21 @@ Modelica in file \"Modelica/package.mo\". type HartreeEnergy = Real (final quantity="Energy", final unit="J"); type MagneticMomentOfParticle = Real (final quantity= "MagneticMomentOfParticle", final unit="A.m2"); - type BohrMagneton = MagneticMomentOfParticle ; - type NuclearMagneton = MagneticMomentOfParticle ; - type GyromagneticCoefficient = Real (final quantity= - "GyromagneticCoefficient", final unit="A.m2/(J.s)"); + type BohrMagneton = MagneticMomentOfParticle; + type NuclearMagneton = MagneticMomentOfParticle; + type GyromagneticCoefficient = Real (final quantity="GyromagneticCoefficient" + , final unit="A.m2/(J.s)"); type GFactorOfAtom = Real (final quantity="GFactorOfAtom", final unit="1"); type GFactorOfNucleus = Real (final quantity="GFactorOfNucleus", final unit= "1"); - type LarmorAngularFrequency = Real (final quantity="AngularFrequency", - final unit="s-1"); + type LarmorAngularFrequency = Real (final quantity="AngularFrequency", final + unit="s-1"); type NuclearPrecessionAngularFrequency = Real (final quantity= "AngularFrequency", final unit="s-1"); type CyclotronAngularFrequency = Real (final quantity="AngularFrequency", final unit="s-1"); - type NuclearQuadrupoleMoment = Real (final quantity= - "NuclearQuadrupoleMoment", final unit="m2"); + type NuclearQuadrupoleMoment = Real (final quantity="NuclearQuadrupoleMoment" + , final unit="m2"); type NuclearRadius = Real (final quantity="Length", final unit="m"); type ElectronRadius = Real (final quantity="Length", final unit="m"); type ComptonWavelength = Real (final quantity="Length", final unit="m"); @@ -771,48 +1190,47 @@ Modelica in file \"Modelica/package.mo\". unit="1"); type RelativeMassDefect = Real (final quantity="RelativeMassDefect", final unit="1"); - type PackingFraction = Real (final quantity="PackingFraction", final unit= - "1"); - type BindingFraction = Real (final quantity="BindingFraction", final unit= - "1"); + type PackingFraction = Real (final quantity="PackingFraction", final unit="1" + ); + type BindingFraction = Real (final quantity="BindingFraction", final unit="1" + ); type MeanLife = Real (final quantity="Time", final unit="s"); type LevelWidth = Real (final quantity="LevelWidth", final unit="J"); type Activity = Real (final quantity="Activity", final unit="Bq"); type SpecificActivity = Real (final quantity="SpecificActivity", final unit= "Bq/kg"); - type DecayConstant = Real (final quantity="DecayConstant", final unit="s-1") - ; + type DecayConstant = Real (final quantity="DecayConstant", final unit="s-1"); type HalfLife = Real (final quantity="Time", final unit="s"); type AlphaDisintegrationEnergy = Real (final quantity="Energy", final unit= "J"); type MaximumBetaParticleEnergy = Real (final quantity="Energy", final unit= "J"); - type BetaDisintegrationEnergy = Real (final quantity="Energy", final unit= - "J"); + type BetaDisintegrationEnergy = Real (final quantity="Energy", final unit="J" + ); // Nuclear Reactions and Ionizing Radiations (chapter 10 of ISO 31-1992) type ReactionEnergy = Real (final quantity="Energy", final unit="J"); type ResonanceEnergy = Real (final quantity="Energy", final unit="J"); type CrossSection = Real (final quantity="Area", final unit="m2"); type TotalCrossSection = Real (final quantity="Area", final unit="m2"); - type AngularCrossSection = Real (final quantity="AngularCrossSection", - final unit="m2/sr"); + type AngularCrossSection = Real (final quantity="AngularCrossSection", final + unit="m2/sr"); type SpectralCrossSection = Real (final quantity="SpectralCrossSection", final unit="m2/J"); type SpectralAngularCrossSection = Real (final quantity= "SpectralAngularCrossSection", final unit="m2/(sr.J)"); - type MacroscopicCrossSection = Real (final quantity= - "MacroscopicCrossSection", final unit="m-1"); + type MacroscopicCrossSection = Real (final quantity="MacroscopicCrossSection" + , final unit="m-1"); type TotalMacroscopicCrossSection = Real (final quantity= "TotalMacroscopicCrossSection", final unit="m-1"); type ParticleFluence = Real (final quantity="ParticleFluence", final unit= "m-2"); - type ParticleFluenceRate = Real (final quantity="ParticleFluenceRate", - final unit="s-1.m2"); - type EnergyFluence = Real (final quantity="EnergyFluence", final unit="J/m2" - ); - type EnergyFluenceRate = Real (final quantity="EnergyFluenceRate", final - unit="W/m2"); + type ParticleFluenceRate = Real (final quantity="ParticleFluenceRate", final + unit="s-1.m2"); + type EnergyFluence = Real (final quantity="EnergyFluence", final unit="J/m2") + ; + type EnergyFluenceRate = Real (final quantity="EnergyFluenceRate", final unit + ="W/m2"); type CurrentDensityOfParticles = Real (final quantity= "CurrentDensityOfParticles", final unit="m-2.s-1"); type MassAttenuationCoefficient = Real (final quantity= @@ -826,15 +1244,15 @@ Modelica in file \"Modelica/package.mo\". "TotalLinearStoppingPower", final unit="J/m"); type TotalAtomicStoppingPower = Real (final quantity= "TotalAtomicStoppingPower", final unit="J.m2"); - type TotalMassStoppingPower = Real (final quantity="TotalMassStoppingPower" - , final unit="J.m2/kg"); + type TotalMassStoppingPower = Real (final quantity="TotalMassStoppingPower", + final unit="J.m2/kg"); type MeanLinearRange = Real (final quantity="Length", final unit="m"); - type MeanMassRange = Real (final quantity="MeanMassRange", final unit= - "kg/m2"); + type MeanMassRange = Real (final quantity="MeanMassRange", final unit="kg/m2" + ); type LinearIonization = Real (final quantity="LinearIonization", final unit= "m-1"); - type TotalIonization = Real (final quantity="TotalIonization", final unit= - "1"); + type TotalIonization = Real (final quantity="TotalIonization", final unit="1" + ); type Mobility = Real (final quantity="Mobility", final unit="m2/V.s"); type IonNumberDensity = Real (final quantity="IonNumberDensity", final unit= "m-3"); @@ -856,14 +1274,14 @@ Modelica in file \"Modelica/package.mo\". type DiffusionArea = Real (final quantity="Area", final unit="m2"); type MigrationArea = Real (final quantity="Area", final unit="m2"); type SlowingDownLength = Real (final quantity="SLength", final unit="m"); - type DiffusionLength = Length ; - type MigrationLength = Length ; - type NeutronYieldPerFission = Real (final quantity="NeutronYieldPerFission" - , final unit="1"); + type DiffusionLength = Length; + type MigrationLength = Length; + type NeutronYieldPerFission = Real (final quantity="NeutronYieldPerFission", + final unit="1"); type NeutronYieldPerAbsorption = Real (final quantity= "NeutronYieldPerAbsorption", final unit="1"); - type FastFissionFactor = Real (final quantity="FastFissionFactor", final - unit="1"); + type FastFissionFactor = Real (final quantity="FastFissionFactor", final unit + ="1"); type ThermalUtilizationFactor = Real (final quantity= "ThermalUtilizationFactor", final unit="1"); type NonLeakageProbability = Real (final quantity="NonLeakageProbability", @@ -875,8 +1293,8 @@ Modelica in file \"Modelica/package.mo\". type SpecificEnergyImparted = Real (final quantity="SpecificEnergy", final unit="Gy"); type AbsorbedDose = Real (final quantity="AbsorbedDose", final unit="Gy"); - type DoseEquivalent = Real (final quantity="DoseEquivalent", final unit="Sv" - ); + type DoseEquivalent = Real (final quantity="DoseEquivalent", final unit="Sv") + ; type AbsorbedDoseRate = Real (final quantity="AbsorbedDoseRate", final unit= "Gy/s"); type LinearEnergyTransfer = Real (final quantity="LinearEnergyTransfer", @@ -892,22 +1310,19 @@ Modelica in file \"Modelica/package.mo\". // chapter 11 is not defined in ISO 31-1992 // Characteristic Numbers (chapter 12 of ISO 31-1992) - type ReynoldsNumber = Real (final quantity="ReynoldsNumber", final unit="1") - ; + type ReynoldsNumber = Real (final quantity="ReynoldsNumber", final unit="1"); type EulerNumber = Real (final quantity="EulerNumber", final unit="1"); type FroudeNumber = Real (final quantity="FroudeNumber", final unit="1"); type GrashofNumber = Real (final quantity="GrashofNumber", final unit="1"); type WeberNumber = Real (final quantity="WeberNumber", final unit="1"); type MachNumber = Real (final quantity="MachNumber", final unit="1"); type KnudsenNumber = Real (final quantity="KnudsenNumber", final unit="1"); - type StrouhalNumber = Real (final quantity="StrouhalNumber", final unit="1") - ; + type StrouhalNumber = Real (final quantity="StrouhalNumber", final unit="1"); type FourierNumber = Real (final quantity="FourierNumber", final unit="1"); type PecletNumber = Real (final quantity="PecletNumber", final unit="1"); - type RayleighNumber = Real (final quantity="RayleighNumber", final unit="1") - ; + type RayleighNumber = Real (final quantity="RayleighNumber", final unit="1"); type NusseltNumber = Real (final quantity="NusseltNumber", final unit="1"); - type BiotNumber = NusseltNumber ; + type BiotNumber = NusseltNumber; // The Biot number (Bi) is used when // the Nusselt number is reserved // for convective transport of heat. @@ -925,44 +1340,43 @@ Modelica in file \"Modelica/package.mo\". type PrandtlNumber = Real (final quantity="PrandtlNumber", final unit="1"); type SchmidtNumber = Real (final quantity="SchmidtNumber", final unit="1"); type LewisNumber = Real (final quantity="LewisNumber", final unit="1"); - type MagneticReynoldsNumber = Real (final quantity="MagneticReynoldsNumber" - , final unit="1"); + type MagneticReynoldsNumber = Real (final quantity="MagneticReynoldsNumber", + final unit="1"); type AlfvenNumber = Real (final quantity="AlfvenNumber", final unit="1"); - type HartmannNumber = Real (final quantity="HartmannNumber", final unit="1") - ; + type HartmannNumber = Real (final quantity="HartmannNumber", final unit="1"); type CowlingNumber = Real (final quantity="CowlingNumber", final unit="1"); // Solid State Physics (chapter 13 of ISO 31-1992) - type BraggAngle = Angle ; + type BraggAngle = Angle; type OrderOfReflexion = Real (final quantity="OrderOfReflexion", final unit= "1"); type ShortRangeOrderParameter = Real (final quantity="RangeOrderParameter", final unit="1"); type LongRangeOrderParameter = Real (final quantity="RangeOrderParameter", final unit="1"); - type DebyeWallerFactor = Real (final quantity="DebyeWallerFactor", final - unit="1"); + type DebyeWallerFactor = Real (final quantity="DebyeWallerFactor", final unit + ="1"); type CircularWavenumber = Real (final quantity="CircularWavenumber", final unit="m-1"); - type FermiCircularWavenumber = Real (final quantity= - "FermiCircularWavenumber", final unit="m-1"); - type DebyeCircularWavenumber = Real (final quantity= - "DebyeCircularWavenumber", final unit="m-1"); - type DebyeCircularFrequency = Real (final quantity="AngularFrequency", - final unit="s-1"); - type DebyeTemperature = ThermodynamicTemperature ; + type FermiCircularWavenumber = Real (final quantity="FermiCircularWavenumber" + , final unit="m-1"); + type DebyeCircularWavenumber = Real (final quantity="DebyeCircularWavenumber" + , final unit="m-1"); + type DebyeCircularFrequency = Real (final quantity="AngularFrequency", final + unit="s-1"); + type DebyeTemperature = ThermodynamicTemperature; type SpectralConcentration = Real (final quantity="SpectralConcentration", final unit="s/m3"); - type GrueneisenParameter = Real (final quantity="GrueneisenParameter", - final unit="1"); + type GrueneisenParameter = Real (final quantity="GrueneisenParameter", final + unit="1"); type MadelungConstant = Real (final quantity="MadelungConstant", final unit= "1"); type DensityOfStates = Real (final quantity="DensityOfStates", final unit= "J-1/m-3"); - type ResidualResistivity = Real (final quantity="ResidualResistivity", - final unit="Ohm.m"); - type LorenzCoefficient = Real (final quantity="LorenzCoefficient", final - unit="V2/K2"); + type ResidualResistivity = Real (final quantity="ResidualResistivity", final + unit="Ohm.m"); + type LorenzCoefficient = Real (final quantity="LorenzCoefficient", final unit + ="V2/K2"); type HallCoefficient = Real (final quantity="HallCoefficient", final unit= "m3/C"); type ThermoelectromotiveForce = Real (final quantity= @@ -977,32 +1391,207 @@ Modelica in file \"Modelica/package.mo\". unit="A/(m2.K2)"); type FermiEnergy = Real (final quantity="Energy", final unit="eV"); type GapEnergy = Real (final quantity="Energy", final unit="eV"); - type DonorIonizationEnergy = Real (final quantity="Energy", final unit="eV") - ; + type DonorIonizationEnergy = Real (final quantity="Energy", final unit="eV"); type AcceptorIonizationEnergy = Real (final quantity="Energy", final unit= "eV"); - type FermiTemperature = ThermodynamicTemperature ; + type FermiTemperature = ThermodynamicTemperature; type ElectronNumberDensity = Real (final quantity="ElectronNumberDensity", final unit="m-3"); - type HoleNumberDensity = Real (final quantity="HoleNumberDensity", final - unit="m-3"); - type IntrinsicNumberDensity = Real (final quantity="IntrinsicNumberDensity" - , final unit="m-3"); + type HoleNumberDensity = Real (final quantity="HoleNumberDensity", final unit + ="m-3"); + type IntrinsicNumberDensity = Real (final quantity="IntrinsicNumberDensity", + final unit="m-3"); type DonorNumberDensity = Real (final quantity="DonorNumberDensity", final unit="m-3"); type AcceptorNumberDensity = Real (final quantity="AcceptorNumberDensity", final unit="m-3"); - type EffectiveMass = Mass ; + type EffectiveMass = Mass; type MobilityRatio = Real (final quantity="MobilityRatio", final unit="1"); - type RelaxationTime = Time ; - type CarrierLifeTime = Time ; + type RelaxationTime = Time; + type CarrierLifeTime = Time; type ExchangeIntegral = Real (final quantity="Energy", final unit="eV"); - type CurieTemperature = ThermodynamicTemperature ; - type NeelTemperature = ThermodynamicTemperature ; - type LondonPenetrationDepth = Length ; - type CoherenceLength = Length ; - type LandauGinzburgParameter = Real (final quantity= - "LandauGinzburgParameter", final unit="1"); - type FluxiodQuantum = Real (final quantity="FluxiodQuantum", final unit="Wb" - ); + type CurieTemperature = ThermodynamicTemperature; + type NeelTemperature = ThermodynamicTemperature; + type LondonPenetrationDepth = Length; + type CoherenceLength = Length; + type LandauGinzburgParameter = Real (final quantity="LandauGinzburgParameter" + , final unit="1"); + type FluxiodQuantum = Real (final quantity="FluxiodQuantum", final unit="Wb") + ; + + annotation ( + Window( + x=0.08, + y=0.04, + width=0.58, + height=0.84, + library=1, + autolayout=1), + Invisible=true, + Icon(Text( + extent=[-63, -13; 45, -67], + string="[kg.m2]", + style(color=0))), + Documentation(info=" + +This package provides predefined types, such as Mass, +Length, Time, based on the international standard +on units:
+ +For more information on units, see also the book of +Francois Cardarelli \"Scientific Unit Conversion - A Practical +Guide to Metrication\" +(Springer 1997).
+ +The following conventions are used in this package:
+ ++ Chapter 1: Space and Time + Chapter 2: Periodic and Related Phenomena + Chapter 3: Mechanics + Chapter 4: Heat + Chapter 5: Electricity and Magnetism + Chapter 6: Light and Related Electro-Magnetic Radiations + Chapter 7: Acoustics + Chapter 8: Physical Chemistry + Chapter 9: Atomic and Nuclear Physics + Chapter 10: Nuclear Reactions and Ionizing Radiations + Chapter 11: (not defined in ISO 31-1992) + Chapter 12: Characteristic Numbers + Chapter 13: Solid State Physics ++
Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ +The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file \"Modelica/package.mo\".
+ +"), + Diagram( + Rectangle(extent=[169, 86; 349, 236], style(fillColor=30, fillPattern=1)) + , + Polygon(points=[169, 236; 189, 256; 369, 256; 349, 236; 169, 236], style( + fillColor=30, fillPattern=1)), + Polygon(points=[369, 256; 369, 106; 349, 86; 349, 236; 369, 256], style( + fillColor=30, fillPattern=1)), + Text( + extent=[179, 226; 339, 196], + string="Library", + style( + color=9, + fillColor=0, + fillPattern=1)), + Text( + extent=[206, 173; 314, 119], + string="[kg.m2]", + style(color=0)), + Text( + extent=[163, 320; 406, 264], + string="Modelica.SIunits", + style(color=1)))); end SIunits; diff --git a/Thermal/HeatTransfer.mo b/Thermal/HeatTransfer.mo new file mode 100644 index 0000000000..828b36ea5d --- /dev/null +++ b/Thermal/HeatTransfer.mo @@ -0,0 +1,2300 @@ +package HeatTransfer "1-dimensional heat transfer with lumped elements" + import Modelica.SIunits.Conversions.*; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + + extends Modelica.Icons.Library2; + + annotation (Icon( + Polygon(points=[-54, -6; -61, -7; -75, -15; -79, -24; -80, -34; -78, -42 + ; -73, -49; -64, -51; -57, -51; -47, -50; -41, -43; -38, -35; -40, + -27; -40, -20; -42, -13; -47, -7; -54, -5; -54, -6], style(color=10 + , fillColor=8)), + Polygon(points=[-75, -15; -79, -25; -80, -34; -78, -42; -72, -49; -64, - + 51; -57, -51; -47, -50; -57, -47; -65, -45; -71, -40; -74, -33; -76 + , -23; -75, -15; -75, -15], style(color=0, fillColor=9)), + Polygon(points=[39, -6; 32, -7; 18, -15; 14, -24; 13, -34; 15, -42; 20, - + 49; 29, -51; 36, -51; 46, -50; 52, -43; 55, -35; 53, -27; 53, -20; + 51, -13; 46, -7; 39, -5; 39, -6], style(color=9, fillColor=8)), + Polygon(points=[18, -15; 14, -25; 13, -34; 15, -42; 21, -49; 29, -51; 36 + , -51; 46, -50; 36, -47; 28, -45; 22, -40; 19, -33; 17, -23; 18, - + 15; 18, -15], style(color=0, fillColor=9)), + Polygon(points=[-9, -23; -9, -10; 18, -17; -9, -23], style( + color=42, + fillColor=42, + fillPattern=1)), + Line(points=[-41, -17; -9, -17], style(color=42, thickness=2)), + Line(points=[-17, -40; 15, -40], style(color=42, thickness=2)), + Polygon(points=[-17, -46; -17, -34; -40, -40; -17, -46], style( + color=42, + fillColor=42, + fillPattern=1))), Documentation(info=" ++This package contains components to model 1-dimensional heat transfer +with lumped elements. This allows especially to model heat transfer in +machines provided the parameters of the lumped elements, such as +the heat capacity of a part, can be determined by measurements +(due to the complex geometries and many materials used in machines, +calculating the lumped element parameters from some basic analytic +formulas is usually not possible). +
+ ++Example models how to use this library are given in subpackage Examples. +For a first simple example, see Examples.TwoMasses where two masses +with different initial temperatures are getting in contact to each +other and arriving after some time at a common temperature. +A more realistic example is provided in Examples.Drive where the +heating of an electrical motor is modelled, see the following screen shot +of this example: +
+ + + ++The filled and non-filled red squares at the left and +right side of a component represent thermal ports (connector HeatPort). +Drawing a line between such squares means that they are thermally connected. +The variables of a HeatPort connector are the temperature T at the port +and the heat flow rate Q_dot flowing into the component (if Q_dot is positive, +the heat flows into the element, otherwise it flows out of the element): +
+ +Modelica.SIunits.Temperature T \"absolute temperature at port in Kelvin\"; + Modelica.SIunits.HeatFlowRate Q_dot \"flow rate at the port in Watt\"; ++ +
+Note, that all temperatures of this package, including initial conditions, +are given in Kelvin. For convenience, in subpackages HeatTransfer.Celsius, + HeatTransfer.Fahrenheit and HeatTransfer.Rankine components are provided such that source and +sensor information is available in degree Celsius, degree Fahrenheit, or degree Rankine, +respectively. Additionally, in package SIunits.Conversions conversion +functions between the units Kelvin and Celsius, Fahrenheit, Rankine are +provided. These functions may be used in the following way: +
+ +import SI=Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + ... + parameter SI.Temperature T = from_degC(25); // convert 25 degree Celsius to Kelvin ++ +
+This package contains the following model components: +
+ +Examples (subpackage) Examples of library usage. + Interfaces (subpackage) Interface definitions. + + HeatCapacitor Lumped thermal element storing heat. + ThermalConductor Lumped thermal element transporting heat without + storing it. + Convection Lumped thermal element for heat convection. + BodyRadiation Lumped thermal element for radiation heat transfer + between two bodies + + FixedTemperature Fixed temperature boundary condition. + PrescribedTemperature Variable temperature boundary condition + FixedHeatFlow Fixed heat flow boundary condition. + PrescribedHeatFlow Variable heat flow boundary condition. + + TemperatureSensor Absolute temperature sensor. + RelTemperatureSensor Relative temperature sensor. + HeatFlowSensor Sensor to determine the heat flow rate + between two ports. + + Celsius (subpackage) Elements with Celsius interface. + Fahrenheit (subpackage) Elements with Fahrenheit interface. + Rankine (subpackage) Elements with Rankine interface. ++ +
+There are several other components available, such as AxialConduction (discretized PDE in +axial direction), which have been temporarily removed from this library. The reason is that +these components reference material properties, such as thermal conductivity, and currently +the Modelica design group is discussing a general scheme to describe material properties. +
+ +
+For technical details in the design of this library, see the following reference:
+Michael Tiller (2001):
+Introduction to Physical Modeling with Modelica.
+Kluwer Academic Publishers Boston.
+
Release Notes:
+
+Acknowledgements:
+Several helpful remarks from the following persons are acknowledged:
+John Batteh, Ford Motors, Dearborn, U.S.A;
+Anton Haumer, Technical Consulting & Electrical Engineering, Austria;
+Ludwig Marvan, VA TECH ELIN EBG Elektronik GmbH, Wien, Austria;
+Hans Olsson, Dynasim AB, Sweden;
+Hubertus Tummescheit, Lund Institute of Technology, Lund, Sweden.
+
Copyright © 2001-2002, Modelica Association, Michael Tiller and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file \"Modelica/package.mo\". +
+ +")); + package Examples + "Example models to demonstrate the usage of package Modelica.Thermal.HeatTransfer" + + + extends Modelica.Icons.Library; + + encapsulated model TwoMasses "Simple conduction demo" + import Modelica.Icons; + import Modelica.Thermal.HeatTransfer; + import SI = Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + + extends Icons.Example; + parameter SI.Temperature T_final_K(fixed=false) + "Projected final temperature"; + parameter NonSI.Temperature_degC T_final_degC(fixed=false) + "Projected final temperature"; + HeatTransfer.HeatCapacitor mass1(C=15, T(start=from_degC(100))) + annotation (extent=[-100, 20; -40, 80]); + HeatTransfer.HeatCapacitor mass2(C=15, T(start=from_degC(0))) annotation + (extent=[40, 20; 100, 80]); + HeatTransfer.ThermalConductor conduction(G=10) annotation (extent=[-30, - + 20; 30, 40]); + annotation (Documentation(info=" ++This example demonstrates the thermal response of two masses connected by +a conducting element. The two masses have the same heat capacity but different +initial temperatures (T1=100 [degC], T2= 0 [degC]). The mass with the higher +temperature will cool off while the mass with the lower temperature heats up. +They will each asymptotically approach the calculated temperature T_final_K +(T_final_degC) that results from dividing the total initial energy in the system by the sum +of the heat capacities of each element. +
+ +
+Simulate for 5 s and plot the variables
+mass1.T, mass2.T, T_final_K or
+Tsensor1.T.signal, Tsensor2.T.signal, T_final_degC
+
+This example contains a simple first order thermal model of +a frequency inverter. The periodic power losses in the +frequency inverter are described by two tables. +\"conductionTable\" describes the convection conduction G +and \"lossTable\" the generated power loss P_loss dependent +on the time.
+ ++The power dissipation to the environment is approximated by +heat flow through a thermal conductance, partially storage +of the heat in a heat capacitor and finally by forced +convection to the environment, defined in the two tables. +
+ ++Simulate for 5 s and plot the heat flow rate and the +temperature in the frequency inverter. +
+ +")); + Sources.TimeTable conductionTable(table=[0, 0.007; 1, 0.014; 2, 0.007; 3 + , 0.014; 4, 0.007; 5, 0.014]) annotation (extent=[20, 60; 40, 80]); + Sources.TimeTable lossTable(table=[0, 10000; 1, 7000; 2, 10000; 3, 7000; + 4, 10000; 5, 7000]) annotation (extent=[-100, -20; -80, 0]); + HeatTransfer.HeatCapacitor C(C=30000) annotation (extent=[10, 20; 30, 40] + ); + HeatTransfer.Celsius.TemperatureSensor Tsensor annotation (extent=[-10, - + 60; 10, -40]); + HeatTransfer.ThermalConductor G(G=50) annotation (extent=[-10, -20; 10, 0 + ]); + HeatTransfer.Convection convection annotation (extent=[40, -20; 60, 0]); + HeatTransfer.PrescribedHeatFlow Q_dot annotation (extent=[-60, -20; -40, + 0]); + HeatTransfer.Celsius.FixedTemperature environment(T=20) annotation ( + extent=[80, -20; 100, 0], rotation=180); + equation + connect(Q_dot.port, G.port_a) annotation (points=[-40, -10; -11, -10], + style(color=42)); + connect(Q_dot.port, Tsensor.port) annotation (points=[-40, -10; -20, -10 + ; -20, -50; -10, -50], style(color=42)); + connect(G.port_b, convection.solid) annotation (points=[11, -10; 39, -10] + , style(color=42)); + connect(C.port, G.port_b) annotation (points=[20, 20; 20, -10; 11, -10], + style(color=42)); + connect(environment.port, convection.fluid) annotation (points=[80, -10; + 61, -10], style(color=42)); + connect(lossTable.outPort, Q_dot.Q_dot) annotation (points=[-78, -10; -62 + , -10], style(color=3)); + connect(conductionTable.outPort, convection.G) annotation (points=[42, 70 + ; 50, 70; 50, 2], style(color=3)); + end FrequencyInverter; + + encapsulated model ControlledTemperature + "Control temperature of a resistor" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Electrical.Analog; + import Modelica.Thermal.HeatTransfer; + import SI = Modelica.SIunits; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + import Modelica.SIunits.Conversions.*; + + extends Icons.Example; + + parameter NonSI.Temperature_degC TAmb=20 "Ambient Temperature"; + parameter NonSI.Temperature_degC TDif=2 "Error in Temperature"; + output NonSI.Temperature_degC TRes "Resulting Temperature"; + annotation (Documentation(info=" ++A constant voltage of 10 V is applied to a +temperature dependent resistor of 10*(1+(T-20C)/(235+20C)) Ohms, +whose losses v**2/r are dissipated via a +thermal conductance of 0.1 W/K to ambient temperature 20 degree C. +The resistor is assumed to have a thermal capacity of 1 J/K, +having ambient temparature at the beginning of the experiment. +The temperature of this heating resistor is held by an OnOff-controller +at reference temperature within a given bandwith +/- 1 K +by switching on and off the voltage source. +The reference temperature starts at 25 degree C +and rises between t = 2 and 8 seconds linear to 50 degree C. +An approppriate simulating time would be 10 seconds. +
+ +")); + Analog.Basic.Ground Ground1 annotation (extent=[-100, -100; -80, -80]); + Analog.Sources.ConstantVoltage ConstantVoltage1(V=10) annotation (extent= + [-100, -60; -80, -40], rotation=-90); + HeatTransfer.HeatCapacitor HeatCapacitor1(C=1, T(start=from_degC(TAmb))) + annotation (extent=[0, -60; 20, -80]); + Analog.Basic.HeatingResistor HeatingResistor1( + R_ref=10, + T_ref=from_degC(20), + alpha=1/(235 + 20)) annotation (extent=[-20, -60; -40, -40], rotation=- + 90); + HeatTransfer.Celsius.FixedTemperature FixedTemperature1(T=TAmb) + annotation (extent=[100, -60; 80, -40]); + HeatTransfer.Celsius.TemperatureSensor TemperatureSensor1 annotation ( + extent=[0, -40; 20, -20], rotation=90); + HeatTransfer.ThermalConductor ThermalConductor1(G=0.1) annotation (extent + =[40, -60; 60, -40]); + SwitchController SwitchController1(bandwidth=TDif) annotation (extent=[- + 20, -20; -40, 0]); + Analog.Ideal.IdealSwitch IdealSwitch1 annotation (extent=[-70, -50; -50, + -30]); + Sources.Ramp Ramp1( + height={25}, + duration={6}, + offset={25}, + startTime={2}) annotation (extent=[20, 0; 0, 20]); + + encapsulated block SwitchController + "On-off controller for use with Modelica.Electrical.Analog.Ideal.IdealSwitch" + + + import Modelica.Blocks; + extends Blocks.Interfaces.MI2BooleanMOs(final n=1); + + parameter Real bandwidth=0.1 "Bandwidth around reference signal"; + + annotation (Icon( + Rectangle(extent=[-100, -100; 100, 100], style(color=5, fillColor=7 + )), + Text( + extent=[-90, 80; -30, 60], + string="Reference", + style(thickness=2)), + Text(extent=[-88, -60; -28, -80], string="Input "), + Line(points=[-80, 0; -70, 20; -52, 42; -28, 60; -8, 66; 16, 58; 32 + , 50; 48, 38; 66, 20; 78, 0], style(thickness=2)), + Line(points=[-80, 30; -8, 50; 80, 20], style(color=41, thickness=2) + ), + Line(points=[-80, 38; -8, 56; 80, 26], style(color=41, pattern=2)) + , + Line(points=[-80, 24; -8, 42; 80, 12], style(color=41, pattern=2)) + , + Line(points=[-80, -20; -46, -20; -46, -60; 68, -60; 68, -20; 80, - + 20], style(color=81, thickness=2))), Documentation(info=" +The block SwitchController sets the output signal to false when +the input signal falls below the reference signal minus half of +the bandwidth and sets the output signal to true when the input +signal exceeds the reference signal plus half of the bandwidth.
+ +The reference signal is represented by inPort1 and the input +signal by inPort2.
+ +Note: This component will be removed when package +ModelicaAdditions.Blocks.Logical is incorporated into the Modelica +Standard library.
+ +")); + protected + Real u=inPort2.signal[1] "Input signal"; + Real uRef=inPort1.signal[1] "Reference input signal"; + Boolean y=outPort.signal[1] "Output signal"; + equation + y = (u > uRef + bandwidth/2) or (pre(y) and not (u < uRef - bandwidth/2 + )); + end SwitchController; + equation + + connect(ConstantVoltage1.n, HeatingResistor1.n) annotation (points=[-90, + -60; -30, -60], style(color=3)); + connect(ConstantVoltage1.n, Ground1.p) annotation (points=[-90, -60; -90 + , -80], style(color=3)); + connect(HeatingResistor1.heatPort, ThermalConductor1.port_a) annotation ( + points=[-20, -50; 38, -50], style(color=42)); + connect(ThermalConductor1.port_b, FixedTemperature1.port) annotation ( + points=[61, -50; 80, -50], style(color=42)); + connect(HeatingResistor1.heatPort, TemperatureSensor1.port) annotation ( + points=[-20, -50; 10, -50; 10, -40], style(color=42)); + connect(HeatingResistor1.heatPort, HeatCapacitor1.port) annotation ( + points=[-20, -50; 10, -50; 10, -60], style(color=42)); + connect(TemperatureSensor1.T, SwitchController1.inPort2) annotation ( + points=[10, -20; 10, -16; -16, -16], style(color=3)); + connect(ConstantVoltage1.p, IdealSwitch1.p) annotation (points=[-90, -40 + ; -70, -40], style(color=3)); + connect(IdealSwitch1.n, HeatingResistor1.p) annotation (points=[-50, -40 + ; -30, -40], style(color=3)); + connect(SwitchController1.inPort1, Ramp1.outPort) annotation (points=[-16 + , -4; -9, -4; -9, 10; -2, 10], style(color=3)); + connect(SwitchController1.outPort, IdealSwitch1.control) annotation ( + points=[-42, -10; -60, -10; -60, -34], style(color=5)); + + TRes = to_degC(HeatingResistor1.heatPort.T); + end ControlledTemperature; + + end Examples; + + package Interfaces + + extends Modelica.Icons.Library; + + partial connector HeatPort "Thermal port for 1-dim. heat transfer" + SI.Temperature T "Port temperature"; + flow SI.HeatFlowRate Q_dot + "Heat flow rate (positive if flowing from outside into the component)"; + end HeatPort; + + connector HeatPort_a + "Thermal port for 1-dim. heat transfer (filled rectangular icon)" + + extends HeatPort; + + annotation ( + Documentation(info=" +This connector is used for 1-dimensional heat flow between components. +The variables in the connector are:
+ +T Temperature in [Kelvin]. + Q_dot Heat flow rate in [Watt]. ++ +
According to the Modelica sign convention, a positive heat flow +rate Q_dot is considered to flow into a component. This +convention has to be used whenever this connector is used in a model +class.
+ +Note, that the two connector classes HeatPort_a and +HeatPort_b are identical with the only exception of the different +icon layout.
+"), + Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=42, fillColor + =42)), Text( + extent=[-98, 196; 102, 102], + string="%name", + style(color=42))), + Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=42, + fillColor=42)), Text( + extent=[-98, 196; 102, 102], + string="%name", + style(color=42)))); + end HeatPort_a; + + connector HeatPort_b + "Thermal port for 1-dim. heat transfer (unfilled rectangular icon)" + + extends HeatPort; + + annotation ( + Documentation(info=" +This connector is used for 1-dimensional heat flow between components. +The variables in the connector are:
+ +T Temperature in [Kelvin]. + Q_dot Heat flow rate in [Watt]. ++ +
According to the Modelica sign convention, a positive heat flow +rate Q_dot is considered to flow into a component. This +convention has to be used whenever this connector is used in a model +class.
+ +Note, that the two connector classes HeatPort_a and +HeatPort_b are identical with the only exception of the different +icon layout.
+"), + Diagram(Rectangle(extent=[-100, 100; 100, -100], style(color=42, + fillColor=7)), Text( + extent=[-98, 196; 102, 102], + string="%name", + style(color=42))), + Icon(Rectangle(extent=[-100, 100; 100, -100], style(color=42, fillColor + =7)), Text( + extent=[-98, 196; 102, 102], + string="%name", + style(color=42)))); + end HeatPort_b; + + partial model Element1D + "Partial heat transfer element with two HeatPort connectors that does not store energy" + + + SI.HeatFlowRate Q_dot "Heat flow rate from port_a -> port_b"; + SI.Temperature dT "port_a.T - port_b.T"; + public + HeatPort_a port_a annotation (extent=[-120, -10; -100, 10]); + HeatPort_b port_b annotation (extent=[100, -10; 120, 10]); + annotation (Documentation(info=" ++This partial model contains the basic connectors and variables to +allow heat transfer models to be created that do not store energy, +This model defines and includes equations for the temperature +drop across the element, dT, and the heat flow rate +through the element from port_a to port_b, Q_dot. +
+ ++By extending this model, it is possible to write simple +constitutive equations for many types of heat transfer components. +
+ + +"), Icon); + equation + dT = port_a.T - port_b.T; + port_a.Q_dot = Q_dot; + port_b.Q_dot = -Q_dot; + end Element1D; + end Interfaces; + + model HeatCapacitor "Lumped thermal element storing heat" + parameter SI.HeatCapacity C "Heat capacity of part (= cp*m)"; + parameter Boolean steadyStateStart=false + "true, if component shall start in steady state"; + SI.Temperature T(start=from_degC(25)) "Temperature of part"; + annotation ( + Icon( + Text(extent=[-129, 121; 131, 70], string="%name"), + Polygon(points=[0, 65; -20, 61; -40, 55; -52, 41; -58, 33; -68, 23; -72 + , 11; -76, -3; -78, -17; -76, -33; -76, -45; -76, -55; -70, -67; + -64, -75; -48, -79; -30, -85; -18, -85; -2, -87; 8, -91; 22, -91 + ; 32, -89; 42, -83; 54, -77; 56, -75; 66, -63; 68, -55; 70, -53; + 72, -37; 76, -23; 78, -15; 78, 1; 74, 13; 66, 23; 54, 31; 44, 39 + ; 36, 55; 26, 63; 0, 65], style(color=9, fillColor=8)), + Polygon(points=[-58, 33; -68, 23; -72, 11; -76, -3; -78, -17; -76, -33 + ; -76, -45; -76, -55; -70, -67; -64, -75; -48, -79; -30, -85; -18 + , -85; -2, -87; 8, -91; 22, -91; 32, -89; 42, -83; 54, -77; 42, - + 79; 40, -79; 30, -81; 20, -83; 18, -83; 10, -83; 2, -79; -12, -75 + ; -22, -75; -30, -73; -40, -67; -50, -57; -56, -45; -58, -37; -58 + , -27; -60, -15; -60, -7; -60, 5; -58, 15; -56, 17; -52, 25; -48 + , 33; -44, 43; -40, 55; -58, 33], style(color=0, fillColor=9)), + Text( + extent=[-69, 5; 71, -26], + string="%C", + style(color=0))), + Diagram( + Polygon(points=[0, 65; -20, 61; -40, 55; -52, 41; -58, 33; -68, 23; -72 + , 11; -76, -3; -78, -17; -76, -33; -76, -45; -76, -55; -70, -67; + -64, -75; -48, -79; -30, -85; -18, -85; -2, -87; 8, -91; 22, -91 + ; 32, -89; 42, -83; 54, -77; 56, -75; 66, -63; 68, -55; 70, -53; + 72, -37; 76, -23; 78, -15; 78, 1; 74, 13; 66, 23; 54, 31; 44, 39 + ; 36, 55; 26, 63; 0, 65], style(color=9, fillColor=8)), + Polygon(points=[-58, 33; -68, 23; -72, 11; -76, -3; -78, -17; -76, -33 + ; -76, -45; -76, -55; -70, -67; -64, -75; -48, -79; -30, -85; -18 + , -85; -2, -87; 8, -91; 22, -91; 32, -89; 42, -83; 54, -77; 42, - + 79; 40, -79; 30, -81; 20, -83; 18, -83; 10, -83; 2, -79; -12, -75 + ; -22, -75; -30, -73; -40, -67; -50, -57; -56, -45; -58, -37; -58 + , -27; -60, -15; -60, -7; -60, 5; -58, 15; -56, 17; -52, 25; -48 + , 33; -44, 43; -40, 55; -58, 33], style(color=0, fillColor=9)), + Line(points=[-1, -90; -1, -8], style(color=41)), + Ellipse(extent=[-6, -3; 4, -13], style(color=41, fillColor=42)), + Text( + extent=[11, 11; 50, -27], + string="T", + style(color=0))), + Documentation(info=" ++This is a generic model for the heat capacity of a material. +No specific geometry is assumed beyond a total volume with +uniform temperature for the entire volume. +Furthermore, it is assumed that the heat capacity +is constant (indepedent of temperature). +
+ ++The temperature T [Kelvin] of this component is a state. +A default of T = 25 degree Celsius (= SIunits.Conversions.from_degC(25)) +is used as start value for initialization. +This usually means that at start of integration the temperature of this +component is 25 degrees Celsius. You may, of course, define a different +temperature as start value for initialization. Alternatively, it is possible +to set parameter steadyStateStart to true. In this case +the additional equation 'der(T) = 0' is used during +initialization, i.e., the temperature T is computed in such a way that +the component starts in steady state. This is useful in cases, +where one would like to start simulation in a suitable operating +point without being forced to integrate for a long time to arrive +at this point. +
+ ++Note, that parameter steadyStateStart is not available in +the parameter menue of the simulation window, because its value +is utilized during translation to generate quite different +equations depending on its setting. Therefore, the value of this +parameter can only be changed before translating the model. +
+ ++This component may be used for complicated geometries where +the heat capacity C is determined my measurements. If the component +consists mainly of one type of material, the mass m of the +component may be measured or calculated and multiplied with the +specific heat capacity cp of the component material to +compute C: +
+ ++ C = cp*m. + + Typical values for cp at 20 degC in J/(kg.K): + + aluminium 896 + concrete 840 + copper 383 + iron 452 + silver 235 + steel 420 ... 500 (V2A) + wood 2500 ++ + +")); + Interfaces.HeatPort_a port annotation (extent=[-10, -110; 10, -90], + rotation=90); + equation + T = port.T; + C*der(T) = port.Q_dot; + + initial equation + if steadyStateStart then + der(T) = 0; + end if; + end HeatCapacitor; + + model ThermalConductor + "Lumped thermal element transporting heat without storing it" + extends Interfaces.Element1D; + parameter SI.ThermalConductance G + "Constant thermal conductance of material"; + + annotation ( + Icon( + Rectangle(extent=[-100, 70; 100, -70], style( + color=0, + pattern=0, + fillColor=8, + fillPattern=8)), + Line(points=[-100, 70; -100, -70], style(color=0, thickness=2)), + Line(points=[100, 70; 100, -70], style(color=0, thickness=2)), + Text(extent=[-139, 134; 141, 74], string="%name"), + Text( + extent=[-115, -76; 113, -116], + string="G=%G", + style(color=0))), + Diagram( + Line(points=[-80, 0; 80, 0], style( + color=41, + thickness=2, + arrow=1)), + Text( + extent=[-26, -10; 27, -39], + string="Q_dot", + style(color=41)), + Text( + extent=[-80, 50; 80, 20], + string="dT = port_a.T - port_b.T", + style(color=0))), + Documentation(info=" +
+This is a model for transport of heat without storing it. +It may be used for complicated geometries where +the thermal conductance G (= inverse of thermal resistance) +is determined by measurements and is assumed to be constant +over the range of operations. If the component consists mainly of +one type of material and a regular geometry, it may be calculated, +e.g., with one of the following equations: +
+ ++ Conductance for a box geometry under the assumption + that heat flows along the box length:
++ G = k*A/L + + k: Thermal conductivity (material constant) + A: Area of box + L: Length of box ++
+ Conductance for a cylindrical geometry under the assumption + that heat flows from the inside to the outside radius + of the cylinder:
++ G = 2*pi*k*L/log(r_out/r_in) + + pi : Modelica.Constants.pi + k : Thermal conductivity (material constant) + L : Length of cylinder + log : Modelica.Math.log; + r_out: Outer radius of cylinder + r_in : Inner radius of cylinder ++
+ Typical values for k at 20 degC in W/(m.K): + + aluminium 220 + concrete 1 + copper 384 + iron 74 + silver 407 + steel 45 .. 15 (V2A) + wood 0.1 ... 0.2 ++ + +")); + equation + Q_dot = G*dT; + end ThermalConductor; + + model Convection "Lumped thermal element for heat convection" + SI.ThermalConductance Gc "Convective thermal conductance of element"; + SI.HeatFlowRate Q_dot "Heat flow rate from solid -> fluid"; + SI.Temperature dT "= solid.T - fluid.T"; + annotation ( + Icon( + Rectangle(extent=[-70, 80; 99, -80], style(color=7, fillColor=7)), + Rectangle(extent=[-100, 80; -70, -80], style( + color=0, + fillColor=8, + fillPattern=8)), + Text(extent=[-117, -88; 124, -128], string="%name"), + Line(points=[-40, 80; -40, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[34, 80; 34, -80], style(color=69, fillColor=47)), + Line(points=[34, -80; 44, -60], style(color=69, fillColor=47)), + Line(points=[34, -80; 24, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; 10, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; -10, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -30, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -50, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 60, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 80, -60], style(color=69, fillColor=47)), + Line(points=[70, 80; 70, -80], style(color=69, fillColor=47)), + Line(points=[100, 0; 100, 0], style(color=69, fillColor=47)), + Line(points=[100, 80; 100, -80], style(color=69, fillColor=47)), + Line(points=[100, -80; 90, -60], style(color=69, fillColor=47)), + Line(points=[100, -80; 110, -60], style(color=69, fillColor=47)), + Line(points=[80, 30; 100, 20], style(color=42, fillColor=45)), + Line(points=[80, 10; 100, 20], style(color=42, fillColor=45)), + Line(points=[-59, 20; 100, 20], style(color=42, fillColor=45)), + Line(points=[-60, -20; 100, -20], style(color=42, fillColor=45)), + Line(points=[80, -10; 100, -20], style(color=42, fillColor=45)), + Line(points=[80, -30; 100, -20], style(color=42, fillColor=45))), + Documentation(info=" +
+This is a model of linear heat convection, e.g., the heat transfer +between a plate and the surrounding air. It may be used for complicated +solid geometries and fluid flow over the solid by determining the +convective thermal conductance Gc by measurements. The basic constitutive +equation for convection is +
+ ++ Q_dot = Gc*(solid.T - fluid.T); + + Q_dot: Heat flow rate from connector 'solid' (e.g. a plate) + to connector 'fluid' (e.g. the surrounding air) ++ +
+Gc = G.signal[1] is an input signal to the component, since Gc is +nearly never constant in practice. For example, Gc may be a function +of the speed of a cooling fan. For simple situations, +Gc may be calculated according to +
+ ++ Gc = A*h + + A: Convection area (e.g. perimeter*length of a box) + h: Heat transfer coefficient ++ +
+where the heat transfer coefficient h is calculated +from properties of the fluid flowing over the solid. Examples: +
+ ++Machines cooled by air (empirical, very rough approximation according +to R. Fischer: Elektrische Maschinen, 10th edition, Hanser-Verlag 1999, +p. 378): +
+ ++ h = 7.8*v^0.78 [W/(m2.K)] (forced convection) + = 12 [W/(m2.K)] (free convection) + + where + v: Air velocity in [m/s] ++ + +
Laminar flow with constant velocity of a fluid along a +flat plate where the heat flow rate from the plate +to the fluid (= solid.Q_dot) is kept constant +(according to J.P.Holman: Heat Transfer, 8th edition, +McGraw-Hill, 1997, p.270): +
+ ++ h = Nu*k/x; + Nu = 0.453*Re^(1/2)*Pr^(1/3); + + where + h : Heat transfer coefficient + Nu : = h*x/k (Nusselt number) + Re : = v*x*rho/mue (Reynolds number) + Pr : = cp*mue/k (Prandtl number) + v : Absolute velocity of fluid + x : distance from leading edge of flat plate + rho: density of fluid (material constant + mue: dynamic viscosity of fluid (material constant) + cp : specific heat capacity of fluid (material constant) + k : thermal conductivity of fluid (material constant) + + and the equation for h holds, provided + Re < 5e5 and 0.6 < Pr < 50 ++ + +"), + Diagram( + Rectangle(extent=[-100, 80; -70, -80], style( + color=0, + fillColor=8, + fillPattern=8)), + Line(points=[-40, 80; -40, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[34, 80; 34, -80], style(color=69, fillColor=47)), + Line(points=[34, -80; 44, -60], style(color=69, fillColor=47)), + Line(points=[34, -80; 24, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; 10, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; -10, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -30, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -50, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 60, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 80, -60], style(color=69, fillColor=47)), + Line(points=[70, 80; 70, -80], style(color=69, fillColor=47)), + Line(points=[100, 0; 100, 0], style(color=69, fillColor=47)), + Line(points=[100, 80; 100, -80], style(color=69, fillColor=47)), + Line(points=[100, -80; 90, -60], style(color=69, fillColor=47)), + Line(points=[100, -80; 110, -60], style(color=69, fillColor=47)), + Line(points=[-40, 80; -40, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[34, 80; 34, -80], style(color=69, fillColor=47)), + Line(points=[34, -80; 44, -60], style(color=69, fillColor=47)), + Line(points=[34, -80; 24, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; 10, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; -10, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -30, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -50, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 60, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 80, -60], style(color=69, fillColor=47)), + Line(points=[70, 80; 70, -80], style(color=69, fillColor=47)), + Line(points=[100, 0; 100, 0], style(color=69, fillColor=47)), + Line(points=[100, 80; 100, -80], style(color=69, fillColor=47)), + Line(points=[100, -80; 90, -60], style(color=69, fillColor=47)), + Line(points=[100, -80; 110, -60], style(color=69, fillColor=47)), + Line(points=[-40, 80; -40, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[0, 80; 0, -80], style(color=69, fillColor=47)), + Line(points=[34, 80; 34, -80], style(color=69, fillColor=47)), + Line(points=[34, -80; 44, -60], style(color=69, fillColor=47)), + Line(points=[34, -80; 24, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; 10, -60], style(color=69, fillColor=47)), + Line(points=[0, -80; -10, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -30, -60], style(color=69, fillColor=47)), + Line(points=[-40, -80; -50, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 60, -60], style(color=69, fillColor=47)), + Line(points=[70, -80; 80, -60], style(color=69, fillColor=47)), + Line(points=[70, 80; 70, -80], style(color=69, fillColor=47)), + Line(points=[100, 0; 100, 0], style(color=69, fillColor=47)), + Line(points=[100, 80; 100, -80], style(color=69, fillColor=47)), + Line(points=[100, -80; 90, -60], style(color=69, fillColor=47)), + Line(points=[100, -80; 110, -60], style(color=69, fillColor=47)), + Line(points=[-59, 20; 100, 20], style(color=42, fillColor=45)), + Line(points=[80, 30; 100, 20], style(color=42, fillColor=45)), + Line(points=[80, 10; 100, 20], style(color=42, fillColor=45)), + Line(points=[-60, -20; 100, -20], style(color=42, fillColor=45)), + Line(points=[80, -10; 100, -20], style(color=42, fillColor=45)), + Line(points=[80, -30; 100, -20], style(color=42, fillColor=45)), + Text( + extent=[-35, 42; -5, 20], + string="Q_dot", + style(color=41)))); + Modelica.Blocks.Interfaces.InPort G(final n=1, redeclare type SignalType = + SI.ThermalConductance) + "Signal representing the convective thermal conductance in [W/K]" + annotation (extent=[-20, 80; 20, 120], rotation=270); + Interfaces.HeatPort_a solid annotation (extent=[-120, -10; -100, 10]); + Interfaces.HeatPort_b fluid annotation (extent=[100, -10; 120, 10]); + equation + Gc = G.signal[1]; + dT = solid.T - fluid.T; + solid.Q_dot = Q_dot; + fluid.Q_dot = -Q_dot; + Q_dot = Gc*dT; + end Convection; + + model BodyRadiation "Lumped thermal element for radiation heat transfer" + extends Interfaces.Element1D; + parameter Real Gr(unit="m2") + "Net radiation conductance between two surfaces (see docu)"; + annotation ( + Icon( + Rectangle(extent=[60, 80; 100, -80], style( + color=0, + fillColor=8, + fillPattern=8)), + Rectangle(extent=[-100, 80; -60, -80], style( + color=0, + fillColor=8, + fillPattern=8)), + Line(points=[-40, 10; 40, 10], style(color=42, fillColor=45)), + Line(points=[-40, 10; -30, 16], style(color=42, fillColor=45)), + Line(points=[-40, 10; -30, 4], style(color=42, fillColor=45)), + Line(points=[-40, -10; 40, -10], style(color=42, fillColor=45)), + Line(points=[30, -16; 40, -10], style(color=42, fillColor=45)), + Line(points=[30, -4; 40, -10], style(color=42, fillColor=45)), + Line(points=[-40, -30; 40, -30], style(color=42, fillColor=45)), + Line(points=[-40, -30; -30, -24], style(color=42, fillColor=45)), + Line(points=[-40, -30; -30, -36], style(color=42, fillColor=45)), + Line(points=[-40, 30; 40, 30], style(color=42, fillColor=45)), + Line(points=[30, 24; 40, 30], style(color=42, fillColor=45)), + Line(points=[30, 36; 40, 30], style(color=42, fillColor=45)), + Text(extent=[-132, 144; 108, 84], string="%name"), + Text( + extent=[-119, -86; 117, -125], + string="G=%G", + style(color=0)), + Rectangle(extent=[-60, 80; -54, -80], style(color=42, fillColor=42)), + Rectangle(extent=[55, 80; 60, -80], style(color=42, fillColor=42))), + Documentation(info=" +
+This is a model describing the thermal radiation, i.e., electromagnetic +radiation emitted between two bodies as a result of their temperatures. +The following constitutive equation is used: +
+ ++ Q_dot = Gr*sigma*(port_a.T^4 - port_b.T^4); ++ +
+where Gr is the radiation conductance and sigma is the Stefan-Boltzmann +constant (= Modelica.Constants.sigma). Gr may be determined by +measurements and is assumed to be constant over the range of operations. +
+ ++For simple cases, Gr may be analytically computed. The analytical +equations use epsilon, the emission value of a body which is in the +range 0..1. Epsilon=1, if the body absorbs all radiation (= black body). +Epsilon=0, if the body reflects all radiation and does not absorb any. +
+ ++ Typical values for epsilon: + + aluminium, polished 0.04 + copper, polished 0.04 + gold, polished 0.02 + paper 0.09 + rubber 0.95 + silver, polished 0.02 + wood 0.85..0.9 ++ +
Analytical Equations for Gr
+ ++Small convex object in large enclosure +(e.g., a hot machine in a room): +
+ ++ Gr = e*A + + where + e: Emission value of object (0..1) + A: Surface area of object where radiation + heat transfer takes place ++ + +
Two parallel plates:
+ ++ Gr = A/(1/e1 + 1/e2 - 1) + + where + e1: Emission value of plate1 (0..1) + e2: Emission value of plate2 (0..1) + A : Area of plate1 (= area of plate2) ++ + + +
Two long cylinders in each other, where radiation takes +place from the inner to the outer cylinder): +
+ ++ Gr = 2*pi*r1*L/(1/e1 + (1/e2 - 1)*(r1/r2)) + + where + pi: = Modelica.Constants.pi + r1: Radius of inner cylinder + r2: Radius of outer cylinder + L : Length of the two cylinders + e1: Emission value of inner cylinder (0..1) + e2: Emission value of outer cylinder (0..1) ++ + +"), + Diagram( + Rectangle(extent=[-100, 80; -66, -80], style( + color=0, + fillColor=8, + fillPattern=8)), + Line(points=[-66, 80; -66, -80], style(color=0, thickness=4)), + Line(points=[60, 80; 60, -80], style(color=0, thickness=4)), + Rectangle(extent=[60, 80; 100, -80], style( + color=0, + fillColor=8, + fillPattern=8)), + Line(points=[-40, 10; 40, 10], style(color=42, fillColor=45)), + Line(points=[-40, 10; -30, 16], style(color=42, fillColor=45)), + Line(points=[-40, 10; -30, 4], style(color=42, fillColor=45)), + Line(points=[-40, -10; 40, -10], style(color=42, fillColor=45)), + Line(points=[30, -16; 40, -10], style(color=42, fillColor=45)), + Line(points=[30, -4; 40, -10], style(color=42, fillColor=45)), + Line(points=[-40, -30; 40, -30], style(color=42, fillColor=45)), + Line(points=[-40, -30; -30, -24], style(color=42, fillColor=45)), + Line(points=[-40, -30; -30, -36], style(color=42, fillColor=45)), + Line(points=[-40, 30; 40, 30], style(color=42, fillColor=45)), + Line(points=[30, 24; 40, 30], style(color=42, fillColor=45)), + Line(points=[30, 36; 40, 30], style(color=42, fillColor=45)))); + equation + Q_dot = Gr*Modelica.Constants.sigma*(port_a.T^4 - port_b.T^4); + end BodyRadiation; + + model FixedTemperature "Fixed temperature boundary condition in Kelvin" + + parameter SI.Temperature T "Fixed temperature at port"; + annotation ( + Icon( + Text(extent=[-121, 162; 119, 102], string="%name"), + Text( + extent=[-121, -105; 119, -151], + string="T=%T", + style(color=0)), + Rectangle(extent=[-100, 100; 101, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Text( + extent=[0, 4; -100, -96], + string="K", + style(color=0)), + Line(points=[-42, 0; 66, 0], style(color=42, thickness=2)), + Polygon(points=[60, -20; 60, 20; 100, 0; 60, -20], style( + color=42, + fillColor=42, + fillPattern=1))), + Documentation(info=" +
+This model defines a fixed temperature T at its port in Kelvin, +i.e., it defines a fixed temperature as a boundary condition. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 100, -101], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-42, 0; 66, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="K", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + equation + port.T = T; + end FixedTemperature; + + model PrescribedTemperature + "Variable temperature boundary condition in Kelvin" + + annotation ( + Icon( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="K", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 99, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text(extent=[-125, 162; 115, 102], string="%name")), + Documentation(info=" ++This model represents a variable temperature boundary condition. +The temperature in [K] is given as input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Text( + extent=[0, 0; -100, -100], + string="K", + style(color=0)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + Modelica.Blocks.Interfaces.InPort T(final n=1, redeclare type SignalType = + SI.Temperature) annotation (extent=[-140, -20; -100, 20]); + equation + port.T = T.signal[1]; + end PrescribedTemperature; + + model FixedHeatFlow "Fixed heat flow boundary condition" + parameter SI.HeatFlowRate Q_dot "Fixed heat flow rate at port"; + annotation ( + Icon( + Text(extent=[-134, 120; 132, 60], string="%name"), + Text( + extent=[-137, -52; 133, -100], + string="Q_dot=%Q_dot", + style(color=0)), + Line(points=[-100, -20; 48, -20], style(color=42, thickness=2)), + Line(points=[-100, 20; 46, 20], style(color=42, thickness=2)), + Polygon(points=[40, 0; 40, 40; 70, 20; 40, 0], style( + color=42, + fillColor=42, + fillPattern=1)), + Polygon(points=[40, -40; 40, 0; 70, -20; 40, -40], style( + color=42, + fillColor=42, + fillPattern=1)), + Rectangle(extent=[70, 40; 90, -40], style(color=42, fillColor=42))), + Diagram( + Text( + extent=[-100, 40; 0, -36], + string="Q_dot=const.", + style(color=0)), + Line(points=[-48, -20; 60, -20], style(color=42, thickness=2)), + Line(points=[-48, 20; 60, 20], style(color=42, thickness=2)), + Polygon(points=[60, 0; 60, 40; 90, 20; 60, 0], style( + color=42, + fillColor=42, + fillPattern=1)), + Polygon(points=[60, -40; 60, 0; 90, -20; 60, -40], style( + color=42, + fillColor=42, + fillPattern=1))), + Documentation(info=" ++This model allows a specified amount of heat flow rate to be \"injected\" +into a thermal system at a given port. The constant amount of heat +flow rate Q_dot is given as a parameter. The heat flows into the +component to which the component FixedHeatFlow is connected, +if parameter Q_dot is positive. +
+ +")); + Interfaces.HeatPort_b port annotation (extent=[90, -10; 110, 10]); + equation + port.Q_dot = -Q_dot; + end FixedHeatFlow; + + model PrescribedHeatFlow "Prescribed heat flow boundary condition" + annotation ( + Icon( + Line(points=[-60, -20; 40, -20], style(color=42, thickness=2)), + Line(points=[-60, 20; 40, 20], style(color=42, thickness=2)), + Line(points=[-80, 0; -60, -20], style(color=42, thickness=2)), + Line(points=[-80, 0; -60, 20], style(color=42, thickness=2)), + Polygon(points=[40, 0; 40, 40; 70, 20; 40, 0], style( + color=42, + fillColor=42, + fillPattern=1)), + Polygon(points=[40, -40; 40, 0; 70, -20; 40, -40], style( + color=42, + fillColor=42, + fillPattern=1)), + Rectangle(extent=[70, 40; 90, -40], style(color=42, fillColor=42)), + Text(extent=[-134, 120; 132, 60], string="%name")), + Documentation(info=" ++This model allows a specified amount of heat flow rate to be \"injected\" +into a thermal system at a given port. The amount of heat +is given by the input signal into the model. The heat flows into the +component to which the component PrescribedHeatFlow is connected, +if the input signal is positive. +
+ +"), + Diagram( + Line(points=[-60, -20; 68, -20], style(color=42, thickness=2)), + Line(points=[-60, 20; 68, 20], style(color=42, thickness=2)), + Line(points=[-80, 0; -60, -20], style(color=42, thickness=2)), + Line(points=[-80, 0; -60, 20], style(color=42, thickness=2)), + Polygon(points=[60, 0; 60, 40; 90, 20; 60, 0], style( + color=42, + fillColor=42, + fillPattern=1)), + Polygon(points=[60, -40; 60, 0; 90, -20; 60, -40], style( + color=42, + fillColor=42, + fillPattern=1)))); + Modelica.Blocks.Interfaces.InPort Q_dot(final n=1) annotation (extent=[-80 + , -20; -120, 20], rotation=180); + Interfaces.HeatPort_b port annotation (extent=[90, -10; 110, 10]); + equation + port.Q_dot = -Q_dot.signal[1]; + end PrescribedHeatFlow; + + model TemperatureSensor "Absolute temperature sensor in Kelvin" + annotation ( + Diagram( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-94, 0; -14, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, 86 + ; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[102, -28; 60, -78], + string="K", + style(color=0))), + Icon( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-90, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, 86 + ; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[126, -20; 26, -120], + string="K", + style(color=0)), + Text(extent=[-132, 144; 108, 84], string="%name")), + Documentation(info=" ++This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Kelvin as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+ +")); + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = + SI.Temperature) annotation (extent=[90, -10; 110, 10]); + Interfaces.HeatPort_a port annotation (extent=[-110, -10; -90, 10]); + equation + T.signal[1] = port.T; + port.Q_dot = 0; + + end TemperatureSensor; + + model RelTemperatureSensor "Relative Temperature sensor" + extends Modelica.Icons.TranslationalSensor; + annotation ( + Icon( + Line(points=[-90, 0; -70, 0; -70, 0], style(color=42)), + Line(points=[-90, 0; -70, 0; -70, 0], style(color=42)), + Line(points=[70, 0; 90, 0; 90, 0], style(color=42)), + Line(points=[0, -30; 0, -80]), + Text(extent=[-140, 94; 144, 34], string="%name"), + Text( + extent=[92, -62; 34, -122], + string="K", + style(color=0))), + Diagram( + Line(points=[-90, 0; -70, 0; -70, 0], style(color=42)), + Line(points=[-98, 0; -70, 0; -70, 0], style(color=42)), + Line(points=[70, 0; 90, 0; 90, 0], style(color=42)), + Line(points=[0, -30; 0, -80]), + Text( + extent=[64, -74; 32, -102], + string="K", + style(color=0))), + Documentation(info=" ++The relative temperature \"port_a.T - port_b.T\" is determined between +the two ports of this component and is provided as output signal in Kelvin. +
+ +")); + Interfaces.HeatPort_a port_a annotation (extent=[-110, -10; -90, 10]); + Interfaces.HeatPort_b port_b annotation (extent=[90, -10; 110, 10]); + Modelica.Blocks.Interfaces.OutPort T_rel(redeclare type SignalType = + SI.Temperature) annotation (extent=[-10, -80; 10, -100], rotation=90) + ; + equation + T_rel.signal[1] = port_a.T - port_b.T; + 0 = port_a.Q_dot; + 0 = port_b.Q_dot; + end RelTemperatureSensor; + + model HeatFlowSensor "Heat flow rate sensor" + extends Modelica.Icons.RotationalSensor; + output SI.HeatFlowRate Q_dot "Heat flow rate from port_a to port_b"; + Modelica.Blocks.Interfaces.OutPort heat(redeclare type SignalType = + SI.HeatFlowRate) "Heat flow from port_a -> port_b" annotation (extent + =[-10, -110; 10, -90], rotation=270); + annotation ( + Diagram( + Line(points=[-70, 0; -95, 0], style(color=42)), + Line(points=[0, -70; 0, -90]), + Line(points=[69, 0; 90, 0], style(color=42))), + Icon( + Text( + extent=[33, -58; 88, -116], + string="Q_dot", + style(color=0)), + Line(points=[-70, 0; -90, 0], style(color=42)), + Line(points=[69, 0; 90, 0], style(color=42)), + Line(points=[0, -70; 0, -90]), + Text(extent=[-132, 144; 108, 84], string="%name")), + Documentation(info=" ++This model is capable of monitoring the heat flow rate flowing through +this component. The sensed value of heat flow rate is the amount that +passes through this sensor while keeping the temperature drop across the +sensor zero. This is an ideal model so it does not absorb any energy +and it has no direct effect on the thermal response of a system it is included in. +The output signal is positive, if the heat flows from port_a +to port_b. +
+ +")); + Interfaces.HeatPort_a port_a annotation (extent=[-110, -10; -90, 10]); + Interfaces.HeatPort_b port_b annotation (extent=[90, -10; 110, 10]); + equation + port_a.T = port_b.T; + port_a.Q_dot + port_b.Q_dot = 0; + Q_dot = port_a.Q_dot; + heat.signal[1] = Q_dot; + end HeatFlowSensor; + + package Celsius "Components with Celsius input and/or output" + + extends Modelica.Icons.Library; + + model ToKelvin "Conversion block from °Celsius to Kelvin" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + annotation ( + Diagram( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-40, -50; -99, -99], + string="°C", + style(color=0, thickness=4)), + Text( + extent=[100, -47; 44, -100], + string="K", + style(color=0)), + Line(points=[-100, 0; -40, 0]), + Line(points=[41, 0; 100, 0])), + Icon( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[112, -40; 32, -120], + string="K", + style(color=0)), + Text( + extent=[-31, -39; -111, -119], + string="°C", + style(color=0, thickness=4)), + Line(points=[-41, 0; -100, 0]), + Line(points=[100, 0; 40, 0]), + Text(extent=[-137, 99; 132, 49], string="%name")), + Documentation(info=" ++This component converts all input signals from Celsius to Kelvin +and provides them as output signals. +
+ +")); + Modelica.Blocks.Interfaces.InPort Celsius(final n=n) annotation (extent=[ + -140, -20; -100, 20]); + Modelica.Blocks.Interfaces.OutPort Kelvin(final n=n) annotation (extent=[ + 100, -10; 120, 10]); + equation + Kelvin.signal = from_degC(Celsius.signal); + end ToKelvin; + + model FromKelvin "Conversion from Kelvin to °Celsius" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + annotation ( + Icon( + Text(extent=[-137, 99; 132, 49], string="%name"), + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-34, -42; -114, -122], + string="K", + style(color=0, thickness=4)), + Text( + extent=[110, -39; 30, -119], + string="°C", + style(color=0)), + Line(points=[-40, 0; -100, 0]), + Line(points=[40, 0; 100, 0])), + Diagram( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-42, -41; -101, -98], + string="K", + style(color=0, thickness=4)), + Text( + extent=[100, -40; 30, -100], + string="°C", + style(color=0)), + Line(points=[-100, 0; -40, 0]), + Line(points=[40, 0; 100, 0])), + Documentation(info=" ++This component converts all input signals from Kelvin to Celsius +and provides them as output signals. +
+ +")); + Modelica.Blocks.Interfaces.InPort Kelvin(final n=n) annotation (extent=[- + 140, -20; -100, 20]); + Modelica.Blocks.Interfaces.OutPort Celsius(final n=n) annotation (extent= + [100, -10; 120, 10]); + equation + Celsius.signal = to_degC(Kelvin.signal); + end FromKelvin; + + model FixedTemperature + "Fixed temperature boundary condition in degree Celsius" + parameter NonSI.Temperature_degC T "Fixed Temperature at the port"; + annotation ( + Icon( + Text(extent=[-118, 165; 122, 105], string="%name"), + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Text( + extent=[0, 0; -100, -100], + string="°C", + style(color=0)), + Line(points=[-91, 0; 66, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text( + extent=[-145, -102; 135, -151], + string="T=%T", + style(color=0))), + Documentation(info=" ++This model defines a fixed temperature T at its port in [degC], +i.e., it defines a fixed temperature as a boundary condition. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 101, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-42, 0; 66, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="°C", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + equation + port.T = from_degC(T); + end FixedTemperature; + + model PrescribedTemperature + "Variable temperature boundary condition in °Celsius" + + annotation ( + Icon( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 92, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text( + extent=[0, 0; -100, -100], + string="°C", + style(color=0)), + Text(extent=[-122, 163; 118, 103], string="%name"), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1))), + Documentation(info=" ++This model represents a variable temperature boundary condition +The temperature value in [degC] is given by the input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="°C", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + Modelica.Blocks.Interfaces.InPort T(final n=1) annotation (extent=[-140, + -20; -100, 20]); + equation + port.T = from_degC(T.signal[1]); + end PrescribedTemperature; + + annotation (Documentation(info=" ++The components of this package are provided for the convenience of +people working mostly with Celsius units, since all models +in package HeatTransfer are based on Kelvin units. +
+ ++Note, that in package SIunits.Conversions, functions are provided +to convert between the units Kelvin, degree Celsius, degree Fahrenheit, +and degree Rankine. These functions allow, e.g., a direct conversion +of units at all places where Kelvin is required as parameter. +Example: +
+ ++ import SIunits.Conversions.*; + Modelica.Thermal.HeatTransfer.HeatCapacitor C(T0 = from_degC(20)); ++ + +")); + model TemperatureSensor "Absolute temperature sensor in °Celsius" + + annotation ( + Diagram( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-94, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, + 86; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[102, -22; 60, -74], + string="°C", + style(color=0))), + Icon( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-90, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, + 86; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[126, -20; 26, -120], + string="°C", + style(color=0)), + Text(extent=[-132, 144; 108, 84], string="%name")), + Documentation(info=" + +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Celsius as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+ +")); + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = + NonSI.Temperature_degC) annotation (extent=[90, -10; 110, 10]); + Interfaces.HeatPort_a port annotation (extent=[-110, -10; -90, 10]); + equation + T.signal[1] = to_degC(port.T); + port.Q_dot = 0; + end TemperatureSensor; + end Celsius; + + package Fahrenheit "Components with Fahrenheit input and/or output" + + extends Modelica.Icons.Library; + + model ToKelvin "Conversion block from °Fahrenheit to Kelvin" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + annotation ( + Diagram( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-40, -50; -99, -99], + string="°F", + style(color=0, thickness=4)), + Text( + extent=[100, -47; 44, -100], + string="K", + style(color=0)), + Line(points=[-100, 0; -40, 0]), + Line(points=[41, 0; 100, 0])), + Icon( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[112, -40; 32, -120], + string="K", + style(color=0)), + Text( + extent=[-31, -39; -111, -119], + string="°F", + style(color=0, thickness=4)), + Line(points=[-41, 0; -100, 0]), + Line(points=[100, 0; 40, 0]), + Text(extent=[-137, 99; 132, 49], string="%name")), + Documentation(info=" ++This component converts all input signals from degree Fahrenheit to Kelvin +and provides them as output signals. +
+ +")); + Modelica.Blocks.Interfaces.InPort Fahrenheit(final n=n) annotation ( + extent=[-140, -20; -100, 20]); + Modelica.Blocks.Interfaces.OutPort Kelvin(final n=n) annotation (extent=[ + 100, -10; 120, 10]); + equation + Kelvin.signal = from_degF(Fahrenheit.signal); + end ToKelvin; + + model FromKelvin "Conversion from Kelvin to °Fahrenheit" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + annotation ( + Icon( + Text(extent=[-137, 99; 132, 49], string="%name"), + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-34, -42; -114, -122], + string="K", + style(color=0, thickness=4)), + Text( + extent=[110, -39; 30, -119], + string="°F", + style(color=0)), + Line(points=[-40, 0; -100, 0]), + Line(points=[40, 0; 100, 0])), + Diagram( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-42, -41; -101, -98], + string="K", + style(color=0, thickness=4)), + Text( + extent=[100, -40; 30, -100], + string="°F", + style(color=0)), + Line(points=[-100, 0; -40, 0]), + Line(points=[40, 0; 100, 0])), + Documentation(info=" ++This component converts all input signals from Kelvin to Fahrenheit +and provides them as output signals. +
+ +")); + Modelica.Blocks.Interfaces.InPort Kelvin(final n=n) annotation (extent=[- + 140, -20; -100, 20]); + Modelica.Blocks.Interfaces.OutPort Fahrenheit(final n=n) annotation ( + extent=[100, -10; 120, 10]); + equation + Fahrenheit.signal = to_degF(Kelvin.signal); + end FromKelvin; + + model FixedTemperature + "Fixed temperature boundary condition in °Fahrenheit" + parameter NonSI.Temperature_degF T "Fixed Temperature at the port"; + annotation ( + Icon( + Text(extent=[-118, 165; 122, 105], string="%name"), + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Text( + extent=[0, 0; -100, -100], + string="°F", + style(color=0)), + Line(points=[-91, 0; 66, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text( + extent=[-145, -102; 135, -151], + string="T=%T", + style(color=0))), + Documentation(info=" ++This model defines a fixed temperature T at its port in [degF], +i.e., it defines a fixed temperature as a boundary condition. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 101, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-42, 0; 66, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="°F", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + equation + port.T = from_degF(T); + end FixedTemperature; + + model PrescribedTemperature + "Variable temperature boundary condition in °Fahrenheit" + + annotation ( + Icon( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 92, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text( + extent=[0, 0; -100, -100], + string="°F", + style(color=0)), + Text(extent=[-122, 163; 118, 103], string="%name"), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1))), + Documentation(info=" ++This model represents a variable temperature boundary condition +The temperature value in [degF] is given by the input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="°F", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + Modelica.Blocks.Interfaces.InPort T(final n=1) annotation (extent=[-140, + -20; -100, 20]); + equation + port.T = from_degF(T.signal[1]); + end PrescribedTemperature; + + annotation (Documentation(info=" ++The components of this package are provided for the convenience of +people working mostly with Fahrenheit units, since all models +in package HeatTransfer are based on Kelvin units. +
+ ++Note, that in package SIunits.Conversions, functions are provided +to convert between the units Kelvin, degree Celsius, degree Fahrenheit +and degree Rankine. These functions allow, e.g., a direct conversion +of units at all places where Kelvin is required as parameter. +Example: +
+ ++ import SIunits.Conversions.*; + Modelica.Thermal.HeatTransfer.HeatCapacitor C(T0 = from_degF(70)); ++ + +")); + model TemperatureSensor "Absolute temperature sensor in °Fahrenheit" + + annotation ( + Diagram( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-94, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, + 86; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[102, -22; 60, -74], + string="°F", + style(color=0))), + Icon( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-90, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, + 86; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[126, -20; 26, -120], + string="°F", + style(color=0)), + Text(extent=[-132, 144; 108, 84], string="%name")), + Documentation(info=" + +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Fahrenheit as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+ +")); + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = + NonSI.Temperature_degF) annotation (extent=[90, -10; 110, 10]); + Interfaces.HeatPort_a port annotation (extent=[-110, -10; -90, 10]); + equation + T.signal[1] = to_degF(port.T); + port.Q_dot = 0; + end TemperatureSensor; + end Fahrenheit; + + package Rankine "Components with Rankine input and/or output" + + extends Modelica.Icons.Library; + + model ToKelvin "Conversion block from °Rankine to Kelvin" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + annotation ( + Diagram( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-40, -50; -99, -99], + string="°Rk", + style(color=0, thickness=4)), + Text( + extent=[100, -47; 44, -100], + string="K", + style(color=0)), + Line(points=[-100, 0; -40, 0]), + Line(points=[41, 0; 100, 0])), + Icon( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[112, -40; 32, -120], + string="K", + style(color=0)), + Text( + extent=[-31, -39; -111, -119], + string="°Rk", + style(color=0, thickness=4)), + Line(points=[-41, 0; -100, 0]), + Line(points=[100, 0; 40, 0]), + Text(extent=[-137, 99; 132, 49], string="%name")), + Documentation(info=" ++This component converts all input signals from degree Rankine to Kelvin +and provides them as output signals. +
+ +")); + Modelica.Blocks.Interfaces.InPort Rankine(final n=n) annotation (extent=[- + 140, -20; -100, 20]); + Modelica.Blocks.Interfaces.OutPort Kelvin(final n=n) annotation (extent=[ + 100, -10; 120, 10]); + equation + Kelvin.signal = from_degRk(Rankine.signal); + end ToKelvin; + + model FromKelvin "Conversion from Kelvin to °Rankine" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + annotation ( + Icon( + Text(extent=[-137, 99; 132, 49], string="%name"), + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-34, -42; -114, -122], + string="K", + style(color=0, thickness=4)), + Text( + extent=[110, -39; 30, -119], + string="°Rk", + style(color=0)), + Line(points=[-40, 0; -100, 0]), + Line(points=[40, 0; 100, 0])), + Diagram( + Ellipse(extent=[-40, 40; 40, -40], style( + color=0, + thickness=2, + fillColor=7)), + Text( + extent=[-42, -41; -101, -98], + string="K", + style(color=0, thickness=4)), + Text( + extent=[100, -40; 30, -100], + string="°Rk", + style(color=0)), + Line(points=[-100, 0; -40, 0]), + Line(points=[40, 0; 100, 0])), + Documentation(info=" ++This component converts all input signals from Kelvin to Rankine +and provides them as output signals. +
+ +")); + Modelica.Blocks.Interfaces.InPort Kelvin(final n=n) annotation (extent=[- + 140, -20; -100, 20]); + Modelica.Blocks.Interfaces.OutPort Rankine(final n=n) annotation (extent=[ + 100, -10; 120, 10]); + equation + Rankine.signal = to_degRk(Kelvin.signal); + end FromKelvin; + + model FixedTemperature "Fixed temperature boundary condition in °Rankine" + + parameter NonSI.Temperature_degRk T "Fixed Temperature at the port"; + annotation ( + Icon( + Text(extent=[-118, 165; 122, 105], string="%name"), + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Text( + extent=[0, 0; -100, -100], + string="°Rk", + style(color=0)), + Line(points=[-91, 0; 66, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text( + extent=[-145, -102; 135, -151], + string="T=%T", + style(color=0))), + Documentation(info=" ++This model defines a fixed temperature T at its port in degree Rankine, +[degRk], i.e., it defines a fixed temperature as a boundary condition. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 101, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-42, 0; 66, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="°Rk", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + equation + port.T = from_degRk(T); + end FixedTemperature; + + model PrescribedTemperature + "Variable temperature boundary condition in °Rankine" + + annotation ( + Icon( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 92, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)), + Text( + extent=[0, 0; -100, -100], + string="°Rk", + style(color=0)), + Text(extent=[-122, 163; 118, 103], string="%name"), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1))), + Documentation(info=" ++This model represents a variable temperature boundary condition +The temperature value in degree Rankine, [degRk] is given by the input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+ +"), + Diagram( + Rectangle(extent=[-100, 100; 100, -100], style( + color=0, + pattern=0, + fillColor=76, + fillPattern=8)), + Line(points=[-102, 0; 64, 0], style(color=42, thickness=2)), + Text( + extent=[0, 0; -100, -100], + string="°Rk", + style(color=0)), + Polygon(points=[62, -20; 62, 20; 100, 0; 62, -20], style( + color=42, + fillColor=42, + fillPattern=1)))); + Interfaces.HeatPort_b port annotation (extent=[100, -10; 120, 10]); + Modelica.Blocks.Interfaces.InPort T(final n=1) annotation (extent=[-140, + -20; -100, 20]); + equation + port.T = from_degRk(T.signal[1]); + end PrescribedTemperature; + annotation (Documentation(info=" ++The components of this package are provided for the convenience of +people working mostly with Rankine units, since all models +in package HeatTransfer are based on Kelvin units. +
+ ++Note, that in package SIunits.Conversions, functions are provided +to convert between the units Kelvin, degree Celsius, degree Fahrenheit +and degree Rankine. These functions allow, e.g., a direct conversion +of units at all places where Kelvin is required as parameter. +Example: +
+ ++ import SIunits.Conversions.*; + Modelica.Thermal.HeatTransfer.HeatCapacitor C(T0 = from_degRk(500)); ++ + +")); + model TemperatureSensor "Absolute temperature sensor in °Rankine" + + annotation ( + Diagram( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-94, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, + 86; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[102, -22; 60, -74], + string="°Rk", + style(color=0))), + Icon( + Ellipse(extent=[-20, -98; 20, -60], style( + color=0, + thickness=2, + fillColor=42)), + Rectangle(extent=[-12, 40; 12, -68], style(color=42, fillColor=42)), + Line(points=[12, 0; 90, 0]), + Line(points=[-90, 0; -12, 0], style(color=42)), + Polygon(points=[-12, 40; -12, 80; -10, 86; -6, 88; 0, 90; 6, 88; 10, + 86; 12, 80; 12, 40; -12, 40], style(color=0, thickness=2)), + Line(points=[-12, 40; -12, -64], style(color=0, thickness=2)), + Line(points=[12, 40; 12, -64], style(color=0, thickness=2)), + Line(points=[-40, -20; -12, -20], style(color=0)), + Line(points=[-40, 20; -12, 20], style(color=0)), + Line(points=[-40, 60; -12, 60], style(color=0)), + Text( + extent=[126, -20; 26, -120], + string="°Rk", + style(color=0)), + Text(extent=[-132, 144; 108, 84], string="%name")), + Documentation(info=" + +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Rankine as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+ +")); + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = + NonSI.Temperature_degRk) annotation (extent=[90, -10; 110, 10]); + Interfaces.HeatPort_a port annotation (extent=[-110, -10; -90, 10]); + equation + T.signal[1] = to_degRk(port.T); + port.Q_dot = 0; + end TemperatureSensor; + end Rankine; +end HeatTransfer; diff --git a/Thermal/package.mo b/Thermal/package.mo new file mode 100644 index 0000000000..3d86d130c3 --- /dev/null +++ b/Thermal/package.mo @@ -0,0 +1,6 @@ +package Thermal "Components for thermal systems" + + import SI = Modelica.SIunits; + + extends Modelica.Icons.Library; +end Thermal; diff --git a/help/Modelica.Blocks.Continuous.DerD.png b/help/Modelica.Blocks.Continuous.DerD.png new file mode 100644 index 0000000000..597ba56e3a Binary files /dev/null and b/help/Modelica.Blocks.Continuous.DerD.png differ diff --git a/help/Modelica.Blocks.Continuous.DerI.png b/help/Modelica.Blocks.Continuous.DerI.png new file mode 100644 index 0000000000..7f0d260c69 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.DerI.png differ diff --git a/help/Modelica.Blocks.Continuous.DerivativeD.png b/help/Modelica.Blocks.Continuous.DerivativeD.png new file mode 100644 index 0000000000..1de1cc72bf Binary files /dev/null and b/help/Modelica.Blocks.Continuous.DerivativeD.png differ diff --git a/help/Modelica.Blocks.Continuous.DerivativeI.png b/help/Modelica.Blocks.Continuous.DerivativeI.png new file mode 100644 index 0000000000..568cdcbf6d Binary files /dev/null and b/help/Modelica.Blocks.Continuous.DerivativeI.png differ diff --git a/help/Modelica.Blocks.Continuous.FirstOrderD.png b/help/Modelica.Blocks.Continuous.FirstOrderD.png new file mode 100644 index 0000000000..c23c54b65c Binary files /dev/null and b/help/Modelica.Blocks.Continuous.FirstOrderD.png differ diff --git a/help/Modelica.Blocks.Continuous.FirstOrderI.png b/help/Modelica.Blocks.Continuous.FirstOrderI.png new file mode 100644 index 0000000000..0b85874d51 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.FirstOrderI.png differ diff --git a/help/Modelica.Blocks.Continuous.IntegratorD.png b/help/Modelica.Blocks.Continuous.IntegratorD.png new file mode 100644 index 0000000000..f8518e0595 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.IntegratorD.png differ diff --git a/help/Modelica.Blocks.Continuous.IntegratorI.png b/help/Modelica.Blocks.Continuous.IntegratorI.png new file mode 100644 index 0000000000..0317bc900d Binary files /dev/null and b/help/Modelica.Blocks.Continuous.IntegratorI.png differ diff --git a/help/Modelica.Blocks.Continuous.LimIntegratorD.png b/help/Modelica.Blocks.Continuous.LimIntegratorD.png new file mode 100644 index 0000000000..c76b84c1fd Binary files /dev/null and b/help/Modelica.Blocks.Continuous.LimIntegratorD.png differ diff --git a/help/Modelica.Blocks.Continuous.LimIntegratorI.png b/help/Modelica.Blocks.Continuous.LimIntegratorI.png new file mode 100644 index 0000000000..7cd72d4a76 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.LimIntegratorI.png differ diff --git a/help/Modelica.Blocks.Continuous.LimPIDD.png b/help/Modelica.Blocks.Continuous.LimPIDD.png new file mode 100644 index 0000000000..4cc5d1be62 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.LimPIDD.png differ diff --git a/help/Modelica.Blocks.Continuous.LimPIDI.png b/help/Modelica.Blocks.Continuous.LimPIDI.png new file mode 100644 index 0000000000..865c3c7a4c Binary files /dev/null and b/help/Modelica.Blocks.Continuous.LimPIDI.png differ diff --git a/help/Modelica.Blocks.Continuous.PID.png b/help/Modelica.Blocks.Continuous.PID.png new file mode 100644 index 0000000000..76f481c3e5 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.PID.png differ diff --git a/help/Modelica.Blocks.Continuous.PIDD.png b/help/Modelica.Blocks.Continuous.PIDD.png new file mode 100644 index 0000000000..f3df3122ff Binary files /dev/null and b/help/Modelica.Blocks.Continuous.PIDD.png differ diff --git a/help/Modelica.Blocks.Continuous.PIDI.png b/help/Modelica.Blocks.Continuous.PIDI.png new file mode 100644 index 0000000000..c3ea6fe3c6 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.PIDI.png differ diff --git a/help/Modelica.Blocks.Continuous.PII.png b/help/Modelica.Blocks.Continuous.PII.png new file mode 100644 index 0000000000..cf8a99b2c8 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.PII.png differ diff --git a/help/Modelica.Blocks.Continuous.SecondOrderD.png b/help/Modelica.Blocks.Continuous.SecondOrderD.png new file mode 100644 index 0000000000..85b558722e Binary files /dev/null and b/help/Modelica.Blocks.Continuous.SecondOrderD.png differ diff --git a/help/Modelica.Blocks.Continuous.SecondOrderI.png b/help/Modelica.Blocks.Continuous.SecondOrderI.png new file mode 100644 index 0000000000..56dc83a98f Binary files /dev/null and b/help/Modelica.Blocks.Continuous.SecondOrderI.png differ diff --git a/help/Modelica.Blocks.Continuous.StateSpaceD.png b/help/Modelica.Blocks.Continuous.StateSpaceD.png new file mode 100644 index 0000000000..c789bb102e Binary files /dev/null and b/help/Modelica.Blocks.Continuous.StateSpaceD.png differ diff --git a/help/Modelica.Blocks.Continuous.StateSpaceI.png b/help/Modelica.Blocks.Continuous.StateSpaceI.png new file mode 100644 index 0000000000..acdb902c64 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.StateSpaceI.png differ diff --git a/help/Modelica.Blocks.Continuous.TransferFunctionD.png b/help/Modelica.Blocks.Continuous.TransferFunctionD.png new file mode 100644 index 0000000000..b31c4dcbba Binary files /dev/null and b/help/Modelica.Blocks.Continuous.TransferFunctionD.png differ diff --git a/help/Modelica.Blocks.Continuous.TransferFunctionI.png b/help/Modelica.Blocks.Continuous.TransferFunctionI.png new file mode 100644 index 0000000000..1df5272fb7 Binary files /dev/null and b/help/Modelica.Blocks.Continuous.TransferFunctionI.png differ diff --git a/help/Modelica.Blocks.ContinuousI.png b/help/Modelica.Blocks.ContinuousI.png new file mode 100644 index 0000000000..f0de54b867 Binary files /dev/null and b/help/Modelica.Blocks.ContinuousI.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusD.png b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusD.png new file mode 100644 index 0000000000..b73bd1b275 Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusD.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusI.png b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusI.png new file mode 100644 index 0000000000..e6058efc17 Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.BusI.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortD.png b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortD.png new file mode 100644 index 0000000000..8b2f770394 Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortD.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortI.png b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortI.png new file mode 100644 index 0000000000..bdf430aced Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.Interfaces.MultiPortI.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.PartD.png b/help/Modelica.Blocks.Examples.BusUsage.PartD.png new file mode 100644 index 0000000000..78be9b33cc Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.PartD.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.PartI.png b/help/Modelica.Blocks.Examples.BusUsage.PartI.png new file mode 100644 index 0000000000..aba3a6469f Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.PartI.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.RestBusD.png b/help/Modelica.Blocks.Examples.BusUsage.RestBusD.png new file mode 100644 index 0000000000..3eef22b662 Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.RestBusD.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsage.RestBusI.png b/help/Modelica.Blocks.Examples.BusUsage.RestBusI.png new file mode 100644 index 0000000000..4a93700aea Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsage.RestBusI.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsageD.png b/help/Modelica.Blocks.Examples.BusUsageD.png new file mode 100644 index 0000000000..08caa5d10b Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsageD.png differ diff --git a/help/Modelica.Blocks.Examples.BusUsageI.png b/help/Modelica.Blocks.Examples.BusUsageI.png new file mode 100644 index 0000000000..1cba569fd3 Binary files /dev/null and b/help/Modelica.Blocks.Examples.BusUsageI.png differ diff --git a/help/Modelica.Blocks.ExamplesI.png b/help/Modelica.Blocks.ExamplesI.png new file mode 100644 index 0000000000..daac49c1a0 Binary files /dev/null and b/help/Modelica.Blocks.ExamplesI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BlockIconI.png b/help/Modelica.Blocks.Interfaces.BlockIconI.png new file mode 100644 index 0000000000..ffdba5eb62 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BlockIconI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanBlockIconI.png b/help/Modelica.Blocks.Interfaces.BooleanBlockIconI.png new file mode 100644 index 0000000000..513400aea1 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanBlockIconI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanInPortD.png b/help/Modelica.Blocks.Interfaces.BooleanInPortD.png new file mode 100644 index 0000000000..e4f9ae91a6 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanInPortD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanInPortI.png b/help/Modelica.Blocks.Interfaces.BooleanInPortI.png new file mode 100644 index 0000000000..8464ff3e18 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanInPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanMIMOsD.png b/help/Modelica.Blocks.Interfaces.BooleanMIMOsD.png new file mode 100644 index 0000000000..5ced8fa720 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanMIMOsD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanMIMOsI.png b/help/Modelica.Blocks.Interfaces.BooleanMIMOsI.png new file mode 100644 index 0000000000..062394876f Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanMIMOsI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanOutPortD.png b/help/Modelica.Blocks.Interfaces.BooleanOutPortD.png new file mode 100644 index 0000000000..a592d2a2d2 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanOutPortD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanOutPortI.png b/help/Modelica.Blocks.Interfaces.BooleanOutPortI.png new file mode 100644 index 0000000000..c396c38e53 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanOutPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanPortI.png b/help/Modelica.Blocks.Interfaces.BooleanPortI.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanSISOD.png b/help/Modelica.Blocks.Interfaces.BooleanSISOD.png new file mode 100644 index 0000000000..5ced8fa720 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanSISOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanSISOI.png b/help/Modelica.Blocks.Interfaces.BooleanSISOI.png new file mode 100644 index 0000000000..ee0015b2ff Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanSISOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanSignalSourceD.png b/help/Modelica.Blocks.Interfaces.BooleanSignalSourceD.png new file mode 100644 index 0000000000..0500589094 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanSignalSourceD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BooleanSignalSourceI.png b/help/Modelica.Blocks.Interfaces.BooleanSignalSourceI.png new file mode 100644 index 0000000000..e0bc0eb667 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BooleanSignalSourceI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanD.png new file mode 100644 index 0000000000..8ae0ee0f26 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanI.png new file mode 100644 index 0000000000..e2300f939d Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputBooleanI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerD.png new file mode 100644 index 0000000000..a0d44c09f5 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerI.png new file mode 100644 index 0000000000..03eb8d478d Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputIntegerI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealD.png new file mode 100644 index 0000000000..00f25b409c Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealI.png new file mode 100644 index 0000000000..5222a15d84 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.InputRealI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanD.png new file mode 100644 index 0000000000..b31de4ccb2 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanI.png new file mode 100644 index 0000000000..267dc70e80 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputBooleanI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerD.png new file mode 100644 index 0000000000..4e1bd549f4 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerI.png new file mode 100644 index 0000000000..a8fd212314 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputIntegerI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealD.png new file mode 100644 index 0000000000..05359106db Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealI.png new file mode 100644 index 0000000000..ca590187dd Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.Internal.OutputRealI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.InternalI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.InternalI.png new file mode 100644 index 0000000000..520b0938df Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.InternalI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanD.png new file mode 100644 index 0000000000..7853299d6e Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanI.png new file mode 100644 index 0000000000..2c63ead29a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveBooleanI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerD.png new file mode 100644 index 0000000000..b38568f407 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerI.png new file mode 100644 index 0000000000..fdfe0710fe Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveIntegerI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealD.png new file mode 100644 index 0000000000..3b561070dc Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealI.png new file mode 100644 index 0000000000..52d373c1ff Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.ReceiveRealI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanD.png new file mode 100644 index 0000000000..d8ccb52744 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanI.png new file mode 100644 index 0000000000..bd800629f7 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendBooleanI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerD.png new file mode 100644 index 0000000000..54c5a9e205 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerI.png new file mode 100644 index 0000000000..ffd7fddc85 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendIntegerI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealD.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealD.png new file mode 100644 index 0000000000..a243269231 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealD.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealI.png b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealI.png new file mode 100644 index 0000000000..e170a32153 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptors.SendRealI.png differ diff --git a/help/Modelica.Blocks.Interfaces.BusAdaptorsI.png b/help/Modelica.Blocks.Interfaces.BusAdaptorsI.png new file mode 100644 index 0000000000..65cade4d67 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.BusAdaptorsI.png differ diff --git a/help/Modelica.Blocks.Interfaces.InPortD.png b/help/Modelica.Blocks.Interfaces.InPortD.png new file mode 100644 index 0000000000..ba11d48f50 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.InPortD.png differ diff --git a/help/Modelica.Blocks.Interfaces.InPortI.png b/help/Modelica.Blocks.Interfaces.InPortI.png new file mode 100644 index 0000000000..68825600c1 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.InPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerBlockIconI.png b/help/Modelica.Blocks.Interfaces.IntegerBlockIconI.png new file mode 100644 index 0000000000..e9c4d5e30e Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerBlockIconI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerInPortD.png b/help/Modelica.Blocks.Interfaces.IntegerInPortD.png new file mode 100644 index 0000000000..5efb6e82a3 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerInPortD.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerInPortI.png b/help/Modelica.Blocks.Interfaces.IntegerInPortI.png new file mode 100644 index 0000000000..8d8b01c876 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerInPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsD.png b/help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsD.png new file mode 100644 index 0000000000..6e3a78ebee Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsD.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsI.png b/help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsI.png new file mode 100644 index 0000000000..217636cdf8 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerMIBooleanMOsI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerMOD.png b/help/Modelica.Blocks.Interfaces.IntegerMOD.png new file mode 100644 index 0000000000..8b5f1e1030 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerMOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerMOI.png b/help/Modelica.Blocks.Interfaces.IntegerMOI.png new file mode 100644 index 0000000000..c04e73f7f8 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerMOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerOutPortD.png b/help/Modelica.Blocks.Interfaces.IntegerOutPortD.png new file mode 100644 index 0000000000..4b60ba100f Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerOutPortD.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerOutPortI.png b/help/Modelica.Blocks.Interfaces.IntegerOutPortI.png new file mode 100644 index 0000000000..c1d675a9e4 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerOutPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerPortI.png b/help/Modelica.Blocks.Interfaces.IntegerPortI.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerSignalSourceD.png b/help/Modelica.Blocks.Interfaces.IntegerSignalSourceD.png new file mode 100644 index 0000000000..8b5f1e1030 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerSignalSourceD.png differ diff --git a/help/Modelica.Blocks.Interfaces.IntegerSignalSourceI.png b/help/Modelica.Blocks.Interfaces.IntegerSignalSourceI.png new file mode 100644 index 0000000000..ff62cbb312 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.IntegerSignalSourceI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MI2BooleanMOsD.png b/help/Modelica.Blocks.Interfaces.MI2BooleanMOsD.png new file mode 100644 index 0000000000..b638767fb3 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MI2BooleanMOsD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MI2BooleanMOsI.png b/help/Modelica.Blocks.Interfaces.MI2BooleanMOsI.png new file mode 100644 index 0000000000..eac15cadf4 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MI2BooleanMOsI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MI2MOD.png b/help/Modelica.Blocks.Interfaces.MI2MOD.png new file mode 100644 index 0000000000..f758bd90f1 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MI2MOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MI2MOI.png b/help/Modelica.Blocks.Interfaces.MI2MOI.png new file mode 100644 index 0000000000..4416862cc9 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MI2MOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MIMOD.png b/help/Modelica.Blocks.Interfaces.MIMOD.png new file mode 100644 index 0000000000..597ba56e3a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MIMOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MIMOI.png b/help/Modelica.Blocks.Interfaces.MIMOI.png new file mode 100644 index 0000000000..2e14b02eec Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MIMOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MIMOsD.png b/help/Modelica.Blocks.Interfaces.MIMOsD.png new file mode 100644 index 0000000000..597ba56e3a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MIMOsD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MIMOsI.png b/help/Modelica.Blocks.Interfaces.MIMOsI.png new file mode 100644 index 0000000000..c6d25277de Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MIMOsI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MISOD.png b/help/Modelica.Blocks.Interfaces.MISOD.png new file mode 100644 index 0000000000..597ba56e3a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MISOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MISOI.png b/help/Modelica.Blocks.Interfaces.MISOI.png new file mode 100644 index 0000000000..7221377222 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MISOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MOD.png b/help/Modelica.Blocks.Interfaces.MOD.png new file mode 100644 index 0000000000..d0dab9dd07 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MOI.png b/help/Modelica.Blocks.Interfaces.MOI.png new file mode 100644 index 0000000000..b503c68c1a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.MVcontrolD.png b/help/Modelica.Blocks.Interfaces.MVcontrolD.png new file mode 100644 index 0000000000..2b13778342 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MVcontrolD.png differ diff --git a/help/Modelica.Blocks.Interfaces.MVcontrolI.png b/help/Modelica.Blocks.Interfaces.MVcontrolI.png new file mode 100644 index 0000000000..2d5d3b9122 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.MVcontrolI.png differ diff --git a/help/Modelica.Blocks.Interfaces.OutPortD.png b/help/Modelica.Blocks.Interfaces.OutPortD.png new file mode 100644 index 0000000000..f27b0eddd4 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.OutPortD.png differ diff --git a/help/Modelica.Blocks.Interfaces.OutPortI.png b/help/Modelica.Blocks.Interfaces.OutPortI.png new file mode 100644 index 0000000000..9d5dc5feb7 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.OutPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.RealPortI.png b/help/Modelica.Blocks.Interfaces.RealPortI.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.RealPortI.png differ diff --git a/help/Modelica.Blocks.Interfaces.SI2SOD.png b/help/Modelica.Blocks.Interfaces.SI2SOD.png new file mode 100644 index 0000000000..f758bd90f1 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SI2SOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.SI2SOI.png b/help/Modelica.Blocks.Interfaces.SI2SOI.png new file mode 100644 index 0000000000..779473194b Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SI2SOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.SIMOD.png b/help/Modelica.Blocks.Interfaces.SIMOD.png new file mode 100644 index 0000000000..597ba56e3a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SIMOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.SIMOI.png b/help/Modelica.Blocks.Interfaces.SIMOI.png new file mode 100644 index 0000000000..38bf332437 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SIMOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.SISOD.png b/help/Modelica.Blocks.Interfaces.SISOD.png new file mode 100644 index 0000000000..597ba56e3a Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SISOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.SISOI.png b/help/Modelica.Blocks.Interfaces.SISOI.png new file mode 100644 index 0000000000..46f28efd53 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SISOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.SOD.png b/help/Modelica.Blocks.Interfaces.SOD.png new file mode 100644 index 0000000000..d0dab9dd07 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SOD.png differ diff --git a/help/Modelica.Blocks.Interfaces.SOI.png b/help/Modelica.Blocks.Interfaces.SOI.png new file mode 100644 index 0000000000..c697748117 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SOI.png differ diff --git a/help/Modelica.Blocks.Interfaces.SVcontrolD.png b/help/Modelica.Blocks.Interfaces.SVcontrolD.png new file mode 100644 index 0000000000..bf840af853 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SVcontrolD.png differ diff --git a/help/Modelica.Blocks.Interfaces.SVcontrolI.png b/help/Modelica.Blocks.Interfaces.SVcontrolI.png new file mode 100644 index 0000000000..504570b90b Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SVcontrolI.png differ diff --git a/help/Modelica.Blocks.Interfaces.SignalSourceD.png b/help/Modelica.Blocks.Interfaces.SignalSourceD.png new file mode 100644 index 0000000000..d0dab9dd07 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SignalSourceD.png differ diff --git a/help/Modelica.Blocks.Interfaces.SignalSourceI.png b/help/Modelica.Blocks.Interfaces.SignalSourceI.png new file mode 100644 index 0000000000..cd368fc444 Binary files /dev/null and b/help/Modelica.Blocks.Interfaces.SignalSourceI.png differ diff --git a/help/Modelica.Blocks.InterfacesI.png b/help/Modelica.Blocks.InterfacesI.png new file mode 100644 index 0000000000..c4dcd63046 Binary files /dev/null and b/help/Modelica.Blocks.InterfacesI.png differ diff --git a/help/Modelica.Blocks.Math.AbsD.png b/help/Modelica.Blocks.Math.AbsD.png new file mode 100644 index 0000000000..8f07697ee1 Binary files /dev/null and b/help/Modelica.Blocks.Math.AbsD.png differ diff --git a/help/Modelica.Blocks.Math.AbsI.png b/help/Modelica.Blocks.Math.AbsI.png new file mode 100644 index 0000000000..8e3d3c4eac Binary files /dev/null and b/help/Modelica.Blocks.Math.AbsI.png differ diff --git a/help/Modelica.Blocks.Math.AcosD.png b/help/Modelica.Blocks.Math.AcosD.png new file mode 100644 index 0000000000..4dcdf2b55c Binary files /dev/null and b/help/Modelica.Blocks.Math.AcosD.png differ diff --git a/help/Modelica.Blocks.Math.AcosI.png b/help/Modelica.Blocks.Math.AcosI.png new file mode 100644 index 0000000000..ce800c6d58 Binary files /dev/null and b/help/Modelica.Blocks.Math.AcosI.png differ diff --git a/help/Modelica.Blocks.Math.Add3D.png b/help/Modelica.Blocks.Math.Add3D.png new file mode 100644 index 0000000000..f06f660aa0 Binary files /dev/null and b/help/Modelica.Blocks.Math.Add3D.png differ diff --git a/help/Modelica.Blocks.Math.Add3I.png b/help/Modelica.Blocks.Math.Add3I.png new file mode 100644 index 0000000000..8110e6de50 Binary files /dev/null and b/help/Modelica.Blocks.Math.Add3I.png differ diff --git a/help/Modelica.Blocks.Math.AddD.png b/help/Modelica.Blocks.Math.AddD.png new file mode 100644 index 0000000000..cdf41fdf26 Binary files /dev/null and b/help/Modelica.Blocks.Math.AddD.png differ diff --git a/help/Modelica.Blocks.Math.AddI.png b/help/Modelica.Blocks.Math.AddI.png new file mode 100644 index 0000000000..85f1957461 Binary files /dev/null and b/help/Modelica.Blocks.Math.AddI.png differ diff --git a/help/Modelica.Blocks.Math.AsinD.png b/help/Modelica.Blocks.Math.AsinD.png new file mode 100644 index 0000000000..9c4ca39ed4 Binary files /dev/null and b/help/Modelica.Blocks.Math.AsinD.png differ diff --git a/help/Modelica.Blocks.Math.AsinI.png b/help/Modelica.Blocks.Math.AsinI.png new file mode 100644 index 0000000000..1f65ae1d55 Binary files /dev/null and b/help/Modelica.Blocks.Math.AsinI.png differ diff --git a/help/Modelica.Blocks.Math.Atan2D.png b/help/Modelica.Blocks.Math.Atan2D.png new file mode 100644 index 0000000000..b2564c75fe Binary files /dev/null and b/help/Modelica.Blocks.Math.Atan2D.png differ diff --git a/help/Modelica.Blocks.Math.Atan2I.png b/help/Modelica.Blocks.Math.Atan2I.png new file mode 100644 index 0000000000..270bbea66f Binary files /dev/null and b/help/Modelica.Blocks.Math.Atan2I.png differ diff --git a/help/Modelica.Blocks.Math.AtanD.png b/help/Modelica.Blocks.Math.AtanD.png new file mode 100644 index 0000000000..f487a2d07d Binary files /dev/null and b/help/Modelica.Blocks.Math.AtanD.png differ diff --git a/help/Modelica.Blocks.Math.AtanI.png b/help/Modelica.Blocks.Math.AtanI.png new file mode 100644 index 0000000000..e883bc9174 Binary files /dev/null and b/help/Modelica.Blocks.Math.AtanI.png differ diff --git a/help/Modelica.Blocks.Math.BooleanChangeD.png b/help/Modelica.Blocks.Math.BooleanChangeD.png new file mode 100644 index 0000000000..5ced8fa720 Binary files /dev/null and b/help/Modelica.Blocks.Math.BooleanChangeD.png differ diff --git a/help/Modelica.Blocks.Math.BooleanChangeI.png b/help/Modelica.Blocks.Math.BooleanChangeI.png new file mode 100644 index 0000000000..48ed4a6f22 Binary files /dev/null and b/help/Modelica.Blocks.Math.BooleanChangeI.png differ diff --git a/help/Modelica.Blocks.Math.CosD.png b/help/Modelica.Blocks.Math.CosD.png new file mode 100644 index 0000000000..519561e62e Binary files /dev/null and b/help/Modelica.Blocks.Math.CosD.png differ diff --git a/help/Modelica.Blocks.Math.CosI.png b/help/Modelica.Blocks.Math.CosI.png new file mode 100644 index 0000000000..3813d6d980 Binary files /dev/null and b/help/Modelica.Blocks.Math.CosI.png differ diff --git a/help/Modelica.Blocks.Math.CoshD.png b/help/Modelica.Blocks.Math.CoshD.png new file mode 100644 index 0000000000..8a5010a7d9 Binary files /dev/null and b/help/Modelica.Blocks.Math.CoshD.png differ diff --git a/help/Modelica.Blocks.Math.CoshI.png b/help/Modelica.Blocks.Math.CoshI.png new file mode 100644 index 0000000000..f405e45aa3 Binary files /dev/null and b/help/Modelica.Blocks.Math.CoshI.png differ diff --git a/help/Modelica.Blocks.Math.DivisionD.png b/help/Modelica.Blocks.Math.DivisionD.png new file mode 100644 index 0000000000..1f7a0330a1 Binary files /dev/null and b/help/Modelica.Blocks.Math.DivisionD.png differ diff --git a/help/Modelica.Blocks.Math.DivisionI.png b/help/Modelica.Blocks.Math.DivisionI.png new file mode 100644 index 0000000000..6d1e1f3265 Binary files /dev/null and b/help/Modelica.Blocks.Math.DivisionI.png differ diff --git a/help/Modelica.Blocks.Math.EdgeD.png b/help/Modelica.Blocks.Math.EdgeD.png new file mode 100644 index 0000000000..5ced8fa720 Binary files /dev/null and b/help/Modelica.Blocks.Math.EdgeD.png differ diff --git a/help/Modelica.Blocks.Math.EdgeI.png b/help/Modelica.Blocks.Math.EdgeI.png new file mode 100644 index 0000000000..48933677bf Binary files /dev/null and b/help/Modelica.Blocks.Math.EdgeI.png differ diff --git a/help/Modelica.Blocks.Math.ExpD.png b/help/Modelica.Blocks.Math.ExpD.png new file mode 100644 index 0000000000..bf7d24104a Binary files /dev/null and b/help/Modelica.Blocks.Math.ExpD.png differ diff --git a/help/Modelica.Blocks.Math.ExpI.png b/help/Modelica.Blocks.Math.ExpI.png new file mode 100644 index 0000000000..d3e7303897 Binary files /dev/null and b/help/Modelica.Blocks.Math.ExpI.png differ diff --git a/help/Modelica.Blocks.Math.FeedbackD.png b/help/Modelica.Blocks.Math.FeedbackD.png new file mode 100644 index 0000000000..cd0abbdf52 Binary files /dev/null and b/help/Modelica.Blocks.Math.FeedbackD.png differ diff --git a/help/Modelica.Blocks.Math.FeedbackI.png b/help/Modelica.Blocks.Math.FeedbackI.png new file mode 100644 index 0000000000..d204afa503 Binary files /dev/null and b/help/Modelica.Blocks.Math.FeedbackI.png differ diff --git a/help/Modelica.Blocks.Math.GainD.png b/help/Modelica.Blocks.Math.GainD.png new file mode 100644 index 0000000000..cb5adf8f1f Binary files /dev/null and b/help/Modelica.Blocks.Math.GainD.png differ diff --git a/help/Modelica.Blocks.Math.GainI.png b/help/Modelica.Blocks.Math.GainI.png new file mode 100644 index 0000000000..fba84075cc Binary files /dev/null and b/help/Modelica.Blocks.Math.GainI.png differ diff --git a/help/Modelica.Blocks.Math.IntegerChangeD.png b/help/Modelica.Blocks.Math.IntegerChangeD.png new file mode 100644 index 0000000000..6e3a78ebee Binary files /dev/null and b/help/Modelica.Blocks.Math.IntegerChangeD.png differ diff --git a/help/Modelica.Blocks.Math.IntegerChangeI.png b/help/Modelica.Blocks.Math.IntegerChangeI.png new file mode 100644 index 0000000000..b7f9a8755f Binary files /dev/null and b/help/Modelica.Blocks.Math.IntegerChangeI.png differ diff --git a/help/Modelica.Blocks.Math.IntegerToRealD.png b/help/Modelica.Blocks.Math.IntegerToRealD.png new file mode 100644 index 0000000000..45e91e617e Binary files /dev/null and b/help/Modelica.Blocks.Math.IntegerToRealD.png differ diff --git a/help/Modelica.Blocks.Math.IntegerToRealI.png b/help/Modelica.Blocks.Math.IntegerToRealI.png new file mode 100644 index 0000000000..944fee15fe Binary files /dev/null and b/help/Modelica.Blocks.Math.IntegerToRealI.png differ diff --git a/help/Modelica.Blocks.Math.Log10D.png b/help/Modelica.Blocks.Math.Log10D.png new file mode 100644 index 0000000000..dd7fdd2d9b Binary files /dev/null and b/help/Modelica.Blocks.Math.Log10D.png differ diff --git a/help/Modelica.Blocks.Math.Log10I.png b/help/Modelica.Blocks.Math.Log10I.png new file mode 100644 index 0000000000..23cbb321cf Binary files /dev/null and b/help/Modelica.Blocks.Math.Log10I.png differ diff --git a/help/Modelica.Blocks.Math.LogD.png b/help/Modelica.Blocks.Math.LogD.png new file mode 100644 index 0000000000..a2f0cef38d Binary files /dev/null and b/help/Modelica.Blocks.Math.LogD.png differ diff --git a/help/Modelica.Blocks.Math.LogI.png b/help/Modelica.Blocks.Math.LogI.png new file mode 100644 index 0000000000..2fc0fa1751 Binary files /dev/null and b/help/Modelica.Blocks.Math.LogI.png differ diff --git a/help/Modelica.Blocks.Math.MatrixGainD.png b/help/Modelica.Blocks.Math.MatrixGainD.png new file mode 100644 index 0000000000..876b75e026 Binary files /dev/null and b/help/Modelica.Blocks.Math.MatrixGainD.png differ diff --git a/help/Modelica.Blocks.Math.MatrixGainI.png b/help/Modelica.Blocks.Math.MatrixGainI.png new file mode 100644 index 0000000000..1163e476aa Binary files /dev/null and b/help/Modelica.Blocks.Math.MatrixGainI.png differ diff --git a/help/Modelica.Blocks.Math.MaxD.png b/help/Modelica.Blocks.Math.MaxD.png new file mode 100644 index 0000000000..f758bd90f1 Binary files /dev/null and b/help/Modelica.Blocks.Math.MaxD.png differ diff --git a/help/Modelica.Blocks.Math.MaxI.png b/help/Modelica.Blocks.Math.MaxI.png new file mode 100644 index 0000000000..e24386b5dd Binary files /dev/null and b/help/Modelica.Blocks.Math.MaxI.png differ diff --git a/help/Modelica.Blocks.Math.MinD.png b/help/Modelica.Blocks.Math.MinD.png new file mode 100644 index 0000000000..f758bd90f1 Binary files /dev/null and b/help/Modelica.Blocks.Math.MinD.png differ diff --git a/help/Modelica.Blocks.Math.MinI.png b/help/Modelica.Blocks.Math.MinI.png new file mode 100644 index 0000000000..387202c122 Binary files /dev/null and b/help/Modelica.Blocks.Math.MinI.png differ diff --git a/help/Modelica.Blocks.Math.ProductD.png b/help/Modelica.Blocks.Math.ProductD.png new file mode 100644 index 0000000000..3c4889f4c9 Binary files /dev/null and b/help/Modelica.Blocks.Math.ProductD.png differ diff --git a/help/Modelica.Blocks.Math.ProductI.png b/help/Modelica.Blocks.Math.ProductI.png new file mode 100644 index 0000000000..e4131b2959 Binary files /dev/null and b/help/Modelica.Blocks.Math.ProductI.png differ diff --git a/help/Modelica.Blocks.Math.RealToIntegerD.png b/help/Modelica.Blocks.Math.RealToIntegerD.png new file mode 100644 index 0000000000..1f42ee1934 Binary files /dev/null and b/help/Modelica.Blocks.Math.RealToIntegerD.png differ diff --git a/help/Modelica.Blocks.Math.RealToIntegerI.png b/help/Modelica.Blocks.Math.RealToIntegerI.png new file mode 100644 index 0000000000..91d44b4582 Binary files /dev/null and b/help/Modelica.Blocks.Math.RealToIntegerI.png differ diff --git a/help/Modelica.Blocks.Math.SignD.png b/help/Modelica.Blocks.Math.SignD.png new file mode 100644 index 0000000000..18f1913eb5 Binary files /dev/null and b/help/Modelica.Blocks.Math.SignD.png differ diff --git a/help/Modelica.Blocks.Math.SignI.png b/help/Modelica.Blocks.Math.SignI.png new file mode 100644 index 0000000000..7bd6ea3eaf Binary files /dev/null and b/help/Modelica.Blocks.Math.SignI.png differ diff --git a/help/Modelica.Blocks.Math.SinD.png b/help/Modelica.Blocks.Math.SinD.png new file mode 100644 index 0000000000..df639af345 Binary files /dev/null and b/help/Modelica.Blocks.Math.SinD.png differ diff --git a/help/Modelica.Blocks.Math.SinI.png b/help/Modelica.Blocks.Math.SinI.png new file mode 100644 index 0000000000..8801de2770 Binary files /dev/null and b/help/Modelica.Blocks.Math.SinI.png differ diff --git a/help/Modelica.Blocks.Math.SinhD.png b/help/Modelica.Blocks.Math.SinhD.png new file mode 100644 index 0000000000..5942e8983b Binary files /dev/null and b/help/Modelica.Blocks.Math.SinhD.png differ diff --git a/help/Modelica.Blocks.Math.SinhI.png b/help/Modelica.Blocks.Math.SinhI.png new file mode 100644 index 0000000000..1f98d522fb Binary files /dev/null and b/help/Modelica.Blocks.Math.SinhI.png differ diff --git a/help/Modelica.Blocks.Math.SqrtD.png b/help/Modelica.Blocks.Math.SqrtD.png new file mode 100644 index 0000000000..b129e7c26a Binary files /dev/null and b/help/Modelica.Blocks.Math.SqrtD.png differ diff --git a/help/Modelica.Blocks.Math.SqrtI.png b/help/Modelica.Blocks.Math.SqrtI.png new file mode 100644 index 0000000000..81c9d1653d Binary files /dev/null and b/help/Modelica.Blocks.Math.SqrtI.png differ diff --git a/help/Modelica.Blocks.Math.SumD.png b/help/Modelica.Blocks.Math.SumD.png new file mode 100644 index 0000000000..2378c38a62 Binary files /dev/null and b/help/Modelica.Blocks.Math.SumD.png differ diff --git a/help/Modelica.Blocks.Math.SumI.png b/help/Modelica.Blocks.Math.SumI.png new file mode 100644 index 0000000000..ecb163f858 Binary files /dev/null and b/help/Modelica.Blocks.Math.SumI.png differ diff --git a/help/Modelica.Blocks.Math.TanD.png b/help/Modelica.Blocks.Math.TanD.png new file mode 100644 index 0000000000..6351d415c6 Binary files /dev/null and b/help/Modelica.Blocks.Math.TanD.png differ diff --git a/help/Modelica.Blocks.Math.TanI.png b/help/Modelica.Blocks.Math.TanI.png new file mode 100644 index 0000000000..07d6b9e529 Binary files /dev/null and b/help/Modelica.Blocks.Math.TanI.png differ diff --git a/help/Modelica.Blocks.Math.TanhD.png b/help/Modelica.Blocks.Math.TanhD.png new file mode 100644 index 0000000000..e437ab6639 Binary files /dev/null and b/help/Modelica.Blocks.Math.TanhD.png differ diff --git a/help/Modelica.Blocks.Math.TanhI.png b/help/Modelica.Blocks.Math.TanhI.png new file mode 100644 index 0000000000..2d738d706a Binary files /dev/null and b/help/Modelica.Blocks.Math.TanhI.png differ diff --git a/help/Modelica.Blocks.Math.TwoInputsD.png b/help/Modelica.Blocks.Math.TwoInputsD.png new file mode 100644 index 0000000000..84b721d31b Binary files /dev/null and b/help/Modelica.Blocks.Math.TwoInputsD.png differ diff --git a/help/Modelica.Blocks.Math.TwoInputsI.png b/help/Modelica.Blocks.Math.TwoInputsI.png new file mode 100644 index 0000000000..e767e9fe6b Binary files /dev/null and b/help/Modelica.Blocks.Math.TwoInputsI.png differ diff --git a/help/Modelica.Blocks.Math.TwoOutputsD.png b/help/Modelica.Blocks.Math.TwoOutputsD.png new file mode 100644 index 0000000000..c31c868427 Binary files /dev/null and b/help/Modelica.Blocks.Math.TwoOutputsD.png differ diff --git a/help/Modelica.Blocks.Math.TwoOutputsI.png b/help/Modelica.Blocks.Math.TwoOutputsI.png new file mode 100644 index 0000000000..f0d341a3af Binary files /dev/null and b/help/Modelica.Blocks.Math.TwoOutputsI.png differ diff --git a/help/Modelica.Blocks.MathI.png b/help/Modelica.Blocks.MathI.png new file mode 100644 index 0000000000..02e506255c Binary files /dev/null and b/help/Modelica.Blocks.MathI.png differ diff --git a/help/Modelica.Blocks.Nonlinear.DeadZoneD.png b/help/Modelica.Blocks.Nonlinear.DeadZoneD.png new file mode 100644 index 0000000000..bc2f35499e Binary files /dev/null and b/help/Modelica.Blocks.Nonlinear.DeadZoneD.png differ diff --git a/help/Modelica.Blocks.Nonlinear.DeadZoneI.png b/help/Modelica.Blocks.Nonlinear.DeadZoneI.png new file mode 100644 index 0000000000..ddd9df29e2 Binary files /dev/null and b/help/Modelica.Blocks.Nonlinear.DeadZoneI.png differ diff --git a/help/Modelica.Blocks.Nonlinear.LimiterD.png b/help/Modelica.Blocks.Nonlinear.LimiterD.png new file mode 100644 index 0000000000..e7ee76aeed Binary files /dev/null and b/help/Modelica.Blocks.Nonlinear.LimiterD.png differ diff --git a/help/Modelica.Blocks.Nonlinear.LimiterI.png b/help/Modelica.Blocks.Nonlinear.LimiterI.png new file mode 100644 index 0000000000..1d20284619 Binary files /dev/null and b/help/Modelica.Blocks.Nonlinear.LimiterI.png differ diff --git a/help/Modelica.Blocks.Nonlinear.VariableLimiterD.png b/help/Modelica.Blocks.Nonlinear.VariableLimiterD.png new file mode 100644 index 0000000000..661981c522 Binary files /dev/null and b/help/Modelica.Blocks.Nonlinear.VariableLimiterD.png differ diff --git a/help/Modelica.Blocks.Nonlinear.VariableLimiterI.png b/help/Modelica.Blocks.Nonlinear.VariableLimiterI.png new file mode 100644 index 0000000000..43ff447116 Binary files /dev/null and b/help/Modelica.Blocks.Nonlinear.VariableLimiterI.png differ diff --git a/help/Modelica.Blocks.NonlinearI.png b/help/Modelica.Blocks.NonlinearI.png new file mode 100644 index 0000000000..8a0140c4f1 Binary files /dev/null and b/help/Modelica.Blocks.NonlinearI.png differ diff --git a/help/Modelica.Blocks.Sources.BooleanConstantD.png b/help/Modelica.Blocks.Sources.BooleanConstantD.png new file mode 100644 index 0000000000..3e190414bc Binary files /dev/null and b/help/Modelica.Blocks.Sources.BooleanConstantD.png differ diff --git a/help/Modelica.Blocks.Sources.BooleanConstantI.png b/help/Modelica.Blocks.Sources.BooleanConstantI.png new file mode 100644 index 0000000000..4c74a04394 Binary files /dev/null and b/help/Modelica.Blocks.Sources.BooleanConstantI.png differ diff --git a/help/Modelica.Blocks.Sources.BooleanPulseD.png b/help/Modelica.Blocks.Sources.BooleanPulseD.png new file mode 100644 index 0000000000..a97e02c299 Binary files /dev/null and b/help/Modelica.Blocks.Sources.BooleanPulseD.png differ diff --git a/help/Modelica.Blocks.Sources.BooleanPulseI.png b/help/Modelica.Blocks.Sources.BooleanPulseI.png new file mode 100644 index 0000000000..05468855b0 Binary files /dev/null and b/help/Modelica.Blocks.Sources.BooleanPulseI.png differ diff --git a/help/Modelica.Blocks.Sources.BooleanStepD.png b/help/Modelica.Blocks.Sources.BooleanStepD.png new file mode 100644 index 0000000000..a769aba320 Binary files /dev/null and b/help/Modelica.Blocks.Sources.BooleanStepD.png differ diff --git a/help/Modelica.Blocks.Sources.BooleanStepI.png b/help/Modelica.Blocks.Sources.BooleanStepI.png new file mode 100644 index 0000000000..4e0d050de5 Binary files /dev/null and b/help/Modelica.Blocks.Sources.BooleanStepI.png differ diff --git a/help/Modelica.Blocks.Sources.ClockD.png b/help/Modelica.Blocks.Sources.ClockD.png new file mode 100644 index 0000000000..ac0a063cd3 Binary files /dev/null and b/help/Modelica.Blocks.Sources.ClockD.png differ diff --git a/help/Modelica.Blocks.Sources.ClockI.png b/help/Modelica.Blocks.Sources.ClockI.png new file mode 100644 index 0000000000..1d968aebf3 Binary files /dev/null and b/help/Modelica.Blocks.Sources.ClockI.png differ diff --git a/help/Modelica.Blocks.Sources.ConstantD.png b/help/Modelica.Blocks.Sources.ConstantD.png new file mode 100644 index 0000000000..ab1b2a933f Binary files /dev/null and b/help/Modelica.Blocks.Sources.ConstantD.png differ diff --git a/help/Modelica.Blocks.Sources.ConstantI.png b/help/Modelica.Blocks.Sources.ConstantI.png new file mode 100644 index 0000000000..f5fb9fd2b5 Binary files /dev/null and b/help/Modelica.Blocks.Sources.ConstantI.png differ diff --git a/help/Modelica.Blocks.Sources.ExpSineD.png b/help/Modelica.Blocks.Sources.ExpSineD.png new file mode 100644 index 0000000000..906994a2b0 Binary files /dev/null and b/help/Modelica.Blocks.Sources.ExpSineD.png differ diff --git a/help/Modelica.Blocks.Sources.ExpSineI.png b/help/Modelica.Blocks.Sources.ExpSineI.png new file mode 100644 index 0000000000..82fa0321ce Binary files /dev/null and b/help/Modelica.Blocks.Sources.ExpSineI.png differ diff --git a/help/Modelica.Blocks.Sources.ExponentialsD.png b/help/Modelica.Blocks.Sources.ExponentialsD.png new file mode 100644 index 0000000000..d918a710cd Binary files /dev/null and b/help/Modelica.Blocks.Sources.ExponentialsD.png differ diff --git a/help/Modelica.Blocks.Sources.ExponentialsI.png b/help/Modelica.Blocks.Sources.ExponentialsI.png new file mode 100644 index 0000000000..38e829ee65 Binary files /dev/null and b/help/Modelica.Blocks.Sources.ExponentialsI.png differ diff --git a/help/Modelica.Blocks.Sources.IntegerConstantD.png b/help/Modelica.Blocks.Sources.IntegerConstantD.png new file mode 100644 index 0000000000..8c0b59fb8f Binary files /dev/null and b/help/Modelica.Blocks.Sources.IntegerConstantD.png differ diff --git a/help/Modelica.Blocks.Sources.IntegerConstantI.png b/help/Modelica.Blocks.Sources.IntegerConstantI.png new file mode 100644 index 0000000000..a44c0146d9 Binary files /dev/null and b/help/Modelica.Blocks.Sources.IntegerConstantI.png differ diff --git a/help/Modelica.Blocks.Sources.IntegerStepD.png b/help/Modelica.Blocks.Sources.IntegerStepD.png new file mode 100644 index 0000000000..cbba855e3d Binary files /dev/null and b/help/Modelica.Blocks.Sources.IntegerStepD.png differ diff --git a/help/Modelica.Blocks.Sources.IntegerStepI.png b/help/Modelica.Blocks.Sources.IntegerStepI.png new file mode 100644 index 0000000000..46f616dc0a Binary files /dev/null and b/help/Modelica.Blocks.Sources.IntegerStepI.png differ diff --git a/help/Modelica.Blocks.Sources.KinematicPTPD.png b/help/Modelica.Blocks.Sources.KinematicPTPD.png new file mode 100644 index 0000000000..4c99db5cf4 Binary files /dev/null and b/help/Modelica.Blocks.Sources.KinematicPTPD.png differ diff --git a/help/Modelica.Blocks.Sources.KinematicPTPI.png b/help/Modelica.Blocks.Sources.KinematicPTPI.png new file mode 100644 index 0000000000..ac7652bd4c Binary files /dev/null and b/help/Modelica.Blocks.Sources.KinematicPTPI.png differ diff --git a/help/Modelica.Blocks.Sources.PulseD.png b/help/Modelica.Blocks.Sources.PulseD.png new file mode 100644 index 0000000000..49f1ae77d0 Binary files /dev/null and b/help/Modelica.Blocks.Sources.PulseD.png differ diff --git a/help/Modelica.Blocks.Sources.PulseI.png b/help/Modelica.Blocks.Sources.PulseI.png new file mode 100644 index 0000000000..fe30dccbc2 Binary files /dev/null and b/help/Modelica.Blocks.Sources.PulseI.png differ diff --git a/help/Modelica.Blocks.Sources.RampD.png b/help/Modelica.Blocks.Sources.RampD.png new file mode 100644 index 0000000000..5c73625c4b Binary files /dev/null and b/help/Modelica.Blocks.Sources.RampD.png differ diff --git a/help/Modelica.Blocks.Sources.RampI.png b/help/Modelica.Blocks.Sources.RampI.png new file mode 100644 index 0000000000..0df1aff340 Binary files /dev/null and b/help/Modelica.Blocks.Sources.RampI.png differ diff --git a/help/Modelica.Blocks.Sources.SampleTriggerD.png b/help/Modelica.Blocks.Sources.SampleTriggerD.png new file mode 100644 index 0000000000..15bb554efb Binary files /dev/null and b/help/Modelica.Blocks.Sources.SampleTriggerD.png differ diff --git a/help/Modelica.Blocks.Sources.SampleTriggerI.png b/help/Modelica.Blocks.Sources.SampleTriggerI.png new file mode 100644 index 0000000000..e281c34861 Binary files /dev/null and b/help/Modelica.Blocks.Sources.SampleTriggerI.png differ diff --git a/help/Modelica.Blocks.Sources.SawToothD.png b/help/Modelica.Blocks.Sources.SawToothD.png new file mode 100644 index 0000000000..eb4abd05ec Binary files /dev/null and b/help/Modelica.Blocks.Sources.SawToothD.png differ diff --git a/help/Modelica.Blocks.Sources.SawToothI.png b/help/Modelica.Blocks.Sources.SawToothI.png new file mode 100644 index 0000000000..c75aef4fa6 Binary files /dev/null and b/help/Modelica.Blocks.Sources.SawToothI.png differ diff --git a/help/Modelica.Blocks.Sources.SineD.png b/help/Modelica.Blocks.Sources.SineD.png new file mode 100644 index 0000000000..a8f4fb7d73 Binary files /dev/null and b/help/Modelica.Blocks.Sources.SineD.png differ diff --git a/help/Modelica.Blocks.Sources.SineI.png b/help/Modelica.Blocks.Sources.SineI.png new file mode 100644 index 0000000000..2ccd3a5691 Binary files /dev/null and b/help/Modelica.Blocks.Sources.SineI.png differ diff --git a/help/Modelica.Blocks.Sources.StepD.png b/help/Modelica.Blocks.Sources.StepD.png new file mode 100644 index 0000000000..129c95c99c Binary files /dev/null and b/help/Modelica.Blocks.Sources.StepD.png differ diff --git a/help/Modelica.Blocks.Sources.StepI.png b/help/Modelica.Blocks.Sources.StepI.png new file mode 100644 index 0000000000..40df409938 Binary files /dev/null and b/help/Modelica.Blocks.Sources.StepI.png differ diff --git a/help/Modelica.Blocks.Sources.TimeTableD.png b/help/Modelica.Blocks.Sources.TimeTableD.png new file mode 100644 index 0000000000..c62a498e47 Binary files /dev/null and b/help/Modelica.Blocks.Sources.TimeTableD.png differ diff --git a/help/Modelica.Blocks.Sources.TimeTableI.png b/help/Modelica.Blocks.Sources.TimeTableI.png new file mode 100644 index 0000000000..5e7607bfe5 Binary files /dev/null and b/help/Modelica.Blocks.Sources.TimeTableI.png differ diff --git a/help/Modelica.Blocks.Sources.TrapezoidD.png b/help/Modelica.Blocks.Sources.TrapezoidD.png new file mode 100644 index 0000000000..8ef2245bdc Binary files /dev/null and b/help/Modelica.Blocks.Sources.TrapezoidD.png differ diff --git a/help/Modelica.Blocks.Sources.TrapezoidI.png b/help/Modelica.Blocks.Sources.TrapezoidI.png new file mode 100644 index 0000000000..1082fd01e0 Binary files /dev/null and b/help/Modelica.Blocks.Sources.TrapezoidI.png differ diff --git a/help/Modelica.Blocks.SourcesI.png b/help/Modelica.Blocks.SourcesI.png new file mode 100644 index 0000000000..6f8077827b Binary files /dev/null and b/help/Modelica.Blocks.SourcesI.png differ diff --git a/help/Modelica.BlocksI.png b/help/Modelica.BlocksI.png new file mode 100644 index 0000000000..476d2d4328 Binary files /dev/null and b/help/Modelica.BlocksI.png differ diff --git a/help/Modelica.ConstantsI.png b/help/Modelica.ConstantsI.png new file mode 100644 index 0000000000..bde824ce36 Binary files /dev/null and b/help/Modelica.ConstantsI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.CCCD.png b/help/Modelica.Electrical.Analog.Basic.CCCD.png new file mode 100644 index 0000000000..e0b661bf65 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.CCCD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.CCCI.png b/help/Modelica.Electrical.Analog.Basic.CCCI.png new file mode 100644 index 0000000000..598a3ffda0 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.CCCI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.CCVD.png b/help/Modelica.Electrical.Analog.Basic.CCVD.png new file mode 100644 index 0000000000..24a77a8c84 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.CCVD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.CCVI.png b/help/Modelica.Electrical.Analog.Basic.CCVI.png new file mode 100644 index 0000000000..11fec05f04 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.CCVI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.CapacitorD.png b/help/Modelica.Electrical.Analog.Basic.CapacitorD.png new file mode 100644 index 0000000000..fe57b0a076 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.CapacitorD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.CapacitorI.png b/help/Modelica.Electrical.Analog.Basic.CapacitorI.png new file mode 100644 index 0000000000..b54621a443 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.CapacitorI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.ConductorD.png b/help/Modelica.Electrical.Analog.Basic.ConductorD.png new file mode 100644 index 0000000000..1c093c6257 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.ConductorD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.ConductorI.png b/help/Modelica.Electrical.Analog.Basic.ConductorI.png new file mode 100644 index 0000000000..a0e0af9f60 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.ConductorI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.EMFD.png b/help/Modelica.Electrical.Analog.Basic.EMFD.png new file mode 100644 index 0000000000..0db34cd2cd Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.EMFD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.EMFI.png b/help/Modelica.Electrical.Analog.Basic.EMFI.png new file mode 100644 index 0000000000..ba6d0a8c62 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.EMFI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.GroundD.png b/help/Modelica.Electrical.Analog.Basic.GroundD.png new file mode 100644 index 0000000000..a3bdd85997 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.GroundD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.GroundI.png b/help/Modelica.Electrical.Analog.Basic.GroundI.png new file mode 100644 index 0000000000..efa2c6959d Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.GroundI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.GyratorD.png b/help/Modelica.Electrical.Analog.Basic.GyratorD.png new file mode 100644 index 0000000000..6373211b74 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.GyratorD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.GyratorI.png b/help/Modelica.Electrical.Analog.Basic.GyratorI.png new file mode 100644 index 0000000000..1f1bd2942f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.GyratorI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.HeatingResistorD.png b/help/Modelica.Electrical.Analog.Basic.HeatingResistorD.png new file mode 100644 index 0000000000..1de44e6d46 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.HeatingResistorD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.HeatingResistorI.png b/help/Modelica.Electrical.Analog.Basic.HeatingResistorI.png new file mode 100644 index 0000000000..65377f3008 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.HeatingResistorI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.InductorD.png b/help/Modelica.Electrical.Analog.Basic.InductorD.png new file mode 100644 index 0000000000..1a563f2a46 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.InductorD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.InductorI.png b/help/Modelica.Electrical.Analog.Basic.InductorI.png new file mode 100644 index 0000000000..0f9a538356 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.InductorI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.OpAmpD.png b/help/Modelica.Electrical.Analog.Basic.OpAmpD.png new file mode 100644 index 0000000000..65ab54a415 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.OpAmpD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.OpAmpI.png b/help/Modelica.Electrical.Analog.Basic.OpAmpI.png new file mode 100644 index 0000000000..79331b8bac Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.OpAmpI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.ResistorD.png b/help/Modelica.Electrical.Analog.Basic.ResistorD.png new file mode 100644 index 0000000000..82a09c06ef Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.ResistorD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.ResistorI.png b/help/Modelica.Electrical.Analog.Basic.ResistorI.png new file mode 100644 index 0000000000..be2ee05615 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.ResistorI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.TransformerD.png b/help/Modelica.Electrical.Analog.Basic.TransformerD.png new file mode 100644 index 0000000000..a45e40f5bc Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.TransformerD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.TransformerI.png b/help/Modelica.Electrical.Analog.Basic.TransformerI.png new file mode 100644 index 0000000000..df9b31115e Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.TransformerI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.VCCD.png b/help/Modelica.Electrical.Analog.Basic.VCCD.png new file mode 100644 index 0000000000..00ca758e55 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.VCCD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.VCCI.png b/help/Modelica.Electrical.Analog.Basic.VCCI.png new file mode 100644 index 0000000000..8d831872af Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.VCCI.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.VCVD.png b/help/Modelica.Electrical.Analog.Basic.VCVD.png new file mode 100644 index 0000000000..5bf43d665d Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.VCVD.png differ diff --git a/help/Modelica.Electrical.Analog.Basic.VCVI.png b/help/Modelica.Electrical.Analog.Basic.VCVI.png new file mode 100644 index 0000000000..62f8ada280 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Basic.VCVI.png differ diff --git a/help/Modelica.Electrical.Analog.BasicI.png b/help/Modelica.Electrical.Analog.BasicI.png new file mode 100644 index 0000000000..5cf67e62cc Binary files /dev/null and b/help/Modelica.Electrical.Analog.BasicI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.CauerFilterD.png b/help/Modelica.Electrical.Analog.Examples.CauerFilterD.png new file mode 100644 index 0000000000..336fecb601 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.CauerFilterD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.CauerFilterI.png b/help/Modelica.Electrical.Analog.Examples.CauerFilterI.png new file mode 100644 index 0000000000..2a571d968a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.CauerFilterI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.ChuaCircuitD.png b/help/Modelica.Electrical.Analog.Examples.ChuaCircuitD.png new file mode 100644 index 0000000000..f280d1be36 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.ChuaCircuitD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.ChuaCircuitI.png b/help/Modelica.Electrical.Analog.Examples.ChuaCircuitI.png new file mode 100644 index 0000000000..aa8c4be862 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.ChuaCircuitI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierD.png b/help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierD.png new file mode 100644 index 0000000000..e3272462a5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierI.png b/help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierI.png new file mode 100644 index 0000000000..920712144e Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.DifferenceAmplifierI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.NandGateD.png b/help/Modelica.Electrical.Analog.Examples.NandGateD.png new file mode 100644 index 0000000000..6b3f6af414 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.NandGateD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.NandGateI.png b/help/Modelica.Electrical.Analog.Examples.NandGateI.png new file mode 100644 index 0000000000..c26dcf4b24 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.NandGateI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.NandD.png b/help/Modelica.Electrical.Analog.Examples.Utilities.NandD.png new file mode 100644 index 0000000000..a8c31f0ddd Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.NandD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.NandI.png b/help/Modelica.Electrical.Analog.Examples.Utilities.NandI.png new file mode 100644 index 0000000000..a3a8b7757d Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.NandI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorD.png b/help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorD.png new file mode 100644 index 0000000000..a62e5f83b2 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorI.png b/help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorI.png new file mode 100644 index 0000000000..2524ebaa70 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.NonlinearResistorI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchD.png b/help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchD.png new file mode 100644 index 0000000000..99fc8ab078 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchI.png b/help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchI.png new file mode 100644 index 0000000000..a33b3d21a1 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.RealSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.TransistorD.png b/help/Modelica.Electrical.Analog.Examples.Utilities.TransistorD.png new file mode 100644 index 0000000000..8e699bf590 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.TransistorD.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.Utilities.TransistorI.png b/help/Modelica.Electrical.Analog.Examples.Utilities.TransistorI.png new file mode 100644 index 0000000000..9c53a062e0 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.Utilities.TransistorI.png differ diff --git a/help/Modelica.Electrical.Analog.Examples.UtilitiesI.png b/help/Modelica.Electrical.Analog.Examples.UtilitiesI.png new file mode 100644 index 0000000000..eb8edeb738 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Examples.UtilitiesI.png differ diff --git a/help/Modelica.Electrical.Analog.ExamplesI.png b/help/Modelica.Electrical.Analog.ExamplesI.png new file mode 100644 index 0000000000..d02e389576 Binary files /dev/null and b/help/Modelica.Electrical.Analog.ExamplesI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserD.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserD.png new file mode 100644 index 0000000000..7c500c7347 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserI.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserI.png new file mode 100644 index 0000000000..569d218bf3 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCloserI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchD.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchD.png new file mode 100644 index 0000000000..a8a6aba062 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchI.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchI.png new file mode 100644 index 0000000000..fe3890d216 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealCommutingSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchD.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchD.png new file mode 100644 index 0000000000..d736cf4149 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchI.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchI.png new file mode 100644 index 0000000000..b09189a9ca Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealIntermediateSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerD.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerD.png new file mode 100644 index 0000000000..3900ac5e30 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerI.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerI.png new file mode 100644 index 0000000000..a7bca6feae Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealOpenerI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchD.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchD.png new file mode 100644 index 0000000000..191fac67f3 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchI.png b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchI.png new file mode 100644 index 0000000000..2c175fcd86 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ControlledIdealSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealCloserD.png b/help/Modelica.Electrical.Analog.Ideal.IdealCloserD.png new file mode 100644 index 0000000000..1832743764 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealCloserD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealCloserI.png b/help/Modelica.Electrical.Analog.Ideal.IdealCloserI.png new file mode 100644 index 0000000000..5217f49fde Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealCloserI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchD.png b/help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchD.png new file mode 100644 index 0000000000..761962464f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchI.png b/help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchI.png new file mode 100644 index 0000000000..e68c278822 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealCommutingSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealDiodeD.png b/help/Modelica.Electrical.Analog.Ideal.IdealDiodeD.png new file mode 100644 index 0000000000..ac100a3cb9 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealDiodeD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealDiodeI.png b/help/Modelica.Electrical.Analog.Ideal.IdealDiodeI.png new file mode 100644 index 0000000000..331b9dd2f3 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealDiodeI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorD.png b/help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorD.png new file mode 100644 index 0000000000..b46eb3290c Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorI.png b/help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorI.png new file mode 100644 index 0000000000..ed363bf8b4 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealGTOThyristorI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealGyratorD.png b/help/Modelica.Electrical.Analog.Ideal.IdealGyratorD.png new file mode 100644 index 0000000000..6600ba3074 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealGyratorD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealGyratorI.png b/help/Modelica.Electrical.Analog.Ideal.IdealGyratorI.png new file mode 100644 index 0000000000..00cc800f28 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealGyratorI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchD.png b/help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchD.png new file mode 100644 index 0000000000..3c229877ec Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchI.png b/help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchI.png new file mode 100644 index 0000000000..ceeffae19b Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealIntermediateSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinD.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinD.png new file mode 100644 index 0000000000..f479ad03b1 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinI.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinI.png new file mode 100644 index 0000000000..4f96bbdb73 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmp3PinI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpD.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpD.png new file mode 100644 index 0000000000..f5e564196a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpI.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpI.png new file mode 100644 index 0000000000..b5784b3913 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedD.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedD.png new file mode 100644 index 0000000000..b69377190f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedI.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedI.png new file mode 100644 index 0000000000..52801bcba5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpAmpLimitedI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpenerD.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpenerD.png new file mode 100644 index 0000000000..3c38749f9a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpenerD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealOpenerI.png b/help/Modelica.Electrical.Analog.Ideal.IdealOpenerI.png new file mode 100644 index 0000000000..129d491fb5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealOpenerI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealSwitchD.png b/help/Modelica.Electrical.Analog.Ideal.IdealSwitchD.png new file mode 100644 index 0000000000..2c440c4387 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealSwitchD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealSwitchI.png b/help/Modelica.Electrical.Analog.Ideal.IdealSwitchI.png new file mode 100644 index 0000000000..8ced1a5e1e Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealSwitchI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealThyristorD.png b/help/Modelica.Electrical.Analog.Ideal.IdealThyristorD.png new file mode 100644 index 0000000000..b46eb3290c Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealThyristorD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealThyristorI.png b/help/Modelica.Electrical.Analog.Ideal.IdealThyristorI.png new file mode 100644 index 0000000000..71ae9d4ddb Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealThyristorI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealTransformerD.png b/help/Modelica.Electrical.Analog.Ideal.IdealTransformerD.png new file mode 100644 index 0000000000..a45e40f5bc Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealTransformerD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdealTransformerI.png b/help/Modelica.Electrical.Analog.Ideal.IdealTransformerI.png new file mode 100644 index 0000000000..432e5e4769 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdealTransformerI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdleD.png b/help/Modelica.Electrical.Analog.Ideal.IdleD.png new file mode 100644 index 0000000000..25e417551f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdleD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.IdleI.png b/help/Modelica.Electrical.Analog.Ideal.IdleI.png new file mode 100644 index 0000000000..fc900729bd Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.IdleI.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ShortD.png b/help/Modelica.Electrical.Analog.Ideal.ShortD.png new file mode 100644 index 0000000000..cc4603aa8d Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ShortD.png differ diff --git a/help/Modelica.Electrical.Analog.Ideal.ShortI.png b/help/Modelica.Electrical.Analog.Ideal.ShortI.png new file mode 100644 index 0000000000..66e0a628eb Binary files /dev/null and b/help/Modelica.Electrical.Analog.Ideal.ShortI.png differ diff --git a/help/Modelica.Electrical.Analog.IdealI.png b/help/Modelica.Electrical.Analog.IdealI.png new file mode 100644 index 0000000000..5d2b6f3826 Binary files /dev/null and b/help/Modelica.Electrical.Analog.IdealI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorD.png b/help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorD.png new file mode 100644 index 0000000000..4320691ac8 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorI.png b/help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorI.png new file mode 100644 index 0000000000..2137cc8ff1 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.AbsoluteSensorI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.CurrentSourceD.png b/help/Modelica.Electrical.Analog.Interfaces.CurrentSourceD.png new file mode 100644 index 0000000000..2907c54410 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.CurrentSourceD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.CurrentSourceI.png b/help/Modelica.Electrical.Analog.Interfaces.CurrentSourceI.png new file mode 100644 index 0000000000..f2c5cc65e4 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.CurrentSourceI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.NegativePinD.png b/help/Modelica.Electrical.Analog.Interfaces.NegativePinD.png new file mode 100644 index 0000000000..6f732ec7d3 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.NegativePinD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.NegativePinI.png b/help/Modelica.Electrical.Analog.Interfaces.NegativePinI.png new file mode 100644 index 0000000000..43976a11a1 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.NegativePinI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.OnePortD.png b/help/Modelica.Electrical.Analog.Interfaces.OnePortD.png new file mode 100644 index 0000000000..5228bc7ec6 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.OnePortD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.OnePortI.png b/help/Modelica.Electrical.Analog.Interfaces.OnePortI.png new file mode 100644 index 0000000000..f316f32191 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.OnePortI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.PinD.png b/help/Modelica.Electrical.Analog.Interfaces.PinD.png new file mode 100644 index 0000000000..232773da01 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.PinD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.PinI.png b/help/Modelica.Electrical.Analog.Interfaces.PinI.png new file mode 100644 index 0000000000..8f5753c866 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.PinI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.PositivePinD.png b/help/Modelica.Electrical.Analog.Interfaces.PositivePinD.png new file mode 100644 index 0000000000..590010debb Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.PositivePinD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.PositivePinI.png b/help/Modelica.Electrical.Analog.Interfaces.PositivePinI.png new file mode 100644 index 0000000000..8f5753c866 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.PositivePinI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.RelativeSensorD.png b/help/Modelica.Electrical.Analog.Interfaces.RelativeSensorD.png new file mode 100644 index 0000000000..03790fa08e Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.RelativeSensorD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.RelativeSensorI.png b/help/Modelica.Electrical.Analog.Interfaces.RelativeSensorI.png new file mode 100644 index 0000000000..666d413526 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.RelativeSensorI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.TwoPinD.png b/help/Modelica.Electrical.Analog.Interfaces.TwoPinD.png new file mode 100644 index 0000000000..af8573ef21 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.TwoPinD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.TwoPinI.png b/help/Modelica.Electrical.Analog.Interfaces.TwoPinI.png new file mode 100644 index 0000000000..b062477d2f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.TwoPinI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.TwoPortD.png b/help/Modelica.Electrical.Analog.Interfaces.TwoPortD.png new file mode 100644 index 0000000000..1aa0b9b608 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.TwoPortD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.TwoPortI.png b/help/Modelica.Electrical.Analog.Interfaces.TwoPortI.png new file mode 100644 index 0000000000..979df33a97 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.TwoPortI.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.VoltageSourceD.png b/help/Modelica.Electrical.Analog.Interfaces.VoltageSourceD.png new file mode 100644 index 0000000000..422fcdd8f1 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.VoltageSourceD.png differ diff --git a/help/Modelica.Electrical.Analog.Interfaces.VoltageSourceI.png b/help/Modelica.Electrical.Analog.Interfaces.VoltageSourceI.png new file mode 100644 index 0000000000..1531138fc0 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Interfaces.VoltageSourceI.png differ diff --git a/help/Modelica.Electrical.Analog.InterfacesI.png b/help/Modelica.Electrical.Analog.InterfacesI.png new file mode 100644 index 0000000000..c4dcd63046 Binary files /dev/null and b/help/Modelica.Electrical.Analog.InterfacesI.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.OLineD.png b/help/Modelica.Electrical.Analog.Lines.OLineD.png new file mode 100644 index 0000000000..ec8a479335 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.OLineD.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.OLineI.png b/help/Modelica.Electrical.Analog.Lines.OLineI.png new file mode 100644 index 0000000000..edc5323c5f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.OLineI.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.TLine1D.png b/help/Modelica.Electrical.Analog.Lines.TLine1D.png new file mode 100644 index 0000000000..f5cf2a894a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.TLine1D.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.TLine1I.png b/help/Modelica.Electrical.Analog.Lines.TLine1I.png new file mode 100644 index 0000000000..099dfc3f8b Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.TLine1I.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.TLine2D.png b/help/Modelica.Electrical.Analog.Lines.TLine2D.png new file mode 100644 index 0000000000..eab12689f5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.TLine2D.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.TLine2I.png b/help/Modelica.Electrical.Analog.Lines.TLine2I.png new file mode 100644 index 0000000000..a978b9cb93 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.TLine2I.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.TLine3D.png b/help/Modelica.Electrical.Analog.Lines.TLine3D.png new file mode 100644 index 0000000000..73f583bef7 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.TLine3D.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.TLine3I.png b/help/Modelica.Electrical.Analog.Lines.TLine3I.png new file mode 100644 index 0000000000..ae81884397 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.TLine3I.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.ULineD.png b/help/Modelica.Electrical.Analog.Lines.ULineD.png new file mode 100644 index 0000000000..ec8a479335 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.ULineD.png differ diff --git a/help/Modelica.Electrical.Analog.Lines.ULineI.png b/help/Modelica.Electrical.Analog.Lines.ULineI.png new file mode 100644 index 0000000000..bea056aba5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Lines.ULineI.png differ diff --git a/help/Modelica.Electrical.Analog.LinesI.png b/help/Modelica.Electrical.Analog.LinesI.png new file mode 100644 index 0000000000..cf3a0782cd Binary files /dev/null and b/help/Modelica.Electrical.Analog.LinesI.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.DiodeD.png b/help/Modelica.Electrical.Analog.Semiconductors.DiodeD.png new file mode 100644 index 0000000000..ac100a3cb9 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.DiodeD.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.DiodeI.png b/help/Modelica.Electrical.Analog.Semiconductors.DiodeI.png new file mode 100644 index 0000000000..fb6e3b9fdd Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.DiodeI.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.NMOSD.png b/help/Modelica.Electrical.Analog.Semiconductors.NMOSD.png new file mode 100644 index 0000000000..185091ce8a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.NMOSD.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.NMOSI.png b/help/Modelica.Electrical.Analog.Semiconductors.NMOSI.png new file mode 100644 index 0000000000..6612b89bd5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.NMOSI.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.NPND.png b/help/Modelica.Electrical.Analog.Semiconductors.NPND.png new file mode 100644 index 0000000000..8bb55c7c69 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.NPND.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.NPNI.png b/help/Modelica.Electrical.Analog.Semiconductors.NPNI.png new file mode 100644 index 0000000000..9c2f6b3820 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.NPNI.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.PMOSD.png b/help/Modelica.Electrical.Analog.Semiconductors.PMOSD.png new file mode 100644 index 0000000000..6168c3f884 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.PMOSD.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.PMOSI.png b/help/Modelica.Electrical.Analog.Semiconductors.PMOSI.png new file mode 100644 index 0000000000..a3f28a1925 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.PMOSI.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.PNPD.png b/help/Modelica.Electrical.Analog.Semiconductors.PNPD.png new file mode 100644 index 0000000000..dd398ee33f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.PNPD.png differ diff --git a/help/Modelica.Electrical.Analog.Semiconductors.PNPI.png b/help/Modelica.Electrical.Analog.Semiconductors.PNPI.png new file mode 100644 index 0000000000..14dbdb1e50 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Semiconductors.PNPI.png differ diff --git a/help/Modelica.Electrical.Analog.SemiconductorsI.png b/help/Modelica.Electrical.Analog.SemiconductorsI.png new file mode 100644 index 0000000000..0de1e520c4 Binary files /dev/null and b/help/Modelica.Electrical.Analog.SemiconductorsI.png differ diff --git a/help/Modelica.Electrical.Analog.Sensors.CurrentSensorD.png b/help/Modelica.Electrical.Analog.Sensors.CurrentSensorD.png new file mode 100644 index 0000000000..79793ef237 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sensors.CurrentSensorD.png differ diff --git a/help/Modelica.Electrical.Analog.Sensors.CurrentSensorI.png b/help/Modelica.Electrical.Analog.Sensors.CurrentSensorI.png new file mode 100644 index 0000000000..60d943c7b2 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sensors.CurrentSensorI.png differ diff --git a/help/Modelica.Electrical.Analog.Sensors.PotentialSensorD.png b/help/Modelica.Electrical.Analog.Sensors.PotentialSensorD.png new file mode 100644 index 0000000000..11813d0668 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sensors.PotentialSensorD.png differ diff --git a/help/Modelica.Electrical.Analog.Sensors.PotentialSensorI.png b/help/Modelica.Electrical.Analog.Sensors.PotentialSensorI.png new file mode 100644 index 0000000000..b06c6b2cc3 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sensors.PotentialSensorI.png differ diff --git a/help/Modelica.Electrical.Analog.Sensors.VoltageSensorD.png b/help/Modelica.Electrical.Analog.Sensors.VoltageSensorD.png new file mode 100644 index 0000000000..79793ef237 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sensors.VoltageSensorD.png differ diff --git a/help/Modelica.Electrical.Analog.Sensors.VoltageSensorI.png b/help/Modelica.Electrical.Analog.Sensors.VoltageSensorI.png new file mode 100644 index 0000000000..9cfa51e9bd Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sensors.VoltageSensorI.png differ diff --git a/help/Modelica.Electrical.Analog.SensorsI.png b/help/Modelica.Electrical.Analog.SensorsI.png new file mode 100644 index 0000000000..9784ab016a Binary files /dev/null and b/help/Modelica.Electrical.Analog.SensorsI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ConstantCurrentD.png b/help/Modelica.Electrical.Analog.Sources.ConstantCurrentD.png new file mode 100644 index 0000000000..b3819a6438 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ConstantCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ConstantCurrentI.png b/help/Modelica.Electrical.Analog.Sources.ConstantCurrentI.png new file mode 100644 index 0000000000..07a2aed301 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ConstantCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ConstantVoltageD.png b/help/Modelica.Electrical.Analog.Sources.ConstantVoltageD.png new file mode 100644 index 0000000000..2809a2eb9b Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ConstantVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ConstantVoltageI.png b/help/Modelica.Electrical.Analog.Sources.ConstantVoltageI.png new file mode 100644 index 0000000000..80b0218e9a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ConstantVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExpSineCurrentD.png b/help/Modelica.Electrical.Analog.Sources.ExpSineCurrentD.png new file mode 100644 index 0000000000..375f2221e4 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExpSineCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExpSineCurrentI.png b/help/Modelica.Electrical.Analog.Sources.ExpSineCurrentI.png new file mode 100644 index 0000000000..bb5ada59d4 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExpSineCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExpSineVoltageD.png b/help/Modelica.Electrical.Analog.Sources.ExpSineVoltageD.png new file mode 100644 index 0000000000..cdae19cde0 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExpSineVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExpSineVoltageI.png b/help/Modelica.Electrical.Analog.Sources.ExpSineVoltageI.png new file mode 100644 index 0000000000..6825fc3932 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExpSineVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentD.png b/help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentD.png new file mode 100644 index 0000000000..25e7b966d0 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentI.png b/help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentI.png new file mode 100644 index 0000000000..349e5ab402 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExponentialsCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageD.png b/help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageD.png new file mode 100644 index 0000000000..82660bcce6 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageI.png b/help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageI.png new file mode 100644 index 0000000000..06d68b9311 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.ExponentialsVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.PulseCurrentD.png b/help/Modelica.Electrical.Analog.Sources.PulseCurrentD.png new file mode 100644 index 0000000000..bb0e1b8437 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.PulseCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.PulseCurrentI.png b/help/Modelica.Electrical.Analog.Sources.PulseCurrentI.png new file mode 100644 index 0000000000..11d7458019 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.PulseCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.PulseVoltageD.png b/help/Modelica.Electrical.Analog.Sources.PulseVoltageD.png new file mode 100644 index 0000000000..fefa616b8a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.PulseVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.PulseVoltageI.png b/help/Modelica.Electrical.Analog.Sources.PulseVoltageI.png new file mode 100644 index 0000000000..26b7a438bc Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.PulseVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.RampCurrentD.png b/help/Modelica.Electrical.Analog.Sources.RampCurrentD.png new file mode 100644 index 0000000000..0999b70ad8 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.RampCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.RampCurrentI.png b/help/Modelica.Electrical.Analog.Sources.RampCurrentI.png new file mode 100644 index 0000000000..748cb113a6 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.RampCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.RampVoltageD.png b/help/Modelica.Electrical.Analog.Sources.RampVoltageD.png new file mode 100644 index 0000000000..050aa5fd6b Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.RampVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.RampVoltageI.png b/help/Modelica.Electrical.Analog.Sources.RampVoltageI.png new file mode 100644 index 0000000000..227815474f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.RampVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SawToothCurrentD.png b/help/Modelica.Electrical.Analog.Sources.SawToothCurrentD.png new file mode 100644 index 0000000000..52d95507a4 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SawToothCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SawToothCurrentI.png b/help/Modelica.Electrical.Analog.Sources.SawToothCurrentI.png new file mode 100644 index 0000000000..97c4d37870 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SawToothCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SawToothVoltageD.png b/help/Modelica.Electrical.Analog.Sources.SawToothVoltageD.png new file mode 100644 index 0000000000..3bf97e6b58 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SawToothVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SawToothVoltageI.png b/help/Modelica.Electrical.Analog.Sources.SawToothVoltageI.png new file mode 100644 index 0000000000..adb2cdd65f Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SawToothVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SignalCurrentD.png b/help/Modelica.Electrical.Analog.Sources.SignalCurrentD.png new file mode 100644 index 0000000000..5f44516882 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SignalCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SignalCurrentI.png b/help/Modelica.Electrical.Analog.Sources.SignalCurrentI.png new file mode 100644 index 0000000000..f08a8130d9 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SignalCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SignalVoltageD.png b/help/Modelica.Electrical.Analog.Sources.SignalVoltageD.png new file mode 100644 index 0000000000..5f44516882 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SignalVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SignalVoltageI.png b/help/Modelica.Electrical.Analog.Sources.SignalVoltageI.png new file mode 100644 index 0000000000..734417a961 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SignalVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SineCurrentD.png b/help/Modelica.Electrical.Analog.Sources.SineCurrentD.png new file mode 100644 index 0000000000..bd85108c54 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SineCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SineCurrentI.png b/help/Modelica.Electrical.Analog.Sources.SineCurrentI.png new file mode 100644 index 0000000000..6445170c7a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SineCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SineVoltageD.png b/help/Modelica.Electrical.Analog.Sources.SineVoltageD.png new file mode 100644 index 0000000000..e049a1c2cc Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SineVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.SineVoltageI.png b/help/Modelica.Electrical.Analog.Sources.SineVoltageI.png new file mode 100644 index 0000000000..8f5f1304fd Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.SineVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.StepCurrentD.png b/help/Modelica.Electrical.Analog.Sources.StepCurrentD.png new file mode 100644 index 0000000000..2cedf31be2 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.StepCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.StepCurrentI.png b/help/Modelica.Electrical.Analog.Sources.StepCurrentI.png new file mode 100644 index 0000000000..3133304f9e Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.StepCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.StepVoltageD.png b/help/Modelica.Electrical.Analog.Sources.StepVoltageD.png new file mode 100644 index 0000000000..8034cfbc27 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.StepVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.StepVoltageI.png b/help/Modelica.Electrical.Analog.Sources.StepVoltageI.png new file mode 100644 index 0000000000..3dfcdcae54 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.StepVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TableCurrentD.png b/help/Modelica.Electrical.Analog.Sources.TableCurrentD.png new file mode 100644 index 0000000000..9394ae696a Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TableCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TableCurrentI.png b/help/Modelica.Electrical.Analog.Sources.TableCurrentI.png new file mode 100644 index 0000000000..6df9c156db Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TableCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TableVoltageD.png b/help/Modelica.Electrical.Analog.Sources.TableVoltageD.png new file mode 100644 index 0000000000..2a7b508cd1 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TableVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TableVoltageI.png b/help/Modelica.Electrical.Analog.Sources.TableVoltageI.png new file mode 100644 index 0000000000..8bf78e85ea Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TableVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentD.png b/help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentD.png new file mode 100644 index 0000000000..a8b3ffdef2 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentI.png b/help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentI.png new file mode 100644 index 0000000000..5b9b5f67e8 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TrapezoidCurrentI.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageD.png b/help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageD.png new file mode 100644 index 0000000000..6066d1b4c5 Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageD.png differ diff --git a/help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageI.png b/help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageI.png new file mode 100644 index 0000000000..781690c9eb Binary files /dev/null and b/help/Modelica.Electrical.Analog.Sources.TrapezoidVoltageI.png differ diff --git a/help/Modelica.Electrical.Analog.SourcesI.png b/help/Modelica.Electrical.Analog.SourcesI.png new file mode 100644 index 0000000000..6f8077827b Binary files /dev/null and b/help/Modelica.Electrical.Analog.SourcesI.png differ diff --git a/help/Modelica.Electrical.AnalogI.png b/help/Modelica.Electrical.AnalogI.png new file mode 100644 index 0000000000..606def0e5a Binary files /dev/null and b/help/Modelica.Electrical.AnalogI.png differ diff --git a/help/Modelica.ElectricalI.png b/help/Modelica.ElectricalI.png new file mode 100644 index 0000000000..afb063d895 Binary files /dev/null and b/help/Modelica.ElectricalI.png differ diff --git a/help/Modelica.Icons.EnumerationI.png b/help/Modelica.Icons.EnumerationI.png new file mode 100644 index 0000000000..b5667fed64 Binary files /dev/null and b/help/Modelica.Icons.EnumerationI.png differ diff --git a/help/Modelica.Icons.ExampleI.png b/help/Modelica.Icons.ExampleI.png new file mode 100644 index 0000000000..5ef64e2b96 Binary files /dev/null and b/help/Modelica.Icons.ExampleI.png differ diff --git a/help/Modelica.Icons.FunctionI.png b/help/Modelica.Icons.FunctionI.png new file mode 100644 index 0000000000..f1d52820fb Binary files /dev/null and b/help/Modelica.Icons.FunctionI.png differ diff --git a/help/Modelica.Icons.GearIconI.png b/help/Modelica.Icons.GearIconI.png new file mode 100644 index 0000000000..246f862634 Binary files /dev/null and b/help/Modelica.Icons.GearIconI.png differ diff --git a/help/Modelica.Icons.InfoD.png b/help/Modelica.Icons.InfoD.png new file mode 100644 index 0000000000..e2a794fb1b Binary files /dev/null and b/help/Modelica.Icons.InfoD.png differ diff --git a/help/Modelica.Icons.InfoI.png b/help/Modelica.Icons.InfoI.png new file mode 100644 index 0000000000..712866b7ce Binary files /dev/null and b/help/Modelica.Icons.InfoI.png differ diff --git a/help/Modelica.Icons.Library2I.png b/help/Modelica.Icons.Library2I.png new file mode 100644 index 0000000000..325fdfda1d Binary files /dev/null and b/help/Modelica.Icons.Library2I.png differ diff --git a/help/Modelica.Icons.LibraryI.png b/help/Modelica.Icons.LibraryI.png new file mode 100644 index 0000000000..80a8e3a5e0 Binary files /dev/null and b/help/Modelica.Icons.LibraryI.png differ diff --git a/help/Modelica.Icons.MotorIconI.png b/help/Modelica.Icons.MotorIconI.png new file mode 100644 index 0000000000..df6b1cba62 Binary files /dev/null and b/help/Modelica.Icons.MotorIconI.png differ diff --git a/help/Modelica.Icons.RecordI.png b/help/Modelica.Icons.RecordI.png new file mode 100644 index 0000000000..db7ade5d1c Binary files /dev/null and b/help/Modelica.Icons.RecordI.png differ diff --git a/help/Modelica.Icons.RotationalSensorD.png b/help/Modelica.Icons.RotationalSensorD.png new file mode 100644 index 0000000000..90342e0182 Binary files /dev/null and b/help/Modelica.Icons.RotationalSensorD.png differ diff --git a/help/Modelica.Icons.RotationalSensorI.png b/help/Modelica.Icons.RotationalSensorI.png new file mode 100644 index 0000000000..1826102836 Binary files /dev/null and b/help/Modelica.Icons.RotationalSensorI.png differ diff --git a/help/Modelica.Icons.TranslationalSensorD.png b/help/Modelica.Icons.TranslationalSensorD.png new file mode 100644 index 0000000000..24182ff049 Binary files /dev/null and b/help/Modelica.Icons.TranslationalSensorD.png differ diff --git a/help/Modelica.Icons.TranslationalSensorI.png b/help/Modelica.Icons.TranslationalSensorI.png new file mode 100644 index 0000000000..19914a3890 Binary files /dev/null and b/help/Modelica.Icons.TranslationalSensorI.png differ diff --git a/help/Modelica.IconsI.png b/help/Modelica.IconsI.png new file mode 100644 index 0000000000..35748b268c Binary files /dev/null and b/help/Modelica.IconsI.png differ diff --git a/help/Modelica.Math.acosD.png b/help/Modelica.Math.acosD.png new file mode 100644 index 0000000000..bdb3661a1b Binary files /dev/null and b/help/Modelica.Math.acosD.png differ diff --git a/help/Modelica.Math.acosI.png b/help/Modelica.Math.acosI.png new file mode 100644 index 0000000000..7ad467331f Binary files /dev/null and b/help/Modelica.Math.acosI.png differ diff --git a/help/Modelica.Math.asinD.png b/help/Modelica.Math.asinD.png new file mode 100644 index 0000000000..5c41e88a40 Binary files /dev/null and b/help/Modelica.Math.asinD.png differ diff --git a/help/Modelica.Math.asinI.png b/help/Modelica.Math.asinI.png new file mode 100644 index 0000000000..2a3fe22952 Binary files /dev/null and b/help/Modelica.Math.asinI.png differ diff --git a/help/Modelica.Math.atan2D.png b/help/Modelica.Math.atan2D.png new file mode 100644 index 0000000000..6f17909e4c Binary files /dev/null and b/help/Modelica.Math.atan2D.png differ diff --git a/help/Modelica.Math.atan2I.png b/help/Modelica.Math.atan2I.png new file mode 100644 index 0000000000..85ef4c4277 Binary files /dev/null and b/help/Modelica.Math.atan2I.png differ diff --git a/help/Modelica.Math.atanD.png b/help/Modelica.Math.atanD.png new file mode 100644 index 0000000000..f74dd958ce Binary files /dev/null and b/help/Modelica.Math.atanD.png differ diff --git a/help/Modelica.Math.atanI.png b/help/Modelica.Math.atanI.png new file mode 100644 index 0000000000..ed5d578e52 Binary files /dev/null and b/help/Modelica.Math.atanI.png differ diff --git a/help/Modelica.Math.baseIcon1D.png b/help/Modelica.Math.baseIcon1D.png new file mode 100644 index 0000000000..efd4cd7986 Binary files /dev/null and b/help/Modelica.Math.baseIcon1D.png differ diff --git a/help/Modelica.Math.baseIcon1I.png b/help/Modelica.Math.baseIcon1I.png new file mode 100644 index 0000000000..6ea116b4d9 Binary files /dev/null and b/help/Modelica.Math.baseIcon1I.png differ diff --git a/help/Modelica.Math.baseIcon2D.png b/help/Modelica.Math.baseIcon2D.png new file mode 100644 index 0000000000..efd4cd7986 Binary files /dev/null and b/help/Modelica.Math.baseIcon2D.png differ diff --git a/help/Modelica.Math.baseIcon2I.png b/help/Modelica.Math.baseIcon2I.png new file mode 100644 index 0000000000..3aee00698c Binary files /dev/null and b/help/Modelica.Math.baseIcon2I.png differ diff --git a/help/Modelica.Math.cosD.png b/help/Modelica.Math.cosD.png new file mode 100644 index 0000000000..50d75db9c1 Binary files /dev/null and b/help/Modelica.Math.cosD.png differ diff --git a/help/Modelica.Math.cosI.png b/help/Modelica.Math.cosI.png new file mode 100644 index 0000000000..d672463950 Binary files /dev/null and b/help/Modelica.Math.cosI.png differ diff --git a/help/Modelica.Math.coshD.png b/help/Modelica.Math.coshD.png new file mode 100644 index 0000000000..c4d7acc2e2 Binary files /dev/null and b/help/Modelica.Math.coshD.png differ diff --git a/help/Modelica.Math.coshI.png b/help/Modelica.Math.coshI.png new file mode 100644 index 0000000000..faada57da9 Binary files /dev/null and b/help/Modelica.Math.coshI.png differ diff --git a/help/Modelica.Math.expD.png b/help/Modelica.Math.expD.png new file mode 100644 index 0000000000..58b32a18cb Binary files /dev/null and b/help/Modelica.Math.expD.png differ diff --git a/help/Modelica.Math.expI.png b/help/Modelica.Math.expI.png new file mode 100644 index 0000000000..b51ef6c455 Binary files /dev/null and b/help/Modelica.Math.expI.png differ diff --git a/help/Modelica.Math.log10D.png b/help/Modelica.Math.log10D.png new file mode 100644 index 0000000000..8841a973ae Binary files /dev/null and b/help/Modelica.Math.log10D.png differ diff --git a/help/Modelica.Math.log10I.png b/help/Modelica.Math.log10I.png new file mode 100644 index 0000000000..e13d9f8f6b Binary files /dev/null and b/help/Modelica.Math.log10I.png differ diff --git a/help/Modelica.Math.logD.png b/help/Modelica.Math.logD.png new file mode 100644 index 0000000000..f3dbfe7d52 Binary files /dev/null and b/help/Modelica.Math.logD.png differ diff --git a/help/Modelica.Math.logI.png b/help/Modelica.Math.logI.png new file mode 100644 index 0000000000..f679e5f75f Binary files /dev/null and b/help/Modelica.Math.logI.png differ diff --git a/help/Modelica.Math.sinD.png b/help/Modelica.Math.sinD.png new file mode 100644 index 0000000000..f1d184b57d Binary files /dev/null and b/help/Modelica.Math.sinD.png differ diff --git a/help/Modelica.Math.sinI.png b/help/Modelica.Math.sinI.png new file mode 100644 index 0000000000..7c7711c8aa Binary files /dev/null and b/help/Modelica.Math.sinI.png differ diff --git a/help/Modelica.Math.sinhD.png b/help/Modelica.Math.sinhD.png new file mode 100644 index 0000000000..cf06d24492 Binary files /dev/null and b/help/Modelica.Math.sinhD.png differ diff --git a/help/Modelica.Math.sinhI.png b/help/Modelica.Math.sinhI.png new file mode 100644 index 0000000000..2ee4505db3 Binary files /dev/null and b/help/Modelica.Math.sinhI.png differ diff --git a/help/Modelica.Math.tanD.png b/help/Modelica.Math.tanD.png new file mode 100644 index 0000000000..85145a48fb Binary files /dev/null and b/help/Modelica.Math.tanD.png differ diff --git a/help/Modelica.Math.tanI.png b/help/Modelica.Math.tanI.png new file mode 100644 index 0000000000..1dd39ddddb Binary files /dev/null and b/help/Modelica.Math.tanI.png differ diff --git a/help/Modelica.Math.tanhD.png b/help/Modelica.Math.tanhD.png new file mode 100644 index 0000000000..3cc07270cc Binary files /dev/null and b/help/Modelica.Math.tanhD.png differ diff --git a/help/Modelica.Math.tanhI.png b/help/Modelica.Math.tanhI.png new file mode 100644 index 0000000000..94c4313465 Binary files /dev/null and b/help/Modelica.Math.tanhI.png differ diff --git a/help/Modelica.Math.tempInterpol1I.png b/help/Modelica.Math.tempInterpol1I.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Math.tempInterpol1I.png differ diff --git a/help/Modelica.Math.tempInterpol2I.png b/help/Modelica.Math.tempInterpol2I.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Math.tempInterpol2I.png differ diff --git a/help/Modelica.MathI.png b/help/Modelica.MathI.png new file mode 100644 index 0000000000..3cf8da4427 Binary files /dev/null and b/help/Modelica.MathI.png differ diff --git a/help/Modelica.Mechanics.Rotational.AccelerateD.png b/help/Modelica.Mechanics.Rotational.AccelerateD.png new file mode 100644 index 0000000000..402e78ff03 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.AccelerateD.png differ diff --git a/help/Modelica.Mechanics.Rotational.AccelerateI.png b/help/Modelica.Mechanics.Rotational.AccelerateI.png new file mode 100644 index 0000000000..6397d4e3bb Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.AccelerateI.png differ diff --git a/help/Modelica.Mechanics.Rotational.BearingFrictionD.png b/help/Modelica.Mechanics.Rotational.BearingFrictionD.png new file mode 100644 index 0000000000..b37d49cc8f Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.BearingFrictionD.png differ diff --git a/help/Modelica.Mechanics.Rotational.BearingFrictionI.png b/help/Modelica.Mechanics.Rotational.BearingFrictionI.png new file mode 100644 index 0000000000..6aebabf85e Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.BearingFrictionI.png differ diff --git a/help/Modelica.Mechanics.Rotational.BrakeD.png b/help/Modelica.Mechanics.Rotational.BrakeD.png new file mode 100644 index 0000000000..83d28acd41 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.BrakeD.png differ diff --git a/help/Modelica.Mechanics.Rotational.BrakeI.png b/help/Modelica.Mechanics.Rotational.BrakeI.png new file mode 100644 index 0000000000..7575fb22b2 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.BrakeI.png differ diff --git a/help/Modelica.Mechanics.Rotational.ClutchD.png b/help/Modelica.Mechanics.Rotational.ClutchD.png new file mode 100644 index 0000000000..c55a33cd14 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.ClutchD.png differ diff --git a/help/Modelica.Mechanics.Rotational.ClutchI.png b/help/Modelica.Mechanics.Rotational.ClutchI.png new file mode 100644 index 0000000000..a5209805d0 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.ClutchI.png differ diff --git a/help/Modelica.Mechanics.Rotational.DamperD.png b/help/Modelica.Mechanics.Rotational.DamperD.png new file mode 100644 index 0000000000..d9dc09fff3 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.DamperD.png differ diff --git a/help/Modelica.Mechanics.Rotational.DamperI.png b/help/Modelica.Mechanics.Rotational.DamperI.png new file mode 100644 index 0000000000..c320a899de Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.DamperI.png differ diff --git a/help/Modelica.Mechanics.Rotational.ElastoBacklashD.png b/help/Modelica.Mechanics.Rotational.ElastoBacklashD.png new file mode 100644 index 0000000000..db6413849c Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.ElastoBacklashD.png differ diff --git a/help/Modelica.Mechanics.Rotational.ElastoBacklashI.png b/help/Modelica.Mechanics.Rotational.ElastoBacklashI.png new file mode 100644 index 0000000000..51279d3553 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.ElastoBacklashI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesD.png b/help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesD.png new file mode 100644 index 0000000000..24984ee7fc Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesI.png b/help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesI.png new file mode 100644 index 0000000000..3bf0036eda Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.CoupledClutchesI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.FirstD.png b/help/Modelica.Mechanics.Rotational.Examples.FirstD.png new file mode 100644 index 0000000000..a156213715 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.FirstD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.FirstI.png b/help/Modelica.Mechanics.Rotational.Examples.FirstI.png new file mode 100644 index 0000000000..69d0edb78c Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.FirstI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.FrictionD.png b/help/Modelica.Mechanics.Rotational.Examples.FrictionD.png new file mode 100644 index 0000000000..9f14934fdf Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.FrictionD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.FrictionI.png b/help/Modelica.Mechanics.Rotational.Examples.FrictionI.png new file mode 100644 index 0000000000..73d841a1e0 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.FrictionI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1D.png b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1D.png new file mode 100644 index 0000000000..165bd3dd36 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1D.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1I.png b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1I.png new file mode 100644 index 0000000000..e9b3f4f0e9 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo1I.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2D.png b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2D.png new file mode 100644 index 0000000000..531093e25d Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2D.png differ diff --git a/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2I.png b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2I.png new file mode 100644 index 0000000000..e9b3f4f0e9 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Examples.LossyGearDemo2I.png differ diff --git a/help/Modelica.Mechanics.Rotational.ExamplesI.png b/help/Modelica.Mechanics.Rotational.ExamplesI.png new file mode 100644 index 0000000000..daac49c1a0 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.ExamplesI.png differ diff --git a/help/Modelica.Mechanics.Rotational.FixedD.png b/help/Modelica.Mechanics.Rotational.FixedD.png new file mode 100644 index 0000000000..e1f02e8920 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.FixedD.png differ diff --git a/help/Modelica.Mechanics.Rotational.FixedI.png b/help/Modelica.Mechanics.Rotational.FixedI.png new file mode 100644 index 0000000000..43e0e3e862 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.FixedI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Gear2D.png b/help/Modelica.Mechanics.Rotational.Gear2D.png new file mode 100644 index 0000000000..c5097a99c1 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Gear2D.png differ diff --git a/help/Modelica.Mechanics.Rotational.Gear2I.png b/help/Modelica.Mechanics.Rotational.Gear2I.png new file mode 100644 index 0000000000..10e70b1357 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Gear2I.png differ diff --git a/help/Modelica.Mechanics.Rotational.GearD.png b/help/Modelica.Mechanics.Rotational.GearD.png new file mode 100644 index 0000000000..2c1f9d2200 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.GearD.png differ diff --git a/help/Modelica.Mechanics.Rotational.GearEfficiencyD.png b/help/Modelica.Mechanics.Rotational.GearEfficiencyD.png new file mode 100644 index 0000000000..2a9bb8e6a4 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.GearEfficiencyD.png differ diff --git a/help/Modelica.Mechanics.Rotational.GearEfficiencyI.png b/help/Modelica.Mechanics.Rotational.GearEfficiencyI.png new file mode 100644 index 0000000000..1d0a687baf Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.GearEfficiencyI.png differ diff --git a/help/Modelica.Mechanics.Rotational.GearI.png b/help/Modelica.Mechanics.Rotational.GearI.png new file mode 100644 index 0000000000..fe0c0a23de Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.GearI.png differ diff --git a/help/Modelica.Mechanics.Rotational.IdealGearD.png b/help/Modelica.Mechanics.Rotational.IdealGearD.png new file mode 100644 index 0000000000..6766bd533e Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.IdealGearD.png differ diff --git a/help/Modelica.Mechanics.Rotational.IdealGearI.png b/help/Modelica.Mechanics.Rotational.IdealGearI.png new file mode 100644 index 0000000000..6464cabd1b Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.IdealGearI.png differ diff --git a/help/Modelica.Mechanics.Rotational.IdealGearR2TD.png b/help/Modelica.Mechanics.Rotational.IdealGearR2TD.png new file mode 100644 index 0000000000..d7be2e0c7b Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.IdealGearR2TD.png differ diff --git a/help/Modelica.Mechanics.Rotational.IdealGearR2TI.png b/help/Modelica.Mechanics.Rotational.IdealGearR2TI.png new file mode 100644 index 0000000000..9146fb4211 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.IdealGearR2TI.png differ diff --git a/help/Modelica.Mechanics.Rotational.IdealPlanetaryD.png b/help/Modelica.Mechanics.Rotational.IdealPlanetaryD.png new file mode 100644 index 0000000000..c203ad01b1 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.IdealPlanetaryD.png differ diff --git a/help/Modelica.Mechanics.Rotational.IdealPlanetaryI.png b/help/Modelica.Mechanics.Rotational.IdealPlanetaryI.png new file mode 100644 index 0000000000..637ac7a4d0 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.IdealPlanetaryI.png differ diff --git a/help/Modelica.Mechanics.Rotational.InertiaD.png b/help/Modelica.Mechanics.Rotational.InertiaD.png new file mode 100644 index 0000000000..38d7c14feb Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.InertiaD.png differ diff --git a/help/Modelica.Mechanics.Rotational.InertiaI.png b/help/Modelica.Mechanics.Rotational.InertiaI.png new file mode 100644 index 0000000000..90c3b235c9 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.InertiaI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorD.png b/help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorD.png new file mode 100644 index 0000000000..2626bbccb1 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorI.png b/help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorI.png new file mode 100644 index 0000000000..d89544509f Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.CompliantD.png b/help/Modelica.Mechanics.Rotational.Interfaces.CompliantD.png new file mode 100644 index 0000000000..b539862e29 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.CompliantD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.CompliantI.png b/help/Modelica.Mechanics.Rotational.Interfaces.CompliantI.png new file mode 100644 index 0000000000..df9fcc6e0d Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.CompliantI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.Flange_aD.png b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_aD.png new file mode 100644 index 0000000000..d59432523f Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_aD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.Flange_aI.png b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_aI.png new file mode 100644 index 0000000000..6bb78b497a Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_aI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.Flange_bD.png b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_bD.png new file mode 100644 index 0000000000..39c473f7f1 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_bD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.Flange_bI.png b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_bI.png new file mode 100644 index 0000000000..a0018ff06b Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.Flange_bI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.FrictionBaseI.png b/help/Modelica.Mechanics.Rotational.Interfaces.FrictionBaseI.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.FrictionBaseI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorD.png b/help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorD.png new file mode 100644 index 0000000000..b960d3a754 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorI.png b/help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorI.png new file mode 100644 index 0000000000..99bff0c097 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.RelativeSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.RigidD.png b/help/Modelica.Mechanics.Rotational.Interfaces.RigidD.png new file mode 100644 index 0000000000..b539862e29 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.RigidD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.RigidI.png b/help/Modelica.Mechanics.Rotational.Interfaces.RigidI.png new file mode 100644 index 0000000000..df9fcc6e0d Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.RigidI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesD.png b/help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesD.png new file mode 100644 index 0000000000..b539862e29 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesI.png b/help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesI.png new file mode 100644 index 0000000000..df9fcc6e0d Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Interfaces.TwoFlangesI.png differ diff --git a/help/Modelica.Mechanics.Rotational.InterfacesI.png b/help/Modelica.Mechanics.Rotational.InterfacesI.png new file mode 100644 index 0000000000..c4dcd63046 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.InterfacesI.png differ diff --git a/help/Modelica.Mechanics.Rotational.LossyGearD.png b/help/Modelica.Mechanics.Rotational.LossyGearD.png new file mode 100644 index 0000000000..6766bd533e Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.LossyGearD.png differ diff --git a/help/Modelica.Mechanics.Rotational.LossyGearI.png b/help/Modelica.Mechanics.Rotational.LossyGearI.png new file mode 100644 index 0000000000..32c9106f27 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.LossyGearI.png differ diff --git a/help/Modelica.Mechanics.Rotational.MoveD.png b/help/Modelica.Mechanics.Rotational.MoveD.png new file mode 100644 index 0000000000..c7073d6a33 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.MoveD.png differ diff --git a/help/Modelica.Mechanics.Rotational.MoveI.png b/help/Modelica.Mechanics.Rotational.MoveI.png new file mode 100644 index 0000000000..beeee1a5a7 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.MoveI.png differ diff --git a/help/Modelica.Mechanics.Rotational.OneWayClutchD.png b/help/Modelica.Mechanics.Rotational.OneWayClutchD.png new file mode 100644 index 0000000000..4aa4438cfb Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.OneWayClutchD.png differ diff --git a/help/Modelica.Mechanics.Rotational.OneWayClutchI.png b/help/Modelica.Mechanics.Rotational.OneWayClutchI.png new file mode 100644 index 0000000000..4c38be835b Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.OneWayClutchI.png differ diff --git a/help/Modelica.Mechanics.Rotational.PositionD.png b/help/Modelica.Mechanics.Rotational.PositionD.png new file mode 100644 index 0000000000..d617cb07f9 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.PositionD.png differ diff --git a/help/Modelica.Mechanics.Rotational.PositionI.png b/help/Modelica.Mechanics.Rotational.PositionI.png new file mode 100644 index 0000000000..a2c8e0b7a0 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.PositionI.png differ diff --git a/help/Modelica.Mechanics.Rotational.RelativeStatesD.png b/help/Modelica.Mechanics.Rotational.RelativeStatesD.png new file mode 100644 index 0000000000..123e96f754 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.RelativeStatesD.png differ diff --git a/help/Modelica.Mechanics.Rotational.RelativeStatesI.png b/help/Modelica.Mechanics.Rotational.RelativeStatesI.png new file mode 100644 index 0000000000..81a6a19e24 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.RelativeStatesI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.AccSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.AccSensorD.png new file mode 100644 index 0000000000..64050a4000 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.AccSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.AccSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.AccSensorI.png new file mode 100644 index 0000000000..b17adbadf5 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.AccSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.AngleSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.AngleSensorD.png new file mode 100644 index 0000000000..59cd93f0b0 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.AngleSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.AngleSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.AngleSensorI.png new file mode 100644 index 0000000000..7878b0982c Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.AngleSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorD.png new file mode 100644 index 0000000000..e228d869c3 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorI.png new file mode 100644 index 0000000000..e9bea4a1a5 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.RelAccSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorD.png new file mode 100644 index 0000000000..7d32555595 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorI.png new file mode 100644 index 0000000000..af3acabb5d Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.RelAngleSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorD.png new file mode 100644 index 0000000000..3c67a99116 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorI.png new file mode 100644 index 0000000000..73e316a993 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.RelSpeedSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorD.png new file mode 100644 index 0000000000..2bae4bb4d4 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorI.png new file mode 100644 index 0000000000..83e1b857e7 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.SpeedSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorD.png b/help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorD.png new file mode 100644 index 0000000000..aedc8b3743 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorD.png differ diff --git a/help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorI.png b/help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorI.png new file mode 100644 index 0000000000..02a91c8c78 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.Sensors.TorqueSensorI.png differ diff --git a/help/Modelica.Mechanics.Rotational.SensorsI.png b/help/Modelica.Mechanics.Rotational.SensorsI.png new file mode 100644 index 0000000000..6c04e6c711 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.SensorsI.png differ diff --git a/help/Modelica.Mechanics.Rotational.SpringD.png b/help/Modelica.Mechanics.Rotational.SpringD.png new file mode 100644 index 0000000000..d0676af8ff Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.SpringD.png differ diff --git a/help/Modelica.Mechanics.Rotational.SpringDamperD.png b/help/Modelica.Mechanics.Rotational.SpringDamperD.png new file mode 100644 index 0000000000..e7e6f49cb2 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.SpringDamperD.png differ diff --git a/help/Modelica.Mechanics.Rotational.SpringDamperI.png b/help/Modelica.Mechanics.Rotational.SpringDamperI.png new file mode 100644 index 0000000000..e90e3a493e Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.SpringDamperI.png differ diff --git a/help/Modelica.Mechanics.Rotational.SpringI.png b/help/Modelica.Mechanics.Rotational.SpringI.png new file mode 100644 index 0000000000..b81d0e9f91 Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.SpringI.png differ diff --git a/help/Modelica.Mechanics.Rotational.TorqueD.png b/help/Modelica.Mechanics.Rotational.TorqueD.png new file mode 100644 index 0000000000..f03b0afc6b Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.TorqueD.png differ diff --git a/help/Modelica.Mechanics.Rotational.TorqueI.png b/help/Modelica.Mechanics.Rotational.TorqueI.png new file mode 100644 index 0000000000..950615d8bf Binary files /dev/null and b/help/Modelica.Mechanics.Rotational.TorqueI.png differ diff --git a/help/Modelica.Mechanics.RotationalI.png b/help/Modelica.Mechanics.RotationalI.png new file mode 100644 index 0000000000..d15f3f5971 Binary files /dev/null and b/help/Modelica.Mechanics.RotationalI.png differ diff --git a/help/Modelica.Mechanics.Translational.AccelerateD.png b/help/Modelica.Mechanics.Translational.AccelerateD.png new file mode 100644 index 0000000000..ef0cf32f77 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.AccelerateD.png differ diff --git a/help/Modelica.Mechanics.Translational.AccelerateI.png b/help/Modelica.Mechanics.Translational.AccelerateI.png new file mode 100644 index 0000000000..e8edb05065 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.AccelerateI.png differ diff --git a/help/Modelica.Mechanics.Translational.DamperD.png b/help/Modelica.Mechanics.Translational.DamperD.png new file mode 100644 index 0000000000..1d5ed5d06e Binary files /dev/null and b/help/Modelica.Mechanics.Translational.DamperD.png differ diff --git a/help/Modelica.Mechanics.Translational.DamperI.png b/help/Modelica.Mechanics.Translational.DamperI.png new file mode 100644 index 0000000000..7ec069b57a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.DamperI.png differ diff --git a/help/Modelica.Mechanics.Translational.ElastoGapD.png b/help/Modelica.Mechanics.Translational.ElastoGapD.png new file mode 100644 index 0000000000..1620b67de7 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.ElastoGapD.png differ diff --git a/help/Modelica.Mechanics.Translational.ElastoGapI.png b/help/Modelica.Mechanics.Translational.ElastoGapI.png new file mode 100644 index 0000000000..6e17f4976a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.ElastoGapI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.AccelerateD.png b/help/Modelica.Mechanics.Translational.Examples.AccelerateD.png new file mode 100644 index 0000000000..0ed8444948 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.AccelerateD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.AccelerateI.png b/help/Modelica.Mechanics.Translational.Examples.AccelerateI.png new file mode 100644 index 0000000000..6743c3115f Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.AccelerateI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.DamperD.png b/help/Modelica.Mechanics.Translational.Examples.DamperD.png new file mode 100644 index 0000000000..be16c9dced Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.DamperD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.DamperI.png b/help/Modelica.Mechanics.Translational.Examples.DamperI.png new file mode 100644 index 0000000000..31ed2be30b Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.DamperI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.FrictionD.png b/help/Modelica.Mechanics.Translational.Examples.FrictionD.png new file mode 100644 index 0000000000..1eb7cfd5bf Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.FrictionD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.FrictionI.png b/help/Modelica.Mechanics.Translational.Examples.FrictionI.png new file mode 100644 index 0000000000..73d841a1e0 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.FrictionI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.InitialConditionsD.png b/help/Modelica.Mechanics.Translational.Examples.InitialConditionsD.png new file mode 100644 index 0000000000..ed38570690 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.InitialConditionsD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.InitialConditionsI.png b/help/Modelica.Mechanics.Translational.Examples.InitialConditionsI.png new file mode 100644 index 0000000000..12fc12d09a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.InitialConditionsI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.OscillatorD.png b/help/Modelica.Mechanics.Translational.Examples.OscillatorD.png new file mode 100644 index 0000000000..72291666f1 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.OscillatorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.OscillatorI.png b/help/Modelica.Mechanics.Translational.Examples.OscillatorI.png new file mode 100644 index 0000000000..23196cb8bf Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.OscillatorI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.PreLoadD.png b/help/Modelica.Mechanics.Translational.Examples.PreLoadD.png new file mode 100644 index 0000000000..319ed9b31c Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.PreLoadD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.PreLoadI.png b/help/Modelica.Mechanics.Translational.Examples.PreLoadI.png new file mode 100644 index 0000000000..a31ac18cf0 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.PreLoadI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.SensorsD.png b/help/Modelica.Mechanics.Translational.Examples.SensorsD.png new file mode 100644 index 0000000000..38a1d49e06 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.SensorsD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.SensorsI.png b/help/Modelica.Mechanics.Translational.Examples.SensorsI.png new file mode 100644 index 0000000000..c75a647a52 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.SensorsI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.SignConventionD.png b/help/Modelica.Mechanics.Translational.Examples.SignConventionD.png new file mode 100644 index 0000000000..1a9c3cb3fd Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.SignConventionD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.SignConventionI.png b/help/Modelica.Mechanics.Translational.Examples.SignConventionI.png new file mode 100644 index 0000000000..86beb2f438 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.SignConventionI.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.WhyArrowsD.png b/help/Modelica.Mechanics.Translational.Examples.WhyArrowsD.png new file mode 100644 index 0000000000..2bf9e4130a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.WhyArrowsD.png differ diff --git a/help/Modelica.Mechanics.Translational.Examples.WhyArrowsI.png b/help/Modelica.Mechanics.Translational.Examples.WhyArrowsI.png new file mode 100644 index 0000000000..2952edea94 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Examples.WhyArrowsI.png differ diff --git a/help/Modelica.Mechanics.Translational.ExamplesI.png b/help/Modelica.Mechanics.Translational.ExamplesI.png new file mode 100644 index 0000000000..daac49c1a0 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.ExamplesI.png differ diff --git a/help/Modelica.Mechanics.Translational.FixedD.png b/help/Modelica.Mechanics.Translational.FixedD.png new file mode 100644 index 0000000000..a9b493e296 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.FixedD.png differ diff --git a/help/Modelica.Mechanics.Translational.FixedI.png b/help/Modelica.Mechanics.Translational.FixedI.png new file mode 100644 index 0000000000..a4e0b8db7c Binary files /dev/null and b/help/Modelica.Mechanics.Translational.FixedI.png differ diff --git a/help/Modelica.Mechanics.Translational.ForceD.png b/help/Modelica.Mechanics.Translational.ForceD.png new file mode 100644 index 0000000000..344baa9a1a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.ForceD.png differ diff --git a/help/Modelica.Mechanics.Translational.ForceI.png b/help/Modelica.Mechanics.Translational.ForceI.png new file mode 100644 index 0000000000..b21eb7a59a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.ForceI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorD.png b/help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorD.png new file mode 100644 index 0000000000..43cce1a3f7 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorI.png b/help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorI.png new file mode 100644 index 0000000000..54aa450e4d Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.AbsoluteSensorI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.CompliantD.png b/help/Modelica.Mechanics.Translational.Interfaces.CompliantD.png new file mode 100644 index 0000000000..e94be6accb Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.CompliantD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.CompliantI.png b/help/Modelica.Mechanics.Translational.Interfaces.CompliantI.png new file mode 100644 index 0000000000..39c8e05f8a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.CompliantI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.Flange_aD.png b/help/Modelica.Mechanics.Translational.Interfaces.Flange_aD.png new file mode 100644 index 0000000000..f792f988f4 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.Flange_aD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.Flange_aI.png b/help/Modelica.Mechanics.Translational.Interfaces.Flange_aI.png new file mode 100644 index 0000000000..0418a39aa1 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.Flange_aI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.Flange_bD.png b/help/Modelica.Mechanics.Translational.Interfaces.Flange_bD.png new file mode 100644 index 0000000000..a497567ed2 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.Flange_bD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.Flange_bI.png b/help/Modelica.Mechanics.Translational.Interfaces.Flange_bI.png new file mode 100644 index 0000000000..70d3b570cb Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.Flange_bI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseD.png b/help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseD.png new file mode 100644 index 0000000000..f2427c233d Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseI.png b/help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseI.png new file mode 100644 index 0000000000..39c8e05f8a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.FrictionBaseI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorD.png b/help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorD.png new file mode 100644 index 0000000000..e97e2d3696 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorI.png b/help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorI.png new file mode 100644 index 0000000000..0ce59645a3 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.RelativeSensorI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.RigidD.png b/help/Modelica.Mechanics.Translational.Interfaces.RigidD.png new file mode 100644 index 0000000000..f2427c233d Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.RigidD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.RigidI.png b/help/Modelica.Mechanics.Translational.Interfaces.RigidI.png new file mode 100644 index 0000000000..39c8e05f8a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.RigidI.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesD.png b/help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesD.png new file mode 100644 index 0000000000..f2427c233d Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesD.png differ diff --git a/help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesI.png b/help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesI.png new file mode 100644 index 0000000000..39c8e05f8a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Interfaces.TwoFlangesI.png differ diff --git a/help/Modelica.Mechanics.Translational.InterfacesI.png b/help/Modelica.Mechanics.Translational.InterfacesI.png new file mode 100644 index 0000000000..c4dcd63046 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.InterfacesI.png differ diff --git a/help/Modelica.Mechanics.Translational.MoveD.png b/help/Modelica.Mechanics.Translational.MoveD.png new file mode 100644 index 0000000000..701c61c4f1 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.MoveD.png differ diff --git a/help/Modelica.Mechanics.Translational.MoveI.png b/help/Modelica.Mechanics.Translational.MoveI.png new file mode 100644 index 0000000000..890666b4e2 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.MoveI.png differ diff --git a/help/Modelica.Mechanics.Translational.PositionD.png b/help/Modelica.Mechanics.Translational.PositionD.png new file mode 100644 index 0000000000..4d16f29263 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.PositionD.png differ diff --git a/help/Modelica.Mechanics.Translational.PositionI.png b/help/Modelica.Mechanics.Translational.PositionI.png new file mode 100644 index 0000000000..9dfa6fc65b Binary files /dev/null and b/help/Modelica.Mechanics.Translational.PositionI.png differ diff --git a/help/Modelica.Mechanics.Translational.RelativeStatesD.png b/help/Modelica.Mechanics.Translational.RelativeStatesD.png new file mode 100644 index 0000000000..71205e2425 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.RelativeStatesD.png differ diff --git a/help/Modelica.Mechanics.Translational.RelativeStatesI.png b/help/Modelica.Mechanics.Translational.RelativeStatesI.png new file mode 100644 index 0000000000..e8f6252217 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.RelativeStatesI.png differ diff --git a/help/Modelica.Mechanics.Translational.RodD.png b/help/Modelica.Mechanics.Translational.RodD.png new file mode 100644 index 0000000000..6658e53401 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.RodD.png differ diff --git a/help/Modelica.Mechanics.Translational.RodI.png b/help/Modelica.Mechanics.Translational.RodI.png new file mode 100644 index 0000000000..299ed5ba3e Binary files /dev/null and b/help/Modelica.Mechanics.Translational.RodI.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.AccSensorD.png b/help/Modelica.Mechanics.Translational.Sensors.AccSensorD.png new file mode 100644 index 0000000000..7396f566cd Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.AccSensorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.AccSensorI.png b/help/Modelica.Mechanics.Translational.Sensors.AccSensorI.png new file mode 100644 index 0000000000..77c8ea7c68 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.AccSensorI.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.ForceSensorD.png b/help/Modelica.Mechanics.Translational.Sensors.ForceSensorD.png new file mode 100644 index 0000000000..0b33071338 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.ForceSensorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.ForceSensorI.png b/help/Modelica.Mechanics.Translational.Sensors.ForceSensorI.png new file mode 100644 index 0000000000..bf1f70e057 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.ForceSensorI.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.PositionSensorD.png b/help/Modelica.Mechanics.Translational.Sensors.PositionSensorD.png new file mode 100644 index 0000000000..7396f566cd Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.PositionSensorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.PositionSensorI.png b/help/Modelica.Mechanics.Translational.Sensors.PositionSensorI.png new file mode 100644 index 0000000000..334f2a8f41 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.PositionSensorI.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.SpeedSensorD.png b/help/Modelica.Mechanics.Translational.Sensors.SpeedSensorD.png new file mode 100644 index 0000000000..8ff6db1efa Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.SpeedSensorD.png differ diff --git a/help/Modelica.Mechanics.Translational.Sensors.SpeedSensorI.png b/help/Modelica.Mechanics.Translational.Sensors.SpeedSensorI.png new file mode 100644 index 0000000000..d990884331 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.Sensors.SpeedSensorI.png differ diff --git a/help/Modelica.Mechanics.Translational.SensorsI.png b/help/Modelica.Mechanics.Translational.SensorsI.png new file mode 100644 index 0000000000..6c04e6c711 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SensorsI.png differ diff --git a/help/Modelica.Mechanics.Translational.SlidingMassD.png b/help/Modelica.Mechanics.Translational.SlidingMassD.png new file mode 100644 index 0000000000..06dcf2cedf Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SlidingMassD.png differ diff --git a/help/Modelica.Mechanics.Translational.SlidingMassI.png b/help/Modelica.Mechanics.Translational.SlidingMassI.png new file mode 100644 index 0000000000..20496544c9 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SlidingMassI.png differ diff --git a/help/Modelica.Mechanics.Translational.SpringD.png b/help/Modelica.Mechanics.Translational.SpringD.png new file mode 100644 index 0000000000..ce6afe4900 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SpringD.png differ diff --git a/help/Modelica.Mechanics.Translational.SpringDamperD.png b/help/Modelica.Mechanics.Translational.SpringDamperD.png new file mode 100644 index 0000000000..9b71cea82a Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SpringDamperD.png differ diff --git a/help/Modelica.Mechanics.Translational.SpringDamperI.png b/help/Modelica.Mechanics.Translational.SpringDamperI.png new file mode 100644 index 0000000000..9a7b50165c Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SpringDamperI.png differ diff --git a/help/Modelica.Mechanics.Translational.SpringI.png b/help/Modelica.Mechanics.Translational.SpringI.png new file mode 100644 index 0000000000..50f040a3a8 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.SpringI.png differ diff --git a/help/Modelica.Mechanics.Translational.StopD.png b/help/Modelica.Mechanics.Translational.StopD.png new file mode 100644 index 0000000000..6912acd77e Binary files /dev/null and b/help/Modelica.Mechanics.Translational.StopD.png differ diff --git a/help/Modelica.Mechanics.Translational.StopI.png b/help/Modelica.Mechanics.Translational.StopI.png new file mode 100644 index 0000000000..2a9509f6b9 Binary files /dev/null and b/help/Modelica.Mechanics.Translational.StopI.png differ diff --git a/help/Modelica.Mechanics.TranslationalI.png b/help/Modelica.Mechanics.TranslationalI.png new file mode 100644 index 0000000000..056580f364 Binary files /dev/null and b/help/Modelica.Mechanics.TranslationalI.png differ diff --git a/help/Modelica.MechanicsI.png b/help/Modelica.MechanicsI.png new file mode 100644 index 0000000000..0ce6089cbb Binary files /dev/null and b/help/Modelica.MechanicsI.png differ diff --git a/help/Modelica.SIunits.Conversions.ConversionIconI.png b/help/Modelica.SIunits.Conversions.ConversionIconI.png new file mode 100644 index 0000000000..2ba6495117 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.ConversionIconI.png differ diff --git a/help/Modelica.SIunits.Conversions.NonSIunitsI.png b/help/Modelica.SIunits.Conversions.NonSIunitsI.png new file mode 100644 index 0000000000..5f3b9113c3 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.NonSIunitsI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_barI.png b/help/Modelica.SIunits.Conversions.from_barI.png new file mode 100644 index 0000000000..b5aac88cbd Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_barI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_dayI.png b/help/Modelica.SIunits.Conversions.from_dayI.png new file mode 100644 index 0000000000..2805502b24 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_dayI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_degCI.png b/help/Modelica.SIunits.Conversions.from_degCI.png new file mode 100644 index 0000000000..afe5c17120 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_degCI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_degFI.png b/help/Modelica.SIunits.Conversions.from_degFI.png new file mode 100644 index 0000000000..e1bf3140d3 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_degFI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_degI.png b/help/Modelica.SIunits.Conversions.from_degI.png new file mode 100644 index 0000000000..8e7b8749d1 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_degI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_degRkI.png b/help/Modelica.SIunits.Conversions.from_degRkI.png new file mode 100644 index 0000000000..ee2bba2631 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_degRkI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_gpsI.png b/help/Modelica.SIunits.Conversions.from_gpsI.png new file mode 100644 index 0000000000..d6882833a5 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_gpsI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_hourI.png b/help/Modelica.SIunits.Conversions.from_hourI.png new file mode 100644 index 0000000000..ee170c14da Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_hourI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_kWhI.png b/help/Modelica.SIunits.Conversions.from_kWhI.png new file mode 100644 index 0000000000..115782a12f Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_kWhI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_kmhI.png b/help/Modelica.SIunits.Conversions.from_kmhI.png new file mode 100644 index 0000000000..77aa1f2c83 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_kmhI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_litreI.png b/help/Modelica.SIunits.Conversions.from_litreI.png new file mode 100644 index 0000000000..4da99a646c Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_litreI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_minuteI.png b/help/Modelica.SIunits.Conversions.from_minuteI.png new file mode 100644 index 0000000000..d5466ffde1 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_minuteI.png differ diff --git a/help/Modelica.SIunits.Conversions.from_rpmI.png b/help/Modelica.SIunits.Conversions.from_rpmI.png new file mode 100644 index 0000000000..016ab16d46 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.from_rpmI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_barI.png b/help/Modelica.SIunits.Conversions.to_barI.png new file mode 100644 index 0000000000..5c4642328c Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_barI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_dayI.png b/help/Modelica.SIunits.Conversions.to_dayI.png new file mode 100644 index 0000000000..c272e15a1f Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_dayI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_degCI.png b/help/Modelica.SIunits.Conversions.to_degCI.png new file mode 100644 index 0000000000..2f171719be Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_degCI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_degFI.png b/help/Modelica.SIunits.Conversions.to_degFI.png new file mode 100644 index 0000000000..c528219214 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_degFI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_degI.png b/help/Modelica.SIunits.Conversions.to_degI.png new file mode 100644 index 0000000000..60de314744 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_degI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_degRkI.png b/help/Modelica.SIunits.Conversions.to_degRkI.png new file mode 100644 index 0000000000..a3bb17632b Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_degRkI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_gpsI.png b/help/Modelica.SIunits.Conversions.to_gpsI.png new file mode 100644 index 0000000000..99c4e19da5 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_gpsI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_hourI.png b/help/Modelica.SIunits.Conversions.to_hourI.png new file mode 100644 index 0000000000..a3c2113b6f Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_hourI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_kWhI.png b/help/Modelica.SIunits.Conversions.to_kWhI.png new file mode 100644 index 0000000000..e54f36713d Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_kWhI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_kmhI.png b/help/Modelica.SIunits.Conversions.to_kmhI.png new file mode 100644 index 0000000000..2b4d49ec2e Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_kmhI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_litreI.png b/help/Modelica.SIunits.Conversions.to_litreI.png new file mode 100644 index 0000000000..23147098b5 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_litreI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_minuteI.png b/help/Modelica.SIunits.Conversions.to_minuteI.png new file mode 100644 index 0000000000..ac38005b54 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_minuteI.png differ diff --git a/help/Modelica.SIunits.Conversions.to_rpmI.png b/help/Modelica.SIunits.Conversions.to_rpmI.png new file mode 100644 index 0000000000..9a9c28bfc0 Binary files /dev/null and b/help/Modelica.SIunits.Conversions.to_rpmI.png differ diff --git a/help/Modelica.SIunits.ConversionsI.png b/help/Modelica.SIunits.ConversionsI.png new file mode 100644 index 0000000000..cd26b5a874 Binary files /dev/null and b/help/Modelica.SIunits.ConversionsI.png differ diff --git a/help/Modelica.SIunitsD.png b/help/Modelica.SIunitsD.png new file mode 100644 index 0000000000..3be3337f97 Binary files /dev/null and b/help/Modelica.SIunitsD.png differ diff --git a/help/Modelica.SIunitsI.png b/help/Modelica.SIunitsI.png new file mode 100644 index 0000000000..ff1b176568 Binary files /dev/null and b/help/Modelica.SIunitsI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.BodyRadiationD.png b/help/Modelica.Thermal.HeatTransfer.BodyRadiationD.png new file mode 100644 index 0000000000..8ac3e84d1f Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.BodyRadiationD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.BodyRadiationI.png b/help/Modelica.Thermal.HeatTransfer.BodyRadiationI.png new file mode 100644 index 0000000000..c630b6f947 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.BodyRadiationI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureD.png new file mode 100644 index 0000000000..5de251ad4e Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureI.png new file mode 100644 index 0000000000..89652e769c Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.FixedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinD.png b/help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinD.png new file mode 100644 index 0000000000..f481e254c3 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinI.png b/help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinI.png new file mode 100644 index 0000000000..b250b221e8 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.FromKelvinI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureD.png new file mode 100644 index 0000000000..3a12951bb4 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureI.png new file mode 100644 index 0000000000..0ffbda2a7f Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.PrescribedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorD.png b/help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorD.png new file mode 100644 index 0000000000..add04c061a Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorI.png b/help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorI.png new file mode 100644 index 0000000000..5fd460935d Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.TemperatureSensorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinD.png b/help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinD.png new file mode 100644 index 0000000000..a5ccc979c9 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinI.png b/help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinI.png new file mode 100644 index 0000000000..4184e142d2 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Celsius.ToKelvinI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.CelsiusI.png b/help/Modelica.Thermal.HeatTransfer.CelsiusI.png new file mode 100644 index 0000000000..d3d4c6102e Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.CelsiusI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.ConvectionD.png b/help/Modelica.Thermal.HeatTransfer.ConvectionD.png new file mode 100644 index 0000000000..0f0dfee9c1 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.ConvectionD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.ConvectionI.png b/help/Modelica.Thermal.HeatTransfer.ConvectionI.png new file mode 100644 index 0000000000..45f4f53cf6 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.ConvectionI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerD.png b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerD.png new file mode 100644 index 0000000000..b638767fb3 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerI.png b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerI.png new file mode 100644 index 0000000000..e8e83bc049 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperature.SwitchControllerI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureD.png new file mode 100644 index 0000000000..9a4300f6c3 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureI.png new file mode 100644 index 0000000000..2d0733c028 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.ControlledTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterD.png b/help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterD.png new file mode 100644 index 0000000000..69dc31156c Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterI.png b/help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterI.png new file mode 100644 index 0000000000..9aa05ad888 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.FrequencyInverterI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesD.png b/help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesD.png new file mode 100644 index 0000000000..200fa8f5d9 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesI.png b/help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesI.png new file mode 100644 index 0000000000..405764e5eb Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Examples.TwoMassesI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.ExamplesI.png b/help/Modelica.Thermal.HeatTransfer.ExamplesI.png new file mode 100644 index 0000000000..daac49c1a0 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.ExamplesI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureD.png new file mode 100644 index 0000000000..a4e4844d8e Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureI.png new file mode 100644 index 0000000000..0002be79fd Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FixedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinD.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinD.png new file mode 100644 index 0000000000..dd88d6a643 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinI.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinI.png new file mode 100644 index 0000000000..92aa770b7b Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.FromKelvinI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureD.png new file mode 100644 index 0000000000..4e6af1dfa3 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureI.png new file mode 100644 index 0000000000..231bc14de6 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.PrescribedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorD.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorD.png new file mode 100644 index 0000000000..d41e7edfc8 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorI.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorI.png new file mode 100644 index 0000000000..e26c058cad Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.TemperatureSensorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinD.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinD.png new file mode 100644 index 0000000000..e0805a39c6 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinI.png b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinI.png new file mode 100644 index 0000000000..e77350d642 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Fahrenheit.ToKelvinI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.FahrenheitI.png b/help/Modelica.Thermal.HeatTransfer.FahrenheitI.png new file mode 100644 index 0000000000..e6bdbb300e Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.FahrenheitI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.FixedHeatFlowD.png b/help/Modelica.Thermal.HeatTransfer.FixedHeatFlowD.png new file mode 100644 index 0000000000..5a596fd2c7 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.FixedHeatFlowD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.FixedHeatFlowI.png b/help/Modelica.Thermal.HeatTransfer.FixedHeatFlowI.png new file mode 100644 index 0000000000..e914b9b008 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.FixedHeatFlowI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.FixedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.FixedTemperatureD.png new file mode 100644 index 0000000000..0934725699 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.FixedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.FixedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.FixedTemperatureI.png new file mode 100644 index 0000000000..3d772a8f3e Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.FixedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.HeatCapacitorD.png b/help/Modelica.Thermal.HeatTransfer.HeatCapacitorD.png new file mode 100644 index 0000000000..77044f32e0 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.HeatCapacitorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.HeatCapacitorI.png b/help/Modelica.Thermal.HeatTransfer.HeatCapacitorI.png new file mode 100644 index 0000000000..9fb9097ad8 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.HeatCapacitorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.HeatFlowSensorD.png b/help/Modelica.Thermal.HeatTransfer.HeatFlowSensorD.png new file mode 100644 index 0000000000..596187553e Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.HeatFlowSensorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.HeatFlowSensorI.png b/help/Modelica.Thermal.HeatTransfer.HeatFlowSensorI.png new file mode 100644 index 0000000000..b1fdaed95d Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.HeatFlowSensorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DD.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DD.png new file mode 100644 index 0000000000..1fd8d05d64 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DI.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DI.png new file mode 100644 index 0000000000..fb776c7fe5 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.Element1DI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPortI.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPortI.png new file mode 100644 index 0000000000..7345cd3ed7 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPortI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aD.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aD.png new file mode 100644 index 0000000000..c8be665508 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aI.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aI.png new file mode 100644 index 0000000000..71d65b1237 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bD.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bD.png new file mode 100644 index 0000000000..9d62bf7d65 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bI.png b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bI.png new file mode 100644 index 0000000000..9bffad6047 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.InterfacesI.png b/help/Modelica.Thermal.HeatTransfer.InterfacesI.png new file mode 100644 index 0000000000..c4dcd63046 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.InterfacesI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowD.png b/help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowD.png new file mode 100644 index 0000000000..a76445bf39 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowI.png b/help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowI.png new file mode 100644 index 0000000000..232e577720 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.PrescribedHeatFlowI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureD.png new file mode 100644 index 0000000000..9fb03b73d2 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureI.png new file mode 100644 index 0000000000..17d84306b5 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.PrescribedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureD.png new file mode 100644 index 0000000000..0da63dc1d9 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureI.png new file mode 100644 index 0000000000..93b5f2d5e6 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.FixedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinD.png b/help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinD.png new file mode 100644 index 0000000000..22a6706c2a Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinI.png b/help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinI.png new file mode 100644 index 0000000000..44eb2386ae Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.FromKelvinI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureD.png b/help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureD.png new file mode 100644 index 0000000000..42dd6336a6 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureI.png b/help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureI.png new file mode 100644 index 0000000000..cc5397b64b Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.PrescribedTemperatureI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorD.png b/help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorD.png new file mode 100644 index 0000000000..19fdd50c21 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorI.png b/help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorI.png new file mode 100644 index 0000000000..efe78e4214 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.TemperatureSensorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinD.png b/help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinD.png new file mode 100644 index 0000000000..bee74f2964 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinI.png b/help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinI.png new file mode 100644 index 0000000000..8c719fa960 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.Rankine.ToKelvinI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.RankineI.png b/help/Modelica.Thermal.HeatTransfer.RankineI.png new file mode 100644 index 0000000000..d0a94ecd3b Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.RankineI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorD.png b/help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorD.png new file mode 100644 index 0000000000..15a3ecfa0a Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorI.png b/help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorI.png new file mode 100644 index 0000000000..bffb4517ed Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.RelTemperatureSensorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.TemperatureSensorD.png b/help/Modelica.Thermal.HeatTransfer.TemperatureSensorD.png new file mode 100644 index 0000000000..6070c28a10 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.TemperatureSensorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.TemperatureSensorI.png b/help/Modelica.Thermal.HeatTransfer.TemperatureSensorI.png new file mode 100644 index 0000000000..675fe2fb42 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.TemperatureSensorI.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.ThermalConductorD.png b/help/Modelica.Thermal.HeatTransfer.ThermalConductorD.png new file mode 100644 index 0000000000..2b6ed6f2c4 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.ThermalConductorD.png differ diff --git a/help/Modelica.Thermal.HeatTransfer.ThermalConductorI.png b/help/Modelica.Thermal.HeatTransfer.ThermalConductorI.png new file mode 100644 index 0000000000..a46e119d56 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransfer.ThermalConductorI.png differ diff --git a/help/Modelica.Thermal.HeatTransferI.png b/help/Modelica.Thermal.HeatTransferI.png new file mode 100644 index 0000000000..27616a60c0 Binary files /dev/null and b/help/Modelica.Thermal.HeatTransferI.png differ diff --git a/help/Modelica.ThermalI.png b/help/Modelica.ThermalI.png new file mode 100644 index 0000000000..23bec9f951 Binary files /dev/null and b/help/Modelica.ThermalI.png differ diff --git a/help/Modelica.html b/help/Modelica.html new file mode 100644 index 0000000000..3a22fcf60b --- /dev/null +++ b/help/Modelica.html @@ -0,0 +1,225 @@ + ++
+
++
+Package Modelica is a standardized and pre-defined package +that is developed together with the Modelica language from the +Modelica Association, see +http://www.Modelica.org. +It is also called Modelica Standard Library. +It provides constants, types, connectors, partial models and model +components +in various disciplines. +
+ ++The Modelica package is free software and can be redistributed and/or +modified under the terms of the Modelica License and the accompanying +disclaimer, displayed at the end of this documentation. +
+ ++The Modelica package consists currently of the following subpackages +
+ ++ Constants Mathematical and physical constants (pi, eps, h, ...) + Icons Icon definitions of general interest + Math Mathematical functions (such as sin, cos) + SIunits SI-unit type definitions (such as Voltage, Torque) + + Blocks Input/output blocks. + Electrical Electric and electronic components. + Mechanics Mechanical components + (currently: 1D-rotational and 1D-translational components) + Thermal Thermal components + (currently: 1-D heat transfer with lumped elements) ++ +
+In the Modelica package the following conventions are used: +
+ ++ p,n: positive and negative side of a partial model. + a,b: side "a" and side "b" of a partial model + (= connectors are completely equivalent). ++
Release Notes:
++ IdealGearR2T Ideal gear transforming rotational in translational motion. + Position Forced movement of a flange with a reference angle + given as input signal + RelativeStates Definition of relative state variables ++
+ replaceable type SignalType = Real ++ in order that the type of the signal of an input/output block + can be changed to a physical type, for example: + +
+ Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque)) ++
THE MODELICA LICENSE (Version 1.1 of June 30, 2000)
+ +Redistribution and use in source and binary forms, with or without +modification are permitted, provided that the following conditions are met: +
DISCLAIMER +
The software (sources, binaries, etc.) in their original or in a modified +form are provided +"as is" and the copyright holders assume no responsibility for its contents +what so ever. Any express or implied warranties, including, but not +limited to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the +copyright holders, or any party who modify and/or redistribute the package, +be liable for any direct, indirect, incidental, special, exemplary, or +consequential damages, arising in any way out of the use of this software, +even if advised of the possibility of such damage. +
+Copyright © 1999-2002, Modelica Association.
+ ++
+
+
+
+This library contains input/output blocks to build up block diagrams. +The library is structured in the following sublibraries: +
+ ++ Interfaces Connectors and partial models for block diagram components + Examples Demonstration examples + Continuous Basic continuous input/output blocks + Discrete Discrete control blocks (not yet available) + Logical Logical and relational operations on Boolean signals + (not yet available) + Nonlinear Discontinuous or non-differentiable algebraic + control blocks + Math Mathematical functions as input/output blocks + Sources Sources such as signal generators ++ +
Release Notes:
++ replaceable type SignalType = Real ++ in order that the type of the signal of an input/output block + can be changed to a physical type, for example: + +
+ Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque)) ++
Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
+ ++
+
+
+
+This package contains basic continuous input/output blocks. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+This blocks computes output y=outPort.signal element-wise as +integral of the input u=inPort.signal multiplied with +the gain k: +
+ ++ k[i] + y[i] = ------ u[i] + s ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Integrator gains |
y0[:] | zeros(size(k, 1)) | Start values of integrators |
+block Integrator "Output the integral of the input signals" + parameter Real k[:]={1} "Integrator gains"; + parameter Real y0[:]=zeros(size(k, 1)) "Start values of integrators"; + extends Interfaces.MIMOs(final n=size(k, 1), y(start=y0)); + +equation + for i in 1:size(k, 1) loop + der(y[i]) = k[i]*u[i]; + end for; +end Integrator; ++
+ +
+This blocks computes y=outPort.signal element-wise as integral +of the input u=inPort.signal multiplied with the gain k. If the +integral reaches a given upper or lower limit and the +input will drive the integral outside of this bound, the +integration is halted and only restarted if the input drives +the integral away from the bounds. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Integrator gains |
outMax[:] | {1} | Upper limits of outputs |
outMin[:] | -outMax | Lower limits of outputs |
y0[:] | zeros(size(k, 1)) | Start values of integrators |
+block LimIntegrator "Integrator with limited values of the outputs" + parameter Real k[:]={1} "Integrator gains"; + parameter Real outMax[:]={1} "Upper limits of outputs"; + parameter Real outMin[:]=-outMax "Lower limits of outputs"; + parameter Real y0[:]=zeros(size(k, 1)) "Start values of integrators"; + + extends Interfaces.MIMOs(final n=max([size(k, 1); size(outMax, 1); size(outMin, 1) + ]), y(start=y0)); + +protected + parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); + parameter Real p_outMax[n]=(if size(outMax, 1) == 1 then ones(n)*outMax[1] + else outMax); + parameter Real p_outMin[n]=(if size(outMin, 1) == 1 then ones(n)*outMin[1] + else outMin); +equation + for i in 1:n loop + der(y[i]) = if y[i] < p_outMin[i] and u[i] < 0 or y[i] > p_outMax[i] and u[ + i] > 0 then 0 else p_k[i]*u[i]; + end for; +end LimIntegrator; ++
+ +
+This blocks defines the transfer function between the +input u=inPort.signal and the output y=outPort.signal +element-wise as approximated derivative: +
+ ++ k[i] * s + y[i] = ------------ * u[i] + T[i] * s + 1 ++ +
+If you would like to be able to change easily between different
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
+parameters, use the general block TransferFunction instead
+and model a derivative block with parameters
+b = {k,0}, a = {T, 1}.
+
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Gains |
T[:] | {0.01} | Time constants (T>0 required; T=0 is ideal derivative block) [s] |
+block Derivative "Approximated derivative block" + parameter Real k[:]={1} "Gains"; + parameter SI.Time T[:](min=fill(Modelica.Constants.small, size(T, 1))) = {0.01} + "Time constants (T>0 required; T=0 is ideal derivative block)"; + + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); + + output Real x[n] "State of block"; + +protected + parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); + parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); +equation + for i in 1:n loop + der(x[i]) = if noEvent(abs(p_k[i]) >= Modelica.Constants.eps) then (u[i] - + x[i])/p_T[i] else 0; + y[i] = if noEvent(abs(p_k[i]) >= Modelica.Constants.eps) then (p_k[i]/p_T[i + ])*(u[i] - x[i]) else 0; + end for; +end Derivative; ++
+ +
+This blocks defines the transfer function between the input u=inPort.signal +and the output y=outPort.signal element-wise as first order system: +
+ ++ k[i] + y[i] = ------------ * u[i] + T[i] * s + 1 ++ +
+If you would like to be able to change easily between different
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
+parameters, use the general block TransferFunction instead
+and model a first order SISO system with parameters
+b = {k}, a = {T, 1}.
+
+Example: + + parameter: k = {0.3}, T = {0.4} + + results in: + + 0.3 + y = ----------- * u + 0.4 s + 1.0 ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Gain |
T[:] | {1} | Time Constant [s] |
+block FirstOrder "First order transfer function block (= 1 pole)" + parameter Real k[:]={1} "Gain"; + parameter SI.Time T[:]={1} "Time Constant"; + + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); + +protected + parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); + parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); +equation + for i in 1:n loop + der(y[i]) = (p_k[i]*u[i] - y[i])/p_T[i]; + end for; +end FirstOrder; ++
+ +
+This blocks defines the transfer function between the input u=inPort.signal and +the output y=outPort.signal element-wise as second order system: +
+ ++ k[i] + y[i] = ---------------------------------------- * u[i] + ( s / w[i] )^2 + 2*D[i]*( s / w[i] ) + 1 + ++ +
+If you would like to be able to change easily between different
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
+parameters, use the general model class TransferFunction
+instead and model a second order SISO system with parameters
+b = {k}, a = {1/w^2, 2*D/w, 1}.
+
+Example: + + parameter: k = {0.3}, w = {0.5}, D = {0.4} + + results in: + + 0.3 + y = ------------------- * u + 4.0 s^2 + 1.6 s + 1 ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Gain |
w[:] | {1} | Angular frequency |
D[:] | {1} | Damping |
+block SecondOrder "Second order transfer function block (= 2 poles)" + parameter Real k[:]={1} "Gain"; + parameter Real w[:]={1} "Angular frequency"; + parameter Real D[:]={1} "Damping"; + + extends Interfaces.MIMOs(final n=max([size(k, 1); size(w, 1); size(D, 1)])); + output Real yd[n] "Derivative of y"; +protected + parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); + parameter Real p_w[n]=(if size(w, 1) == 1 then ones(n)*w[1] else w); + parameter Real p_D[n]=(if size(D, 1) == 1 then ones(n)*D[1] else D); +equation + for i in 1:n loop + der(y[i]) = yd[i]; + der(yd[i]) = p_w[i]*(p_w[i]*(p_k[i]*u[i] - y[i]) - 2*p_D[i]*yd[i]); + end for; +end SecondOrder; ++
+ +
+This blocks defines the transfer function between the input u=inPort.signal and +the output y=outPort.signal element-wise as PI system: +
+ ++ 1 + y[i] = k[i] * (1 + ------ ) * u[i] + T[i]*s + + T[i]*s + 1 + = k[i] * ----------- * u[i] + T[i]*s ++ +
+If you would like to be able to change easily between different
+transfer functions (FirstOrder, SecondOrder, ... ) by changing
+parameters, use the general model class TransferFunction
+instead and model a PI SISO system with parameters
+b = {k*T, k}, a = {T, 0}.
+
+Example: + + parameter: k = {0.3}, T = {0.4} + + results in: + + 0.4 s + 1 + y = 0.3 ----------- * u + 0.4 s ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Gain |
T[:] | {1} | Time Constant (T>0 required) [s] |
+block PI "Proportional-Integral controller" + parameter Real k[:]={1} "Gain"; + parameter SI.Time T[:]={1} "Time Constant (T>0 required)"; + + extends Interfaces.MIMOs(final n=max([size(k, 1); size(T, 1)])); + output Real x[n] "State of block"; + +protected + parameter Real p_k[n]=(if size(k, 1) == 1 then ones(n)*k[1] else k); + parameter Real p_T[n]=(if size(T, 1) == 1 then ones(n)*T[1] else T); +equation + for i in 1:n loop + der(x[i]) = u[i]/p_T[i]; + y[i] = p_k[i]*(x[i] + u[i]); + end for; +end PI; ++
+ +
+This is the text-book version of a PID-controller. +For a more practically useful PID-controller, use +block LimPID. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k | 1 | Gain |
Ti | 0.5 | Time Constant of Integrator [s] |
Td | 0.1 | Time Constant of Derivative block [s] |
Nd | 10 | The higher Nd, the more ideal the derivative block |
+block PID "PID-controller in additive description form" + extends Interfaces.SISO; + + parameter Real k=1 "Gain"; + parameter SI.Time Ti(min=Modelica.Constants.small) = 0.5 + "Time Constant of Integrator"; + parameter SI.Time Td(min=0) = 0.1 "Time Constant of Derivative block"; + parameter Real Nd(min=Modelica.Constants.small) = 10 + "The higher Nd, the more ideal the derivative block"; + + Math.Gain P "Proportional part of PID controller"; + Integrator I(k={1/Ti}) "Integral part of PID controller"; + Derivative D(k={Td}, T={max([Td/Nd, 100*Modelica.Constants.eps])}) + "Derivative part of PID controller"; + Math.Gain Gain(k={k}) "Gain of PID controller"; + Math.Add3 Add; +equation + connect(P.outPort, Add.inPort1); + connect(I.outPort, Add.inPort2); + connect(D.outPort, Add.inPort3); + connect(Add.outPort, Gain.inPort); + connect(outPort, Gain.outPort); + connect(inPort, I.inPort); + connect(inPort, P.inPort); + connect(inPort, D.inPort); +end PID; ++
+ +
+This is a PID controller incorporating several practical aspects. +It is designed according to chapter 3 of the book +
+ ++ K. Astroem, T. Haegglund: PID Controllers: Theory, Design, and Tuning. + 2nd edition, 1995. ++ +
+Besides the additive proportional, integral and derivative +part of this controller, the following practical aspects are included: +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k | 1 | Gain of PID block |
Ti | 0.5 | Time constant of Integrator block [s] |
Td | 0.1 | Time constant of Derivative block [s] |
yMax | 1 | Upper limit of output |
yMin | -yMax | Lower limit of output |
wp | 1 | Set-point weight for Proportional block (0..1) |
wd | 0 | Set-point weight for Derivative block (0..1) |
Ni | 0.9 | Ni*Ti is time constant of anti-windup compensation |
Nd | 10 | The higher Nd, the more ideal the derivative block |
+block LimPID + "PID controller with limited output, anti-windup compensation and setpoint weighting" + + + extends Interfaces.SVcontrol; + + parameter Real k(min=0) = 1 "Gain of PID block"; + parameter SI.Time Ti(min=Modelica.Constants.small) = 0.5 + "Time constant of Integrator block"; + parameter SI.Time Td(min=0) = 0.1 "Time constant of Derivative block"; + parameter Real yMax=1 "Upper limit of output"; + parameter Real yMin=-yMax "Lower limit of output"; + parameter Real wp(min=0) = 1 "Set-point weight for Proportional block (0..1)" + ; + parameter Real wd(min=0) = 0 "Set-point weight for Derivative block (0..1)"; + parameter Real Ni(min=100*Modelica.Constants.eps) = 0.9 + "Ni*Ti is time constant of anti-windup compensation"; + parameter Real Nd(min=100*Modelica.Constants.eps) = 10 + "The higher Nd, the more ideal the derivative block"; + Nonlinear.Limiter limiter(uMax={yMax}, uMin={yMin}); + Math.Add addP(k1=wp, k2=-1); + Math.Add addD(k1=wd, k2=-1); + Math.Gain P; + Integrator I(k={1/Ti}); + Derivative D(k={Td}, T={max([Td/Nd, 1.e-14])}); + Math.Gain gainPID(k={k}); + Math.Add3 addPID; + Math.Add3 addI(k2=-1); + Math.Add addSat(k2=-1); + Math.Gain gainTrack(k={1/(k*Ni)}); +equation + assert(yMax >= yMin, "PID: Limits must be consistent"); + connect(inPort_s, addP.inPort1); + connect(inPort_m, addP.inPort2); + connect(inPort_s, addD.inPort1); + connect(inPort_m, addD.inPort2); + connect(inPort_s, addI.inPort1); + connect(inPort_m, addI.inPort2); + connect(gainTrack.outPort, addI.inPort3); + connect(addP.outPort, P.inPort); + connect(addD.outPort, D.inPort); + connect(addI.outPort, I.inPort); + connect(P.outPort, addPID.inPort1); + connect(D.outPort, addPID.inPort2); + connect(I.outPort, addPID.inPort3); + connect(addPID.outPort, gainPID.inPort); + connect(gainPID.outPort, addSat.inPort2); + connect(addSat.outPort, gainTrack.inPort); + connect(gainPID.outPort, limiter.inPort); + connect(limiter.outPort, outPort); + connect(limiter.outPort, addSat.inPort1); +end LimPID; ++
+ +
+This block defines the transfer function between the input +u=inPort.signal[1] and the output y=outPort.signal[1] +as (nb = dimension of b, na = dimension of a): +
+ ++ b[1]*s^[nb-1] + b[2]*s^[nb-2] + ... + b[nb] + y(s) = --------------------------------------------- * u(s) + a[1]*s^[na-1] + a[2]*s^[na-2] + ... + a[na] ++ +
+State variables x are defined according to controller canonical +form. Initial values of the states can be set as start values of x. +
+ +
+Example: +
+ ++ TransferFunction g(b = {2,4}, a = {1,3}); ++ +
+results in the following transfer function: +
+ ++ 2*s + 4 + y = --------- * u + s + 3 ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
b[:] | {1} | Numerator coefficients of transfer function. |
a[:] | {1,1} | Denominator coefficients of transfer function. |
+block TransferFunction "Linear transfer function" + extends Interfaces.SISO; + + parameter Real b[:]={1} "Numerator coefficients of transfer function."; + parameter Real a[:]={1,1} "Denominator coefficients of transfer function."; + output Real x[size(a, 1) - 1] + "State of transfer function from controller canonical form"; + +protected + parameter Integer na=size(a, 1) "Size of Denominator of transfer function."; + parameter Integer nb(max=na) = size(b, 1) + "Size of Numerator of transfer function."; + parameter Integer nx=size(a, 1) - 1; + Real x1dot "Derivative of first state of TransferFcn"; + Real xn "Highest order state of TransferFcn"; +equation + [der(x); xn] = [x1dot; x]; + [u] = transpose([a])*[x1dot; x]; + [y] = transpose([zeros(na - nb, 1); b])*[x1dot; x]; +end TransferFunction; ++
+ +
+The State Space block defines the relation +between the input u=inPort.signal and the output +y=outPort.signal in state space form: +
+ ++ + der(x) = A * x + B * u + y = C * x + D * u + ++ +
+The input is a vector of length nu, the output is a vector +of length ny and nx is the number of states. Accordingly +
++ A has the dimension: A(nx,nx), + B has the dimension: B(nx,nu), + C has the dimension: C(ny,nx), + D has the dimension: D(ny,nu) ++ +
+Example: +
++ parameter: A = [0.12, 2;3, 1.5] + parameter: B = [2, 7;3, 1] + parameter: C = [0.1, 2] + parameter: D = zeros(ny,nu) +results in the following equations: + + [der(x[1])] [0.12 2.00] [x[1]] [2.0 7.0] [u[1]] + [ ] = [ ]*[ ] + [ ]*[ ] + [der(x[2])] [3.00 1.50] [x[2]] [0.1 2.0] [u[2]] + + [x[1]] [u[1]] + y[1] = [0.1 2.0] * [ ] + [0 0] * [ ] + [x[2]] [u[2]] ++
++
+
Name | Default | Description |
---|---|---|
A[:, size(A, 1)] | [1, 0; 0, 1] | Matrix A of state space model |
B[size(A, 1), :] | [1; 1] | Matrix B of state space model |
C[:, size(A, 1)] | [1, 1] | Matrix C of state space model |
D[size(C, 1), size(B, 2)] | zeros(size(C, 1), size(B, 2)) | Matrix D of state space model |
+block StateSpace "Linear state space system" + parameter Real A[:, size(A, 1)]=[1, 0; 0, 1] "Matrix A of state space model"; + parameter Real B[size(A, 1), :]=[1; 1] "Matrix B of state space model"; + parameter Real C[:, size(A, 1)]=[1, 1] "Matrix C of state space model"; + parameter Real D[size(C, 1), size(B, 2)]=zeros(size(C, 1), size(B, 2)) + "Matrix D of state space model"; + + extends Interfaces.MIMO(final nin=size(B, 2), final nout=size(C, 1)); + output Real x[size(A, 1)] "State vector"; +equation + der(x) = A*x + B*u; + y = C*x + D*u; +end StateSpace; ++
+ +
+Defines that the output (= outPort.signal) is the derivative +of the input (=inPort.signal). Note, that Modelica.Blocks.Continuous.Derivative +computes the derivative in an approximate sense, where this block computes +the derivative exactly. This requires that the input signals are differentiated +by the Modelica translator, if these derivatives are not yet present in +the model. +
+ ++
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Der "Derivative of input (= analytic differentations)" + extends Interfaces.MIMOs; + +equation + for i in 1:n loop + y[i] = der(u[i]); + end for; +end Der; ++
+
+
+This package contains currently one example model to demonstrate the usage of the +signal bus concept provided by the Modelica.Blocks package. +
+ +Copyright © 2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
Signal bus concept
+ ++In technical systems, such as vehicles, robots or satellites, many signals +are exchanged between components. In a simulation system, these signals +are usually modelled by signal connections of input/output blocks. +Unfortunately, the signal connection structure may become very complicated, +especially for hierarchical models. +
+ ++The same is also true for real technical systems. To reduce complexity +and get higher flexibility, many technical systems use data buses to +exchange data between components. For the same reasons, it is often better +to use a "signal bus" concept also in a Modelica model. This is demonstrated +at hand of this model (Modelica.Blocks.Examples.BusUsage), see diagram layer: +
+ ++Difficulties arise if the input or output connector of an +input/output block shall be connected directly to a variable +of a bus because connections can only be performed between +connectors but not between variables. For convenience, +single variable connectors for Real, Integer and Boolean +variables are provided as Modelica.Blocks.Interfaces.RealPort, +Modelica.Blocks.Interfaces.IntegerPort, +Modelica.Blocks.Interfaces.BooleanPort. +For example, the RealPort connector is basically defined as: +
+connector RealPort = Real; ++ +
+This allows a definition of a bus in the form: +
+ +connector Bus + RealPort r1; + RealPort r2; + ... + end Bus; ++ +
+and a connection to r1 and r2 is possible since these are connectors. +Unfortunately, signals defined in this way have, by default, no unit. +To improve this situation, a RealPort is actually defined as +
+ +connector RealPort + replaceable type SignalType = Real; + extends SignalType; + end RealPort; ++ +
+This allows a redeclaration of the Real type to the desired type, such as: +
+ +connector Bus + import SI=Modelica.SIunits; + RealPort v(redeclare SignalType=SI.Velocity); + RealPort p(redeclare SignalType=SI.Pressure); + ... + end Bus; ++ +
+In order to connect from a RealPort connector to an InPort or OutPort +connector of a block from the Modelica.Blocks package, an adaptor block +is needed, since the two connectors are not compatible. Appropriate adaptors +are provided in Modelica.Blocks.Interfaces.BusAdaptors. The usage can +be seen in the diagram layer of the model at hand +(Modelica.Blocks.Examples.BusUsage). +
+ ++If a bus connector contains many signals it is no longer so easy +to test just one part of a system, because all parts of +the bus connector must get a value. To simplify this, +it is practical to provide a RestBus component which +sets all parts of a bus to a default value when selected +via the parameter menu. This is also demonstrated in the example +model (see diagram layer). +
+ +Simulate the system for 1 s. The outputs of the 'receive' signal +blocks should be the same as the inputs of the 'send' signal blocks. +
+ ++encapsulated model BusUsage "Demonstration of signal bus usage" + import Modelica.Icons; + import Modelica.Blocks.Interfaces.BusAdaptors; + import Modelica.Blocks.Sources; + + extends Icons.Example; + +protected + Interfaces.Bus bus; +public + BusAdaptors.SendReal putRealSignal1; + BusAdaptors.SendBoolean putBooleanSignal; + BusAdaptors.SendInteger putIntegerSignal; + BusAdaptors.ReceiveReal getRealSignal1; + BusAdaptors.ReceiveBoolean getBooleanSignal; + BusAdaptors.ReceiveInteger getIntegerSignal; + RestBus restBus(set_realSignal2=true); + Sources.IntegerStep generateIntegerSignal( + height={1}, + offset={2}, + startTime={0.5}); + Sources.BooleanStep generateBooleanSignal(startTime={0.5}); + Sources.Sine generateRealSignal1; + + encapsulated package Interfaces + "Interfaces specialised for this example" + + connector MultiPort "Combined port of real and boolean signal" + Real myRealSignal; + Boolean myBooleanSignal; + + end MultiPort; + + connector Bus "Signal bus" + import SI = Modelica.SIunits; + import Modelica.Blocks.Interfaces.*; + + RealPort realSignal1(redeclare type SignalType = SI.AngularVelocity) "First Real signal (angular velocity)"; + RealPort realSignal2 "Second Real signal"; + IntegerPort integerSignal "Integer signal"; + BooleanPort booleanSignal "Boolean signal"; + MultiPort multiSignal "Combined signal"; + + end Bus; + end Interfaces; + + encapsulated model Part "Component with MultiPort connector" + import Modelica.Blocks.Examples; + + Examples.BusUsage.Interfaces.MultiPort multiSignal; + + equation + multiSignal.myRealSignal = time; + multiSignal.myBooleanSignal = time > 0.5; + end Part; + + encapsulated model RestBus + "Set default values for bus variables that are not defined elsewhere" + + + import Modelica.Blocks.Examples; + + parameter Boolean set_realSignal1=false + "Set dummy value for desiredThrottle"; + parameter Boolean set_realSignal2=false "Set dummy value for brake"; + parameter Boolean set_integerSignal=false + "Set dummy value for controlLeverPosition"; + parameter Boolean set_booleanSignal=false "Set dummy value for desiredGear" + ; + parameter Boolean set_multiSignal=false "Set dummy value for ignition"; + + Examples.BusUsage.Interfaces.Bus bus; + equation + if set_realSignal1 then + bus.realSignal1 = 0; + end if; + if set_realSignal2 then + bus.realSignal2 = 0; + end if; + if set_integerSignal then + bus.integerSignal = 0; + end if; + if set_booleanSignal then + bus.booleanSignal = false; + end if; + if set_multiSignal then + bus.multiSignal.myRealSignal = 0; + bus.multiSignal.myBooleanSignal = false; + end if; + end RestBus; + + Part part; +equation + + connect(putRealSignal1.toBus, bus.realSignal1); + connect(putIntegerSignal.toBus, bus.integerSignal); + connect(generateRealSignal1.outPort, putRealSignal1.inPort); + connect(generateBooleanSignal.outPort, putBooleanSignal.inPort); + connect(generateIntegerSignal.outPort, putIntegerSignal.inPort); + connect(getRealSignal1.fromBus, bus.realSignal1); + connect(getIntegerSignal.fromBus, bus.integerSignal); + connect(restBus.bus, bus); + connect(putBooleanSignal.toBus, bus.booleanSignal); + connect(getBooleanSignal.fromBus, bus.booleanSignal); + connect(part.multiSignal, bus.multiSignal); +end BusUsage; ++
+ +
+
Name | Default | Description |
---|---|---|
set_realSignal1 | false | Set dummy value for desiredThrottle |
set_realSignal2 | false | Set dummy value for brake |
set_integerSignal | false | Set dummy value for controlLeverPosition |
set_booleanSignal | false | Set dummy value for desiredGear |
set_multiSignal | false | Set dummy value for ignition |
+encapsulated model RestBus + "Set default values for bus variables that are not defined elsewhere" + + + import Modelica.Blocks.Examples; + + parameter Boolean set_realSignal1=false "Set dummy value for desiredThrottle" + ; + parameter Boolean set_realSignal2=false "Set dummy value for brake"; + parameter Boolean set_integerSignal=false + "Set dummy value for controlLeverPosition"; + parameter Boolean set_booleanSignal=false "Set dummy value for desiredGear"; + parameter Boolean set_multiSignal=false "Set dummy value for ignition"; + + Examples.BusUsage.Interfaces.Bus bus; +equation + if set_realSignal1 then + bus.realSignal1 = 0; + end if; + if set_realSignal2 then + bus.realSignal2 = 0; + end if; + if set_integerSignal then + bus.integerSignal = 0; + end if; + if set_booleanSignal then + bus.booleanSignal = false; + end if; + if set_multiSignal then + bus.multiSignal.myRealSignal = 0; + bus.multiSignal.myBooleanSignal = false; + end if; +end RestBus; ++
+ +
+encapsulated model Part "Component with MultiPort connector" + import Modelica.Blocks.Examples; + + Examples.BusUsage.Interfaces.MultiPort multiSignal; + +equation + multiSignal.myRealSignal = time; + multiSignal.myBooleanSignal = time > 0.5; +end Part; ++
+
+ +
Defines connector for signalbus.
+++
+connector Bus "Signal bus" + import SI = Modelica.SIunits; + import Modelica.Blocks.Interfaces.*; + + RealPort realSignal1(redeclare type SignalType = SI.AngularVelocity) "First Real signal (angular velocity)"; + RealPort realSignal2 "Second Real signal"; + IntegerPort integerSignal "Integer signal"; + BooleanPort booleanSignal "Boolean signal"; + MultiPort multiSignal "Combined signal"; + +end Bus; ++
+ +
+connector MultiPort "Combined port of real and boolean signal" + Real myRealSignal; + Boolean myBooleanSignal; + +end MultiPort; ++
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+This package contains interface definitions for +continuous input/output blocks. In particular it +contains the following connector classes: +
+ ++ InPort Connector with input signals of type Real. + OutPort Connector with output signals of type Real. + BooleanInPort Connector with input signals of type Boolean. + BooleanOutPort Connector with output signals of type Boolean. + IntegerInPort Connector with input signals of type Integer. + IntegerOutPort Connector with output signals of type Integer. + + RealPort Connector with input/output signals of type Real. + BooleanPort Connector with input/output signals of type Real. + IntegerPort Connector with input/output signals of type Real. ++ +
The following partial block classes are provided +to model continuous control blocks:
+ ++ BlockIcon Basic graphical layout of continuous block + SO Single Output continuous control block + MO Multiple Output continuous control block + SISO Single Input Single Output continuous control block + SI2SO 2 Single Input / 1 Single Output continuous control block + SIMO Single Input Multiple Output continuous control block + MISO Multiple Input Single Output continuous control block + MIMO Multiple Input Multiple Output continuous control block + MIMOs Multiple Input Multiple Output continuous control block + with same number of inputs and outputs + MI2MO 2 Multiple Input / Multiple Output continuous + control block + SignalSource Base class for continuous signal sources + SVcontrol Single-Variable continuous controller + MVcontrol Multi-Variable continuous controller ++ +
+The following partial block classes are provided +to model Boolean control blocks: +
+ ++ BooleanBlockIcon Basic graphical layout of Boolean block + BooleanSISO Single Input Single Output control block + with signals of type Boolean + BooleanMIMOs Multiple Input Multiple Output control block + with same number of inputs and outputs + MI2BooleanMOs 2 Multiple Input / Boolean Multiple Output + block with same signal lengths + BooleanSignalSource Base class for Boolean signal sources + IntegerMIBooleanMOs Multiple Integer Input Multiple Boolean Output control block + with same number of inputs and outputs ++ +
+The following partial block classes are provided +to model Integer control blocks: +
+ ++ IntegerBlockIcon Basic graphical layout of Integer block + IntegerMO Multiple Output control block + IntegerSignalSource Base class for Integer signal sources ++ +
In addition, a subpackage BusAdaptors is temporarily provided +in order to make a signal bus concept available. It will be removed, +when the package Block is revised exploiting new Modelica features.
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+Block has a continuous input and a continuous output signal vector +where the signal sizes of the input and output vector are identical. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+partial block MIMOs + "Multiple Input Multiple Output continuous control block with same number of inputs and outputs" + + + extends BlockIcon; + parameter Integer n=1 "Number of inputs (= number of outputs)"; + InPort inPort(final n=n) "Connector of Real input signals"; + OutPort outPort(final n=n) "Connector of Real output signals"; + output Real y[n] "Output signals"; +protected + Real u[:]=inPort.signal "Input signals"; +equation + y = outPort.signal; +end MIMOs; ++
+ +
+partial block SISO + "Single Input Single Output continuous control block" + extends BlockIcon; + + InPort inPort(final n=1) "Connector of Real input signal"; + OutPort outPort(final n=1) "Connector of Real output signal"; + output Real y; + +protected + Real u=inPort.signal[1]; +equation + y = outPort.signal[1]; +end SISO; ++
+ +
+partial block SVcontrol "Single-Variable continuous controller" + extends BlockIcon; + +protected + Real u_s "Scalar setpoint input signal"; + Real u_m "Scalar measurement input signal"; +public + InPort inPort_s(final n=1) "Connector of setpoint input signal"; + InPort inPort_m(final n=1) "Connector of measurement input signal"; + OutPort outPort(final n=1) "Connector of actuator output signal"; + output Real y "Scalar actuator output signal"; +equation + u_s = inPort_s.signal[1]; + u_m = inPort_m.signal[1]; + y = outPort.signal[1]; +end SVcontrol; ++
+ +
+Block has a continuous input and a continuous output signal vector. +The signal sizes of the input and output vector may be different. +
+++
+
Name | Default | Description |
---|---|---|
nin | 1 | Number of inputs |
nout | 1 | Number of outputs |
+partial block MIMO + "Multiple Input Multiple Output continuous control block" + + extends BlockIcon; + parameter Integer nin=1 "Number of inputs"; + parameter Integer nout=1 "Number of outputs"; + InPort inPort(final n=nin) "Connector of Real input signals"; + OutPort outPort(final n=nout) "Connector of Real output signals"; + output Real y[nout] "Output signals"; +protected + Real u[:]=inPort.signal "Input signals"; +equation + y = outPort.signal; +end MIMO; ++
+
+
Name | Default | Description |
---|---|---|
replaceable type SignalType | Real |
+connector RealPort "Real port (both input/output possible)" + replaceable type SignalType = Real; + extends SignalType; +end RealPort; ++
+
+connector IntegerPort = Integer "Integer port (both input/output possible)"; ++
+
+connector BooleanPort = Boolean "Boolean port (both input/output possible)"; ++
+ +
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of signal vector |
replaceable type SignalType | Real | type of signal |
+connector InPort "Connector with input signals of type Real" + parameter Integer n=1 "Dimension of signal vector"; + replaceable type SignalType = Real "type of signal"; + input SignalType signal[n] "Real input signals"; + +end InPort; ++
+ +
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of signal vector |
replaceable type SignalType | Real | type of signal |
+connector OutPort "Connector with output signals of type Real" + parameter Integer n=1 "Dimension of signal vector"; + replaceable type SignalType = Real "type of signal"; + output SignalType signal[n] "Real output signals"; + +end OutPort; ++
+ +
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of signal vector |
+connector BooleanInPort + "Connector with input signals of type Boolean" + parameter Integer n=1 "Dimension of signal vector"; + input Boolean signal[n] "Boolean input signals"; + +end BooleanInPort; ++
+ +
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of signal vector |
+connector BooleanOutPort + "Connector with output signals of type Boolean" + parameter Integer n=1 "Dimension of signal vector"; + output Boolean signal[n] "Boolean output signals"; + +end BooleanOutPort; ++
+ +
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of signal vector |
+connector IntegerInPort + "Connector with input signals of type Integer" + parameter Integer n=1 "Dimension of signal vector"; + input Integer signal[n] "Integer input signals"; + +end IntegerInPort; ++
+ +
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of signal vector |
+connector IntegerOutPort + "Connector with output signals of type Integer" + parameter Integer n=1 "Dimension of signal vector"; + output Integer signal[n] "Integer output signals"; + +end IntegerOutPort; ++
+
+partial block BlockIcon "Basic graphical layout of continuous block" +end BlockIcon; ++
+ +
+partial block SO "Single Output continuous control block" + extends BlockIcon; + + OutPort outPort(final n=1) "Connector of Real output signal"; + output Real y; +equation + y = outPort.signal[1]; +end SO; ++
+ +
++
+
Name | Default | Description |
---|---|---|
nout | 1 | Number of outputs |
+partial block MO "Multiple Output continuous control block" + extends BlockIcon; + + parameter Integer nout(min=1) = 1 "Number of outputs"; + OutPort outPort(final n=nout) "Connector of Real output signals"; + output Real y[nout]; +equation + y = outPort.signal; +end MO; ++
+ +
+Block has two Input vectors inPort1.signal and inPort2.signal and one +output vector outPort.signal. All vectors have one element.
++
+partial block SI2SO + "2 Single Input / 1 Single Output continuous control block" + extends BlockIcon; + + InPort inPort1(final n=1) "Connector of Real input signal 1"; + InPort inPort2(final n=1) "Connector of Real input signal 2"; + OutPort outPort(final n=1) "Connector of Real output signal"; + output Real y "Output signal"; + +protected + Real u1=inPort1.signal[1] "Input signal 1"; + Real u2=inPort2.signal[1] "Input signal 2"; +equation + y = outPort.signal[1]; +end SI2SO; ++
+ +
Block has one continuous input signal and a vector of continuous output +signals.
+++
+
Name | Default | Description |
---|---|---|
nout | 1 | Number of outputs |
+partial block SIMO + "Single Input Multiple Output continuous control block" + extends BlockIcon; + parameter Integer nout=1 "Number of outputs"; + InPort inPort(final n=1) "Connector of Real input signal"; + OutPort outPort(final n=nout) "Connector of Real output signals"; + output Real y[nout] "Output signals"; + +protected + Real u=inPort.signal[1] "Input signal"; +equation + y = outPort.signal; +end SIMO; ++
+ +
+Block has a vector of continuous input signals and +one continuous output signal. +
+++
+
Name | Default | Description |
---|---|---|
nin | 1 | Number of inputs |
+partial block MISO + "Multiple Input Single Output continuous control block" + extends BlockIcon; + parameter Integer nin=1 "Number of inputs"; + InPort inPort(final n=nin) "Connector of Real input signals"; + OutPort outPort(final n=1) "Connector of Real output signal"; + output Real y "Output signal"; + +protected + Real u[:]=inPort.signal "Input signals"; +equation + y = outPort.signal[1]; +end MISO; ++
+ +
+Block has two Input vectors inPort1.signal and inPort2.signal and one +output vector outPort.signal. All vectors have the same number of elements. ++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+partial block MI2MO + "2 Multiple Input / Multiple Output continuous control block" + extends BlockIcon; + + parameter Integer n=1 "Dimension of input and output vectors."; + + InPort inPort1(final n=n) "Connector 1 of Real input signals"; + InPort inPort2(final n=n) "Connector 2 of Real input signals"; + OutPort outPort(final n=n) "Connector of Real output signals"; + output Real y[n] "Output signals"; +protected + Real u1[:]=inPort1.signal "Input signals 1"; + Real u2[:]=inPort2.signal "Input signals 2"; +equation + y = outPort.signal; +end MI2MO; ++
+ +
+
Name | Default | Description |
---|---|---|
nout | 1 | Number of outputs |
offset[:] | {0} | offset of output signal |
startTime[:] | {0} | output = offset for time < startTime [s] |
+partial block SignalSource "Base class for continuous signal source" + extends MO; + parameter Real offset[:]={0} "offset of output signal"; + parameter SI.Time startTime[:]={0} "output = offset for time < startTime"; +end SignalSource; ++
+ +
+
Name | Default | Description |
---|---|---|
nu_s | 1 | Number of setpoint inputs |
nu_m | 1 | Number of measurement inputs |
ny | 1 | Number of actuator outputs |
+partial block MVcontrol "Multi-Variable continuous controller" + extends BlockIcon; + + parameter Integer nu_s=1 "Number of setpoint inputs"; + parameter Integer nu_m=1 "Number of measurement inputs"; + parameter Integer ny=1 "Number of actuator outputs"; + InPort inPort_s(final n=nu_s) "Connector of setpoint input signals"; + InPort inPort_m(final n=nu_m) "Connector of measurement input signals"; + OutPort outPort(final n=ny) "Connector of actuator output signals"; +end MVcontrol; ++
+
+partial block BooleanBlockIcon + "Basic graphical layout of Boolean block" +end BooleanBlockIcon; ++
+ +
+partial block BooleanSISO + "Single Input Single Output control block with signals of type Boolean" + + extends BooleanBlockIcon; + +public + BooleanInPort inPort(final n=1) "Connector of Boolean input signal"; + BooleanOutPort outPort(final n=1) "Connector of Boolean output signal"; + output Boolean y; + +protected + Boolean u=inPort.signal[1]; +equation + y = outPort.signal[1]; +end BooleanSISO; ++
+ +
+Block has a continuous input and a continuous output signal vector +where the signal sizes of the input and output vector are identical +and of type boolean. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+partial block BooleanMIMOs + "Multiple Input Multiple Output continuous control block with same number of inputs and outputs of boolean type" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Number of inputs (= number of outputs)"; + BooleanInPort inPort(final n=n) "Connector of Boolean input signals"; + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals"; + output Boolean y[n] "Output signals"; +protected + Boolean u[:]=inPort.signal "Input signals"; +equation + y = outPort.signal; +end BooleanMIMOs; ++
+ +
Block has two Boolean input vectors u1 and u2 and one Boolean output +vector y. All vectors have the same number of elements.
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+partial block MI2BooleanMOs + "2 Multiple Input / Boolean Multiple Output block with same signal lengths" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Dimension of input and output vectors."; + InPort inPort1(final n=n) "Connector 1 of Boolean input signals"; + InPort inPort2(final n=n) "Connector 2 of Boolean input signals"; + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals"; +end MI2BooleanMOs; ++
+ +
+
Name | Default | Description |
---|---|---|
nout | 1 | Number of Boolean outputs |
+partial block BooleanSignalSource + "Base class for Boolean signal sources" + extends BooleanBlockIcon; + parameter Integer nout(min=1) = 1 "Number of Boolean outputs"; + BooleanOutPort outPort(final n=nout) "Connector of Boolean output signal"; +end BooleanSignalSource; ++
+
+partial block IntegerBlockIcon + "Basic graphical layout of Integer block" +end IntegerBlockIcon; ++
+ +
+
Name | Default | Description |
---|---|---|
nout | 1 | Number of outputs |
+partial block IntegerMO + "Multiple Integer Output continuous control block" + extends IntegerBlockIcon; + + parameter Integer nout(min=1) = 1 "Number of outputs"; + IntegerOutPort outPort(final n=nout) "Connector of Integer output signals" + ; + output Integer y[nout]; +equation + y = outPort.signal; +end IntegerMO; ++
+ +
+
Name | Default | Description |
---|---|---|
nout | 1 | Number of outputs |
offset[:] | {0} | offset of output signal |
startTime[:] | {0} | output = offset for time < startTime [s] |
+partial block IntegerSignalSource + "Base class for continuous Integer signal source" + extends IntegerMO; + parameter Integer offset[:]={0} "offset of output signal"; + parameter SI.Time startTime[:]={0} "output = offset for time < startTime"; +end IntegerSignalSource; ++
+ +
+Block has a continuous integer input and a continuous boolean output signal vector +where the signal sizes of the input and output vector are identical. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+partial block IntegerMIBooleanMOs + "Multiple Integer Input Multiple Boolean Output continuous control block with same number of inputs and outputs" + + + extends BooleanBlockIcon; + parameter Integer n=1 "Number of inputs (= number of outputs)"; + IntegerInPort inPort(final n=n) "Connector of Integer input signals"; + BooleanOutPort outPort(final n=n) "Connector of Boolean output signals"; + output Boolean y[n] "Boolean output signals"; +protected + Integer u[n]=inPort.signal "Input signals"; +equation + y = outPort.signal; +end IntegerMIBooleanMOs; ++
+
+
+ +
+Converts an InPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the InPort connector. +
+ +++
+block SendReal "Send Real signal to bus" + Internal.InputReal toBus; + InPort inPort(final n=1); +equation + toBus = inPort.signal[1]; +end SendReal; ++
+ +
+Converts a BooleanInPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the BooleanInPort connector. +
+ +++
+block SendBoolean "Send Boolean signal to bus" + Internal.InputBoolean toBus; + BooleanInPort inPort(final n=1); +equation + toBus = inPort.signal[1]; +end SendBoolean; ++
+ +
+Converts an IntegerInPort connector to a signal which can be connected to the +signal bus. Connect connector 'toBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the IntegerInPort connector. +
+ +++
+block SendInteger "Send Integer signal to bus" + Internal.InputInteger toBus; + IntegerInPort inPort(final n=1); +equation + toBus = inPort.signal[1]; +end SendInteger; ++
+ +
+Converts a signal from the signal bus to an OutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the OutPort connector. +
+ +++
+block ReceiveReal "Receive Real signal from bus" + Internal.OutputReal fromBus; + OutPort outPort(final n=1); +equation + fromBus = outPort.signal[1]; +end ReceiveReal; ++
+ +
+Converts a signal from the signal bus to a BooleanOutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the BooleanOutPort connector. +
+ +++
+block ReceiveBoolean "Receive Boolean signal from bus" + Internal.OutputBoolean fromBus; + BooleanOutPort outPort(final n=1); +equation + fromBus = outPort.signal[1]; +end ReceiveBoolean; ++
+ +
+Converts a signal from the signal bus to an IntegerOutPort connector. Use this +element by connecting connector 'fromBus' with the signal bus. A pop-up +dialog appears which allows to specify the signal from the bus +which is set equal to the signal of the IntegerOutPort connector. +
+ +++
+block ReceiveInteger "Receive Integer signal from bus" + Internal.OutputInteger fromBus; + IntegerOutPort outPort(final n=1); +equation + fromBus = outPort.signal[1]; +end ReceiveInteger; ++
+
+
+ +
+connector InputReal = input Real "'input Real' variable as connector"; ++
+ +
+connector InputBoolean = input Boolean "'input Boolean' variable as connector"; ++
+ +
+connector InputInteger = input Integer "'input Integer' variable as connector"; ++
+ +
+connector OutputReal = output Real "'output Real' variable as connector"; ++
+ +
+connector OutputBoolean = output Boolean + "'output Boolean' variable as connector"; ++
+ +
+connector OutputInteger = output Integer + "'output Integer' variable as connector"; ++
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+This package contains basic mathematical operations, +such as summation and multiplication, and basic mathematical +functions, such as sqrt and sin, as +input/output blocks. All blocks of this library can be either +connected with continuous blocks or with sampled-data blocks. +In particular the following operations and functions are +provided: +
+ +TwoInputs Change causality of input signals. + TwoOutputs Change causality of output signals. + Gain Output the input multiplied by a scalar gain + MatrixGain Output the product of a gain matrix with the input + Sum Output the sum of the elements of the input vector + Feedback Output difference between commanded and feedback input + Add Output the sum of the two inputs + Add3 Output the sum of the three inputs + Product Output product of the two inputs + Division Output first input divided by second input + Abs Output the absolute value of the input + Sign Output the sign of the input + Sqrt Output the square root of the input + Sin Output the sine of the input + Cos Output the cosine of the input + Tan Output the tangent of the input + Asin Output the arc sine of the input + Acos Output the arc cosine of the input + Atan Output the arc tangent of the input + Atan2 Output atan(u1/u2) of the inputs u1 and u2 + Sinh Output the hyperbolic sine of the input + Cosh Output the hyperbolic cosine of the input + Tanh Output the hyperbolic tangent of the input + Exp Output the exponential (base e) of the input + Log Output the natural (base e) logarithm of the input + Log10 Output the base 10 logarithm of the input + RealToInteger Output the nearest Integer value to the input + IntegerToReal Output the input as Real value + Max Output the maximum of the two inputs + Min Output the minimum of the two inputs + Edge Set output to true at rising edge of the input + BooleanChange Set output to true when Boolean input changes + IntegerChange Set output to true when Integer input changes ++ +
Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+This block computes the output y=outPort.signal as +element-wise product of gain k with the +input u = inPort.signal: +
+ +y[i] = k[i] * u[i]; ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Gain vector multiplied element-wise with input vector |
+block Gain + "Output the element-wise product of a gain vector with the input signal vector" + + + parameter Real k[:]={1} + "Gain vector multiplied element-wise with input vector"; +protected + Real u[size(k, 1)] "Input signals"; + Real y[size(k, 1)] "Output signals"; +public + Interfaces.InPort inPort(final n=size(k, 1)) "Input signal connector"; + Interfaces.OutPort outPort(final n=size(k, 1)) "Output signal connector"; +equation + u = inPort.signal; + y = outPort.signal; + for i in 1:size(k, 1) loop + y[i] = k[i]*u[i]; + end for; +end Gain; ++
+ +
+This block computes the output y=outPort.signal as sum of the +three input signals u1=inPort1.signal, u2=inPort2.signal +and u3=inPort3.signal: +
+ +y = k1*u1 + k2*u2 + k3*u3; ++ +
+Example: +
+ +parameter: n = 2, k1= +2, k2= -3, k3=1; + + results in the following equations: + + y[1] = 2 * u1[1] - 3 * u2[1] + u3[1]; + y[2] = 2 * u1[2] - 3 * u2[2] + u3[2]; ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
k1 | +1 | Gain of upper input |
k2 | +1 | Gain of middle input |
k3 | +1 | Gain of lower input |
n | 1 | Dimension of input and output vectors. |
+block Add3 "Output the sum of the three inputs" + extends Interfaces.BlockIcon; + + parameter Real k1=+1 "Gain of upper input"; + parameter Real k2=+1 "Gain of middle input"; + parameter Real k3=+1 "Gain of lower input"; + parameter Integer n=1 "Dimension of input and output vectors."; + Interfaces.InPort inPort1(final n=n) "Connector 1 of Real input signals"; + Interfaces.InPort inPort2(final n=n) "Connector 2 of Real input signals"; + Interfaces.InPort inPort3(final n=n) "Connector 3 of Real input signals"; + Interfaces.OutPort outPort(final n=n) "Connector of Real output signals"; +equation + outPort.signal = k1*inPort1.signal + k2*inPort2.signal + k3*inPort3.signal; +end Add3; ++
+ +
+This block computes the output y=outPort.signal as sum of the +two input signals u1=inPort1.signal and u2=inPort2.signal: +
+ +y = k1*u1 + k2*u2; ++ +
+Example: +
+ +parameter: n = 2, k1= +2, k2= -3 + + results in the following equations: + + y[1] = 2 * u1[1] - 3 * u2[1] + y[2] = 2 * u1[2] - 3 * u2[2] ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
k1 | +1 | Gain of upper input |
k2 | +1 | Gain of lower input |
+block Add "Output the sum of the two inputs" + extends Interfaces.MI2MO; + parameter Real k1=+1 "Gain of upper input"; + parameter Real k2=+1 "Gain of lower input"; +equation + y = k1*u1 + k2*u2; +end Add; ++
+ +
This block is used to enable assignment of values to +variables preliminary defined as outputs (e.g. useful for +inverse model generation).
+ +Release Notes:
++
Name | Default | Description |
---|---|---|
n | 1 | number of input signals |
+block TwoInputs + "Change causality of input signals (e.g. for inverse models)" + + extends Interfaces.BlockIcon; + parameter Integer n=1 "number of input signals"; + + Interfaces.InPort inPort1(n=n); + Interfaces.InPort inPort2(n=n); +equation + inPort1.signal = inPort2.signal; +end TwoInputs; ++
+ +
This block is used to enable assignment of values to +variables preliminary defined as inputs (e.g. useful for +inverse model generation).
+ +Release Notes:
++
Name | Default | Description |
---|---|---|
n | 1 | number of input signals |
+block TwoOutputs + "Change causality of output signals (e.g. for inverse models)" + extends Interfaces.BlockIcon; + parameter Integer n=1 "number of input signals"; + + Interfaces.OutPort OutPort1(n=n); + Interfaces.OutPort OutPort2(n=n); +equation + OutPort1.signal = OutPort2.signal; +end TwoOutputs; ++
+ +
+This block computes the output y=outPort.signal as product of the +gain matrix K with the input signal vector u = inPort.signal: +
+ +y = K * u; ++ +
+Example: +
+ +parameter: K = [0.12 2; 3 1.5] + + results in the following equations: + + | y[1] | | 0.12 2.00 | | u[1] | + | | = | | * | | + | y[2] | | 3.00 1.50 | | u[2] | ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
K[:, :] | [1, 0; 0, 1] | Gain matrix which is multiplied with the input |
+block MatrixGain + "Output the product of a gain matrix with the input signal vector" + parameter Real K[:, :]=[1, 0; 0, 1] + "Gain matrix which is multiplied with the input"; + extends Interfaces.MIMO(final nin=size(K, 2), final nout=size(K, 1)); +equation + y = K*u; +end MatrixGain; ++
+ +
This block computes the output y=outPort.signal[1] as +sum of the elements of the input signal vector +u=inPort.signal:
+ +y = u[1] + u[2] + ... + u[nin]; ++ +
Example: With parameter nin = 3 results the following equation:
+ +y = u[1] + u[2] + u[3]; ++ +
Optionally, the parameter Real k[nin]=ones(nin) could be +changed to weight the sum elements in order to calculate the scalar +product
+ +y = k*u = k[1]*u[1] + k[2]*u[2] + ... + k[nin]*u[nin] . ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
nin | 1 | Number of inputs |
k[nin] | ones(nin) | Optional: sum coefficients |
+block Sum "Output the sum of the elements of the input vector" + extends Interfaces.MISO; + + parameter Real k[nin]=ones(nin) "Optional: sum coefficients"; + +equation + y = k*u; +end Sum; ++
+ +
+This block computes the output y=outPort.signal as difference of the +commanded input u1=inPort1.signal and the feedback +input u2=inPort2.signal: +
+ +y = u1 - u2; ++ +
+Example: +
+ +parameter: n = 2 + + results in the following equations: + + y[1] = u1[1] - u2[1] + y[2] = u1[2] - u2[2] ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | size of input and feedback signal |
+block Feedback + "Output difference between commanded and feedback input" + parameter Integer n=1 "size of input and feedback signal"; + Interfaces.InPort inPort1(final n=n); + Interfaces.InPort inPort2(final n=n); + Interfaces.OutPort outPort(final n=n); +equation + outPort.signal = inPort1.signal - inPort2.signal; +end Feedback; ++
+ +
+This block computes the output y=outPort.signal element-wise +as product of the corresponding elements of +the two inputs u1=inPort1.signal and u2=inPort2.signal: +
+ +y[i] = u1[i] * u2[i]; ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+block Product "Output product of the two inputs" + extends Interfaces.MI2MO; +equation + for i in 1:n loop + y[i] = u1[i]*u2[i]; + end for; +end Product; ++
+ +
+This block computes the output y=outPort.signal element-wise +by dividing the corresponding elements of +the two inputs u1=inPort1.signal and u2=inPort2.signal: +
+ +y[i] = u1[i] / u2[i]; ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+block Division "Output first input divided by second input" + extends Interfaces.MI2MO; +equation + for i in 1:n loop + y[i] = u1[i]/u2[i]; + end for; +end Division; ++
+ +
+This block computes the output y=outPort.signal element-wise +as absolute value of the input u=inPort.signal: +
+ +y[i] = abs( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Abs "Output the absolute value of the input" + extends Interfaces.MIMOs; +equation + y = abs(u); +end Abs; ++
+ +
+This block computes the output y=outPort.signal element-wise +as sign of the input u=inPort.signal: +
+ +1 if u[i] > 0 + y[i] = 0 if u[i] == 0 + -1 if u[i] < 0 ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Sign "Output the sign of the input" + extends Interfaces.MIMOs; +equation + y = sign(u); +end Sign; ++
+ +
+This block computes the output y=outPort.signal element-wise +as square root of the input u=inPort.signal: +
+ +y[i] = sqrt( u[i] ); ++ +
+All elements of the input vector shall be zero or positive. +Otherwise an error occurs. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Sqrt + "Output the square root of the input (input >= 0 required)" + extends Interfaces.MIMOs; +equation + y = sqrt(u); +end Sqrt; ++
+ +
+This block computes the output y=outPort.signal element-wise +as sine of the input u=inPort.signal: +
+ +y[i] = sin( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Sin "Output the sine of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.sin(u); +end Sin; ++
+ +
+This block computes the output y=outPort.signal element-wise +as cos of the input u=inPort.signal: +
+ +y[i] = cos( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Cos "Output the cosine of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.cos(u); +end Cos; ++
+ +
+This block computes the output y=outPort.signal element-wise +as tan of the input u=inPort.signal: +
+ +y[i] = tan( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Tan "Output the tangent of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.tan(u); +end Tan; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +sine-inverse of the input u=inPort.signal: +
+ +y[i] = asin( u[i] ); ++ +
+The absolute values of the elements of the input u need to +be less or equal to one (abs( u[i] ) <= 1). +Otherwise an error occurs. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Asin "Output the arc sine of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.asin(u); +end Asin; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +cosine-inverse of the input u=inPort.signal: +
+ +y[i] = acos( u[i] ); ++ +
+The absolute values of the elements of the input u need to +be less or equal to one (abs( u[i] ) <= 1). +Otherwise an error occurs. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Acos "Output the arc cosine of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.acos(u); +end Acos; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +tangent-inverse of the input u=inPort.signal: +
+ +y[i] = atan( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Atan "Output the arc tangent of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.atan(u); +end Atan; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +tangent-inverse of the input u1=inPort1.signal divided by +input u2=inPort2.signal: +
+ +y[i] = atan2( u1[i], u2[i] ); ++ +
+u1[i] and u2[i] shall not be zero at the same time instant. +Atan2 uses the sign of u1[i] and u2[i] in order to construct +the solution in the range -180 deg <= y[i] <= 180 deg, whereas +block Atan gives a solution in the range +-90 deg <= y[i] <= 90 deg. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+block Atan2 "Output atan(u1/u2) of the inputs u1 and u2" + extends Interfaces.MI2MO; +equation + y = Modelica.Math.atan2(u1, u2); +end Atan2; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +hyperbolic sine of the input u=inPort.signal: +
+ +y[i] = sinh( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Sinh "Output the hyperbolic sine of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.sinh(u); +end Sinh; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +hyperbolic cosine of the input u=inPort.signal: +
+ +y[i] = cosh( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Cosh "Output the hyperbolic cosine of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.cosh(u); +end Cosh; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +hyperbolic tangent of the input u=inPort.signal: +
+ +y[i] = tanh( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Tanh "Output the hyperbolic tangent of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.tanh(u); +end Tanh; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +exponential (of base e) of the input u=inPort.signal: +
+ +y[i] = exp( u[i] ); ++ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Exp "Output the exponential (base e) of the input" + extends Interfaces.MIMOs; +equation + y = Modelica.Math.exp(u); +end Exp; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +natural (base e) logarithm of the input u=inPort.signal: +
+ +y[i] = log( u[i] ); ++ +
+An error occurs if the elements of the input u are +zero or negative. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Log + "Output the natural (base e) logarithm of the input (input > 0 required)" + + extends Interfaces.MIMOs; +equation + y = Modelica.Math.log(u); +end Log; ++
+ +
+This block computes the output y=outPort.signal element-wise as the +base 10 logarithm of the input u=inPort.signal: +
+ +y[i] = log10( u[i] ); ++ +
+An error occurs if the elements of the input u are +zero or negative. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Log10 + "Output the base 10 logarithm of the input (input > 0 required)" + + + extends Interfaces.MIMOs; +equation + y = Modelica.Math.log10(u); +end Log10; ++
+ +
+This block computes the output y=outPort.signal element-wise +as nearest integer value of the input u=inPort.signal: +
+ +y[i] = integer( floor( u[i] + 0.5 ) ) for u[i] > 0; + y[i] = integer( ceil ( u[i] - 0.5 ) ) for u[i] < 0; ++
++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of input and output signals |
+block RealToInteger "Convert real to integer signals" + extends Interfaces.IntegerBlockIcon; + parameter Integer n=1 "Number of input and output signals"; +protected + Real u[n]; +public + Interfaces.InPort inPort(final n=n); + Interfaces.IntegerOutPort outPort(final n=n); +equation + u = inPort.signal; + for i in 1:n loop + outPort.signal[i] = if (u[i] > 0) then integer(floor(u[i] + 0.5)) else + integer(ceil(u[i] - 0.5)); + end for; +end RealToInteger; ++
+ +
+This block computes the output y=outPort.signal element-wise +as Real equivalent of the Integer input u=inPort.signal: +
+ +y[i] = u[i]; ++ +
where u is of Integer and y of Real type.
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of input signals (= number of output signals) |
+block IntegerToReal "Convert integer to real signals" + extends Interfaces.BlockIcon; + parameter Integer n=1 "Number of input signals (= number of output signals)"; + Interfaces.OutPort outPort(final n=n); + Interfaces.IntegerInPort inPort(final n=n); +equation + outPort.signal = inPort.signal; +end IntegerToReal; ++
+ +
+This block computes the output y=outPort.signal element-wise +as maximum of the two inputs u1=inPort1.signal and u2=inPort2.signal: +
+ +y[i] = max ( u1[i] , u2[i] ); ++
++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+block Max "Pass through the largest signal" + extends Interfaces.MI2MO; +equation + for i in 1:n loop + y[i] = max(u1[i], u2[i]); + end for; +end Max; ++
+ +
+This block computes the output y=outPort.signal element-wise +as minimum of the two inputs u1=inPort1.signal and u2=inPort2.signal: +
+ +y[i] = min ( u1[i] , u2[i] ); ++
++
+
Name | Default | Description |
---|---|---|
n | 1 | Dimension of input and output vectors. |
+block Min "Pass through the smallest signal" + extends Interfaces.MI2MO; +equation + for i in 1:n loop + y[i] = min(u1[i], u2[i]); + end for; +end Min; ++
+ +
+This block sets the Boolean output y=outPort.signal element-wise +to true, when the Boolean input u=inPort.signal shows a rising edge: +
+ +y[i] = edge( u[i] ); ++
++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block Edge "Indicates rising edge of boolean signal" + extends Interfaces.BooleanMIMOs; +equation + for i in 1:n loop + y[i] = edge(u[i]); + end for; +end Edge; ++
+ +
+This block sets the Boolean output y=outPort.signal element-wise +to true, when the Boolean input u=inPort.signal shows a rising +or falling edge, i.e., when the signal changes: +
+ +y[i] = change( u[i] ); ++
++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block BooleanChange "Indicates boolean signal changing" + extends Interfaces.BooleanMIMOs; +equation + for i in 1:n loop + y[i] = change(u[i]); + end for; +end BooleanChange; ++
+ +
+This block sets the Boolean output y=outPort.signal element-wise +to true, when the Integer input u=inPort.signal changes: +
+ +y[i] = change( u[i] ); ++
++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block IntegerChange "Indicates integer signal changing" + extends Interfaces.IntegerMIBooleanMOs; +equation + for i in 1:n loop + y[i] = change(u[i]); + end for; +end IntegerChange; ++
+
+
+This package contains discontinuous and +non-differentiable, algebraic input/output blocks. +In particular the following blocks are provided: +
+ ++ Limiter Limit the range of a signal to fixed limits. + VariableLimiter Limit the range of a signal to variable limits. + DeadZone Provide a region of zero output. ++ +
Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+The Limiter block passes its input signal as output signal +as long as the input is within the specified upper and lower +limits. If this is not the case, the corresponding limit is passed +as output. +
+++
+
Name | Default | Description |
---|---|---|
uMax[:] | {1} | Upper limits of input signals |
uMin[size(uMax, 1)] | -uMax | Lower limits of input signals |
+block Limiter "Limit the range of a signal" + parameter Real uMax[:]={1} "Upper limits of input signals"; + parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax + "Lower limits of input signals"; + extends Interfaces.MIMOs(final n=size(uMax, 1)); + +equation + for i in 1:n loop + y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i] + else u[i]; + end for; +end Limiter; ++
+ +
+The Limiter block passes its input signal as output signal +as long as the input is within the upper and lower +limits specified by the two additional inputs limit1 and +limit2. If this is not the case, the corresponding limit +is passed as output. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+block VariableLimiter + "Limit the range of a signal with variable limits" + extends Interfaces.MIMOs; + + Interfaces.InPort limit1(final n=n); + Interfaces.InPort limit2(final n=n); +protected + Real uMax[n]; + Real uMin[n]; + +equation + for i in 1:n loop + uMax[i] = max(limit1.signal[i], limit2.signal[i]); + uMin[i] = min(limit1.signal[i], limit2.signal[i]); + y[i] = if u[i] > uMax[i] then uMax[i] else if u[i] < uMin[i] then uMin[i] + else u[i]; + end for; +end VariableLimiter; ++
+ +
+The DeadZone block defines a region of zero output. +
+ ++If the input is within uMin ... uMax, the output +is zero. Outside of this zone, the output is a linear +function of the input with a slope of 1. +
+++
+
Name | Default | Description |
---|---|---|
uMax[:] | {1} | Upper limits of dead zones |
uMin[size(uMax, 1)] | -uMax | Lower limits of dead zones |
+block DeadZone "Provide a region of zero output" + parameter Real uMax[:]={1} "Upper limits of dead zones"; + parameter Real uMin[size(uMax, 1)](max=uMax) = -uMax + "Lower limits of dead zones"; + extends Interfaces.MIMOs(final n=size(uMax, 1)); + +equation + for i in 1:n loop + y[i] = if u[i] > uMax[i] then u[i] - uMax[i] else if u[i] < uMin[i] then u[ + i] - uMin[i] else 0; + end for; +end DeadZone; ++
+
+ + + + + + + + + + + + + + + + + + +
+
+This package contains source components, i.e., blocks which +have only output signals. These blocks are used as signal generators. +
+ +The following sources are provided to generate Real signals:
+ ++ Clock Generate actual time. + Constant Generate constant signals. + Step Generate step signals. + Ramp Generate ramp signals. + Sine Generate sine signals. + ExpSine Generate exponentially damped sine signals. + Exponentials Generate a rising and falling exponential signal. + Pulse Generate pulse signals. + SawTooth Generate sawtooth signals. + Trapezoid Generate trapezoidal signals. + KinematicPTP Generate an acceleration signal to move as fast as + possible along a distance within given kinematic constraints. + TimeTable Generate a (possibly discontinuous) signal by + linear interpolation in a table. ++ +
The following sources are provided to generate Boolean signals:
+ ++ BooleanConstant Generate constant signals. + BooleanStep Generate step signals. + BooleanPulse Generate pulse signals. + SampleTrigger Generate sample triggers. ++ +
The following sources are provided to generate Integer signals:
+ ++ IntegerConstant Generate constant signals. + IntegerStep Generate step signals. ++ +
+All sources are vectorized. This means that the output +is a vector of signals. The number of outputs is in correspondance +to the lenght of the parameter vectors defining the signals. Examples: +
+ ++ // output.signal[1] = 2*sin(2*pi*2.1); + // output.signal[2] = 3*sin(2*pi*2.3); + Modelica.Blocks.Sources.Sine s1(amplitude={2,3}, freqHz={2.1,2.2}); + + // output.signal[1] = 3*sin(2*pi*2.1); + // output.signal[2] = 3*sin(2*pi*2.3); + Modelica.Blocks.Sources.Sine s2(amplitude={3}, freqHz={2.1,2.3}); ++ +
+The first instance s1 consists of two sinusoidal output signals +with the given amplitudes and frequencies. The second instance s2 +consists also of two sinusoidal output signals. Since the +amplitudes are the same for all output signals of s2, this value +has to be provided only once. This approached is used for all +parameters of signal sources: Whenever only a scalar value is +provided for one parameter, then this value is used for all output +signals. +
+ ++All Real source signals (with the exception of the Constant source) +have at least the following two parameters: +
+ ++ offset Value which is added to all signal values. + startTime Start time of signal. For time < startTime, + the output is set to offset. ++ +
+The offset parameter is especially useful in order to shift +the corresponding source, such that at initial time the system +is stationary. To determine the corresponding value of offset, +usually requires a trimming calculation. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association, DLR and Fraunhofer-Gesellschaft.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+
Name | Default | Description |
---|---|---|
height[:] | {1} | Heights of steps |
offset[:] | {0} | offset of output signal |
startTime[:] | {0} | output = offset for time < startTime [s] |
+block IntegerStep "Generate step signals of type Integer" + parameter Integer height[:]={1} "Heights of steps"; + extends Interfaces.IntegerSignalSource(final nout=max([size(height, 1); size( + offset, 1); size(startTime, 1)])); +protected + parameter Integer p_height[nout]=(if size(height, 1) == 1 then ones(nout)* + height[1] else height); + parameter Integer p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)* + offset[1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); +equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_height[i]); + end for; +end IntegerStep; ++
+ +
+
Name | Default | Description |
---|---|---|
startTime[:] | {0} | Time instants of steps [s] |
startValue[size(startTime, 1)] | fill(false, size(startTime, 1)) | Output before startTime |
+block BooleanStep "Generate step signals of type Boolean" + parameter SI.Time startTime[:]={0} "Time instants of steps"; + parameter Boolean startValue[size(startTime, 1)]=fill(false, size(startTime, + 1)) "Output before startTime"; + extends Interfaces.BooleanSignalSource(final nout=size(startTime, 1)); +equation + for i in 1:nout loop + outPort.signal[i] = if time >= startTime[i] then not startValue[i] else + startValue[i]; + end for; +end BooleanStep; ++
+ +
+
Name | Default | Description |
---|---|---|
amplitude[:] | {1} | Amplitudes of sine waves |
freqHz[:] | {1} | Frequencies of sine waves [Hz] |
phase[:] | {0} | Phases of sine waves [rad] |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block Sine "Generate sine signals" + parameter Real amplitude[:]={1} "Amplitudes of sine waves"; + parameter SI.Frequency freqHz[:]={1} "Frequencies of sine waves"; + parameter SI.Angle phase[:]={0} "Phases of sine waves"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1); size( + phase, 1); size(offset, 1); size(startTime, 1)])); +protected + constant Real pi=Modelica.Constants.pi; + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout)* + amplitude[1] else amplitude); + parameter Real p_freqHz[nout]=(if size(freqHz, 1) == 1 then ones(nout)*freqHz + [1] else freqHz); + parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[1] + else phase); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); +equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_amplitude[i]*Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i]) + + p_phase[i])); + end for; +end Sine; ++
+ +
+
Name | Default | Description |
---|---|---|
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block Clock "Generate actual time signals " + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(offset, 1); size(startTime, 1)])); +protected + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + +equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + time - p_startTime[i]); + end for; +end Clock; ++
+ +
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Constant output values |
+block Constant "Generate constant signals of type Real" + parameter Real k[:]={1} "Constant output values"; + extends Interfaces.MO(final nout=size(k, 1)); + +equation + outPort.signal = k; +end Constant; ++
+ +
+
Name | Default | Description |
---|---|---|
height[:] | {1} | Heights of steps |
offset[:] | {0} | offset of output signal |
startTime[:] | {0} | output = offset for time < startTime [s] |
+block Step "Generate step signals of type Real" + parameter Real height[:]={1} "Heights of steps"; + extends Interfaces.SignalSource(final nout=max([size(height, 1); size(offset, 1); + size(startTime, 1)])); +protected + parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)*height + [1] else height); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); +equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_height[i]); + end for; +end Step; ++
+ +
+
Name | Default | Description |
---|---|---|
height[:] | {1} | Heights of ramps |
duration[:] | {2} | Durations of ramps |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block Ramp "Generate ramp signals" + parameter Real height[:]={1} "Heights of ramps"; + parameter Real duration[:](min=Modelica.Constants.small) = {2} + "Durations of ramps"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(height, 1); size(duration, 1); size( + offset, 1); size(startTime, 1)])); +protected + parameter Real p_height[nout]=(if size(height, 1) == 1 then ones(nout)*height + [1] else height); + parameter Real p_duration[nout]=(if size(duration, 1) == 1 then ones(nout)* + duration[1] else duration); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + +equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else if + time < (p_startTime[i] + p_duration[i]) then (time - p_startTime[i])* + p_height[i]/p_duration[i] else p_height[i]); + end for; +end Ramp; ++
+ +
+
Name | Default | Description |
---|---|---|
amplitude[:] | {1} | Amplitudes of sine waves |
freqHz[:] | {2} | Frequencies of sine waves [Hz] |
phase[:] | {0} | Phases of sine waves [rad] |
damping[:] | {1} | Damping coefficients of sine waves [s-1] |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block ExpSine "Generate exponentially damped sine signals" + parameter Real amplitude[:]={1} "Amplitudes of sine waves"; + parameter SI.Frequency freqHz[:]={2} "Frequencies of sine waves"; + parameter SI.Angle phase[:]={0} "Phases of sine waves"; + parameter SI.Damping damping[:]={1} "Damping coefficients of sine waves"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(freqHz, 1); size( + phase, 1); size(damping, 1); size(offset, 1); size(startTime, 1)])); +protected + constant Real pi=Modelica.Constants.pi; + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout)* + amplitude[1] else amplitude); + parameter Real p_freqHz[nout]=(if size(freqHz, 1) == 1 then ones(nout)*freqHz + [1] else freqHz); + parameter Real p_phase[nout]=(if size(phase, 1) == 1 then ones(nout)*phase[1] + else phase); + parameter Real p_damping[nout]=(if size(damping, 1) == 1 then ones(nout)* + damping[1] else damping); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); +equation + for i in 1:nout loop + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else + p_amplitude[i]*Modelica.Math.exp(-(time - p_startTime[i])*p_damping[i])* + Modelica.Math.sin(2*pi*p_freqHz[i]*(time - p_startTime[i]) + p_phase[i])) + ; + end for; +end ExpSine; ++
+ +
+
Name | Default | Description |
---|---|---|
outMax[:] | {1} | Height of output for infinite riseTime |
riseTime[:] | {0.5} | Rise time [s] |
riseTimeConst[:] | {0.1} | Rise time constant [s] |
fallTimeConst[:] | riseTimeConst | Fall time constant [s] |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block Exponentials "Generate a rising and falling exponential signal" + + parameter Real outMax[:]={1} "Height of output for infinite riseTime"; + parameter SI.Time riseTime[:](min=0) = {0.5} "Rise time"; + parameter SI.Time riseTimeConst[:](min=Modelica.Constants.small) = {0.1} + "Rise time constant"; + parameter SI.Time fallTimeConst[:](min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(outMax, 1); size(riseTime, 1); size( + riseTimeConst, 1); size(fallTimeConst, 1); size(offset, 1); size( + startTime, 1)])); +protected + parameter Real p_outMax[nout]=(if size(outMax, 1) == 1 then ones(nout)*outMax + [1] else outMax); + parameter SI.Time p_riseTime[nout]=(if size(riseTime, 1) == 1 then ones(nout)* + riseTime[1] else riseTime); + parameter SI.Time p_riseTimeConst[nout]=(if size(riseTimeConst, 1) == 1 then ones( + nout)*riseTimeConst[1] else riseTimeConst); + parameter SI.Time p_fallTimeConst[nout]=(if size(fallTimeConst, 1) == 1 then ones( + nout)*fallTimeConst[1] else fallTimeConst); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + Real y_riseTime[nout]; +equation + for i in 1:nout loop + y_riseTime[i] = p_outMax[i]*(1 - Modelica.Math.exp(-p_riseTime[i]/ + p_riseTimeConst[i])); + outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i]) then 0 else + if (time < (p_startTime[i] + p_riseTime[i])) then p_outMax[i]*(1 - + Modelica.Math.exp(-(time - p_startTime[i])/p_riseTimeConst[i])) else + y_riseTime[i]*Modelica.Math.exp(-(time - p_startTime[i] - p_riseTime[i])/ + p_fallTimeConst[i])); + end for; + +end Exponentials; ++
+ +
+
Name | Default | Description |
---|---|---|
amplitude[:] | {1} | Amplitudes of pulses |
width[:] | {50} | Widths of pulses in % of periods |
period[:] | {1} | Times for one period [s] |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block Pulse "Generate pulse signals of type Real" + parameter Real amplitude[:]={1} "Amplitudes of pulses"; + parameter Real width[:]( + final min=Modelica.Constants.small, + final max=100) = {50} "Widths of pulses in % of periods"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(width, 1); size( + period, 1); size(offset, 1); size(startTime, 1)])); +protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout)* + amplitude[1] else amplitude); + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)*period[1] + else period); + parameter SI.Time p_width[nout]=diagonal(p_period)*(if size(width, 1) == 1 then ones + (nout)*width[1] else width)/100 "Width of one pulse"; + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; +equation + for i in 1:nout loop + when sample(p_startTime[i], p_period[i]) then + T0[i] = time; + end when; + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] or time >= T0[i + ] + p_width[i] then 0 else p_amplitude[i]); + end for; +end Pulse; ++
+ +
+
Name | Default | Description |
---|---|---|
amplitude[:] | {1} | Amplitudes of saw tooths |
period[:] | {1} | Times for one period [s] |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block SawTooth "Generate saw tooth signals" + parameter Real amplitude[:]={1} "Amplitudes of saw tooths"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(period, 1); size( + offset, 1); size(startTime, 1)])); +protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout)* + amplitude[1] else amplitude); + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)*period[1] + else period); + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; +equation + for i in 1:nout loop + when sample(p_startTime[i], p_period[i]) then + T0[i] = time; + end when; + outPort.signal[i] = p_offset[i] + (if time < p_startTime[i] then 0 else ( + p_amplitude[i]/p_period[i])*(time - T0[i])); + end for; +end SawTooth; ++
+ +
+
Name | Default | Description |
---|---|---|
amplitude[:] | {1} | Amplitudes of trapezoids |
rising[:] | {0} | Rising durations of trapezoids [s] |
width[:] | {0.5} | Width durations of trapezoids [s] |
falling[:] | {0} | Falling durations of trapezoids [s] |
period[:] | {1} | Time for one period [s] |
nperiod[:] | {-1} | Number of periods (< 0 means infinite number of periods) |
offset[:] | {0} | Offsets of output signals |
startTime[:] | {0} | Output = offset for time < startTime [s] |
+block Trapezoid "Generate trapezoidal signals of type Real" + parameter Real amplitude[:]={1} "Amplitudes of trapezoids"; + parameter SI.Time rising[:](final min=0) = {0} "Rising durations of trapezoids"; + parameter SI.Time width[:](final min=0) = {0.5} "Width durations of trapezoids"; + parameter SI.Time falling[:](final min=0) = {0} "Falling durations of trapezoids"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Time for one period"; + parameter Integer nperiod[:]={-1} + "Number of periods (< 0 means infinite number of periods)"; + parameter Real offset[:]={0} "Offsets of output signals"; + parameter SI.Time startTime[:]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=max([size(amplitude, 1); size(rising, 1); size( + width, 1); size(falling, 1); size(period, 1); size(nperiod, 1); size( + offset, 1); size(startTime, 1)])); +protected + parameter Real p_amplitude[nout]=(if size(amplitude, 1) == 1 then ones(nout)* + amplitude[1] else amplitude); + parameter SI.Time T_rising[nout]=(if size(rising, 1) == 1 then ones(nout)*rising[1] + else rising) "End time of rising phase within one period"; + parameter SI.Time T_width[nout]=T_rising + (if size(width, 1) == 1 then ones(nout)* + width[1] else width) "End time of width phase within one period"; + parameter SI.Time T_falling[nout]=T_width + (if size(falling, 1) == 1 then ones(nout + )*falling[1] else falling) "End time of falling phase within one period"; + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)*period[1] + else period) "Duration of one period"; + parameter Real p_offset[nout]=(if size(offset, 1) == 1 then ones(nout)*offset + [1] else offset); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; + Integer counter[nout](start=(if size(nperiod, 1) == 1 then ones(nout)*nperiod + [1] else nperiod)) "Period counter"; + Integer counter2[nout](start=(if size(nperiod, 1) == 1 then ones(nout)* + nperiod[1] else nperiod)); +equation + for i in 1:nout loop + when pre(counter2[i]) <> 0 and sample(p_startTime[i], p_period[i]) then + T0[i] = time; + counter2[i] = pre(counter[i]); + counter[i] = pre(counter[i]) - (if pre(counter[i]) > 0 then 1 else 0); + end when; + outPort.signal[i] = p_offset[i] + (if (time < p_startTime[i] or counter2[i] + == 0 or time >= T0[i] + T_falling[i]) then 0 else if (time < T0[i] + + T_rising[i]) then (time - T0[i])*p_amplitude[i]/T_rising[i] else if (time + < T0[i] + T_width[i]) then p_amplitude[i] else (T0[i] + T_falling[i] - + time)*p_amplitude[i]/(T_falling[i] - T_width[i])); + end for; +end Trapezoid; ++
+ +
+The goal is to move as fast as possible along a distance +deltaq +under given kinematical constraints. The distance can be a positional or +angular range. In robotics such a movement is called PTP (Point-To-Point). +This source block generates the acceleration qdd of this signal +as output. After integrating the output two times, the position q is +obtained. The signal is constructed in such a way that it is not possible +to move faster, given the maximally allowed velocity qd_max and +the maximally allowed acceleration qdd_max. +
+ ++If several distances are given (vector deltaq has more than 1 element), +an acceleration output vector is constructed such that all signals +are in the same periods in the acceleration, constant velocity +and deceleration phase. This means that only one of the signals +is at its limits whereas the others are sychnronized in such a way +that the end point is reached at the same time instant. +
+ ++This element is useful to generate a reference signal for a controller +which controls a drive train or in combination with model +Modelica.Mechanics.Rotational.Accelerate to drive +a flange according to a given acceleration. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
deltaq[:] | {1} | Distance to move |
qd_max[:] | {1} | Maximum velocities der(q) |
qdd_max[:] | {1} | Maximum accelerations der(qd) |
startTime | 0 | Time instant at which movement starts [s] |
+block KinematicPTP + "Move as fast as possible along a distance within given kinematic constraints" + + + parameter Real deltaq[:]={1} "Distance to move"; + parameter Real qd_max[:](final min=Modelica.Constants.small) = {1} + "Maximum velocities der(q)"; + parameter Real qdd_max[:](final min=Modelica.Constants.small) = {1} + "Maximum accelerations der(qd)"; + parameter SI.Time startTime=0 "Time instant at which movement starts"; + + extends Interfaces.MO(final nout=max([size(deltaq, 1); size(qd_max, 1); size( + qdd_max, 1)])); + +protected + parameter Real p_deltaq[nout]=(if size(deltaq, 1) == 1 then ones(nout)*deltaq + [1] else deltaq); + parameter Real p_qd_max[nout]=(if size(qd_max, 1) == 1 then ones(nout)*qd_max + [1] else qd_max); + parameter Real p_qdd_max[nout]=(if size(qdd_max, 1) == 1 then ones(nout)* + qdd_max[1] else qdd_max); + Real sd_max; + Real sdd_max; + Real sdd; + Real aux1[nout]; + Real aux2[nout]; + SI.Time Ta1; + SI.Time Ta2; + SI.Time Tv; + SI.Time Te; + Boolean noWphase; +equation + for i in 1:nout loop + aux1[i] = p_deltaq[i]/p_qd_max[i]; + aux2[i] = p_deltaq[i]/p_qdd_max[i]; + end for; + sd_max = 1/max(abs(aux1)); + sdd_max = 1/max(abs(aux2)); + + Ta1 = sqrt(1/sdd_max); + Ta2 = sd_max/sdd_max; + noWphase = Ta2 >= Ta1; + Tv = if noWphase then Ta1 else 1/sd_max; + Te = if noWphase then Ta1 + Ta1 else Tv + Ta2; + + // path-acceleration + sdd = if time < startTime then 0 else ((if noWphase then (if time < Ta1 + + startTime then sdd_max else (if time < Te + startTime then -sdd_max else 0) + ) else (if time < Ta2 + startTime then sdd_max else (if time < Tv + + startTime then 0 else (if time < Te + startTime then -sdd_max else 0))))); + + // acceleration + outPort.signal = p_deltaq*sdd; +end KinematicPTP; ++
+ +
+This block generates an output signal by linear interpolation in +a table. The time points and function values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the data to be interpolated. +The table interpolation has the following proporties: +
+ ++Example: +
+ ++ table = [0 0 + 1 0 + 1 1 + 2 4 + 3 9 + 4 16] + +If, e.g., time = 1.0, the output y = 0.0 (before event), 1.0 (after event) + e.g., time = 1.5, the output y = 2.5, + e.g., time = 2.0, the output y = 4.0, + e.g., time = 5.0, the output y = 23.0 (i.e. extrapolation). ++ + +
Release Notes:
++ parameter Real table[:, :]=[0, 0; 1, 1; 2, 4]; ++ to +
+ parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4]; ++
++
+
Name | Default | Description |
---|---|---|
table[:, 2] | [0, 0; 1, 1; 2, 4] | Table matrix (time = first column) |
offset[1] | {0} | Offset of output signal |
startTime[1] | {0} | Output = offset for time < startTime [s] |
+block TimeTable + "Generate a (possibly discontinuous) signal by linear interpolation in a table" + + + parameter Real table[:, 2]=[0, 0; 1, 1; 2, 4] + "Table matrix (time = first column)"; + parameter Real offset[1]={0} "Offset of output signal"; + parameter SI.Time startTime[1]={0} "Output = offset for time < startTime"; + extends Interfaces.MO(final nout=1); +protected + Real a "Interpolation coefficients a of actual interval (y=a*x+b)"; + Real b "Interpolation coefficients b of actual interval (y=a*x+b)"; + Integer last(start=1) "Last used lower grid index"; + SI.Time nextEvent(start=0) "Next event instant"; + function getInterpolationCoefficients + "Determine interpolation coefficients and next time event" + input Real table[:, 2] "Table for interpolation"; + input Real offset "y-offset"; + input Real startTime "time-offset"; + input Real t "Actual time instant"; + input Integer last "Last used lower grid index"; + input Real TimeEps "Relative epsilon to check for identical time instants"; + output Real a "Interpolation coefficients a (y=a*x + b)"; + output Real b "Interpolation coefficients b (y=a*x + b)"; + output Real nextEvent "Next event instant"; + output Integer next "New lower grid index"; + protected + Integer columns=2 "Column to be interpolated"; + Integer ncol=2 "Number of columns to be interpolated"; + Integer nrow=size(table, 1) "Number of table rows"; + Integer next0; + Real tp; + Real dt; + algorithm + next := last; + nextEvent := t - TimeEps*abs(t); + // in case there are no more time events + tp := t + TimeEps*abs(t) - startTime; + + if tp < 0.0 then + // First event not yet reached + nextEvent := startTime; + a := 0; + b := offset; + elseif nrow < 2 then + // Special action if table has only one row + a := 0; + b := offset + table[1, columns]; + else + + // Find next time event instant. Note, that two consecutive time instants + // in the table may be identical due to a discontinuous point. + while next < nrow and tp >= table[next, 1] loop + next := next + 1; + end while; + + // Define next time event, if last table entry not reached + if next < nrow then + nextEvent := startTime + table[next, 1]; + end if; + + // Determine interpolation coefficients + next0 := next - 1; + dt := table[next, 1] - table[next0, 1]; + if dt <= TimeEps*abs(table[next, 1]) then + // Interpolation interval is not big enough, use "next" value + a := 0; + b := offset + table[next, columns]; + else + a := (table[next, columns] - table[next0, columns])/dt; + b := offset + table[next0, columns] - a*table[next0, 1]; + end if; + end if; + // Take into account startTime "a*(time - startTime) + b" + b := b - a*startTime; + end getInterpolationCoefficients; +algorithm + when {time >= pre(nextEvent),initial()} then + (a,b,nextEvent,last) := getInterpolationCoefficients(table, scalar(offset) + , scalar(startTime), time, last, 100*Modelica.Constants.eps); + end when; +equation + outPort.signal[1] = a*time + b; +end TimeTable; ++
+ +
+
Name | Default | Description |
---|---|---|
k[:] | {true} | Constant output values |
+block BooleanConstant "Generate constant signals of type Boolean" + parameter Boolean k[:]={true} "Constant output values"; + extends Interfaces.BooleanSignalSource(final nout=size(k, 1)); + +equation + outPort.signal = k; +end BooleanConstant; ++
+ +
+
Name | Default | Description |
---|---|---|
width[:] | {50} | Widths of pulses in % of period |
period[:] | {1} | Times for one period [s] |
startTime[:] | {0} | Iime instants of first pulse [s] |
+block BooleanPulse "Generate pulse signals of type Boolean" + parameter Real width[:]( + final min=Modelica.Constants.small, + final max=100) = {50} "Widths of pulses in % of period"; + parameter SI.Time period[:](final min=Modelica.Constants.small) = {1} + "Times for one period"; + parameter SI.Time startTime[:]={0} "Iime instants of first pulse"; + extends Interfaces.BooleanSignalSource(final nout=max([size(width, 1); size(period + , 1); size(startTime, 1)])); +protected + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)*period[1] + else period); + parameter SI.Time Twidth[nout]=diagonal(p_period)*(if size(width, 1) == 1 then ones( + nout)*width[1] else width)/100 "width of one pulse"; + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); + SI.Time T0[nout](final start=p_startTime) "Start time of current period"; +equation + for i in 1:nout loop + when sample(p_startTime[i], p_period[i]) then + T0[i] = time; + end when; + outPort.signal[i] = time >= T0[i] and time < T0[i] + Twidth[i]; + end for; +end BooleanPulse; ++
+ +
+
Name | Default | Description |
---|---|---|
period[:] | {0.01} | Sample periods [s] |
startTime[:] | {0} | Time instants of first sample triggers [s] |
+block SampleTrigger "Generate sample trigger signals" + parameter SI.Time period[:](final min=Modelica.Constants.small) = {0.01} + "Sample periods"; + parameter SI.Time startTime[:]={0} "Time instants of first sample triggers"; + extends Interfaces.BooleanSignalSource(final nout=max([size(period, 1); size( + startTime, 1)])); + +protected + parameter SI.Time p_period[nout]=(if size(period, 1) == 1 then ones(nout)*period[1] + else period); + parameter SI.Time p_startTime[nout]=(if size(startTime, 1) == 1 then ones(nout)* + startTime[1] else startTime); +equation + for i in 1:nout loop + outPort.signal[i] = sample(p_startTime[i], p_period[i]); + end for; +end SampleTrigger; ++
+ +
+
Name | Default | Description |
---|---|---|
k[:] | {1} | Constant output values |
+block IntegerConstant "Generate constant signals of type Integer" + parameter Integer k[:]={1} "Constant output values"; + extends Interfaces.IntegerMO(final nout=size(k, 1)); + +equation + outPort.signal = k; +end IntegerConstant; ++
+
+
+
+This package provides often needed constants from mathematics, machine +dependent constants and constants from nature. The latter constants +(name, value, description) are from the following source: +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+constant Real pi=2*Modelica.Math.asin(1.0);
+constant Real D2R=pi/180 "Degree to Radian";
+constant Real R2D=180/pi "Radian to Degree";
+constant Real eps=1.e-15 "Biggest number such that 1.0 + eps = 1.0";
+constant Real small=1.e-60 + "Smallest number such that small and -small are representable on the machine";
+constant Real inf=1.e+60 + "Biggest Real number such that inf and -inf are representable on the machine";
+constant Integer Integer_inf=2147483647 + "Biggest Integer number such that Integer_inf and -Integer_inf are representable on the machine";
+constant SI.Velocity c=299792458 "Speed of light in vacuum";
+constant SI.Acceleration g_n=9.80665 "Standard acceleration of gravity on earth";
+constant Real G(final unit="m3/(kg.s2)") = 6.673e-11 + "Newtonian constant of gravitation";
+constant Real h(final unit="J.s") = 6.62606876e-34 "Planck constant";
+constant Real k(final unit="J/K") = 1.3806503e-23 "Boltzmann constant";
+constant Real R(final unit="J/(mol.K)") = 8.314472 "Molar gas constant";
+constant Real sigma(final unit="W/(m2.K4)") = 5.670400e-8 + "Stefan-Boltzmann constant";
+constant Real N_A(final unit="1/mol") = 6.02214199e23 "Avogadro constant";
+constant Real mue_0(final unit="N/A2") = 4*pi*1.e-7 "Magnetic constant";
+constant Real epsilon_0(final unit="F/m") = 1/(mue_0*c*c) "Electric constant";
+constant NonSI.Temperature_degC T_zero=-273.15 "Absolute zero temperature";
+constant Real E=e;
+constant Real PI=pi;
+constant Real EPS=eps;
+constant Real SMALL=small;
+constant Real INF=inf;
+constant Real INTEGER_INF=Integer_inf;
+constant Real C=c;
+constant Real H=h;
+constant Real K=k;
+constant Real R0=R;
+constant Real SIGMA=sigma;
+constant Real G_EARTH=g_n;
+constant Real T_ZERO=T_zero;
+
+
+
+This library contains electrical components to build up analog and digital circuits. +The library is currently structured in the following sublibraries: +
++
+
+
+
+
+
+
+
+This package contains packages for analog electrical components: +
+
+
+
+
+
+
+
+This package contains basic analog electrical components: +
+
+
+
+
+
+ +
+Ground of an electrical circuit. The potential at the +ground node is zero. Every electrical circuit has to contain +at least one ground object. +
+++
+model Ground "Ground node" + Interfaces.Pin p; +equation + p.v = 0; +end Ground; ++
+ +
+The linear resistor connects the branch voltage v with the +branch current i by i*R = v. +The Resistance R is allowed to be positive, zero, or negative. +
+++
+
Name | Default | Description |
---|---|---|
R | 1 | Resistance [Ohm] |
+model Resistor "Ideal linear electrical resistor" + extends Interfaces.OnePort; + parameter SI.Resistance R=1 "Resistance"; +equation + R*i = v; +end Resistor; ++
+ +
This is a model for an electrical resistor where the generated heat +is dissipated to the environment via connector heatPort and where +the resistance R is temperature dependent according to the following +equation:
+ +R = R_ref*(1 + alpha*(heatPort.T - T_ref)) ++ +
alpha is the temperature coefficient of resistance, which +is often abbreviated as TCR. In resistor catalogues, it is usually +defined as X [ppm/K] (parts per million, similarly to per centage) +meaning X*1.e-6 [1/K]. Resistors are available for 1 .. 7000 ppm/K, +i.e., alpha = 1e-6 .. 7e-3 1/K;
+ +When connector heatPort is not connected, the temperature +dependent behaviour is switched off by setting heatPort.T = T_ref. +Additionally, the equation heatPort.Q_dot = 0 is implicitly present +due to a special rule in Modelica that flow variables of not connected +connectors are set to zero.
+++
+
Name | Default | Description |
---|---|---|
R_ref | Resistance at temperature T_ref [Ohm] | |
T_ref | 300 | Reference temperature [K] |
alpha | 0 | Temperature coefficient of resistance [1/K] |
+model HeatingResistor "Temperature dependent electrical resistor" + extends Interfaces.OnePort; + + parameter SI.Resistance R_ref "Resistance at temperature T_ref"; + parameter SI.Temperature T_ref=300 "Reference temperature"; + parameter Real alpha(unit="1/K") = 0 "Temperature coefficient of resistance"; + + SI.Resistance R "Resistance = R_ref*(1 + alpha*(heatPort.T - T_ref));"; + + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort; +equation + v = R*i; + + if cardinality(heatPort) > 0 then + R = R_ref*(1 + alpha*(heatPort.T - T_ref)); + heatPort.Q_dot = -v*i; + else + /* heatPort is not connected resulting in the + implicit equation 'heatPort.Q_dot = 0' + */ + R = R_ref; + heatPort.T = T_ref; + end if; +end HeatingResistor; ++
+ +
+The linear conductor connects the branch voltage v with the +branch current i by i = v*G. +The Conductance G is allowed to be positive, zero, or negative. +
+++
+
Name | Default | Description |
---|---|---|
G | 1 | Conductance [S] |
+model Conductor "Ideal linear electrical conductor" + extends Interfaces.OnePort; + parameter SI.Conductance G=1 "Conductance"; +equation + i = G*v; +end Conductor; ++
+ +
+The linear capacitor connects the branch voltage v with the +branch current i by i = C * dv/dt. +The Capacitance C is allowed to be positive, zero, or negative. +
+++
+
Name | Default | Description |
---|---|---|
C | 1 | Capacitance [F] |
+model Capacitor "Ideal linear electrical capacitor" + extends Interfaces.OnePort; + parameter SI.Capacitance C=1 "Capacitance"; +equation + i = C*der(v); +end Capacitor; ++
+ +
+The linear inductor connects the branch voltage v with the +branch current i by v = L * di/dt. +The Inductance L is allowed to be positive, zero, or negative. +
+++
+
Name | Default | Description |
---|---|---|
L | 1 | Inductance [H] |
+model Inductor "Ideal linear electrical inductor" + extends Interfaces.OnePort; + parameter SI.Inductance L=1 "Inductance"; +equation + L*der(i) = v; +end Inductor; ++
+ +
The transformer is a two port. The left port voltage v1, left port current i1, +right port voltage v2 and right port current i2 are connected by the following +relation:
+| v1 | | L1 M | | i1' | + | | = | | | | + | v2 | | M L2 | | i2' |+
L1, L2, and M are the primary, secondary, and coupling inductances respectively.
+++
+
Name | Default | Description |
---|---|---|
L1 | 1 | Primary inductance [H] |
L2 | 1 | Secondary inductance [H] |
M | 1 | Coupling inductance [H] |
+model Transformer "Transformer with two ports" + extends Interfaces.TwoPort; + parameter SI.Inductance L1=1 "Primary inductance"; + parameter SI.Inductance L2=1 "Secondary inductance"; + parameter SI.Inductance M=1 "Coupling inductance"; +equation + v1 = L1*der(i1) + M*der(i2); + v2 = M*der(i1) + L2*der(i2); +end Transformer; ++
+ +
+A gyrator is a two-port element defined by the following equations: +
++ i1 = G2 * v2 + i2 = -G1 * v1 ++
+where the constants G1, G2 are called the gyration conductance. +
+++
+
Name | Default | Description |
---|---|---|
G1 | 1 | Gyration conductance [S] |
G2 | 1 | Gyration conductance [S] |
+model Gyrator "Gyrator" + extends Interfaces.TwoPort; + parameter SI.Conductance G1=1 "Gyration conductance"; + parameter SI.Conductance G2=1 "Gyration conductance"; +equation + i1 = G2*v2; + i2 = -G1*v1; +end Gyrator; ++
+ +
+EMF transforms electrical energy into rotational mechanical energy. +It is used as basic building block of an electrical motor. The mechanical +connector flange_b can be connected to elements of the +Modelica.Mechanics.Rotational library. flange_b.tau is the cut-torque, +flange_b.phi is the angle at the rotational connection. +
+++
+
Name | Default | Description |
---|---|---|
k | 1 | Transformation coefficient [N.m/A] |
+model EMF "Electromotoric force (electric/mechanic transformer)" + parameter Real k(final unit="N.m/A") = 1 "Transformation coefficient"; + + SI.Voltage v "Voltage drop between the two pins"; + SI.Current i "Current flowing from positive to negative pin"; + SI.AngularVelocity w "Angular velocity of flange_b"; + Interfaces.PositivePin p; + Interfaces.NegativePin n; + Modelica.Mechanics.Rotational.Interfaces.Flange_b flange_b; +equation + v = p.v - n.v; + 0 = p.i + n.i; + i = p.i; + + w = der(flange_b.phi); + k*w = v; + flange_b.tau = -k*i; +end EMF; ++
+ +
+The linear voltage-controlled voltage source is a TwoPort. +The right port voltage v2 is controlled by the left port voltage v1 +via +
+ ++ v2 = v1 * gain. ++ +
+The left port current is zero. Any voltage gain can be chosen. +
+++
+
Name | Default | Description |
---|---|---|
gain | 1 | Voltage gain |
+model VCV "Linear voltage-controlled voltage source" + extends Interfaces.TwoPort; + parameter Real gain=1 "Voltage gain"; +equation + v2 = v1*gain; + i1 = 0; +end VCV; ++
+ +
+The linear voltage-controlled current source is a TwoPort. +The right port current i2 is controlled by the left port voltage v1 +via +
++ i2 = v1 * transConductance. ++
+The left port current is zero. Any transConductance can be chosen. +
+++
+
Name | Default | Description |
---|---|---|
transConductance | 1 | Transconductance [S] |
+model VCC "Linear voltage-controlled current source" + extends Interfaces.TwoPort; + parameter SI.Conductance transConductance=1 "Transconductance"; +equation + i2 = v1*transConductance; + i1 = 0; +end VCC; ++
+ +
+The linear current-controlled voltage source is a TwoPort. +The right port voltage v2 is controlled by the left port current i1 +via +
++ v2 = i1 * transResistance. ++
+The left port voltage is zero. Any transResistance can be chosen. +
+++
+
Name | Default | Description |
---|---|---|
transResistance | 1 | Transresistance [Ohm] |
+model CCV "Linear current-controlled voltage source" + extends Interfaces.TwoPort; + + parameter SI.Resistance transResistance=1 "Transresistance"; +equation + v2 = i1*transResistance; + v1 = 0; +end CCV; ++
+ +
+The linear current-controlled current source is a TwoPort. +The right port current i2 is controlled by the left port current i1 +via +
+ ++ i2 = i1 * gain. ++ +
+The left port voltage is zero. Any current gain can be chosen. +
+++
+
Name | Default | Description |
---|---|---|
gain | 1 | Current gain |
+model CCC "Linear current-controlled current source" + extends Interfaces.TwoPort; + parameter Real gain=1 "Current gain"; +equation + i2 = i1*gain; + v1 = 0; +end CCC; ++
+ +
+The OpAmp is a simle nonideal model with a smooth out.v = f(vin) characteristic, +where "vin = in_p.v - in_n.v". +The characteristic is limited by VMax.v and VMin.v. Its slope at vin=0 +is the parameter Slope, which must be positive. (Therefore, the absolute +value of Slope is taken into calculation.) +
+++
+
Name | Default | Description |
---|---|---|
Slope | 1 | Slope of the out.v/vin characteristic at vin=0 |
+model OpAmp "Simple nonideal model of an OpAmp with limitation" + parameter Real Slope=1 "Slope of the out.v/vin characteristic at vin=0"; + Modelica.Electrical.Analog.Interfaces.PositivePin in_p + "Positive pin of the input port"; + Modelica.Electrical.Analog.Interfaces.NegativePin in_n + "Negative pin of the input port"; + Modelica.Electrical.Analog.Interfaces.PositivePin out "Output pin"; + Modelica.Electrical.Analog.Interfaces.PositivePin VMax + "Positive output voltage limitation"; + Modelica.Electrical.Analog.Interfaces.NegativePin VMin + "Negative output voltage limitation"; + SI.Voltage vin "input voltagae"; +protected + Real f "auxiliary variable"; + Real absSlope; +equation + in_p.i = 0; + in_n.i = 0; + VMax.i = 0; + VMin.i = 0; + vin = in_p.v - in_n.v; + f = 2/(VMax.v - VMin.v); + absSlope = if (Slope < 0) then -Slope else Slope; + out.v = (VMax.v + VMin.v)/2 + absSlope*vin/(1 + absSlope*noEvent(if (f*vin < + 0) then -f*vin else f*vin)); +end OpAmp; ++
+
+
+This package contains examples for the analog electrical packages. +
+
+
+
+
+
+ +
+The example Cauer Filter is a low-pass-filter of the fifth order. It is realized +using a switched-capacitor network. The voltage source V is the input voltage, +and the Op5.p2.v is the filter output voltage. The pulse response is calculated. +
+The simulation end time should be 2e5. Please plot the output voltage Op5.p2.v. +
+
+
+
+
++
+encapsulated model CauerFilter "CAUER Switched Capacitor Filter" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; + + Sources.TrapezoidVoltage V( + V=1, + startTime=499, + rising=1, + width=1500, + falling=1, + period=50000, + nperiod=1); + Sources.TrapezoidVoltage Clk( + V=5, + rising=5, + width=500, + falling=5, + period=1000); + Basic.Capacitor C1(C=1); + Basic.Capacitor C2(C=1.55); + Basic.Capacitor C3(C=1.527); + Basic.Capacitor C4(C=1); + Basic.Capacitor C5(C=1); + Basic.Capacitor C6(C=1.018); + Basic.Capacitor C7(C=1); + Basic.Capacitor C8(C=1.644); + Basic.Capacitor C9(C=2); + Basic.Capacitor C10(C=1); + Basic.Capacitor C11(C=2); + Basic.Capacitor C12(C=1); + Basic.Capacitor C13(C=9.862); + Basic.Capacitor C14(C=7.23); + Basic.Capacitor C15(C=10.06); + Basic.Capacitor C16(C=10.23); + Basic.Capacitor C17(C=12.76); + Basic.Capacitor C18(C=8.676); + Utilities.RealSwitch S1; + Utilities.RealSwitch S2; + Utilities.RealSwitch S3; + Utilities.RealSwitch S4; + Utilities.RealSwitch S5; + Utilities.RealSwitch S6; + Utilities.RealSwitch S7; + Utilities.RealSwitch S8; + Utilities.RealSwitch S9; + Utilities.RealSwitch S10; + Utilities.RealSwitch S11; + Utilities.RealSwitch S12; + Utilities.RealSwitch S13; + Utilities.RealSwitch S14; + Utilities.RealSwitch S15; + Utilities.RealSwitch S16; + Utilities.RealSwitch S17; + Utilities.RealSwitch S18; + Basic.VCV Op1(gain=30000); + Basic.VCV Op2(gain=30000); + Basic.VCV Op3(gain=30000); + Basic.VCV Op4(gain=30000); + Basic.VCV Op5(gain=30000); + Basic.Ground G; + Basic.Ground M; +equation + connect(S1.n1, V.p); + connect(C8.p, C18.n); + connect(C8.p, S11.n1); + connect(C8.p, S17.n1); + connect(C8.p, Op5.p2); + connect(C2.p, C13.p); + connect(C2.p, C16.n); + connect(C2.p, S7.n1); + connect(C2.p, S13.n1); + connect(C2.p, Op3.p2); + connect(C6.p, C14.n); + connect(C6.p, S1.n2); + connect(C6.p, S5.n1); + connect(C6.p, Op1.p2); + connect(C15.n, S9.n2); + connect(C15.n, S3.n1); + connect(C15.n, Op2.p2); + connect(C14.p, C2.n); + connect(C14.p, S2.n2); + connect(C14.p, S4.n1); + connect(C14.p, Op1.n1); + connect(C15.p, S6.n2); + connect(C15.p, S8.n2); + connect(C15.p, Op2.n1); + connect(C16.p, C6.n); + connect(C16.p, C8.n); + connect(C16.p, S10.n2); + connect(C16.p, Op3.n1); + connect(C17.p, S12.n1); + connect(C17.p, S14.n1); + connect(C17.p, Op4.n1); + connect(C18.p, C13.n); + connect(C18.p, S16.n1); + connect(C18.p, S18.n1); + connect(C18.p, Op5.n1); + connect(C17.n, S15.n2); + connect(C17.n, S17.n2); + connect(C17.n, S9.n1); + connect(C17.n, Op4.p2); + connect(C1.n, S2.p); + connect(C3.p, S3.p); + connect(C3.n, S4.p); + connect(C4.p, S5.p); + connect(C4.n, S6.p); + connect(C5.p, S7.p); + connect(C5.n, S8.p); + connect(C7.p, S9.p); + connect(C7.n, S10.p); + connect(C9.p, S11.p); + connect(C9.n, S12.p); + connect(C10.p, S13.p); + connect(C10.n, S14.p); + connect(C11.p, S15.p); + connect(C11.n, S16.p); + connect(C12.p, S17.p); + connect(C12.n, S18.p); + connect(C1.p, S1.p); + connect(S1.control, Clk.p); + connect(S2.control, Clk.p); + connect(S3.control, Clk.p); + connect(S4.control, Clk.p); + connect(S5.control, Clk.p); + connect(S6.control, Clk.p); + connect(S7.control, Clk.p); + connect(S8.control, Clk.p); + connect(S9.control, Clk.p); + connect(S10.control, Clk.p); + connect(S11.control, Clk.p); + connect(S12.control, Clk.p); + connect(S13.control, Clk.p); + connect(S14.control, Clk.p); + connect(S15.control, Clk.p); + connect(S16.control, Clk.p); + connect(S17.control, Clk.p); + connect(S18.control, Clk.p); + connect(G.p, V.n); + connect(G.p, S3.n2); + connect(G.p, S4.n2); + connect(G.p, S5.n2); + connect(G.p, S7.n2); + connect(G.p, S11.n2); + connect(G.p, S12.n2); + connect(G.p, S13.n2); + connect(G.p, S14.n2); + connect(G.p, S16.n2); + connect(G.p, S18.n2); + connect(G.p, S2.n1); + connect(G.p, S6.n1); + connect(G.p, S8.n1); + connect(G.p, S10.n1); + connect(G.p, S15.n1); + connect(M.p, Op1.p1); + connect(M.p, Op2.p1); + connect(M.p, Op3.p1); + connect(M.p, Op4.p1); + connect(M.p, Op5.p1); + connect(M.p, Op1.n2); + connect(M.p, Op2.n2); + connect(M.p, Op3.n2); + connect(M.p, Op4.n2); + connect(M.p, Op5.n2); + connect(M.p, Clk.n); + + /*1*/ + + /*2*/ + + /*3*/ + + /*4*/ + + /*5*/ + /*6*/ + /*7*/ + /*8*/ + /*9*/ + /*10*/ + /*11*/ + /*12*/ + /*13*/ + /*14*/ + /*15*/ + /*16*/ + /*17*/ + /*18*/ + /*19*/ + /*20*/ + /*21*/ + /*22*/ + /*23*/ + /*24*/ + /*25*/ + /*26*/ + /*27*/ + /*28*/ + /*29*/ + /*CL*/ + /*G*/ +end CauerFilter; ++
+ +
+ Chua's circuit is the most simple nonlinear circuit which shows chaotic behaviour. The circuit consists of linear basic elements (capacitors, resistor, conductor, inductor), and one nonlinear element, which is called Chua's diode. The chaotic behaviour is simulated. +
+The simulation end time should be set to 5e4. To get the chaotic behaviour please plot C1.v. Choose C2.v as the independent variable. +
+
+ +
+
+
+
++
+encapsulated model ChuaCircuit "Chua's circuit, ns, V, A" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Examples.Utilities; + + Basic.Inductor L(L=18); + Basic.Resistor Ro(R=12.5e-3); + Basic.Conductor G(G=0.565); + Basic.Capacitor C1(C=10, v(start=4)); + Basic.Capacitor C2(C=100); + Utilities.NonlinearResistor Nr( + Ga(min=-1) = -0.757576, + Gb(min=-1) = -0.409091, + Ve=1); + Basic.Ground Gnd; +equation + connect(L.p, G.p); + connect(G.n, Nr.p); + connect(Nr.n, Gnd.p); + connect(C1.p, G.n); + connect(L.n, Ro.p); + connect(G.p, C2.p); + connect(C1.n, Gnd.p); + connect(C2.n, Gnd.p); + connect(Ro.n, Gnd.p); +end ChuaCircuit; ++
+It is a simple NPN transistor amplifier circuit. The voltage difference between R1.p and R3.n is amplified. The output signal is the voltage between R2.n and R4.n. In this example the voltage at V1 is amplified because R3.n is grounded. +
+The simulation end time should be set to 1e- 8. Please plot the input voltage V1.v, and the output voltages R2.n.v, and R4.n.v. +
+ +
+
+
+
+
++
+encapsulated model DifferenceAmplifier + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; + + Sources.ExpSineVoltage V1( + V=0.2, + freqHz=0.2e9, + damping=0.1e8); + Sources.RampVoltage V2(V=15, duration=1e-9); + Sources.RampCurrent I1(I=0.16, duration=1e-9); + Basic.Resistor R1(R=0.0001); + Basic.Resistor R2(R=100); + Basic.Resistor R3(R=0.0001); + Basic.Resistor R4(R=100); + Basic.Capacitor C1(C=1e-10); + Basic.Capacitor C4(C=1e-10); + Basic.Capacitor C5(C=1e-10); + Basic.Capacitor C2(C=1e-10); + Basic.Capacitor C3(C=1e-10); + Basic.Ground Gnd1; + Basic.Ground Gnd9; + Basic.Ground Gnd3; + Basic.Ground Gnd2; + Basic.Ground Gnd6; + Basic.Ground Gnd7; + Basic.Ground Gnd8; + Basic.Ground Gnd5; + Basic.Ground Gnd4; + Utilities.Transistor Transistor1; + Utilities.Transistor Transistor2; +equation + connect(V1.n, Gnd1.p); + connect(C1.n, Gnd2.p); + connect(I1.n, Gnd7.p); + connect(C5.n, Gnd8.p); + connect(C3.n, Gnd5.p); + connect(R3.n, Gnd4.p); + connect(C2.n, Gnd3.p); + connect(C4.p, Gnd6.p); + connect(I1.p, C5.p); + connect(R1.p, V1.p); + connect(R2.p, V2.p); + connect(R4.p, V2.p); + connect(V2.n, Gnd9.p); + connect(R1.n, Transistor1.b); + connect(Transistor1.b, C1.p); + connect(Transistor1.c, C2.p); + connect(R2.n, Transistor1.c); + connect(Transistor1.e, I1.p); + connect(Transistor2.b, R3.p); + connect(Transistor2.b, C3.p); + connect(C4.n, Transistor2.c); + connect(R4.n, Transistor2.c); + connect(C5.p, Transistor2.e); +end DifferenceAmplifier; ++
+ +
+The nand gate is a basic CMOS building block. It consists of four CMOS transistors. +The output voltage Nand.y.v is low if and only if the two input voltages at Nand.x1.v and Nand.x2.v +are both high. In this way the nand functionality is realized. +
+The simulation end time should be set to 1e-7. Please plot the input voltages Nand.x1.v, +d Nand.x2.v, and the output voltage Nand.y.v. +
+
+ +
+
+
+
++
+encapsulated model NandGate + "CMOS NAND Gate (see Tietze/Schenk, page 157)" + import Modelica.Electrical.Analog.Basic; + import Modelica.Electrical.Analog.Sources; + import Modelica.Electrical.Analog.Examples.Utilities; + + Sources.TrapezoidVoltage VIN1( + V=3.5, + startTime=20e-9, + rising=1e-9, + width=19e-9, + falling=1.e-9, + period=40e-9); + Sources.TrapezoidVoltage VIN2( + V=3.5, + startTime=10e-9, + rising=1e-9, + width=19e-9, + falling=1.e-9, + period=40e-9); + Sources.RampVoltage VDD(V=5, duration=1e-9); + Basic.Ground Gnd1; + Basic.Ground Gnd4; + Basic.Ground Gnd5; + Utilities.Nand Nand; +equation + connect(VDD.n, Gnd1.p); + connect(VIN1.n, Gnd4.p); + connect(VIN2.n, Gnd5.p); + connect(Nand.Vdd, VDD.p); + connect(VIN1.p, Nand.x1); + connect(VIN2.p, Nand.x2); +end NandGate; ++
+
+
+This package contains utilities ... +
+ ++
+
+
+
+
+model RealSwitch + Ideal.ControlledIdealCommutingSwitch S(level=2.5); + Basic.Resistor R(R=0.01); + Interfaces.Pin p; + Interfaces.Pin n1; + Interfaces.Pin n2; + Interfaces.Pin control; +equation + connect(p, R.p); + connect(R.n, S.p); + connect(n1, S.n1); + connect(n2, S.n2); + connect(control, S.control); +end RealSwitch; ++
+ +
+
Name | Default | Description |
---|---|---|
Ga | [S] | |
Gb | [S] | |
Ve | [V] |
+model NonlinearResistor "Chua's resistor" + extends Interfaces.OnePort; + parameter SI.Conductance Ga; + parameter SI.Conductance Gb; + parameter SI.Voltage Ve; +equation + i = if (v < -Ve) then Gb*(v + Ve) - Ga*Ve else if (v > Ve) then Gb*(v - Ve) + + Ga*Ve else Ga*v; +end NonlinearResistor; ++
+model Transistor + Basic.Resistor rtb(R=0.05); + Basic.Resistor rtc(R=0.1); + Basic.Capacitor ct(C=1e-10); + Semiconductors.NPN Tr( + Bf=50, + Br=0.1, + Is=1e-16, + Vak=0.02, + Tauf=0.12e-9, + Taur=5e-9, + Ccs=1e-12, + Cje=0.4e-12, + Cjc=0.5e-12, + Phie=0.8, + Me=0.4, + Phic=0.8, + Mc=0.333, + Gbc=1e-15, + Gbe=1e-15, + Vt=0.02585); + Basic.Ground Ground1; + Interfaces.Pin c; + Interfaces.Pin b; + Interfaces.Pin e; +equation + connect(rtb.n, Tr.B); + connect(rtb.n, ct.p); + connect(ct.n, Ground1.p); + connect(Tr.C, rtc.p); + connect(rtc.n, c); + connect(b, rtb.p); + connect(Tr.E, e); +end Transistor; ++
+ +
+The nand gate is a basic CMOS building block. It consists of four CMOS transistors. +
+
+ +
+
+
+
++
+model Nand "CMOS NAND Gate (see Tietze/Schenk, page 157)" + Semiconductors.PMOS TP1( + W=6.5e-6, + L=3.1e-6, + Beta=1.05e-5, + Vt=-1, + K2=0.41, + K5=0.8385, + dW=-2.5e-6, + dL=-2.1e-6); + Semiconductors.PMOS TP2( + W=6.5e-6, + L=3.1e-6, + Beta=1.05e-5, + Vt=-1, + K2=0.41, + K5=0.8385, + dW=-2.5e-6, + dL=-2.1e-6); + Semiconductors.NMOS TN1( + W=6.5e-6, + L=3.1e-6, + Beta=4.1e-5, + Vt=0.8, + K2=1.144, + K5=0.7311, + dW=-2.5e-6, + dL=-1.5e-6); + Semiconductors.NMOS TN2( + W=6.5e-6, + L=3.1e-6, + Beta=4.1e-5, + Vt=0.8, + K2=1.144, + K5=0.7311, + dW=-2.5e-6, + dL=-1.5e-6); + Basic.Capacitor C4(C=0.4e-13); + Basic.Capacitor C7(C=0.4e-13); + Basic.Ground Gnd; + Basic.Ground Gnd2; + Basic.Ground Gnd3; + Basic.Ground Gnd6; + Basic.Ground Gnd7; + Basic.Ground Gnd8; + Interfaces.Pin x1; + Interfaces.Pin x2; + Interfaces.Pin Vdd; + Interfaces.Pin y; +equation + connect(TN1.S, TN2.D); + connect(TN2.B, Gnd.p); + connect(TN2.D, C7.p); + connect(TN2.S, Gnd.p); + connect(TP1.S, TN1.D); + connect(TP1.G, TN1.G); + connect(C4.n, Gnd2.p); + connect(C7.n, Gnd3.p); + connect(TP2.B, Gnd6.p); + connect(TN1.B, Gnd7.p); + connect(TP1.B, Gnd8.p); + connect(TP2.G, x1); + connect(TP2.G, TN2.G); + connect(TN1.G, x2); + connect(TP2.S, TN1.D); + connect(TN1.D, C4.p); + connect(Vdd, TP1.D); + connect(TP2.D, Vdd); + connect(C4.p, y); +end Nand; ++
+
+
+This package contains electrical components with idealized behaviour: +
++
+
+
+
+
+ +
+Ideal thyristor ... < description will be added > +
+++
+
Name | Default | Description |
---|---|---|
Roff | 1.E-5 | Closed thyristor resistance [Ohm] |
Gon | 1.E-5 | Opened thyristor conductance [S] |
+model IdealThyristor "Ideal thyristor" + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed thyristor resistance"; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened thyristor conductance"; +protected + Real s "Auxiliary variable"; + Boolean off(start=true); + Boolean fire(start=true); +public + Modelica.Blocks.Interfaces.BooleanInPort firePort(final n=1); +equation + fire = firePort.signal[1]; + off = s < 0 or pre(off) and not fire; + v = s*(if off then 1 else Roff); + i = s*(if off then Gon else 1); +end IdealThyristor; ++
+ +
+Ideal GTO thyristor ... +
+++
+
Name | Default | Description |
---|---|---|
Roff | 1.E-5 | Closed thyristor resistance [Ohm] |
Gon | 1.E-5 | Opened thyristor conductance [S] |
+model IdealGTOThyristor "Ideal GTO thyristor" + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed thyristor resistance"; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened thyristor conductance"; +protected + Real s "Auxiliary variable"; + Boolean off(start=true) "Position of switch"; + Boolean fire; +public + Modelica.Blocks.Interfaces.BooleanInPort firePort(final n=1); +equation + fire = firePort.signal[1]; + off = s < 0 or not fire; + v = s*(if off then 1 else Roff); + i = s*(if off then Gon else 1); +end IdealGTOThyristor; ++
+ +
+Ideal electrical switch. In order to prevent singularities +during switching, the opened switch has a high resistance +and the closed switch has a low resistance. +
++If the actual circuit has an appropriate structure, the +limiting case is also allowed, i.e., the resistance of the +closed switch could be exactly zero and the conductance of the +open switch could be also exactly zero (i.e. the resistance is +infinite). Note, there are circuits, where a description +with zero/infinity resistances is not possible. +
+++
+
Name | Default | Description |
---|---|---|
Roff | 1.E-5 | Closed switch resistance [Ohm] |
Gon | 1.E-5 | Opened switch conductance [S] |
+model IdealSwitch "Ideal electrical switch" + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened switch conductance"; +protected + Real s "Auxiliary variable"; + Boolean off; +public + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1, signal(start={ + false})) "true/false opened/closed switch"; +equation + off = control.signal[1]; + v = s*(if off then 1 else Roff); + i = s*(if off then Gon else 1); +end IdealSwitch; ++
+ +
+The commuting switch has a positive pin p and two negative pins n1 and n2. +The switching behaviour is controlled +by the control signal. If the control signal is true, the pin p is connected +with the negative pin n2. Otherwise, the pin p is connected to the negative pin n1. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model IdealCommutingSwitch "Ideal commuting switch" + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; +public + Interfaces.PositivePin p; + Interfaces.NegativePin n2; + Interfaces.NegativePin n1; + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => p--n2 connected, false => p--n1 connected"; +protected + Real s1; + Real s2 "Auxiliary variables"; + Boolean off; +equation + off = control.signal[1]; + 0 = p.i + n2.i + n1.i; + + p.v - n1.v = s1*(if (off) then 1 else Ron); + n1.i = -s1*(if (off) then Goff else 1); + p.v - n2.v = s2*(if (off) then Ron else 1); + n2.i = -s2*(if (off) then 1 else Goff); +end IdealCommutingSwitch; ++
+ +
+The intermediate switch has four switching contact pins p1, p2, n1, and n2. +The switching behaviour is controlled by the control signal. If the control +signal is true, the pin p1 is connected to pin n2, and the pin p2 is +connected to the pin n2. Otherwise, the pin p1 is connected to n1, and +p2 is connected to n2. +
+ + + ++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +
+ + + ++The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model IdealIntermediateSwitch "Ideal intermediate switch" + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; +public + Interfaces.PositivePin p1; + Interfaces.PositivePin p2; + Interfaces.NegativePin n1; + Interfaces.NegativePin n2; + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) "true => p1--n2, p2--n1 connected, + otherwise p1--n1, p2--n2 connected"; +protected + Real s1; + Real s2; + Real s3; + Real s4 "Auxiliary variables"; + Boolean off; +equation + off = control.signal[1]; + p1.v - n1.v = s1*(if (off) then 1 else Ron); + p2.v - n2.v = s2*(if (off) then 1 else Ron); + p1.v - n2.v = s3*(if (off) then Ron else 1); + p2.v - n1.v = s4*(if (off) then Ron else 1); + + p1.i = if (off) then s1*Goff + s3 else s1 + s3*Goff; + p2.i = if (off) then s2*Goff + s4 else s2 + s4*Goff; + n1.i = if (off) then -s1*Goff - s4 else -s1 - s4*Goff; + n2.i = if (off) then -s2*Goff - s3 else -s2 - s3*Goff; +end IdealIntermediateSwitch; ++
+ +
+The ideal switch is a three-pole. If the third pin voltage exceeds the given +parameter Voltage, the pins p and n are open (no current flowing, any voltage +possible). Otherwise, p and n are short cut. +
+++
+
Name | Default | Description |
---|---|---|
level | 0.5 | Switch level [V] |
Roff | 1.E-5 | Closed switch resistance [Ohm] |
Gon | 1.E-5 | Opened switch conductance [S] |
+model ControlledIdealSwitch "Controlled ideal switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened switch conductance"; +protected + Real s "Auxiliary variable"; +public + Interfaces.Pin p "Positive pin"; + Interfaces.Pin n "Negative pin"; + Interfaces.Pin control + "Control pin: control.v > level open, otherwise closed"; +equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v < level) then Roff else 1); + n.i = s*(if (control.v < level) then 1 else Gon); +end ControlledIdealSwitch; ++
+ +
+The commuting switch has a positive pin p and two negative pins n1 and n2. +The switching behaviour is controlled +by the control pin. If its voltage exceeds the value of the parameter level, +the pin p is connected with the negative pin n2. Otherwise, the pin p is +connected the negative pin n1. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
level | 0.5 | Switch level [V] |
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model ControlledIdealCommutingSwitch + "Controlled ideal commuting switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; +public + Interfaces.PositivePin p; + Interfaces.NegativePin n2; + Interfaces.NegativePin n1; + Interfaces.Pin control + "Control pin: if control.v > level p--n2 connected, otherwise p--n1 connected" + ; +protected + Real s1; + Real s2 "Auxiliary variables"; +equation + control.i = 0; + 0 = p.i + n2.i + n1.i; + + p.v - n1.v = s1*(if (control.v > level) then 1 else Ron); + n1.i = -s1*(if (control.v > level) then Goff else 1); + p.v - n2.v = s2*(if (control.v > level) then Ron else 1); + n2.i = -s2*(if (control.v > level) then 1 else Goff); +end ControlledIdealCommutingSwitch; ++
+ +
+The intermediate switch has four switching contact pins p1, p2, n1, and n2. +The switching behaviour is controlled +by the control pin. If its voltage exceeds the value of the +parameter level, the pin p1 is connected to pin n2, and the pin p2 is +connected to the pin n2. Otherwise, the pin p1 is connected to n1, and +p2 is connected to n2. +
+ + + ++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +
+ + + ++The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
level | 0.5 | Switch level [V] |
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model ControlledIdealIntermediateSwitch + "Controlled ideal intermediate switch" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; + +public + Interfaces.PositivePin p1; + Interfaces.PositivePin p2; + Interfaces.NegativePin n1; + Interfaces.NegativePin n2; + Interfaces.Pin control "Control pin: if control.v > level p1--n2, p2--n1 connected, + otherwise p1--n1, p2--n2 connected"; +protected + Real s1; + Real s2; + Real s3; + Real s4 "Auxiliary variables"; +equation + control.i = 0; + + p1.v - n1.v = s1*(if (control.v > level) then 1 else Ron); + p2.v - n2.v = s2*(if (control.v > level) then 1 else Ron); + p1.v - n2.v = s3*(if (control.v > level) then Ron else 1); + p2.v - n1.v = s4*(if (control.v > level) then Ron else 1); + + p1.i = if (control.v > level) then s1*Goff + s3 else s1 + s3*Goff; + p2.i = if (control.v > level) then s2*Goff + s4 else s2 + s4*Goff; + n1.i = if (control.v > level) then -s1*Goff - s4 else -s1 - s4*Goff; + n2.i = if (control.v > level) then -s2*Goff - s3 else -s2 - s3*Goff; +end ControlledIdealIntermediateSwitch; ++
+ +
+The ideal OpAmp is a two-port. The left port is fixed to v1=0 and i1=0 +(nullator). At the right port both any voltage v2 and any current i2 +are possible (norator). +
+++
+model IdealOpAmp + "Ideal operational amplifier (norator-nullator pair)" + SI.Voltage v1 "Voltage drop over the left port"; + SI.Voltage v2 "Voltage drop over the right port"; + SI.Current i1 "Current flowing from pos. to neg. pin of the left port"; + SI.Current i2 "Current flowing from pos. to neg. pin of the right port"; + Interfaces.PositivePin p1 "Positive pin of the left port"; + Interfaces.NegativePin n1 "Negative pin of the left port"; + Interfaces.PositivePin p2 "Positive pin of the right port"; + Interfaces.NegativePin n2 "Negative pin of the right port"; +equation + v1 = p1.v - n1.v; + v2 = p2.v - n2.v; + 0 = p1.i + n1.i; + 0 = p2.i + n2.i; + i1 = p1.i; + i2 = p2.i; + v1 = 0; + i1 = 0; +end IdealOpAmp; ++
+ +
+The ideal OpAmp with three pins is of exactly the same behaviour as the ideal +OpAmp with four pins. Only the negative output pin is left out. +Both the input voltage and current are fixed to zero (nullator). +At the output pin both any voltage v2 and any current i2 +are possible. +
+++
+model IdealOpAmp3Pin + "Ideal operational amplifier (norator-nullator pair), but 3 pins" + Interfaces.PositivePin in_p "Positive pin of the input port"; + Interfaces.NegativePin in_n "Negative pin of the input port"; + Interfaces.PositivePin out "Output pin"; +equation + in_p.v = in_n.v; + in_p.i = 0; + in_n.i = 0; +end IdealOpAmp3Pin; ++
+ +
+The ideal OpAmp with limitation behaves like an ideal OpAmp without limitation, +if the output voltage is within the limits (VMin < out.v < VMax). In this case +the input voltage vin=in_p.v - in_n.v is zero. +If the input voltage is vin < 0, the output voltage is out.v = VMin. +If the input voltage is vin > 0, the output voltage is out.v = VMax. +
+++
+model IdealOpAmpLimited "Ideal operational amplifier with limitation" + + Interfaces.PositivePin in_p "Positive pin of the input port"; + Interfaces.NegativePin in_n "Negative pin of the input port"; + Interfaces.PositivePin out "Output pin"; + Interfaces.PositivePin VMax "Positive output voltage limitation"; + Interfaces.NegativePin VMin "Negative output voltage limitation"; + SI.Voltage vin "input voltage"; +protected + Real s "Auxiliary variable"; +equation + in_p.i = 0; + in_n.i = 0; + VMax.i = 0; + VMin.i = 0; + vin = in_p.v - in_n.v; + in_p.v - in_n.v = if (s < -1) then s + 1 else if (s > 1) then s - 1 else 0; + out.v = if (s < -1) then VMin.v else if (s > 1) then VMax.v else (VMax.v - + VMin.v)*s/2 + (VMax.v + VMin.v)/2; +end IdealOpAmpLimited; ++
+ +
+Ideal electrical diode. This is an ideal switch which is +open, when it is reversed biased (voltage drop < 0) and +which is closed, when it is conducting (current > 0). +In order to prevent singularities during switching, the opened +diode has a high resistance and the closed diode has a low +resistance. +
++If the actual circuit has an appropriate structure, the +limiting case is also allowed, i.e., the resistance of the +closed diode could be exactly zero and the conductance of the +open diode could be also exactly zero (i.e. the resistance is +infinity). Note, there are circuits, where a description +with zero/infinity resistances is not possible. +
+++
+
Name | Default | Description |
---|---|---|
Roff | 1.E-5 | Closed diode resistance [Ohm] |
Gon | 1.E-5 | Opened diode conductance [S] |
+model IdealDiode "Ideal electrical diode" + extends Interfaces.OnePort; + parameter SI.Resistance Roff(final min=0) = 1.E-5 "Closed diode resistance"; + parameter SI.Conductance Gon(final min=0) = 1.E-5 "Opened diode conductance"; + Boolean off(start=true) "Switching state of diode"; +protected + Real s "Auxiliary variable"; +equation + off = s < 0; + v = s*(if off then 1 else Roff); + i = s*(if off then Gon else 1); +end IdealDiode; ++
+ +
+The ideal transformer is an ideal two-port resistive circuit element +which is characterized by the following two equations: +
++ v1 = n * v2 + i2 = -n * i1 ++
+where n is a real number called the turns ratio. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Turns ratio |
+model IdealTransformer "Ideal electrical transformer" + extends Interfaces.TwoPort; + parameter Real n=1 "Turns ratio"; +equation + v1 = n*v2; + i2 = -n*i1; +end IdealTransformer; ++
+ +
+A gyrator is an ideal two-port element defined by the following equations: +
++ i1 = G * v2 + i2 = -G * v1 ++
+where the constant G is called the gyration conductance. +
+++
+
Name | Default | Description |
---|---|---|
G | 1 | Gyration conductance [S] |
+model IdealGyrator "Ideal gyrator" + extends Interfaces.TwoPort; + parameter SI.Conductance G=1 "Gyration conductance"; +equation + i1 = G*v2; + i2 = -G*v1; +end IdealGyrator; ++
+ +
+The model Idle is a simple idle running branch. +
+++
+model Idle "Idle branch" + extends Interfaces.OnePort; +equation + + i = 0; + +end Idle; ++
+ +
+The model Short is a simple short cut branch. +
+++
+model Short "Short cut branch" + extends Interfaces.OnePort; +equation + v = 0; +end Short; ++
+ +
+The ideal opener has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control signal. +If the control signal is true, pin p is not connected +with negative pin n. Otherwise, pin p is connected +with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model IdealOpener "Ideal electrical opener" + extends Interfaces.OnePort; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => switch open, false => p--n connected"; +protected + Real s "Auxiliary variable"; + Boolean off; + +equation + off = control.signal[1]; + v = s*(if off then 1 else Ron); + i = s*(if off then Goff else 1); +end IdealOpener; ++
+ +
+The ideal opener has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control signal. +If the control signal is true, pin p is not connected +with negative pin n. Otherwise, pin p is connected +with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model IdealCloser "Ideal electrical closer" + extends Interfaces.OnePort; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; + Modelica.Blocks.Interfaces.BooleanInPort control(final n=1) + "true => switch open, false => p--n connected"; +protected + Real s "Auxiliary variable"; + Boolean on; + +equation + on = control.signal[1]; + v = s*(if not on then 1 else Ron); + i = s*(if not on then Goff else 1); +end IdealCloser; ++
+ +
++
+The ideal switch has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control pin. +If its voltage exceeds the voltage of the parameter level, +pin p is not connected with negative pin n. +Otherwise, pin p is connected with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
level | 0.5 | Switch level [V] |
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model ControlledIdealOpener "Controlled ideal electrical opener" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; +protected + Real s "Auxiliary variable"; +public + Interfaces.PositivePin p; + Interfaces.NegativePin n; + Interfaces.Pin control + "Control pin: control.v > level switch open, otherwise p--n connected"; +equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v > level) then 1 else Ron); + p.i = s*(if (control.v > level) then Goff else 1); +end ControlledIdealOpener; ++
+ +
++
+The ideal switch has a positive pin p and a negative pin n. +The switching behaviour is controlled by the control pin. +If its voltage exceeds the voltage of the parameter level, +pin p is not connected with negative pin n. +Otherwise, pin p is connected with negative pin n. +
++In order to prevent singularities during switching, the opened +switch has a (very low) conductance Goff +and the closed switch has a (very low) resistance Ron. +The limiting case is also allowed, i.e., the resistance Ron of the +closed switch could be exactly zero and the conductance Goff of the +open switch could be also exactly zero. Note, there are circuits, +where a description with zero Ron or zero Goff is not possible. +
+++
+
Name | Default | Description |
---|---|---|
level | 0.5 | Switch level [V] |
Ron | 1.E-5 | Closed switch resistance [Ohm] |
Goff | 1.E-5 | Opened switch conductance [S] |
+model ControlledIdealCloser "Controlled ideal electrical closer" + parameter SI.Voltage level=0.5 "Switch level"; + parameter SI.Resistance Ron(final min=0) = 1.E-5 "Closed switch resistance"; + parameter SI.Conductance Goff(final min=0) = 1.E-5 "Opened switch conductance"; +protected + Real s "Auxiliary variable"; +public + Interfaces.PositivePin p; + Interfaces.NegativePin n; + Interfaces.Pin control + "Control pin: control.v > level switch open, otherwise p--n connected"; +equation + control.i = 0; + 0 = p.i + n.i; + p.v - n.v = s*(if (control.v > level) then Ron else 1); + p.i = s*(if (control.v > level) then 1 else Goff); +end ControlledIdealCloser; ++
+
+
+This package contains connectors and interfaces (partial models) for +analog electrical components. +
+ ++
+
+
+
+
+ +
+connector Pin "Pin of an electrical component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; +end Pin; ++
+ +
+Superclass of elements which have two electrical pins: +the positive pin connector p, and the negative pin +connector n. It is assumed that the current flowing +into pin p is identical to the current flowing out of pin n. +This current is provided explicitly as current i. +
+++
+partial model OnePort + "Component with two electrical pins p and n and current i from p to n" + + SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)"; + SI.Current i "Current flowing from pin p to pin n"; + PositivePin p; + NegativePin n; +equation + v = p.v - n.v; + 0 = p.i + n.i; + i = p.i; +end OnePort; ++
+ +
+partial model TwoPort + "Component with two electrical ports, including current" + SI.Voltage v1 "Voltage drop over the left port"; + SI.Voltage v2 "Voltage drop over the right port"; + SI.Current i1 "Current flowing from pos. to neg. pin of the left port"; + SI.Current i2 "Current flowing from pos. to neg. pin of the right port"; + PositivePin p1 "Positive pin of the left port"; + NegativePin n1 "Negative pin of the left port"; + PositivePin p2 "Positive pin of the right port"; + NegativePin n2 "Negative pin of the right port"; +equation + v1 = p1.v - n1.v; + v2 = p2.v - n2.v; + 0 = p1.i + n1.i; + 0 = p2.i + n2.i; + i1 = p1.i; + i2 = p2.i; +end TwoPort; ++
+ +
Connectors PositivePin +and NegativePin are nearly identical. +The only difference is that the icons are different in order +to identify more easily the pins of a component. Usually, +connector PositivePin is used for the positive and +connector NegativePin for the negative pin of an electrical +component.
++connector PositivePin "Positive pin of an electric component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; +end PositivePin; ++
+ +
Connectors PositivePin +and NegativePin are nearly identical. +The only difference is that the icons are different in order +to identify more easily the pins of a component. Usually, +connector PositivePin is used for the positive and +connector NegativePin for the negative pin of an electrical +component.
++connector NegativePin "Negative pin of an electric component" + SI.Voltage v "Potential at the pin"; + flow SI.Current i "Current flowing into the pin"; +end NegativePin; ++
+ +
+partial model TwoPin "Component with one electrical port" + SI.Voltage v "Voltage drop between the two pins (= p.v - n.v)"; + PositivePin p "Positive pin"; + NegativePin n "Negative pin"; +equation + v = p.v - n.v; +end TwoPin; ++
+ +
+partial model AbsoluteSensor + "Base class to measure the absolute value of a pin variable" + extends Modelica.Icons.RotationalSensor; + + PositivePin p "pin to be measured"; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +end AbsoluteSensor; ++
+ +
+partial model RelativeSensor + "Base class to measure a relative variable between two pins" + extends Modelica.Icons.RotationalSensor; + + PositivePin p "positive pin"; + NegativePin n "negative pin"; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); + + +end RelativeSensor; ++
+ +
+
Name | Default | Description |
---|---|---|
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
signalSource |
+partial model VoltageSource "Interface for voltage sources" + extends OnePort; + + parameter SI.Voltage offset=0 "Voltage offset"; + parameter SI.Time startTime=0 "Time offset"; + replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final offset={offset} + , final startTime={startTime}); +equation + v = signalSource.outPort.signal[1]; +end VoltageSource; ++
+ +
+
Name | Default | Description |
---|---|---|
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
signalSource |
+partial model CurrentSource "Interface for current sources" + extends OnePort; + + parameter SI.Current offset=0 "Current offset"; + parameter SI.Time startTime=0 "Time offset"; + replaceable Modelica.Blocks.Interfaces.SignalSource signalSource(final offset={offset} + , final startTime={startTime}); +equation + i = signalSource.outPort.signal[1]; +end CurrentSource; ++
+
+
+This package contains lossy and lossless segmented transmission lines, +and LC distributed line models. +
+ ++
+
+
+
+
+ +
+Lossy Transmission Line. + + The lossy transmission line OLine consists of segments of + lumped resistances and inductances in series + and conductances and capacitances that are + connected with the reference pin p3. The precision + of the model depends on the number N of + lumped segments. +
+++
+
Name | Default | Description |
---|---|---|
r | 1 | Resistance per meter [Ohm/m] |
l | 1 | Inductance per meter [H/m] |
g | 1 | Conductance per meter [Siemens/m] |
c | 1 | Capacitance per meter [F/m] |
length | 1 | Length of line [m] |
N | 1 | Number of lumped segments |
+model OLine "Lossy Transmission Line" + //extends Interfaces.ThreePol; + Interfaces.Pin p1; + Interfaces.Pin p2; + Interfaces.Pin p3; + SI.Voltage v13; + SI.Voltage v23; + SI.Current i1; + SI.Current i2; + parameter Real r( + final min=Modelica.Constants.small, + unit="Ohm/m") = 1 "Resistance per meter"; + parameter Real l( + final min=Modelica.Constants.small, + unit="H/m") = 1 "Inductance per meter"; + parameter Real g( + final min=Modelica.Constants.small, + unit="Siemens/m") = 1 "Conductance per meter"; + parameter Real c( + final min=Modelica.Constants.small, + unit="F/m") = 1 "Capacitance per meter"; + parameter SI.Length length(final min=Modelica.Constants.small) = 1 "Length of line"; + parameter Integer N(final min=1) = 1 "Number of lumped segments"; +protected + Basic.Resistor R[N + 1](R=fill(r*length/(N + 1), N + 1)); + Basic.Inductor L[N + 1](L=fill(l*length/(N + 1), N + 1)); + Basic.Capacitor C[N](C=fill(c*length/(N), N)); + Basic.Conductor G[N](G=fill(g*length/(N), N)); +equation + v13 = p1.v - p3.v; + v23 = p2.v - p3.v; + i1 = p1.i; + i2 = p2.i; + connect(p1, R[1].p); + for i in 1:N loop + connect(R[i].n, L[i].p); + connect(L[i].n, C[i].p); + connect(L[i].n, G[i].p); + connect(C[i].n, p3); + connect(G[i].n, p3); + connect(L[i].n, R[i + 1].p); + end for; + connect(R[N + 1].n, L[N + 1].p); + connect(L[N + 1].n, p2); +end OLine; ++
+ +
+The lossy RC line ULine consists of segments of +lumped series resistances and capacitances that are +connected with the reference pin p3. The precision +of the model depends on the number N of +lumped segments. +
+++
+
Name | Default | Description |
---|---|---|
r | 1 | Resistance per meter [Ohm/m] |
c | 1 | Capacitance per meter [F/m] |
length | 1 | Length of line [m] |
N | 1 | Number of lumped segments |
+model ULine "Lossy RC Line" + //extends Interfaces.ThreePol; + Interfaces.Pin p1; + Interfaces.Pin p2; + Interfaces.Pin p3; + SI.Voltage v13; + SI.Voltage v23; + SI.Current i1; + SI.Current i2; + parameter Real r( + final min=Modelica.Constants.small, + unit="Ohm/m") = 1 "Resistance per meter"; + parameter Real c( + final min=Modelica.Constants.small, + unit="F/m") = 1 "Capacitance per meter"; + parameter SI.Length length(final min=Modelica.Constants.small) = 1 "Length of line"; + parameter Integer N(final min=1) = 1 "Number of lumped segments"; +protected + Basic.Resistor R[N + 1](R=fill(r*length/(N + 1), N + 1)); + Basic.Capacitor C[N](C=fill(c*length/(N), N)); +equation + v13 = p1.v - p3.v; + v23 = p2.v - p3.v; + i1 = p1.i; + i2 = p2.i; + connect(p1, R[1].p); + for i in 1:N loop + connect(R[i].n, R[i + 1].p); + end for; + for i in 1:N loop + connect(R[i].n, C[i].p); + end for; + for i in 1:N loop + connect(C[i].n, p3); + end for; + connect(R[N + 1].n, p2); +end ULine; ++
+ +
+ +Lossless transmission line with characteristic impedance Z0 and transmission delay TD + + The lossless transmission line TLine1 is a two Port. Both port branches + consist of a resistor with characteristic impedance Z0 and a controled voltage + source that takes into consideration the transmission delay TD. + For further details see Branin's article. + The model parameters can be derived from inductance and + capacitance per length (L' resp. C'), i. e. + Z0 = sqrt(L'/C') and TD = sqrt(L'*C')*length_of_line. Resistance R' + and conductance C' per meter are assumed to be zero. + +References: + Branin Jr., F. H.: Transient Analysis of Lossless Transmission Lines. + Proceedings of the IEEE 55(1967), 2012 - 2013 + + Hoefer, E. E. E.; Nielinger, H.: SPICE : Analyseprogramm fuer elektronische + Schaltungen. Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1985. + ++
+
Name | Default | Description |
---|---|---|
Z0 | 1 | Characteristic impedance [Ohm] |
TD | 1 | Transmission delay [s] |
+model TLine1 + "Lossless transmission line with characteristic impedance Z0 and transmission delay TD" + + + extends Modelica.Electrical.Analog.Interfaces.TwoPort; + + parameter Modelica.SIunits.Resistance Z0=1 "Characteristic impedance"; + parameter Modelica.SIunits.Time TD=1 "Transmission delay"; + +protected + Modelica.SIunits.Voltage er; + Modelica.SIunits.Voltage es; +equation + + assert(Z0 > 0, "Z0 has to be positive"); + assert(TD > 0, "TD has to be positive"); + i1 = (v1 - es)/Z0; + i2 = (v2 - er)/Z0; + es = 2*delay(v2, TD) - delay(er, TD); + er = 2*delay(v1, TD) - delay(es, TD); + +end TLine1; ++
+ +
+ +Lossless transmission line with characteristic impedance Z0, frequency F and normalized length NL + + The lossless transmission line TLine2 is a two Port. Both port branches + consist of a resistor with the value of the characteristic impedance Z0 + and a controled voltage source that takes into consideration + the transmission delay. + For further details see Branin's article. + Resistance R' and conductance C' per meter are assumed to be zero. + The characteristic impedance Z0 can be derived from inductance and + capacitance per length (L' resp. C'), i. e. Z0 = sqrt(L'/C'). + The normalized length NL is equal to the length of the line divided + by the wavelength corresponding to the frequency F, i. e. the + transmission delay TD is the quotient of NL and F. + +References: + Branin Jr., F. H.: Transient Analysis of Lossless Transmission Lines. + Proceedings of the IEEE 55(1967), 2012 - 2013 + + Hoefer, E. E. E.; Nielinger, H.: SPICE : Analyseprogramm fuer elektronische + Schaltungen. Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1985. + + ++
+
Name | Default | Description |
---|---|---|
Z0 | 1 | Characteristic impedance [Ohm] |
F | 1 | Frequency [Hz] |
NL | 1 | Normalized length [m] |
+model TLine2 + "Lossless transmission line with characteristic impedance Z0, frequency F and normalized length NL" + + + extends Modelica.Electrical.Analog.Interfaces.TwoPort; + + parameter Modelica.SIunits.Resistance Z0=1 "Characteristic impedance"; + parameter Modelica.SIunits.Frequency F=1 "Frequency"; + parameter Modelica.SIunits.Length NL=1 "Normalized length"; + +protected + Modelica.SIunits.Voltage er; + Modelica.SIunits.Voltage es; + Modelica.SIunits.Time TD; +equation + + assert(Z0 > 0, "Z0 has to be positive"); + assert(NL > 0, "NL has to be positive"); + assert(F > 0, "F has to be positive"); + TD = NL/F; + i1 = (v1 - es)/Z0; + i2 = (v2 - er)/Z0; + es = 2*delay(v2, TD) - delay(er, TD); + er = 2*delay(v1, TD) - delay(es, TD); + +end TLine2; ++
+ +
+ +Lossless transmission line with characteristic impedance Z0 and frequency F + + The lossless transmission line TLine3 is a two Port. Both port branches + consist of a resistor with value of the characteristic impedance Z0 + and a controled voltage source that takes into consideration + the transmission delay. + For further details see Branin's article. + Resistance R' and conductance C' per meter are assumed to be zero. + The characteristic impedance Z0 can be derived from inductance and + capacitance per length (L' resp. C'), i. e. Z0 = sqrt(L'/C'). + The length of the line is equal to a quarter of the wavelength + corresponding to the frequency F, i. e. the + transmission delay is the quotient of 4 and F. + In this case, the caracteristic impedance is called natural impedance. + + References: + Branin Jr., F. H.: Transient Analysis of Lossless Transmission Lines. + Proceedings of the IEEE 55(1967), 2012 - 2013 + + Hoefer, E. E. E.; Nielinger, H.: SPICE : Analyseprogramm fuer elektronische + Schaltungen. Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1985. + + ++
+
Name | Default | Description |
---|---|---|
Z0 | 1 | Natural impedance [Ohm] |
F | 1 | Frequency [Hz] |
+model TLine3 + "Lossless transmission line with characteristic impedance Z0 and frequency F" + + + extends Modelica.Electrical.Analog.Interfaces.TwoPort; + + parameter Modelica.SIunits.Resistance Z0=1 "Natural impedance"; + parameter Modelica.SIunits.Frequency F=1 "Frequency"; + +protected + Modelica.SIunits.Voltage er; + Modelica.SIunits.Voltage es; + Modelica.SIunits.Time TD; +equation + + assert(Z0 > 0, "Z0 has to be positive"); + assert(F > 0, "F has to be positive"); + TD = 1/F/4; + i1 = (v1 - es)/Z0; + i2 = (v2 - er)/Z0; + es = 2*delay(v2, TD) - delay(er, TD); + er = 2*delay(v1, TD) - delay(es, TD); + +end TLine3; ++
+
+
++
+This package contains semiconductor devices: +
+
+
+
+
+
+ +
++
+The simple diode is a one port. It consists of the diode itself and an parallel ohmic +resistance R. The diode formula is: +
++ v/vt + i = ids ( e - 1). ++
+If the exponent v/vt reaches the limit maxex, the diode characterisic is linearly +continued to avoid overflow. +
+++
+
Name | Default | Description |
---|---|---|
Ids | 1.e-6 | Saturation current [A] |
Vt | 0.04 | Voltage equivalent of temperature (kT/qn) [V] |
Maxexp | 15 | Max. exponent for linear continuation |
R | 1.e8 | Parallel ohmic resistance [Ohm] |
+model Diode "Simple diode" + extends Modelica.Electrical.Analog.Interfaces.OnePort; + parameter SIunits.Current Ids=1.e-6 "Saturation current"; + parameter SIunits.Voltage Vt=0.04 "Voltage equivalent of temperature (kT/qn)"; + parameter Real Maxexp(final min=Modelica.Constants.SMALL) = 15 + "Max. exponent for linear continuation"; + parameter SIunits.Resistance R=1.e8 "Parallel ohmic resistance"; +equation + i = if (v/Vt > Maxexp) then Ids*(exp(Maxexp)*(1 + v/Vt - Maxexp) - 1) + v/R + else Ids*(exp(v/Vt) - 1) + v/R; +end Diode; ++
+ +
++
+The PMOS model is a simple model of a p-channel metal-oxide semiconductor +FET. It differs slightly from the device used in the SPICE simulator. +For more details please care for H. Spiro. +
++The model does not consider capacitances. A high drain-source resistance RDS +is included to avoid numerical difficulties. +
++Some typical parameter sets are: +
++ W L Beta Vt K2 K5 DW DL + m m A/V^2 V - - m m + + 50.e-6 8.e-6 .0085e-3 -.15 .41 .839 -3.8e-6 -4.0e-6 + 20.e-6 6.e-6 .0105e-3 -1.0 .41 .839 -2.5e-6 -2.1e-6 + 30.e-6 5.e-6 .0059e-3 -.3 .98 1.01 0 -3.9e-6 + 30.e-6 5.e-6 .0152e-3 -.69 .104 1.1 -.8e-6 -.4e-6 + 30.e-6 5.e-6 .0163e-3 -.69 .104 1.1 -.8e-6 -.4e-6 + 30.e-6 5.e-6 .0182e-3 -.69 .086 1.06 -.1e-6 -.6e-6 + 20.e-6 6.e-6 .0074e-3 -1. .4 .59 0 0 ++
++
+
Name | Default | Description |
---|---|---|
W | 20.0e-6 | Width [m] |
L | 6.0e-6 | Length [m] |
Beta | 0.0105e-3 | Transconductance parameter [A/(V*V)] |
Vt | -1.0 | Zero bias threshold voltage [V] |
K2 | 0.41 | Bulk threshold parameter |
K5 | 0.839 | Reduction of pinch-off region |
dW | -2.5e-6 | Narrowing of channel [m] |
dL | -2.1e-6 | Shortening of channel [m] |
RDS | 1.e+7 | Drain-Source-Resistance [Ohm] |
+model PMOS "Simple MOS Transistor" + // 6.12.2001 parameter RDS added, Clauss + + + Interfaces.Pin D "Drain"; + Interfaces.Pin G "Gate"; + Interfaces.Pin S "Source"; + Interfaces.Pin B "Bulk"; + + parameter SIunits.Length W=20.0e-6 "Width"; + parameter SIunits.Length L=6.0e-6 "Length"; + parameter SIunits.Transconductance Beta=0.0105e-3 "Transconductance parameter"; + parameter SIunits.Voltage Vt=-1.0 "Zero bias threshold voltage"; + parameter Real K2=0.41 "Bulk threshold parameter"; + parameter Real K5=0.839 "Reduction of pinch-off region"; + parameter SIunits.Length dW=-2.5e-6 "Narrowing of channel"; + parameter SIunits.Length dL=-2.1e-6 "Shortening of channel"; + parameter SIunits.Resistance RDS=1.e+7 "Drain-Source-Resistance"; +protected + Real v; + Real uds; + Real ubs; + Real ugst; + Real ud; + Real us; + Real id; + Real gds; +equation + //assert (L + dL > 0, "Effective length must be positive"); + //assert (W + dW > 0, "Effective width must be positive"); + gds = if (RDS < 1.e-20 and RDS > -1.e-20) then 1.e20 else 1/RDS; + v = Beta*(W + dW)/(L + dL); + ud = if (D.v > S.v) then S.v else D.v; + us = if (D.v > S.v) then D.v else S.v; + uds = ud - us; + ubs = if (B.v < us) then 0 else B.v - us; + ugst = (G.v - us - Vt + K2*ubs)*K5; + id = if (ugst >= 0) then v*uds*gds else if (ugst < uds) then -v*uds*(ugst - + uds/2 - gds) else -v*(ugst*ugst/2 - uds*gds); + G.i = 0; + D.i = if (D.v > S.v) then -id else id; + S.i = if (D.v > S.v) then id else -id; + B.i = 0; +end PMOS; ++
+ +
++
+The NMos model is a simple model of a n-channel metal-oxide semiconductor +FET. It differs slightly from the device used in the SPICE simulator. +For more details please care for H. Spiro. +
++The model does not consider capacitances. A high drain-source resistance RDS +is included to avoid numerical difficulties. +
++
+ W L Beta Vt K2 K5 DW DL + m m A/V^2 V - - m m + + 12.e-6 4.e-6 .062e-3 -4.5 .24 .61 -1.2e-6 -.9e-6 depletion + 60.e-6 3.e-6 .048e-3 .1 .08 .68 -1.2e-6 -.9e-6 enhancement + 12.e-6 4.e-6 .0625e-3 -.8 .21 .78 -1.2e-6 -.9e-6 zero + 50.e-6 8.e-6 .0299e-3 .24 1.144 .7311 -5.4e-6 -4.e-6 + 20.e-6 6.e-6 .041e-3 .8 1.144 .7311 -2.5e-6 -1.5e-6 + 30.e-6 9.e-6 .025e-3 -4. .861 .878 -3.4e-6 -1.74e-6 + 30.e-6 5.e-6 .031e-3 .6 1.5 .72 0 -3.9e-6 + 50.e-6 6.e-6 .0414e-3 -3.8 .34 .8 -1.6e-6 -2.e-6 depletion + 50.e-6 5.e-6 .03e-3 .37 .23 .86 -1.6e-6 -2.e-6 enhancement + 50.e-6 6.e-6 .038e-3 -.9 .23 .707 -1.6e-6 -2.e-6 zero + 20.e-6 4.e-6 .06776e-3 .5409 .065 .71 -.8e-6 -.2e-6 + 20.e-6 4.e-6 .06505e-3 .6209 .065 .71 -.8e-6 -.2e-6 + 20.e-6 4.e-6 .05365e-3 .6909 .03 .8 -.3e-6 -.2e-6 + 20.e-6 4.e-6 .05365e-3 .4909 .03 .8 -.3e-6 -.2e-6 + 12.e-6 4.e-6 .023e-3 -4.5 .29 .6 0 0 depletion + 60.e-6 3.e-6 .022e-3 .1 .11 .65 0 0 enhancement + 12.e-6 4.e-6 .038e-3 -.8 .33 .6 0 0 zero + 20.e-6 6.e-6 .022e-3 .8 1 .66 0 0 ++
+
++
+
Name | Default | Description |
---|---|---|
W | 20.e-6 | Width [m] |
L | 6.e-6 | Length [m] |
Beta | 0.041e-3 | Transconductance parameter [A/(V*V)] |
Vt | 0.8 | Zero bias threshold voltage [V] |
K2 | 1.144 | Bulk threshold parameter |
K5 | 0.7311 | Reduction of pinch-off region |
dW | -2.5e-6 | narrowing of channel [m] |
dL | -1.5e-6 | shortening of channel [m] |
RDS | 1.e+7 | Drain-Source-Resistance [Ohm] |
+model NMOS "Simple MOS Transistor" + // 6.12.2001 parameter RDS added, Clauss + Interfaces.Pin D "Drain"; + Interfaces.Pin G "Gate"; + Interfaces.Pin S "Source"; + Interfaces.Pin B "Bulk"; + parameter SIunits.Length W=20.e-6 "Width"; + parameter SIunits.Length L=6.e-6 "Length"; + parameter SIunits.Transconductance Beta=0.041e-3 "Transconductance parameter"; + parameter SIunits.Voltage Vt=0.8 "Zero bias threshold voltage"; + parameter Real K2=1.144 "Bulk threshold parameter"; + parameter Real K5=0.7311 "Reduction of pinch-off region"; + parameter SIunits.Length dW=-2.5e-6 "narrowing of channel"; + parameter SIunits.Length dL=-1.5e-6 "shortening of channel"; + parameter SIunits.Resistance RDS=1.e+7 "Drain-Source-Resistance"; +protected + Real v; + Real uds; + Real ubs; + Real ugst; + Real ud; + Real us; + Real id; + Real gds; +equation + //assert (L + dL > 0, "Effective length must be positive"); + //assert (W + dW > 0, "Effective width must be positive"); + gds = if (RDS < 1.e-20 and RDS > -1.e-20) then 1.e20 else 1/RDS; + v = Beta*(W + dW)/(L + dL); + ud = if (D.v < S.v) then S.v else D.v; + us = if (D.v < S.v) then D.v else S.v; + uds = ud - us; + ubs = if (B.v > us) then 0 else B.v - us; + ugst = (G.v - us - Vt + K2*ubs)*K5; + id = if (ugst <= 0) then v*uds*gds else if (ugst > uds) then v*uds*(ugst - + uds/2 + gds) else v*(ugst*ugst/2 + uds*gds); + G.i = 0; + D.i = if (D.v < S.v) then -id else id; + S.i = if (D.v < S.v) then id else -id; + B.i = 0; +end NMOS; ++
+ +
++
+This model is a simple model of a bipolar npn junction transistor according +to Ebers-Moll. +
++A typical parameter set is: +
++ Bf Br Is Vak Tauf Taur Ccs Cje Cjc Phie Me PHic Mc Gbc Gbe Vt + - - A V s s F F F V - V - mS mS V + + 50 0.1 1e-16 0.02 0.12e-9 5e-9 1e-12 0.4e-12 0.5e-12 0.8 0.4 0.8 0.333 1e-15 1e-15 0.02585 ++
+
+
++
+
Name | Default | Description |
---|---|---|
Bf | 50 | Forward beta |
Br | 0.1 | Reverse beta |
Is | 1.e-16 | Transport saturation current [A] |
Vak | 0.02 | Early voltage (inverse), 1/Volt [1/V] |
Tauf | 0.12e-9 | Ideal forward transit time [s] |
Taur | 5e-9 | Ideal reverse transit time [s] |
Ccs | 1e-12 | Collector-substrat(ground) cap. [F] |
Cje | 0.4e-12 | Base-emitter zero bias depletion cap. [F] |
Cjc | 0.5e-12 | Base-coll. zero bias depletion cap. [F] |
Phie | 0.8 | Base-emitter diffusion voltage [V] |
Me | 0.4 | Base-emitter gradation exponent |
Phic | 0.8 | Base-collector diffusion voltage [V] |
Mc | 0.333 | Base-collector gradation exponent |
Gbc | 1e-15 | Base-collector conductance [S] |
Gbe | 1e-15 | Base-emitter conductance [S] |
Vt | 0.02585 | Voltage equivalent of temperature [V] |
EMin | -100 | if x < EMin, the exp(x) function is linearized |
EMax | 40 | if x > EMax, the exp(x) function is linearized |
+model NPN "Simple BJT according to Ebers-Moll" + parameter Real Bf=50 "Forward beta"; + parameter Real Br=0.1 "Reverse beta"; + parameter SIunits.Current Is=1.e-16 "Transport saturation current"; + parameter SIunits.InversePotential Vak=0.02 "Early voltage (inverse), 1/Volt"; + parameter SIunits.Time Tauf=0.12e-9 "Ideal forward transit time"; + parameter SIunits.Time Taur=5e-9 "Ideal reverse transit time"; + parameter SIunits.Capacitance Ccs=1e-12 "Collector-substrat(ground) cap."; + parameter SIunits.Capacitance Cje=0.4e-12 "Base-emitter zero bias depletion cap."; + parameter SIunits.Capacitance Cjc=0.5e-12 "Base-coll. zero bias depletion cap."; + parameter SIunits.Voltage Phie=0.8 "Base-emitter diffusion voltage"; + parameter Real Me=0.4 "Base-emitter gradation exponent"; + parameter SIunits.Voltage Phic=0.8 "Base-collector diffusion voltage"; + parameter Real Mc=0.333 "Base-collector gradation exponent"; + parameter SIunits.Conductance Gbc=1e-15 "Base-collector conductance"; + parameter SIunits.Conductance Gbe=1e-15 "Base-emitter conductance"; + parameter SIunits.Voltage Vt=0.02585 "Voltage equivalent of temperature"; + parameter Real EMin=-100 "if x < EMin, the exp(x) function is linearized"; + parameter Real EMax=40 "if x > EMax, the exp(x) function is linearized"; +protected + Real vbc; + Real vbe; + Real qbk; + Real ibc; + Real ibe; + Real cbc; + Real cbe; + Real ExMin; + Real ExMax; + Real Capcje; + Real Capcjc; + function pow "Just a helper function for x^y" + input Real x; + input Real y; + output Real z; + algorithm + z := x^y; + end pow; +public + Modelica.Electrical.Analog.Interfaces.Pin C "Collector"; + Modelica.Electrical.Analog.Interfaces.Pin B "Base"; + Modelica.Electrical.Analog.Interfaces.Pin E "Emitter"; +equation + ExMin = exp(EMin); + ExMax = exp(EMax); + vbc = B.v - C.v; + vbe = B.v - E.v; + qbk = 1 - vbc*Vak; + + ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc*Gbc + else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc*Gbc + else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; + ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe*Gbe + else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe*Gbe + else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; + Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - vbc/ + Phic, -Mc); + Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - vbe/ + Phie, -Me); + cbc = if (vbc/Vt < EMin) then Taur*Is/Vt*ExMin*(vbc/Vt - EMin + 1) + Capcjc + else if (vbc/Vt > EMax) then Taur*Is/Vt*ExMax*(vbc/Vt - EMax + 1) + Capcjc + else Taur*Is/Vt*exp(vbc/Vt) + Capcjc; + cbe = if (vbe/Vt < EMin) then Tauf*Is/Vt*ExMin*(vbe/Vt - EMin + 1) + Capcje + else if (vbe/Vt > EMax) then Tauf*Is/Vt*ExMax*(vbe/Vt - EMax + 1) + Capcje + else Tauf*Is/Vt*exp(vbe/Vt) + Capcje; + C.i = (ibe - ibc)*qbk - ibc/Br - cbc*der(vbc) + Ccs*der(C.v); + B.i = ibe/Bf + ibc/Br + cbc*der(vbc) + cbe*der(vbe); + E.i = -B.i - C.i + Ccs*der(C.v); +end NPN; ++
+ +
++
+This model is a simple model of a bipolar pnp junction transistor according +to Ebers-Moll. +
+A typical parameter set is: +
++ Bf Br Is Vak Tauf Taur Ccs Cje Cjc Phie Me PHic Mc Gbc Gbe Vt + - - A V s s F F F V - V - mS mS V + + 50 0.1 1e-16 0.02 0.12e-9 5e-9 1e-12 0.4e-12 0.5e-12 0.8 0.4 0.8 0.333 1e-15 1e-15 0.02585 ++
+
+
++
+
Name | Default | Description |
---|---|---|
Bf | 50 | Forward beta |
Br | 0.1 | Reverse beta |
Is | 1.e-16 | Transport saturation current [A] |
Vak | 0.02 | Early voltage (inverse), 1/Volt [1/V] |
Tauf | 0.12e-9 | Ideal forward transit time [s] |
Taur | 5e-9 | Ideal reverse transit time [s] |
Ccs | 1e-12 | Collector-substrat(ground) cap. [F] |
Cje | 0.4e-12 | Base-emitter zero bias depletion cap. [F] |
Cjc | 0.5e-12 | Base-coll. zero bias depletion cap. [F] |
Phie | 0.8 | Base-emitter diffusion voltage [V] |
Me | 0.4 | Base-emitter gradation exponent |
Phic | 0.8 | Base-collector diffusion voltage [V] |
Mc | 0.333 | Base-collector gradation exponent |
Gbc | 1e-15 | Base-collector conductance [S] |
Gbe | 1e-15 | Base-emitter conductance [S] |
Vt | 0.02585 | Voltage equivalent of temperature [V] |
EMin | -100 | if x < EMin, the exp(x) function is linearized |
EMax | 40 | if x > EMax, the exp(x) function is linearized |
+model PNP "Simple BJT according to Ebers-Moll" + parameter Real Bf=50 "Forward beta"; + parameter Real Br=0.1 "Reverse beta"; + parameter SIunits.Current Is=1.e-16 "Transport saturation current"; + parameter SIunits.InversePotential Vak=0.02 "Early voltage (inverse), 1/Volt"; + parameter SIunits.Time Tauf=0.12e-9 "Ideal forward transit time"; + parameter SIunits.Time Taur=5e-9 "Ideal reverse transit time"; + parameter SIunits.Capacitance Ccs=1e-12 "Collector-substrat(ground) cap."; + parameter SIunits.Capacitance Cje=0.4e-12 "Base-emitter zero bias depletion cap."; + parameter SIunits.Capacitance Cjc=0.5e-12 "Base-coll. zero bias depletion cap."; + parameter SIunits.Voltage Phie=0.8 "Base-emitter diffusion voltage"; + parameter Real Me=0.4 "Base-emitter gradation exponent"; + parameter SIunits.Voltage Phic=0.8 "Base-collector diffusion voltage"; + parameter Real Mc=0.333 "Base-collector gradation exponent"; + parameter SIunits.Conductance Gbc=1e-15 "Base-collector conductance"; + parameter SIunits.Conductance Gbe=1e-15 "Base-emitter conductance"; + parameter SIunits.Voltage Vt=0.02585 "Voltage equivalent of temperature"; + parameter Real EMin=-100 "if x < EMin, the exp(x) function is linearized"; + parameter Real EMax=40 "if x > EMax, the exp(x) function is linearized"; +protected + Real vbc; + Real vbe; + Real qbk; + Real ibc; + Real ibe; + Real cbc; + Real cbe; + Real ExMin; + Real ExMax; + Real Capcje; + Real Capcjc; + function pow "Just a helper function for x^y" + input Real x; + input Real y; + output Real z; + algorithm + z := x^y; + end pow; +public + Modelica.Electrical.Analog.Interfaces.Pin C "Collector"; + Modelica.Electrical.Analog.Interfaces.Pin B "Base"; + Modelica.Electrical.Analog.Interfaces.Pin E "Emitter"; +equation + ExMin = exp(EMin); + ExMax = exp(EMax); + vbc = C.v - B.v; + vbe = E.v - B.v; + qbk = 1 - vbc*Vak; + + ibc = if (vbc/Vt < EMin) then Is*(ExMin*(vbc/Vt - EMin + 1) - 1) + vbc*Gbc + else if (vbc/Vt > EMax) then Is*(ExMax*(vbc/Vt - EMax + 1) - 1) + vbc*Gbc + else Is*(exp(vbc/Vt) - 1) + vbc*Gbc; + + ibe = if (vbe/Vt < EMin) then Is*(ExMin*(vbe/Vt - EMin + 1) - 1) + vbe*Gbe + else if (vbe/Vt > EMax) then Is*(ExMax*(vbe/Vt - EMax + 1) - 1) + vbe*Gbe + else Is*(exp(vbe/Vt) - 1) + vbe*Gbe; + + Capcjc = if (vbc/Phic > 0) then Cjc*(1 + Mc*vbc/Phic) else Cjc*pow(1 - vbc/ + Phic, -Mc); + Capcje = if (vbe/Phie > 0) then Cje*(1 + Me*vbe/Phie) else Cje*pow(1 - vbe/ + Phie, -Me); + cbc = if (vbc/Vt < EMin) then Taur*Is/Vt*ExMin*(vbc/Vt - EMin + 1) + Capcjc + else if (vbc/Vt > EMax) then Taur*Is/Vt*ExMax*(vbc/Vt - EMax + 1) + Capcjc + else Taur*Is/Vt*exp(vbc/Vt) + Capcjc; + cbe = if (vbe/Vt < EMin) then Tauf*Is/Vt*ExMin*(vbe/Vt - EMin + 1) + Capcje + else if (vbe/Vt > EMax) then Tauf*Is/Vt*ExMax*(vbe/Vt - EMax + 1) + Capcje + else Tauf*Is/Vt*exp(vbe/Vt) + Capcje; + C.i = -((ibe - ibc)*qbk - ibc/Br - cbc*der(vbc) - Ccs*der(C.v)); + B.i = -(ibe/Bf + ibc/Br + cbe*der(vbe) + cbc*der(vbc)); + E.i = -B.i - C.i + Ccs*der(C.v); +end PNP; ++
+
+
+This package contains potential, voltage, and current sensors. +
+ ++
+
+
+
+
+ +
+model PotentialSensor "Sensor to measure the potential" + extends Interfaces.AbsoluteSensor; + SI.ElectricPotential phi "Absolute voltage potential"; +equation + p.i = 0; + phi = p.v; + phi = outPort.signal[1]; +end PotentialSensor; ++
+ +
+model VoltageSensor "Sensor to measure the voltage between two pins" + extends Interfaces.RelativeSensor; + SI.Voltage v "Voltage between pin p and n (= p.v - n.v)"; +equation + p.i = 0; + n.i = 0; + v = p.v - n.v; + v = outPort.signal[1]; +end VoltageSensor; ++
+ +
+model CurrentSensor "Sensor to measure the current in a branch" + extends Interfaces.RelativeSensor; + SI.Current i "current in the branch from p to n"; +equation + p.v = n.v; + p.i = i; + n.i = -i; + i = outPort.signal[1]; +end CurrentSensor; ++
+
+
+This package contains time-dependend and controlled voltage and current sources. +
+ ++
+
+
+
+
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Amplitude of trapezoid [V] |
rising | 0 | Rising duration of trapezoid [s] |
width | 0.5 | Width duration of trapezoid [s] |
falling | 0 | Falling duration of trapezoid [s] |
period | 1 | Time for one period [s] |
nperiod | -1 | Number of periods (< 0 means infinite number of periods) |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model TrapezoidVoltage "Trapezoidal voltage source" + parameter SI.Voltage V=1 "Amplitude of trapezoid"; + parameter SI.Time rising(final min=0) = 0 "Rising duration of trapezoid"; + parameter SI.Time width(final min=0) = 0.5 "Width duration of trapezoid"; + parameter SI.Time falling(final min=0) = 0 "Falling duration of trapezoid"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + parameter Integer nperiod=-1 + "Number of periods (< 0 means infinite number of periods)"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Trapezoid signalSource( + amplitude={V}, + rising={rising}, + width={width}, + falling={falling}, + period={period}, + nperiod={nperiod})); +end TrapezoidVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Amplitude of sine wave [V] |
freqHz | 2 | Frequency of sine wave [Hz] |
phase | 0 | Phase of sine wave [rad] |
damping | 1 | Damping coefficient of sine wave [s-1] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model ExpSineVoltage "Exponentially damped sine voltage source" + parameter SI.Voltage V=1 "Amplitude of sine wave"; + parameter SI.Frequency freqHz=2 "Frequency of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Damping damping=1 "Damping coefficient of sine wave"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.ExpSine signalSource( + amplitude={V}, + freqHz={freqHz}, + phase={phase}, + damping={damping})); +end ExpSineVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Height of ramp [V] |
duration | 2 | Duration of ramp [s] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model RampVoltage "Ramp voltage source" + parameter SI.Voltage V=1 "Height of ramp"; + parameter SI.Time duration(min=Modelica.Constants.small) = 2 "Duration of ramp"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Ramp signalSource(final height={V}, final duration + ={duration})); +end RampVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Height of ramp [A] |
duration | 2 | Duration of ramp [s] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model RampCurrent "Ramp current source" + parameter SI.Current I=1 "Height of ramp"; + parameter SI.Time duration(min=Modelica.Constants.small) = 2 "Duration of ramp"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Ramp signalSource(final height={I}, final duration + ={duration})); +end RampCurrent; ++
+ +
+model SignalVoltage + "Generic voltage source using the input signal as source voltage" + extends Interfaces.OnePort; + + Modelica.Blocks.Interfaces.InPort inPort(final n=1); +equation + inPort.signal[1] = v; +end SignalVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Value of constant voltage [V] |
+model ConstantVoltage "Source for constant voltage" + parameter SI.Voltage V=1 "Value of constant voltage"; + extends Interfaces.OnePort; +equation + v = V; +end ConstantVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Height of step [V] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model StepVoltage "Step voltage source" + parameter SI.Voltage V=1 "Height of step"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Step signalSource(height={V})); +end StepVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Amplitude of sine wave [V] |
phase | 0 | Phase of sine wave [rad] |
freqHz | 1 | Frequency of sine wave [Hz] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model SineVoltage "Sine voltage source" + parameter SI.Voltage V=1 "Amplitude of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Frequency freqHz=1 "Frequency of sine wave"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Sine signalSource( + amplitude={V}, + freqHz={freqHz}, + phase={phase})); +end SineVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
vMax | 1 | Upper bound for rising edge |
riseTime | 0.5 | Rise time [s] |
riseTimeConst | 0.1 | Rise time constant [s] |
fallTimeConst | riseTimeConst | Fall time constant [s] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model ExponentialsVoltage + " Rising and falling exponential voltage source" + parameter Real vMax=1 "Upper bound for rising edge"; + parameter SI.Time riseTime(min=0) = 0.5 "Rise time"; + parameter SI.Time riseTimeConst(min=Modelica.Constants.small) = 0.1 + "Rise time constant"; + parameter SI.Time fallTimeConst(min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Exponentials signalSource( + outMax={vMax}, + riseTime={riseTime}, + riseTimeConst={riseTimeConst}, + fallTimeConst={fallTimeConst})); +end ExponentialsVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Amplitude of pulse [V] |
width | 50 | Width of pulse in % of period |
period | 1 | Time for one period [s] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model PulseVoltage "Pulse voltage source" + parameter SI.Voltage V=1 "Amplitude of pulse"; + parameter Real width( + final min=Modelica.Constants.small, + final max=100) = 50 "Width of pulse in % of period"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.Pulse signalSource( + amplitude={V}, + width={width}, + period={period})); +end PulseVoltage; ++
+ +
+
Name | Default | Description |
---|---|---|
V | 1 | Amplitude of saw tooth [V] |
period | 1 | Time for one period [s] |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model SawToothVoltage "Saw tooth voltage source" + parameter SI.Voltage V=1 "Amplitude of saw tooth"; + parameter SI.Time period=1 "Time for one period"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.SawTooth signalSource(amplitude={V}, period={ + period})); +end SawToothVoltage; ++
+ +
+This block generates a voltage source by linear interpolation in +a table. The time points and voltage values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the voltage to be interpolated. +The table interpolation has the following proporties: +
+ ++Example: +
+ ++ table = [0 0 + 1 0 + 1 1 + 2 4 + 3 9 + 4 16] + +If, e.g., time = 1.0, the voltage v = 0.0 (before event), 1.0 (after event) + e.g., time = 1.5, the voltage v = 2.5, + e.g., time = 2.0, the voltage v = 4.0, + e.g., time = 5.0, the voltage v = 23.0 (i.e. extrapolation). ++ +
++
+
Name | Default | Description |
---|---|---|
table[:, :] | [0, 0; 1, 1; 2, 4] | Table matrix (time = first column, voltage = second column) |
offset | 0 | Voltage offset [V] |
startTime | 0 | Time offset [s] |
+model TableVoltage + "Voltage source by linear interpolation in a table" + parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] + "Table matrix (time = first column, voltage = second column)"; + extends Interfaces.VoltageSource(redeclare Modelica.Blocks.Sources.TimeTable signalSource(table=table)); +end TableVoltage; ++
+ +
+model SignalCurrent + "Generic current source using the input signal as source current" + extends Interfaces.OnePort; + + Modelica.Blocks.Interfaces.InPort inPort(final n=1); +equation + i = inPort.signal[1]; +end SignalCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Value of constant current [A] |
+model ConstantCurrent "Source for constant current" + parameter SI.Current I=1 "Value of constant current"; + extends Interfaces.OnePort; +equation + i = I; +end ConstantCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Height of step [A] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model StepCurrent "Step current source" + parameter SI.Current I=1 "Height of step"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Step signalSource(height={I})); +end StepCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Amplitude of sine wave [A] |
phase | 0 | Phase of sine wave [rad] |
freqHz | 1 | Frequency of sine wave [Hz] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model SineCurrent "Sine current source" + parameter SI.Current I=1 "Amplitude of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Frequency freqHz=1 "Frequency of sine wave"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Sine signalSource( + amplitude={I}, + freqHz={freqHz}, + phase={phase})); +end SineCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Amplitude of sine wave |
freqHz | 2 | Frequency of sine wave [Hz] |
phase | 0 | Phase of sine wave [rad] |
damping | 1 | Damping coefficient of sine wave [s-1] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model ExpSineCurrent "Exponentially damped sine current source" + parameter Real I=1 "Amplitude of sine wave"; + parameter SI.Frequency freqHz=2 "Frequency of sine wave"; + parameter SI.Angle phase=0 "Phase of sine wave"; + parameter SI.Damping damping=1 "Damping coefficient of sine wave"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.ExpSine signalSource( + amplitude={I}, + freqHz={freqHz}, + phase={phase}, + damping={damping})); +end ExpSineCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
iMax | 1 | Upper bound for rising edge |
riseTime | 0.5 | Rise time [s] |
riseTimeConst | 0.1 | Rise time constant [s] |
fallTimeConst | riseTimeConst | Fall time constant [s] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model ExponentialsCurrent + " Rising and falling exponential current source" + parameter Real iMax=1 "Upper bound for rising edge"; + parameter SI.Time riseTime(min=0) = 0.5 "Rise time"; + parameter SI.Time riseTimeConst(min=Modelica.Constants.small) = 0.1 + "Rise time constant"; + parameter SI.Time fallTimeConst(min=Modelica.Constants.small) = riseTimeConst + "Fall time constant"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Exponentials signalSource( + outMax={iMax}, + riseTime={riseTime}, + riseTimeConst={riseTimeConst}, + fallTimeConst={fallTimeConst})); +end ExponentialsCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Amplitude of pulse [A] |
width | 50 | Width of pulse in % of period |
period | 1 | Time for one period [s] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model PulseCurrent "Pulse current source" + parameter SI.Current I=1 "Amplitude of pulse"; + parameter Real width( + final min=Modelica.Constants.small, + final max=100) = 50 "Width of pulse in % of period"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Pulse signalSource( + amplitude={I}, + width={width}, + period={period})); +end PulseCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Amplitude of saw tooth [A] |
period | 1 | Time for one period [s] |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model SawToothCurrent "Saw tooth current source" + parameter SI.Current I=1 "Amplitude of saw tooth"; + parameter SI.Time period=1 "Time for one period"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.SawTooth signalSource(amplitude={I}, period={ + period})); +end SawToothCurrent; ++
+ +
+
Name | Default | Description |
---|---|---|
I | 1 | Amplitude of trapezoid [A] |
rising | 0 | Rising duration of trapezoid [s] |
width | 0.5 | Width duration of trapezoid [s] |
falling | 0 | Falling duration of trapezoid [s] |
period | 1 | Time for one period [s] |
nperiod | -1 | Number of periods (< 0 means infinite number of periods) |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model TrapezoidCurrent "Trapezoidal current source" + parameter SI.Current I=1 "Amplitude of trapezoid"; + parameter SI.Time rising(final min=0) = 0 "Rising duration of trapezoid"; + parameter SI.Time width(final min=0) = 0.5 "Width duration of trapezoid"; + parameter SI.Time falling(final min=0) = 0 "Falling duration of trapezoid"; + parameter SI.Time period(final min=Modelica.Constants.small) = 1 + "Time for one period"; + parameter Integer nperiod=-1 + "Number of periods (< 0 means infinite number of periods)"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.Trapezoid signalSource( + amplitude={I}, + rising={rising}, + width={width}, + falling={falling}, + period={period}, + nperiod={nperiod})); +end TrapezoidCurrent; ++
+ +
+This block generates a current source by linear interpolation in +a table. The time points and current values are stored in a matrix +table[i,j], where the first column table[:,1] contains the +time points and the second column contains the current to be interpolated. +The table interpolation has the following proporties: +
+ ++Example: +
+ ++ table = [0 0 + 1 0 + 1 1 + 2 4 + 3 9 + 4 16] + +If, e.g., time = 1.0, the current i = 0.0 (before event), 1.0 (after event) + e.g., time = 1.5, the current i = 2.5, + e.g., time = 2.0, the current i = 4.0, + e.g., time = 5.0, the current i = 23.0 (i.e. extrapolation). ++ +
++
+
Name | Default | Description |
---|---|---|
table[:, :] | [0, 0; 1, 1; 2, 4] | Table matrix (time = first column, current = second column) |
offset | 0 | Current offset [A] |
startTime | 0 | Time offset [s] |
+model TableCurrent + "Current source by linear interpolation in a table" + parameter Real table[:, :]=[0, 0; 1, 1; 2, 4] + "Table matrix (time = first column, current = second column)"; + extends Interfaces.CurrentSource(redeclare Modelica.Blocks.Sources.TimeTable signalSource(table=table)); +end TableCurrent; ++
+
+
+This package contains definitions for the graphical layout of +components which may be used in different libraries. +The icons can be utilized by inheriting them in the desired class +using "extends". +
+ + +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+partial model Info "Icon for an information class" +end Info; ++
+
+partial model Example "Icon for an example model" +end Example; ++
+
+partial function Function "Icon for a function" +end Function; ++
+
+partial record Record "Icon for a record" +end Record; ++
+
+partial function Enumeration "Icon for an enumeration" +end Enumeration; ++
+ +
+partial model TranslationalSensor + "Icon representing translational measurement device" +end TranslationalSensor; ++
+ +
+partial model RotationalSensor + "Icon representing rotational measurement device" +end RotationalSensor; ++
+
+partial model GearIcon "Icon for gearbox" +end GearIcon; ++
+
+partial model MotorIcon "Icon for electrical motor" +end MotorIcon; ++
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
+
+This package contains the following basic mathematical functions: +
+ ++ sin(u) sine + cos(u) cosine + tan(u) tangent (u shall not be -pi/2, pi/2, 3*pi/2, ...) + asin(u) inverse sine (-1 <= u <= 1) + acos(u) inverse cosine (-1 <= u <= 1) + atan(u) inverse tangent + atan2(u1,u2) four quadrant inverse tangent + sinh(u) hyperbolic sine + cosh(u) hyperbolic cosine + tanh(u) hyperbolic tangent + exp(u) exponential, base e + log(u) natural (base e) logarithm (u > 0) + log10(u) base 10 logarithm (u > 0) ++ +
+These functions are used by calling them directly +with a full name (e.g. y = Modelica.Math.asin(0.5)). +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
+ ++
+
+ +
+partial function baseIcon1 + "Basic icon for mathematical function with y-axis on left side" +end baseIcon1; ++
+ +
+partial function baseIcon2 + "Basic icon for mathematical function with y-axis in middle" +end baseIcon2; ++
+ +
+function sin "sine" + extends baseIcon1; + input SI.Angle u; + output Real y; +external "C" y = sin(u); +end sin; ++
+ +
+function cos "cosine" + extends baseIcon1; + input SI.Angle u; + output Real y; +external "C" y = cos(u); +end cos; ++
+ +
+function tan "tangent (u shall not be -pi/2, pi/2, 3*pi/2, ...)" + extends baseIcon2; + input SI.Angle u; + output Real y; +external "C" y = tan(u); +end tan; ++
+ +
+function asin "inverse sine (-1 <= u <= 1)" + extends baseIcon2; + input Real u; + output SI.Angle y; +external "C" y = asin(u); +end asin; ++
+ +
+function acos "inverse cosine (-1 <= u <= 1)" + extends baseIcon2; + input Real u; + output SI.Angle y; +external "C" y = acos(u); +end acos; ++
+ +
+function atan "inverse tangent" + extends baseIcon2; + input Real u; + output SI.Angle y; +external "C" y = atan(u); +end atan; ++
+ +
++
+function atan2 "four quadrant inverse tangent" + extends baseIcon2; + input Real u1; + input Real u2; + output SI.Angle y; +external "C" y = atan2(u1, u2); +end atan2; ++
+ +
+function sinh "hyperbolic sine" + extends baseIcon2; + input Real u; + output Real y; +external "C" y = sinh(u); +end sinh; ++
+ +
+function cosh "hyperbolic cosine" + extends baseIcon2; + input Real u; + output Real y; +external "C" y = cosh(u); +end cosh; ++
+ +
+function tanh "hyperbolic tangent" + extends baseIcon2; + input Real u; + output Real y; +external "C" y = tanh(u); +end tanh; ++
+ +
+function exp "exponential, base e" + extends baseIcon2; + input Real u; + output Real y; +external "C" y = exp(u); +end exp; ++
+ +
+function log "natural (base e) logarithm (u shall be > 0)" + extends baseIcon1; + input Real u; + output Real y; +external "C" y = log(u); +end log; ++
+ +
+function log10 "base 10 logarithm (u shall be > 0)" + extends baseIcon1; + input Real u; + output Real y; +external "C" y = log10(u); +end log10; ++
+
+function tempInterpol1 + "temporary routine for linear interpolation (will be removed)" + input Real u "input value (first column of table)"; + input Real table[:, :] "table to be interpolated"; + input Integer icol "column of table to be interpolated"; + output Real y "interpolated input value (icol column of table)"; +protected + Integer i; + Integer n "number of rows of table"; + Real u1; + Real u2; + Real y1; + Real y2; +algorithm + n := size(table, 1); + if n <= 1 then + y := table[1, icol]; + else + // Search interval + if u <= table[1, 1] then + i := 1; + else + i := 2; + // Supports duplicate table[i, 1] values + // in the interior to allow discontinuities. + // Interior means that + // if table[i, 1] = table[i+1, 1] we require i>1 and i+1<n + while i < n and u >= table[i, 1] loop + i := i + 1; + end while; + i := i - 1; + end if; + + // Get interpolation data + u1 := table[i, 1]; + u2 := table[i + 1, 1]; + y1 := table[i, icol]; + y2 := table[i + 1, icol]; + + assert(u2 > u1, "Table index must be increasing"); + // Interpolate + y := y1 + (y2 - y1)*(u - u1)/(u2 - u1); + end if; +end tempInterpol1; ++
+
+function tempInterpol2 + "temporary routine for vectorized linear interpolation (will be removed)" + + input Real u "input value (first column of table)"; + input Real table[:, :] "table to be interpolated"; + input Integer icol[:] "column(s) of table to be interpolated"; + output Real y[1, size(icol, 1)] + "interpolated input value(s) (column(s) icol of table)"; +protected + Integer i; + Integer n "number of rows of table"; + Real u1; + Real u2; + Real y1[1, size(icol, 1)]; + Real y2[1, size(icol, 1)]; +algorithm + n := size(table, 1); + if n <= 1 then + y := transpose([table[1, icol]]); + else + // Search interval + if u <= table[1, 1] then + i := 1; + else + i := 2; + // Supports duplicate table[i, 1] values + // in the interior to allow discontinuities. + // Interior means that + // if table[i, 1] = table[i+1, 1] we require i>1 and i+1<n + while i < n and u >= table[i, 1] loop + i := i + 1; + end while; + i := i - 1; + end if; + + // Get interpolation data + u1 := table[i, 1]; + u2 := table[i + 1, 1]; + y1 := transpose([table[i, icol]]); + y2 := transpose([table[i + 1, icol]]); + + assert(u2 > u1, "Table index must be increasing"); + // Interpolate + y := y1 + (y2 - y1)*(u - u1)/(u2 - u1); + end if; +end tempInterpol2; ++
+
+
+This package contains components to model mechanical systems. +Currently, the following subpackages are available:
+ ++ Rotational 1-dimensional rotational mechanical components. + Translational 1-dimensional translational mechanical components. ++ +
+It is planned to add a subpackage for multibody systems to +model 3-dimensional mechanical systems. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+Content
+1. Overview of library Modelica.Mechanics.Rotational
+2. Components of the library
+3. Flange connectors
+4. Sign conventions
+5. User-defined components
+6. Requirements for simulation tools
+
1. Overview of library Modelica.Mechanics.Rotational
+ ++This package contains components to model 1-dimensional rotational +mechanical systems, including different types of gearboxes, +shafts with inertia, external torques, spring/damper elements, +frictional elements, backlash, elements to measure angle, angular velocity, +angular acceleration and the cut-torque of a flange. In sublibrary +Examples several examples are present to demonstrate the usage of +the elements. Just open the corresponding example model and simulate +the model according to the provided description. +
+ ++A unique feature of this library is the component-oriented +modeling of Coulomb friction elements, such as friction in bearings, +clutches, brakes, and gear efficiency. Even (dynamically) coupled +friction elements, e.g., as in automatic gearboxes, can be handeled +without introducing stiffness which leads to fast simulations. +The underlying theory is new and is based on the solution of mixed +continuous/discrete systems of equations, i.e., equations where the +unknowns are of type Real, Integer or Boolean. +Provided appropriate numerical algorithms for the solution of such types of +systems are available in the simulation tool, the simulation of +(dynamically) coupled friction elements of this library is +efficient and reliable. +
+ + + ++A simple example of the usage of this library is given in the +figure above. This drive consists of a shaft with inertia J1=0.2 which +is connected via an ideal gearbox with gear ratio=5 to a second shaft +with inertia J2=5. The left shaft is driven via an external, +sinusoidal torque. +The filled and non-filled grey squares at the left and +right side of a component represent mechanical flanges. +Drawing a line between such squares means that the corresponding +flanges are rigidly attached to each other. +By convention in this library, the connector characterized as a +filled grey square is called flange_a and placed at the +left side of the component in the "design view" and the connector +characterized as a non-filled grey square is called flange_b +and placed at the right side of the component in the "design view". +The two connectors are completely identical, with the only +exception that the graphical layout is a little bit different in order +to distinguish them for easier access of the connector variables. +For example, J1.flange_a.tau is the cut-torque in the connector +flange_a of component J1. +
+ ++The components of this +library can be connected together in an arbitrary way. E.g. it is +possible to connect two springs or two shafts with inertia directly +together, see figure below. +
+ + + +2. Components of the library
+ ++This package contains the following model components: +
+ ++ Examples Sublibrary containing example models. + Interfaces Sublibrary containing interface definitions. + Inertia Rotational component with inertia. + IdealGear Ideal gear transforming rotational in rotational motion. + IdealPlanetary Ideal standard planetary gear. + IdealGearR2T Ideal gear transforming rotational in translational motion. + Spring Linear spring. + Damper Linear damper. + SpringDamper Linear spring and linear damper in parallel connection. + ElastoBacklash Linear spring, linear damper and backlash in series + connection (backlash is modeled with elasticity). + BearingFriction Coulomb friction in the bearings. + Clutch Frictional clutch where the clutch pressure force is an + input signal (= Coulomb friction between two flanges). + OneWayClutch Parallel connection of free wheel and clutch + Brake Frictional brake where the brake pressure force is an + input signal (= Coulomb friction between flange + and housing). + LossyGear Gear with mesh efficiency and bearing friction + (stuck/rolling possible) + GearEfficiency Efficiency of a gearbox. + Gear Realistic model of a gearbox (taking into account + efficiency, bearing friction, elasticity, damping, backlash) + GearNew Realistic model of a gearbox (taking into account + efficiency, bearing friction, elasticity, damping, backlash), + based on new component LossyGear + Position Forced movement of a flange with a reference angle + given as input signal (positive angle for + positive input signal). + Accelerate Forced movement of a flange with an angular acceleration + given as input signal (positive acceleration for + positive input signal). + Move Forced movement of a flange according to an angle, speed + and angular acceleration given as input signals. + Fixed Fixing flange in housing at a predefined angle. + Torque External torque defined as input signal which accelerates + the connected flange for positive input signal. + RelativeStates Definition of relative state variables + Sensors Sublibrary containing ideal sensors to measure + flange variables. ++ +
3. Flange connectors
+ ++A flange is described by the connector class +Interfaces.Flange_a +or Interfaces.Flange_b. As already noted, the two connector +classes are completely identical. There is only a difference in the icons, +in order to easier identify a flange variable in a diagram. +Both connector classes contain the following variables: +
+ ++ SIunits.Angle phi "absolute rotation angle of flange"; + flow SIunits.Torque tau "cut-torque in the flange"; ++ +
+If needed, the angular velocity w and the +angular acceleration a of a flange connector can be +determined by differentiation of the flange angle phi: +
+ ++ w = der(phi); a = der(w); + ++ + +
4. Sign conventions
+ ++The variables of a component of this library can be accessed in the +usual way. However, since most of these variables are basically elements +of vectors, i.e., have a direction, the question arises how the +signs of variables shall be interpreted. The basic idea is explained +at hand of the following figure: +
+ + + ++In the figure, three identical drive trains are shown. The only +difference is that the gear of the middle drive train and the +gear as well as the right inertia of the lower drive train +are horizontally flipped with regards to the upper drive train. +The signs of variables are now interpreted in the following way: +Due to the 1-dimensional nature of the model, all components are +basically connected together along one line (more complicated +cases are discussed below). First, one has to define +a positive direction of this line, called axis of rotation. +In the top part of the figure this is characterized by an arrow +defined as axis of rotation. The simple rule is now: +If a variable of a component is positive and can be interpreted as +the element of a vector (e.g. torque or angular velocity vector), the +corresponding vector is directed into the positive direction +of the axis of rotation. In the following figure, the right-most +inertias of the figure above are displayed with the positive +vector direction displayed according to this rule: +
+ + + ++The cut-torques J2.flange_a.tau, J4.flange_a.tau, J6.flange_b.tau +of the right inertias are all identical and are directed into the +direction of rotation if the values are positive. Similiarily, +the angular velocities J2.w, J4.w, J6.w of the right inertias +are all identical and are also directed into the +direction of rotation if the values are positive. Some special +cases are shown in the next figure: +
+ + + ++In the upper part of the figure, two variants of the connection of an +external torque and an inertia are shown. In both cases, a positive +signal input into the torque component accelerates the inertias +inertia1, inertia2 into the positive axis of rotation, +i.e., the angular accelerations inertia1.a, inertia2.a +are positive and are directed along the "axis of rotation" arrow. +In the lower part of the figure the connection of inertias with +a planetary gear are shown. Note, that the three flanges of the +planetary gearbox are located along the axis of rotation and that +the axis direction determines the positive rotation along these +flanges. As a result, the positive rotation for inertia4, inertia6 +is as indicated with the additional grey arrows. +
5. User-defined components
+ ++In this section some hints are given to define your own +1-dimensional rotational components which are compatible with the +elements of this package. +It is convenient to define a new +component by inheritance from one of the following base classes, +which are defined in sublibrary Interfaces: +
+ ++ Rigid Rigid connection of two rotational 1D flanges + (used for elements with inertia). + Compliant Compliant connection of two rotational 1D flanges + (used for force laws such as a spring or a damper). + TwoFlanges General connection of two rotational 1D flanges + (used for gearboxes). + AbsoluteSensor Measure absolute flange variables. + RelativeSensor Measure relative flange variables. ++ +
+The difference between these base classes are the auxiliary +variables defined in the model and the relations between +the flange variables already defined in the base class. +For example, in model Rigid the flanges flange_a and +flange_b are rigidly connected, i.e., flange_a.phi = flange_b.phi, +whereas in model Compliant the cut-torques are the +same, i.e., flange_a.tau + flange_b.tau = 0. +
+ ++The equations of a mechanical component are vector equations, i.e., +they need to be expressed in a common coordinate system. +Therefore, for a component a local axis of rotation has to be +defined. All vector quantities, such as cut-torques or angular +velocities have to be expressed according to this definition. +Examples for such a definition are given in the following figure +for an inertia component and a planetary gearbox: +
+ + + ++As can be seen, all vectors are directed into the direction +of the rotation axis. The angles in the flanges are defined +correspondingly. For example, the angle sun.phi in the +flange of the sun wheel of the planetary gearbox is positive, +if rotated in mathematical positive direction (= counter clock +wise) along the axis of rotation. +
+ ++On first view, one may assume that the selected local +coordinate system has an influence on the usage of the +component. But this is not the case, as shown in the next figure: +
+ + + ++In the figure the local axes of rotation of the components +are shown. The connection of two inertias in the left and in the +right part of the figure are completely equivalent, i.e., the right +part is just a different drawing of the left part. This is due to the +fact, that by a connection, the two local coordinate systems are +made identical and the (automatically) generated connection equations +(= angles are identical, cut-torques sum-up to zero) are also +expressed in this common coordinate system. Therefore, even if in +the left figure it seems to be that the angular velocity vector of +J2 goes from right to left, in reality it goes from +left to right as shown in the right part of the figure, where the +local coordinate systems are drawn such that they are aligned. +Note, that the simple rule stated in section 4. (Sign conventions) +also determines that +the angular velocity of J2 in the left part of the +figure is directed from left to right. +
+ ++To summarize, the local coordinate system selected for a component +is just necessary, in order that the equations of this component +are expressed correctly. The selection of the coordinate system +is arbitrary and has no influence on the usage of the component. +Especially, the actual direction of, e.g., a cut-torque is most +easily determined by the rule of section 4. A more strict determination +by aligning coordinate systems and then using the vector direction +of the local coordinate systems, often requires a re-drawing of the +diagram and is therefore less convenient to use. +
6. Requirements for simulation tools
+ ++This library is designed in a fully object oriented way in order that +components can be connected together in every meaningful combination +(e.g. direct connection of two springs or two inertias). +As a consequence, most models lead to a system of +differential-algebraic equations of index 3 (= constraint +equations have to be differentiated twice in order to arrive at +a state space representation) and the Modelica translator or +the simulator has to cope with this system representation. +According to our present knowledge, this requires that the +Modelica translator is able to symbolically differentiate equations +(otherwise it is e.g. not possible to provide consistent initial +conditions; even if consistent initial conditions are present, most +numerical DAE integrators can cope at most with index 2 DAEs). +
+ + + +The elements of this library can be connected together in an +arbitrary way. However, difficulties may occur, if the elements which can lock the +relative motion between two flanges are connected rigidly +together such that essentially the same relative motion can be locked. +The reason is +that the cut-torque in the locked phase is not uniquely defined if the +elements are locked at the same time instant (i.e., there does not exist a +unique solution) and some simulation systems may not be +able to handle this situation, since this leads to a singularity during +simulation. Currently, this type of problem can occur with the +Coulomb friction elements BearingFriction, Clutch, Brake when +the elements become stuck: + + + + ++In the figure above two typical situations are shown: In the upper part of +the figure, the series connection of rigidly attached BearingFriction and +Clutch components are shown. This does not hurt, because the BearingFriction +element can lock the relative motion between the element and the housing, +whereas the clutch element can lock the relative motion between the two +connected flanges. Contrary, the drive train in the lower part of the figure +may give rise to simulation problems, because the BearingFriction element +and the Brake element can lock the relative motion between a flange and +the housing and these flanges are rigidly connected together, i.e., +essentially the same relative motion can be locked. These difficulties +may be solved by either introducing a compliance between these flanges +or by combining the BearingFriction and Brake element into +one component and resolving the ambiguity of the frictional torque in the +stuck mode. A tool may handle this situation also automatically, +by picking one solution of the infinitely many, e.g., the one where +the difference to the value of the previous time instant is as small +as possible. +
+ + +Release Notes:
++ IdealGearR2T Ideal gear transforming rotational in translational motion. + Position Forced movement of a flange with a reference angle + given as input signal + RelativeStates Definition of relative state variables ++ Icon of Rotational.Torque changed. + Elements Acceleration, Torque, Fixed, Sensors ordered according + to the Translational library.
Copyright © 1999-2002, 2000-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
+ ++
+
+ +
+Rotational component with inertia and two rigidly connected flanges. +
+Release Notes:
+++
+
Name | Default | Description |
---|---|---|
J | 1 | Moment of inertia [kg.m2] |
+model Inertia "1D-rotational component with inertia" + extends Interfaces.Rigid; + parameter SI.Inertia J=1 "Moment of inertia"; + SI.AngularVelocity w "Absolute angular velocity of component"; + SI.AngularAcceleration a "Absolute angular acceleration of component"; + +equation + w = der(phi); + a = der(w); + J*a = flange_a.tau + flange_b.tau; +end Inertia; ++
+ +
+This element characterices any type of gear box which is fixed in the +ground and which has one driving shaft and one driven shaft. +The gear is ideal, i.e., it does not have inertia, elasticity, damping +or backlash. If these effects have to be considered, the gear has to be +connected to other elements in an appropriate way. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
ratio | 1 | Transmission ratio (flange_a.phi/flange_b.phi) |
+model IdealGear "Ideal gear without inertia" + extends Interfaces.TwoFlanges; + parameter Real ratio=1 "Transmission ratio (flange_a.phi/flange_b.phi)"; + +equation + flange_a.phi = ratio*flange_b.phi; + 0 = ratio*flange_a.tau + flange_b.tau; +end IdealGear; ++
+ +
+The IdealPlanetary gear box is an ideal gear without inertia, +elasticity, damping or backlash consisting +of an inner sun wheel, an outer ring wheel and a +planet wheel located between sun and ring wheel. The bearing +of the planet wheel shaft is fixed in the planet carrier. +The component can be connected to other elements at the +sun, ring and/or carrier flanges. It is not possible to connect +to the planet wheel. If inertia shall not be neglected, +the sun, ring and carrier inertias can be easily added by attaching +inertias (= model Inertia) to the corresponding connectors. +The inertias of the planet wheels are always neglected. +
+ ++The icon of the planetary gear signals that the sun and carrier +flanges are on the left side and the ring flange is on the right side +of the gear box. However, this component is generic and is valid +independantly how the flanges are actually placed (e.g. sun wheel +may be placed on the right side instead on the left side in reality). +
+ ++The ideal planetary gearbox is uniquely defined by the ratio +of the number of ring teeth zr with respect to the number of +sun teeth zs. For example, if there are 100 ring teeth and +50 sun teeth then ratio = zr/zs = 2. The number of planet teeth +zp has to fulfill the following relationship: +
+ ++ zp := (zr - zs) / 2 ++ +
+Therefore, in the above example zp = 25 is required. +
+ ++According to the overall convention, the positive direction of all +vectors, especially the absolute angular velocities and cut-torques +in the flanges, are along the axis vector displayed in the icon. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
ratio | 100/50 | number of ring_teeth/sun_teeth (e.g. ratio=100/50) |
+model IdealPlanetary "Ideal planetary gear box" + parameter Real ratio=100/50 + "number of ring_teeth/sun_teeth (e.g. ratio=100/50)"; + + // kinematic relationship + Interfaces.Flange_a sun "sun flange (flange axis directed INTO cut plane)" + ; + Interfaces.Flange_a carrier + "carrier flange (flange axis directed INTO cut plane)"; + Interfaces.Flange_b ring + "ring flange (flange axis directed OUT OF cut plane)"; +equation + (1 + ratio)*carrier.phi = sun.phi + ratio*ring.phi; + + // torque balance (no inertias) + ring.tau = ratio*sun.tau; + carrier.tau = -(1 + ratio)*sun.tau; +end IdealPlanetary; ++
+ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
ratio | 1 | transmission ratio (flange_a.phi/flange_b.s) [rad/m] |
+model IdealGearR2T + "Gearbox transforming rotational into translational motion" + + parameter Real ratio(final unit="rad/m") = 1 + "transmission ratio (flange_a.phi/flange_b.s)"; + Interfaces.Flange_a flange_a; + Modelica.Mechanics.Translational.Interfaces.Flange_b flange_b; +equation + flange_a.phi = ratio*flange_b.s; + 0 = ratio*flange_a.tau + flange_b.f; +end IdealGearR2T; ++
+ +
+A linear 1D rotational spring. The component can be connected either +between two inertias/gears to describe the shaft elasticity, or between +a inertia/gear and the housing (component Fixed), to describe +a coupling of the element with the housing via a spring. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
c | Spring constant [N.m/rad] | |
phi_rel0 | 0 | Unstretched spring angle [rad] |
+model Spring "Linear 1D rotational spring" + extends Interfaces.Compliant; + parameter Real c(final unit="N.m/rad", final min=0) "Spring constant"; + parameter SI.Angle phi_rel0=0 "Unstretched spring angle"; + +equation + tau = c*(phi_rel - phi_rel0); +end Spring; ++
+ +
+Linear, velocity dependent damper element. It can be either connected +between an inertia or gear and the housing (component Fixed), or +between two inertia/gear elements. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
d | 0 | Damping constant [N.m.s/rad] |
+model Damper "Linear 1D rotational damper" + extends Interfaces.Compliant; + parameter Real d( + final unit="N.m.s/rad", + final min=0) = 0 "Damping constant"; + SI.AngularVelocity w_rel + "Relative angular velocity between flange_b and flange_a"; +equation + w_rel = der(phi_rel); + tau = d*w_rel; +end Damper; ++
+ +
+A spring and damper element connected in parallel. +The component can be +connected either between two inertias/gears to describe the shaft elasticity +and damping, or between an inertia/gear and the housing (component Fixed), +to describe a coupling of the element with the housing via a spring/damper. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
c | Spring constant [N.m/rad] | |
phi_rel0 | 0 | Unstretched spring angle [rad] |
d | 0 | Damping constant [N.m.s/rad] |
+model SpringDamper + "Linear 1D rotational spring and damper in parallel" + extends Interfaces.Compliant; + parameter Real c(final unit="N.m/rad", final min=0) "Spring constant"; + parameter SI.Angle phi_rel0=0 "Unstretched spring angle"; + parameter Real d( + final unit="N.m.s/rad", + final min=0) = 0 "Damping constant"; + SI.AngularVelocity w_rel + "Relative angular velocity between flange_b and flange_a"; + +equation + w_rel = der(phi_rel); + tau = c*(phi_rel - phi_rel0) + d*w_rel; +end SpringDamper; ++
+ +
+This element consists of a backlash element connected in series +to a spring and damper element which are connected in parallel. +The spring constant shall be non-zero, otherwise the component cannot be used. +
+ ++In combination with components IdealGear, the ElastoBacklash model +can be used to model a gear box with backlash, elasticity and damping. +
+ + +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
b | 0 | Total backlash [rad] |
c | 1.e5 | Spring constant (c > 0 required) [N.m/rad] |
phi_rel0 | 0 | Unstretched spring angle [rad] |
d | 0 | Damping constant [N.m.s/rad] |
+model ElastoBacklash + "Backlash connected in series to linear spring and damper (backlash is modeled with elasticity)" + + + extends Interfaces.Compliant; + parameter SI.Angle b(final min=0) = 0 "Total backlash"; + parameter Real c( + final unit="N.m/rad", + final min=Modelica.Constants.small) = 1.e5 + "Spring constant (c > 0 required)"; + parameter SI.Angle phi_rel0=0 "Unstretched spring angle"; + parameter Real d( + final unit="N.m.s/rad", + final min=0) = 0 "Damping constant"; + SI.AngularVelocity w_rel + "Relative angular velocity between flange_b and flange_a"; +protected + SI.Angle b2=b/2; + // A minimum backlash is defined in order to avoid an infinite + // number of state events if backlash b is set to zero. + constant SI.Angle b_min=1.e-10 "minimum backlash"; +equation + w_rel = der(phi_rel); + tau = if b2 > b_min then (if phi_rel > b2 then c*(phi_rel - phi_rel0 - b2) + + d*w_rel else (if phi_rel < -b2 then c*(phi_rel - phi_rel0 + b2) + d*w_rel + else 0)) else c*(phi_rel - phi_rel0) + d*w_rel; +end ElastoBacklash; ++
+ +
+This element describes Coulomb friction in bearings, +i.e., a frictional torque acting between a flange and the housing. +The positive sliding friction torque "tau" has to be defined +by table "tau_pos" as function of the absolute angular velocity "w". +E.g. +
+ +
+ w | tau + ---+----- + 0 | 0 + 1 | 2 + 2 | 5 + 3 | 8 ++ +
+gives the following table: +
+ ++ tau_pos = [0, 0; 1, 2; 2, 5; 3, 8]; ++ +
+Currently, only linear interpolation in the table is supported. +Outside of the table, extrapolation through the last +two table entries is used. It is assumed that the negative +sliding friction force has the same characteristic with negative +values. Friction is modelled in the following way: +
+ ++When the absolute angular velocity "w" is not zero, the friction torque +is a function of w and of a constant normal force. This dependency +is defined via table tau_pos and can be determined by measurements, +e.g. by driving the gear with constant velocity and measuring the +needed motor torque (= friction torque). +
+ ++When the absolute angular velocity becomes zero, the elements +connected by the friction element become stuck, i.e., the absolute +angle remains constant. In this phase the friction torque is +calculated from a torque balance due to the requirement, that +the absolute acceleration shall be zero. The elements begin +to slide when the friction torque exceeds a threshold value, +called the maximum static friction torque, computed via: +
+ ++ maximum_static_friction = peak * sliding_friction(w=0) (peak >= 1) ++ +
+This procedure is implemented in a "clean" way by state events and +leads to continuous/discrete systems of equations if friction elements +are dynamically coupled which have to be solved by appropriate +numerical methods. The method is described in: +
+ ++More precise friction models take into account the elasticity of the +material when the two elements are "stuck", as well as other effects, +like hysteresis. This has the advantage that the friction element can +be completely described by a differential equation without events. The +drawback is that the system becomes stiff (about 10-20 times slower +simulation) and that more material constants have to be supplied which +requires more sophisticated identification. For more details, see the +following references, especially (Armstrong and Canudas de Witt 1996): +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
tau_pos[:, :] | [0, 1] | [w,tau] Positive sliding friction characteristic (w>=0) |
peak | 1 | peak*tau_pos[1,2] = Maximum friction torque for w==0 |
w_small | 1 | Relative angular velocity near to zero (see model info text) [rad/s] |
+model BearingFriction "Coulomb friction in bearings " + extends Interfaces.Rigid; + + parameter Real tau_pos[:, :]=[0, 1] + "[w,tau] Positive sliding friction characteristic (w>=0)"; + parameter Real peak(final min=1) = 1 + "peak*tau_pos[1,2] = Maximum friction torque for w==0"; + + extends Interfaces.FrictionBase; + + SI.AngularVelocity w "Absolute angular velocity of flange_a and flange_b"; + SI.AngularAcceleration a + "Absolute angular acceleration of flange_a and flange_b"; + +equation + // Constant auxiliary variables + tau0 = Modelica.Math.tempInterpol1(0, tau_pos, 2); + tau0_max = peak*tau0; + free = false; + + // Angular velocity and angular acceleration of flanges + w = der(phi); + a = der(w); + w_relfric = w; + a_relfric = a; + + // Equilibrium of torques + 0 = flange_a.tau + flange_b.tau - tau; + + // Friction torque + tau = if locked then sa else (if startForward then + Modelica.Math.tempInterpol1(w, tau_pos, 2) else if startBackward then - + Modelica.Math.tempInterpol1(-w, tau_pos, 2) else if pre(mode) == Forward + then Modelica.Math.tempInterpol1(w, tau_pos, 2) else - + Modelica.Math.tempInterpol1(-w, tau_pos, 2)); +end BearingFriction; ++
+ +
+This component models a clutch, i.e., a component with +two flanges where friction is present between the two flanges +and these flanges are pressed together via a normal force. +The normal force fn has to be provided as input signal u in a normalized form, +fn = fn_max*u, where fn_max has to be provided as parameter. Friction in the +clutch is modelled in the following way: +
+ ++When the relative angular velocity is not zero, the friction torque is a +function of the velocity dependent friction coefficient mue(w_rel) , of +the normal force "fn", and of a geometry constant "cgeo" which takes into +account the geometry of the device and the assumptions on the friction +distributions: +
+ ++ frictional_torque = cgeo * mue(w_rel) * fn ++ +
+ Typical values of coefficients of friction: +
+ ++ dry operation : mue = 0.2 .. 0.4 + operating in oil: mue = 0.05 .. 0.1 ++ +
+ When plates are pressed together, where ri is the inner radius, + ro is the outer radius and N is the number of friction interfaces, + the geometry constant is calculated in the following way under the + assumption of a uniform rate of wear at the interfaces: +
+ ++ cgeo = N*(r0 + ri)/2 + ++ +
+ The positive part of the friction characteristic mue(w_rel), + w_rel >= 0, is defined via table mue_pos (first column = w_rel, + second column = mue). Currently, only linear interpolation in + the table is supported. +
+ ++ When the relative angular velocity becomes zero, the elements + connected by the friction element become stuck, i.e., the relative + angle remains constant. In this phase the friction torque is + calculated from a torque balance due to the requirement, that + the relative acceleration shall be zero. The elements begin + to slide when the friction torque exceeds a threshold value, + called the maximum static friction torque, computed via: +
+ ++ frictional_torque = peak * cgeo * mue(w_rel=0) * fn (peak >= 1) ++ +
+This procedure is implemented in a "clean" way by state events and +leads to continuous/discrete systems of equations if friction elements +are dynamically coupled. The method is described in: +
+ ++More precise friction models take into account the elasticity of the +material when the two elements are "stuck", as well as other effects, +like hysteresis. This has the advantage that the friction element can +be completely described by a differential equation without events. The +drawback is that the system becomes stiff (about 10-20 times slower +simulation) and that more material constants have to be supplied which +requires more sophisticated identification. For more details, see the +following references, especially (Armstrong and Canudas de Witt 1996): +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
mue_pos[:, :] | [0, 0.5] | [w,mue] positive sliding friction coefficient (w_rel>=0) |
peak | 1 | peak*mue_pos[1,2] = maximum value of mue for w_rel==0 |
cgeo | 1 | Geometry constant containing friction distribution assumption |
fn_max | 1 | Maximum normal force [N] |
w_small | 1 | Relative angular velocity near to zero (see model info text) [rad/s] |
+model Clutch "Clutch based on Coulomb friction " + extends Interfaces.Compliant; + + parameter Real mue_pos[:, :]=[0, 0.5] + "[w,mue] positive sliding friction coefficient (w_rel>=0)"; + parameter Real peak(final min=1) = 1 + "peak*mue_pos[1,2] = maximum value of mue for w_rel==0"; + parameter Real cgeo(final min=0) = 1 + "Geometry constant containing friction distribution assumption"; + parameter SI.Force fn_max(final min=0) = 1 "Maximum normal force"; + + extends Interfaces.FrictionBase; + + SI.AngularVelocity w_rel + "Relative angular velocity (flange_b.w - flange_a.w)"; + SI.AngularAcceleration a_rel + "Relative angular acceleration (flange_b.a - flange_a.a)"; + + Real mue0 "Friction coefficient for w=0 and forward sliding"; + SI.Force fn "Normal force (fn=fn_max*inPort.signal)"; + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Normalized force signal (= normal_force/fn_max; clutch is engaged if > 0)" + ; +equation + // Constant auxiliary variable + mue0 = Modelica.Math.tempInterpol1(0, mue_pos, 2); + + // Relative quantities + w_rel = der(phi_rel); + a_rel = der(w_rel); + w_relfric = w_rel; + a_relfric = a_rel; + + // Normal force and friction torque for w_rel=0 + fn = fn_max*inPort.signal[1]; + free = fn <= 0; + tau0 = mue0*cgeo*fn; + tau0_max = peak*tau0; + + // friction torque + tau = if locked then sa else if free then 0 else cgeo*fn*(if startForward + then Modelica.Math.tempInterpol1(w_rel, mue_pos, 2) else if startBackward + then -Modelica.Math.tempInterpol1(-w_rel, mue_pos, 2) else if pre(mode) + == Forward then Modelica.Math.tempInterpol1(w_rel, mue_pos, 2) else - + Modelica.Math.tempInterpol1(-w_rel, mue_pos, 2)); +end Clutch; ++
+ +
+This component models a one-way clutch, i.e., a component with +two flanges where friction is present between the two flanges +and these flanges are pressed together via a normal force. These +flanges maybe sliding with respect to each other + +Parallel connection of ClutchCombi and of FreeWheel. + The element is introduced to resolve the ambiguity + of the constraint torques of the elements. + +
+A one-way-clutch is an element where a clutch is connected in parallel +to a free wheel. This special element is provided, because such +a parallel connection introduces an ambiguity into the model +(the constraint torques are not uniquely defined when both +elements are stuck) and this element resolves it by introducing +one constraint torque and not two. +
+ ++Note, initial values have to be chosen for the model, such that the +relative speed of the one-way-clutch >= 0. Otherwise, the configuration +is physically not possible and an error occurs. +
+ ++The normal force fn has to be provided as input signal u in a normalized form, +fn = fn_max*u, where fn_max has to be provided as parameter. Friction in the +clutch is modelled in the following way: +
+ ++When the relative angular velocity is positive, the friction torque is a +function of the velocity dependent friction coefficient mue(w_rel) , of +the normal force "fn", and of a geometry constant "cgeo" which takes into +account the geometry of the device and the assumptions on the friction +distributions: +
+ ++ frictional_torque = cgeo * mue(w_rel) * fn ++ +
+ Typical values of coefficients of friction: +
+ ++ dry operation : mue = 0.2 .. 0.4 + operating in oil: mue = 0.05 .. 0.1 ++ +
+ When plates are pressed together, where ri is the inner radius, + ro is the outer radius and N is the number of friction interfaces, + the geometry constant is calculated in the following way under the + assumption of a uniform rate of wear at the interfaces: +
+ ++ cgeo = N*(r0 + ri)/2 + ++ +
+ The positive part of the friction characteristic mue(w_rel), + w_rel >= 0, is defined via table mue_pos (first column = w_rel, + second column = mue). Currently, only linear interpolation in + the table is supported. +
+ ++ When the relative angular velocity becomes zero, the elements + connected by the friction element become stuck, i.e., the relative + angle remains constant. In this phase the friction torque is + calculated from a torque balance due to the requirement, that + the relative acceleration shall be zero. The elements begin + to slide when the friction torque exceeds a threshold value, + called the maximum static friction torque, computed via: +
+ ++ frictional_torque = peak * cgeo * mue(w_rel=0) * fn (peak >= 1) ++ +
+This procedure is implemented in a "clean" way by state events and +leads to continuous/discrete systems of equations if friction elements +are dynamically coupled. The method is described in: +
+ +Release Notes:
+Copyright © 1999-2002, DLR.
+++
+
Name | Default | Description |
---|---|---|
mue_pos[:, :] | [0, 0.5] | [w,mue] positive sliding friction coefficient (w_rel>=0) |
peak | 1 | peak*mue_pos[1,2] = maximum value of mue for w_rel==0 |
cgeo | 1 | Geometry constant containing friction distribution assumption |
fn_max | 1 | Maximum normal force [N] |
w_small | 1 | Relative angular velocity near to zero (see model info text) [rad/s] |
+model OneWayClutch "Series connection of freewheel and clutch" + extends Interfaces.Compliant; + + parameter Real mue_pos[:, :]=[0, 0.5] + "[w,mue] positive sliding friction coefficient (w_rel>=0)"; + parameter Real peak(final min=1) = 1 + "peak*mue_pos[1,2] = maximum value of mue for w_rel==0"; + parameter Real cgeo(final min=0) = 1 + "Geometry constant containing friction distribution assumption"; + parameter SI.Force fn_max(final min=0) = 1 "Maximum normal force"; + parameter SI.AngularVelocity w_small(min=Modelica.Constants.eps) = 1 + "Relative angular velocity near to zero (see model info text)"; + + SI.AngularVelocity w_rel + "Relative angular velocity (flange_b.w - flange_a.w)"; + SI.AngularAcceleration a_rel + "Relative angular acceleration (flange_b.a - flange_a.a)"; + Real u "normalized force input signal (0..1)"; + SI.Force fn "Normal force (fn=fn_max*inPort.signal)"; + + Boolean startForward + "true, if w_rel=0 and start of forward sliding or w_rel > w_small"; + Boolean locked "true, if w_rel=0 and not sliding"; + Boolean stuck(final start=false) "w_rel=0 (forward sliding or locked)"; + +protected + SI.Torque tau0 "Friction torque for w=0 and sliding"; + SI.Torque tau0_max "Maximum friction torque for w=0 and locked"; + Real mue0 "Friction coefficient for w=0 and sliding"; + Boolean free "true, if frictional element is not active"; + Real sa "path parameter of tau = f(a_rel) Friction characteristic"; + constant Real eps0=1.0e-4 "Relative hysteresis epsilon"; + SI.Torque tau0_max_low "lowest value for tau0_max"; + parameter Real peak2=max([peak, 1 + eps0]); +public + Modelica.Blocks.Interfaces.InPort inPort(final n=1); +equation + // Constant auxiliary variable + mue0 = Modelica.Math.tempInterpol1(0, mue_pos, 2); + tau0_max_low = eps0*mue0*cgeo*fn_max; + + // Relative quantities + w_rel = der(phi_rel); + a_rel = der(w_rel); + + // Normal force and friction torque for w_rel=0 + u = inPort.signal[1]; + free = u <= 0; + fn = if free then 0 else fn_max*u; + tau0 = mue0*cgeo*fn; + tau0_max = if free then tau0_max_low else peak2*tau0; + + /* Friction characteristic + (locked is introduced to help the Modelica translator determining + the different structural configurations, if for each configuration + special code shall be generated) + */ + startForward = pre(stuck) and (sa > tau0_max or pre(startForward) and sa > + tau0 or w_rel > w_small) or initial() and (w_rel > 0); + locked = pre(stuck) and not startForward; + + // acceleration and friction torque + a_rel = if locked then 0 else sa - tau0; + tau = if locked then sa else (if free then 0 else cgeo*fn* + Modelica.Math.tempInterpol1(w_rel, mue_pos, 2)); + + // Determine configuration + stuck = locked or w_rel <= 0; +end OneWayClutch; ++
+ +
+This component models a brake, i.e., a component where a frictional +torque is acting between the housing and a flange and a controlled normal +force presses the flange to the housing in order to increase friction. +The normal force fn has to be provided as input signal u in a normalized +form, fn = fn_max*u, where fn_max has to be provided as parameter. +Friction in the brake is modelled in the following way: +
+ ++When the absolute angular velocity "w" is not zero, the friction torque +is a function of the velocity dependent friction coefficient mue(w) , of +the normal force "fn", and of a geometry constant "cgeo" which takes into +account the geometry of the device and the assumptions on the friction +distributions: +
+ ++ frictional_torque = cgeo * mue(w) * fn ++ +
+ Typical values of coefficients of friction: +
+ ++ dry operation : mue = 0.2 .. 0.4 + operating in oil: mue = 0.05 .. 0.1 ++ +
+ When plates are pressed together, where ri is the inner radius, + ro is the outer radius and N is the number of friction interfaces, + the geometry constant is calculated in the following way under the + assumption of a uniform rate of wear at the interfaces: +
+ ++ cgeo = N*(r0 + ri)/2 + ++ +
+ The positive part of the friction characteristic mue(w), + w >= 0, is defined via table mue_pos (first column = w, + second column = mue). Currently, only linear interpolation in + the table is supported. +
+ ++ When the absolute angular velocity becomes zero, the elements + connected by the friction element become stuck, i.e., the absolute + angle remains constant. In this phase the friction torque is + calculated from a torque balance due to the requirement, that + the absolute acceleration shall be zero. The elements begin + to slide when the friction torque exceeds a threshold value, + called the maximum static friction torque, computed via: +
+ ++ frictional_torque = peak * cgeo * mue(w=0) * fn (peak >= 1) ++ +
+This procedure is implemented in a "clean" way by state events and +leads to continuous/discrete systems of equations if friction elements +are dynamically coupled. The method is described in: +
+ ++More precise friction models take into account the elasticity of the +material when the two elements are "stuck", as well as other effects, +like hysteresis. This has the advantage that the friction element can +be completely described by a differential equation without events. The +drawback is that the system becomes stiff (about 10-20 times slower +simulation) and that more material constants have to be supplied which +requires more sophisticated identification. For more details, see the +following references, especially (Armstrong and Canudas de Witt 1996): +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
mue_pos[:, :] | [0, 0.5] | [w,mue] positive sliding friction coefficient (w_rel>=0) |
peak | 1 | peak*mue_pos[1,2] = maximum value of mue for w_rel==0 |
cgeo | 1 | Geometry constant containing friction distribution assumption |
fn_max | 1 | Maximum normal force [N] |
w_small | 1 | Relative angular velocity near to zero (see model info text) [rad/s] |
+model Brake "Brake based on Coulomb friction " + extends Interfaces.Rigid; + + parameter Real mue_pos[:, :]=[0, 0.5] + "[w,mue] positive sliding friction coefficient (w_rel>=0)"; + parameter Real peak(final min=1) = 1 + "peak*mue_pos[1,2] = maximum value of mue for w_rel==0"; + parameter Real cgeo(final min=0) = 1 + "Geometry constant containing friction distribution assumption"; + parameter SI.Force fn_max(final min=0) = 1 "Maximum normal force"; + + extends Interfaces.FrictionBase; + + SI.AngularVelocity w "Absolute angular velocity of flange_a and flange_b"; + SI.AngularAcceleration a + "Absolute angular acceleration of flange_a and flange_b"; + + Real mue0 "Friction coefficient for w=0 and forward sliding"; + SI.Force fn "Normal force (=fn_max*inPort.signal)"; + + // Constant auxiliary variable + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Normalized force signal (= normal_force/fn_max; brake is active if > 0)"; +equation + mue0 = Modelica.Math.tempInterpol1(0, mue_pos, 2); + + // Angular velocity and angular acceleration of flanges flange_a and flange_b + w = der(phi); + a = der(w); + w_relfric = w; + a_relfric = a; + + // Torque equilibrium, normal force and friction torque for w_rel=0 + 0 = flange_a.tau + flange_b.tau - tau; + fn = fn_max*inPort.signal[1]; + tau0 = mue0*cgeo*fn; + tau0_max = peak*tau0; + free = fn <= 0; + + // friction torque + tau = if locked then sa else if free then 0 else cgeo*fn*(if startForward + then Modelica.Math.tempInterpol1(w, mue_pos, 2) else if startBackward + then -Modelica.Math.tempInterpol1(-w, mue_pos, 2) else if pre(mode) == + Forward then Modelica.Math.tempInterpol1(w, mue_pos, 2) else - + Modelica.Math.tempInterpol1(-w, mue_pos, 2)); +end Brake; ++
+ +
+This component models the gear ratio and the losses of +a standard gear box in a reliable way including the stuck phases +that may occur at zero speed. The gear boxes that can +be handeled are fixed in the ground, have one input and one +output shaft, and are essentially described by the equations: +
+ +flange_a.phi = i*flange_b.phi + (-flange_b.tau) = i*(eta_mf*flange_a.tau - tau_bf) ++ +
+where +
+ +The loss terms "eta_mf" and "tau_bf" are functions of the +absolute value of the input shaft speed w_a and of the energy +flow direction. They are defined by parameter lossTable[:,5] + where the columns of this table have the following +meaning:
+ +|w_a| | +eta_mf1 | +eta_mf2 | +|tau_bf1| | +|tau_bf2| | +
... | +... | +... | +... | +... | +
... | +... | +... | +... | +... | +
with
+ +|w_a| | +Absolute value of angular velocity of input shaft flange_a | +
eta_mf1 | +Mesh efficiency in case of input shaft driving | +
eta_mf2 | +Mesh efficiency in case of output shaft driving | +
|tau_bf1| | +Absolute bearing friction torque in case of input shaft driving | +
|tau_bf2| | +Absolute bearing friction torque in case of output shaft driving | +
+With these variables, the mesh efficiency and the bearing friction +are formally defined as: +
+ +if flange_a.tau*w_a > 0 or flange_a.tau==0 and w_a > 0 then + eta_mf := eta_mf1 + tau_bf := tau_bf1 + elseif flange_a.tau*w_a < 0 or flange_a.tau==0 and w_a < 0 then + eta_mf := 1/eta_mf2 + tau_bf := tau_bf2 + else // w_a == 0 + eta_mf and tau_bf are computed such that der(w_a) = 0 + end if; ++ +
Note, that the losses are modeled in a physically meaningful way taking +into account that at zero speed the movement may be locked due +to the friction in the gear teeth and/or in the bearings. +Due to this important property, this component can be used in +situations where the combination of the components +Modelica.Mechanics.Rotational.IdealGear and +Modelica.Mechanics.Rotational.GearEfficiency will fail because, +e.g., chattering occurs when using the +Modelica.Mechanics.Rotational.GearEfficiency model. +
+ ++Acknowledgement: The essential idea to model efficiency +in this way is from Christoph Pelchen, ZF Friedrichshafen. +
+ +For detailed information:
+ +Pelchen C., +Schweiger C., +and Otter M.: +"Modeling +and Simulating the Efficiency of Gearboxes and of Planetary Gearboxes," in +Proceedings of the 2nd International Modelica Conference, Oberpfaffenhofen, Germany, +pp. 257-266, The Modelica Association and Institute of Robotics and Mechatronics, +Deutsches Zentrum für Luft- und Raumfahrt e. V., March 18-19, 2002.
+ +++
+
Name | Default | Description |
---|---|---|
i | 1 | Transmission ratio (flange_a.phi/flange_b.phi) |
lossTable[:, 5] | [0, 1, 1, 0, 0] | Array for mesh efficiencies and bearing friction depending on speed |
+model LossyGear + "Gear with mesh efficiency and bearing friction (stuck/rolling possible)" + + + extends Interfaces.TwoFlanges; + + parameter Real i=1 "Transmission ratio (flange_a.phi/flange_b.phi)"; + parameter Real lossTable[:, 5]=[0, 1, 1, 0, 0] + "Array for mesh efficiencies and bearing friction depending on speed"; + + Real sa "path parameter for acceleration and torque loss"; + SI.AngularVelocity w_a "angular velocity of flange_a"; + SI.AngularAcceleration a_a "angular acceleration of flange_a"; + + Real interpolation_result[1, size(lossTable, 2) - 1]; + Real eta_mf1; + Real eta_mf2; + Real tau_bf1; + Real tau_bf2; + + Real quadrant1; + Real quadrant2; + Real quadrant3; + Real quadrant4; + + SI.Torque tauLoss + "Torque loss due to friction in the gear teeth and in the bearings"; + SI.Torque tauLossMax "Torque loss for positive speed"; + SI.Torque tauLossMin "Torque loss for negative speed"; + + Boolean tau_aPos "true, if torque of flange_a is not negative"; + Boolean startForward "true, if starting to roll forward"; + Boolean startBackward "true, if starting to roll backward"; + Boolean locked "true, if gear is locked"; + + Boolean ideal "true, if losses are neglected"; + + constant Integer Unknown=3 "Value of mode is not known"; + constant Integer Free=2 "Element is not active"; + constant Integer Forward=1 "w_a > 0 (forward rolling)"; + constant Integer Stuck=0 + "w_a = 0 (forward rolling, locked or backward rolling)"; + constant Integer Backward=-1 "w_a < 0 (backward rolling)"; + Integer mode( + final min=Backward, + final max=Unknown, + start=Free, + fixed=true); + + +protected + function equal "Compare whether two Real matrices are identical" + + extends Modelica.Icons.Function; + input Real A[:, :]; + input Real B[:, :]; + input Real eps=Modelica.Constants.eps + "two numbers r1, r2 are identical if abs(r1-r2) <= eps"; + output Boolean result; + algorithm + result := false; + if size(A, 1) == size(B, 1) and size(A, 2) == size(B, 2) then + result := true; + for i in 1:size(A, 1) loop + for j in 1:size(A, 2) loop + if abs(A[i, j] - B[i, j]) >= eps then + result := false; + end if; + end for; + end for; + end if; + end equal; +equation + + assert(abs(i) > 0, "Error in initialization of LossyGear: i may not be zero") + ; + + ideal = equal(lossTable, [0, 1, 1, 0, 0]); + + interpolation_result = if ideal then [1, 1, 0, 0] else + Modelica.Math.tempInterpol2(noEvent(abs(w_a)), lossTable, {2,3,4,5}); + eta_mf1 = interpolation_result[1, 1]; + eta_mf2 = interpolation_result[1, 2]; + tau_bf1 = noEvent(abs(interpolation_result[1, 3])); + tau_bf2 = noEvent(abs(interpolation_result[1, 4])); + + flange_a.phi = i*flange_b.phi; + + // Torque balance (no inertias) + 0 = flange_b.tau + i*(flange_a.tau - tauLoss); + + // Speed for friction element + w_a = der(flange_a.phi); + a_a = der(w_a); + + quadrant1 = (1 - eta_mf1)*flange_a.tau + tau_bf1; + quadrant2 = (1 - 1/eta_mf2)*flange_a.tau + tau_bf2; + quadrant4 = (1 - 1/eta_mf2)*flange_a.tau - tau_bf2; + quadrant3 = (1 - eta_mf1)*flange_a.tau - tau_bf1; + + // Torque Losses + tau_aPos = ideal or (flange_a.tau >= 0); + tauLossMax = if tau_aPos then quadrant1 else quadrant2; + tauLossMin = if tau_aPos then quadrant4 else quadrant3; + + // Determine rolling/stuck mode when w_rel = 0 + startForward = pre(mode) == Stuck and sa > tauLossMax or initial() and w_a > + 0; + startBackward = pre(mode) == Stuck and sa < tauLossMin or initial() and w_a + < 0; + locked = not (ideal or pre(mode) == Forward or startForward or pre(mode) == + Backward or startBackward); + + /* Parameterized curve description a_a = f1(sa), tauLoss = f2(sa) + In comparison to Modelica.Mechanics.Rotational.FrictionBase it is possible + to simplify the following expression as mode == Stuck is assured in case + of startForward or startBackward */ + tauLoss = if ideal then 0 else (if locked then sa else (if (startForward or + pre(mode) == Forward) then tauLossMax else tauLossMin)); + + a_a = if locked then 0 else sa - tauLoss; + + /* Finite state machine to fix configuration after the computation above + The above equations are only dependent on pre(mode) and not on the actual + value of mode. This prevents loops. So mode can be determined in one step. */ + mode = if ideal then Free else (if (pre(mode) == Forward or startForward) + and w_a > 0 then Forward else if (pre(mode) == Backward or startBackward) + and w_a < 0 then Backward else Stuck); +end LossyGear; ++
+ +
+THIS COMPONENT IS OBSOLETE and should no longer be used. It is only +kept for backward compatibility purposes. Use model +Modelica.Mechanics.Rotational.LossyGear instead which implements +gear efficiency in a much more reliable way. +
+ ++This component consists of two rigidly connected flanges flange_a and flange_b without +inertia where an efficency coefficient eta reduces the driven +torque as function of the driving torque depending on the direction +of the energy flow, i.e., energy is always lost. This can be seen as a +simple model of the Coulomb friction acting between the teeth of a +gearbox. +
+ ++Note, that most gearbox manufacturers provide tables of the +efficiency of a gearbox as function of the angular velocity +(efficiency becomes zero, if the angular velocity is zero). +However, such a table is practically useless for simulation purposes, +because in gearboxes always two types of friction is present: +(1) Friction in the bearings and (2) friction between +the teeth of the gear. (1) leads to a velocity dependent, additive +loss-torque, whereas (2) leads to a torque-dependent reduction of the +driving torque. The gearbox manufacturers measure both effects +together and determine the gear efficiency from it, although for +simulation purposes the two effects need to be separated. +Assume for example that only constant bearing friction, i.e., +bearingTorque=const., is present, i.e., +
+ ++ (1) loadTorque = motorTorque - sign(w)*bearingTorque ++ +
+Gearbox manufacturers use the loss-formula +
+ ++ (2) loadTorque = eta*motorTorque ++ +
+Comparing (1) and (2) gives a formulat for the efficiency eta: +
+ ++ eta = (1 - sign(w)*bearingTorque/motorTorque) ++ +
+When the motorTorque becomes smaller as the bearingTorque, +(2) is useless, because the efficiency is zero. To summarize, +be careful to determine the gear efficiency of this element +from tables of the gear manufacturers. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
eta | 1 | Efficiency |
+model GearEfficiency + "Obsolete component (use model LossyGear instead)" + extends Interfaces.Rigid; + + parameter Real eta( + min=Modelica.Constants.small, + max=1) = 1 "Efficiency"; + SI.Power power_a "Energy flowing into flange_a (= power)"; + Boolean driving_a + "True, if energy is flowing INTO and not out of flange flange_a"; + +equation + power_a = flange_a.tau*der(phi); + driving_a = power_a >= 0; + flange_b.tau = -(if driving_a then eta*flange_a.tau else flange_a.tau/eta); +end GearEfficiency; ++
+ +
+This component models the essential effects of a gearbox, in particular +gear efficiency due to friction between the teeth, bearing friction, +gear elasticity and damping, backlash. +The inertia of the gear wheels is not modeled. If necessary, inertia +has to be taken into account by connecting components of model Inertia +to the left and/or the right flange. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
ratio | 1 | transmission ratio (flange_a.phi/flange_b.phi) |
eta | 1 | Gear efficiency |
friction_pos[:, :] | [0, 1] | [w,tau] positive sliding friction characteristic (w>=0) |
peak | 1 | peak*friction_pos[1,2] = maximum friction torque at zero velocity |
c | 1.e5 | Gear elasticity (spring constant) [N.m/rad] |
d | 0 | (relative) gear damping [N.m.s/rad] |
b | 0 | Total backlash [rad] |
+model Gear "Realistic model of a gearbox" + extends Interfaces.TwoFlanges; + + parameter Real ratio=1 "transmission ratio (flange_a.phi/flange_b.phi)"; + parameter Real eta( + min=Modelica.Constants.small, + max=1) = 1 "Gear efficiency"; + parameter Real friction_pos[:, :]=[0, 1] + "[w,tau] positive sliding friction characteristic (w>=0)"; + parameter Real peak(final min=1) = 1 + "peak*friction_pos[1,2] = maximum friction torque at zero velocity"; + parameter Real c( + final unit="N.m/rad", + final min=Modelica.Constants.small) = 1.e5 + "Gear elasticity (spring constant)"; + parameter Real d( + final unit="N.m.s/rad", + final min=0) = 0 "(relative) gear damping"; + parameter SI.Angle b(final min=0) = 0 "Total backlash"; + + IdealGear gearRatio(final ratio=ratio); + GearEfficiency gearEfficiency(final eta=eta); + BearingFriction bearingFriction(final tau_pos=friction_pos, final peak= + peak); + ElastoBacklash elastoBacklash( + final b=b, + final c=c, + final phi_rel0=0, + final d=d); +equation + connect(gearRatio.flange_b, gearEfficiency.flange_a); + connect(gearEfficiency.flange_b, bearingFriction.flange_a); + connect(bearingFriction.flange_b, elastoBacklash.flange_a); + connect(elastoBacklash.flange_b, flange_b); + connect(gearRatio.flange_a, flange_a); +end Gear; ++
+ +
This component models the essential effects of a gearbox, in +particular
+ +The inertia of the gear wheels is not modeled. If necessary, +inertia has to be taken into account by connecting components of +model Inertia to the left and/or the right flange of component +GearNew.
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
i | 1 | transmission ratio (flange_a.phi/flange_b.phi) |
lossTable[:, 5] | [0, 1, 1, 0, 0] | Array for mesh efficiencies and bearing friction depending on speed (see docu of LossyGear) |
c | 1.e5 | Gear elasticity (spring constant) [N.m/rad] |
d | 0 | (relative) gear damping [N.m.s/rad] |
b | 0 | Total backlash [rad] |
+model Gear2 "Realistic model of a gearbox (based on LossyGear)" + extends Interfaces.TwoFlanges; + + parameter Real i=1 "transmission ratio (flange_a.phi/flange_b.phi)"; + parameter Real lossTable[:, 5]=[0, 1, 1, 0, 0] + "Array for mesh efficiencies and bearing friction depending on speed (see docu of LossyGear)" + ; + + parameter Real c( + final unit="N.m/rad", + final min=Modelica.Constants.small) = 1.e5 + "Gear elasticity (spring constant)"; + parameter Real d( + final unit="N.m.s/rad", + final min=0) = 0 "(relative) gear damping"; + parameter SI.Angle b(final min=0) = 0 "Total backlash"; + + LossyGear lossyGear(final i=i, final lossTable=lossTable); + ElastoBacklash elastoBacklash( + final b=b, + final c=c, + final phi_rel0=0, + final d=d); +equation + connect(flange_a, lossyGear.flange_a); + connect(lossyGear.flange_b, elastoBacklash.flange_a); + connect(elastoBacklash.flange_b, flange_b); +end Gear2; ++
+ +
+The input signal inPort.signal[1] defines the reference +angle phi_ref(t) in [rad]. Flange flange_b is forced +to move according to this reference motion. According to parameter +exact (default = false), this is done in the following way: +
+The input signal can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
exact | false | true/false exact treatment/filtering the input signal |
f_crit | 50 | if exact=false, critical frequency of filter to filter input signal [Hz] |
+model Position + "Forced movement of a flange according to a reference angle signal" + + + parameter Boolean exact=false + "true/false exact treatment/filtering the input signal"; + parameter SI.Frequency f_crit=50 + "if exact=false, critical frequency of filter to filter input signal"; + output SI.Angle phi_ref "reference angle defined with the input signal"; + output SI.Angle phi "absolute rotation angle of flange flange_b"; + output SI.AngularVelocity w "absolute angular velocity of flange flange_b"; + output SI.AngularAcceleration a + "absolute angular acceleration of flange flange_b"; +protected + parameter Real w_crit=2*Modelica.Constants.pi*f_crit + "critical frequency in [1/s]"; + constant Real af=1.3617 "s coefficient of Bessel filter"; + constant Real bf=0.6180 "s*s coefficient of Bessel filter"; +public + Interfaces.Flange_b flange_b; + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Flange angle as input signal"; +equation + phi_ref = inPort.signal[1]; + phi = flange_b.phi; + w = der(phi); + a = der(w); + + if exact then + phi = phi_ref; + else + // Filter: a = phi_ref/(1 + (af/w_crit)*s + (bf/w_crit^2)*s^2) + a = ((phi_ref - phi)*w_crit - af*w)*(w_crit/bf); + end if; + +initial equation + if not exact then + phi = phi_ref; + end if; +end Position; ++
+ +
+The input signal inPort.signal[1] defines an angular acceleration +a in [rad/s2]. Flange flange_b is forced to move with +this acceleration. The angular velocity w and the rotation angle +phi of the flange are automatically determined by integration of +the acceleration. +
+ ++The input signal can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
phi_start | 0 | Start angle [rad] |
w_start | 0 | Start angular velocity [rad/s] |
+model Accelerate + "Forced movement of a flange according to an acceleration signal" + + parameter SI.Angle phi_start=0 "Start angle"; + parameter SI.AngularVelocity w_start=0 "Start angular velocity"; + + SI.Angle phi(final start=phi_start, final fixed=true) + "absolute rotation angle of flange flange_b"; + SI.AngularVelocity w(final start=w_start, final fixed=true) + "absolute angular velocity of flange flange_b"; + SI.AngularAcceleration a + "absolute angular acceleration of flange flange_b"; + Interfaces.Flange_b flange_b; + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Angular acceleration as input signal"; +equation + phi = flange_b.phi; + w = der(phi); + a = der(w); + a = inPort.signal[1]; +end Accelerate; ++
+ +
+Flange flange_b is forced to move with a predefined motion +according to the input signals: +
+ ++ inPort.signal[1]: angle of flange + inPort.signal[2]: angular velocity of flange + inPort.signal[3]: angular acceleration of flange ++ +
+The user has to guarantee that the input signals are consistent to each other, +i.e., that inPort.signal[2] is the derivative of inPort.signal[1] and that +inPort.signal[3] is the derivative of inPort.signal[2]. There are, however, +also applications where by purpose these conditions do not hold. For example, +if only the position dependent terms of a mechanical system shall be +calculated, one may provide angle = angle(t) and set the angular velocity +and the angular acceleration to zero. +
+ ++The input signals can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ ++Note, this model utilizes the non-standard function constrain(..) +and assumes that this function is supported by the Modelica translator: +
++ Real r[:], rd[:], rdd[:]; + ... + r = .. + rd = ... + rdd = ... + constrain(r,rd,rdd); ++
+where r, rd and rdd are variables which need to be computed +somewhere else. A simple implementation of constrain() is: +
+ ++ r = 0; ++ +
+However, this implementation requires that r(t) is given as analytical, +smooth function in order that it can be differentiated and it does +not allow applications such as the one sketched above. +Function constrain() +is used to explicitly inform the Modelica translator that +rd is the derivative of r and rdd is the derivative of rd +and that all derivatives need to be identical to zero. +The Modelica translator can utilize this information to use +rd and rdd whenever the Pantelides algorithm requires to compute +the derivatives of r (and takes rd and rdd instead of actually +differentiating r). +
+ +Release Notes:
+++
+model Move + "Forced movement of a flange according to an angle, speed and angular acceleration signal" + + + SI.Angle phi "absolute rotation angle of flange flange_b"; + SI.AngularVelocity w "absolute angular velocity of flange flange_b"; + SI.AngularAcceleration a + "absolute angular acceleration of flange flange_b"; + Interfaces.Flange_b flange_b; + Modelica.Blocks.Interfaces.InPort inPort(final n=3); +protected + Real constraintResidue; + Real constraintResidue_d; + Real constraintResidue_dd; +equation + phi = flange_b.phi; + w = der(phi); + a = der(w); + + constraintResidue = inPort.signal[1] - phi; + constraintResidue_d = inPort.signal[2] - w; + constraintResidue_dd = inPort.signal[3] - a; + constrain(constraintResidue, constraintResidue_d, constraintResidue_dd); +end Move; ++
+ +
+The flange of a 1D rotational mechanical system is fixed +at an angle phi0 in the housing. May be used: +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
phi0 | 0 | Fixed offset angle of housing [rad] |
+model Fixed "Flange fixed in housing at a given angle" + parameter SI.Angle phi0=0 "Fixed offset angle of housing"; + + Interfaces.Flange_b flange_b "(right) flange fixed in housing"; +equation + flange_b.phi = phi0; +end Fixed; ++
+ +
+The input signal inPort.signal[1] defines an external +torque tau in [Nm] which acts (with negative sign) at +a flange connector, i.e., the component connected to this +flange is driven by torque tau.
++The input signal can be provided from one of the signal generator +blocks of Modelica.Blocks.Sources. +
+ +Release Notes:
+++
+model Torque "Input signal acting as external torque on a flange" + SI.Torque tau "Torque (a positive value accelerates the flange)"; + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Connector of input signal used as torque"; + Interfaces.Flange_b flange_b "(Right) flange"; +equation + tau = inPort.signal[1]; + flange_b.tau = -tau; +end Torque; ++
+ +
+Usually, the absolute angle and the absolute angular velocity of +Modelica.Mechanics.Rotational.Inertia models are used as state variables. +In some circumstances, relative quantities are better suited, e.g., +because it may be easier to supply initial values. +In such cases, model RelativeStates allows the definition of state variables +in the following way: +
+ ++An example is given in the next figure +
+ + + ++Here, the relative angle and the relative angular velocity between +the two inertias are used as state variables. Additionally, the +simulator selects either the absolute angle and absolute angular +velocity of model inertia1 or of model inertia2 as state variables. +
+ +Release Notes:
+++
+model RelativeStates "Definition of relative state variables" + extends Interfaces.TwoFlanges; + SI.Angle phi_rel(stateSelect=StateSelect.prefer) + "relative rotation angle used as state variable"; + SI.AngularVelocity w_rel(stateSelect=StateSelect.prefer) + "relative angular velocity used as state variable"; + SI.AngularAcceleration a_rel "relative angular acceleration"; +equation + phi_rel = flange_b.phi - flange_a.phi; + w_rel = der(phi_rel); + a_rel = der(w_rel); + flange_a.tau = 0; + flange_b.tau = 0; +end RelativeStates; ++
+
+
+This package contains example models to demonstrate the usage of the +Modelica.Mechanics.Rotational package. Open the models and +simulate them according to the provided description in the models. +The following demo models are present: +
+ ++ First First example using simple, basic elements + Friction Example to demonstrate usage of a clutch and a brake + CoupledClutches Example to demonstrate usage of 3 dynamically + coupled clutches. + LossyGearDemo1 Example to demonstrate that gear efficiency may lead to stuck motion + LossyGearDemo2 Example to show combination of LossyGear and BearingFriction ++ + +
Release Notes:
+ +Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
The drive train consists of a motor inertia which is driven by +a sine-wave motor torque. Via a gearbox the rotational energy is +transmitted to a load inertia. Elasticity in the gearbox is modeled +by a spring element. A linear damper is used to model the +damping in the gearbox bearing.
+ +Note, that a force component (like the damper of this example) +which is acting between a shaft and the housing has to be fixed +in the housing on one side via component Fixed.
+ +Simulate for 1 second and plot the following variables:
+ angular velocities of inertias inertia2 and 3: inertia2.w, inertia3.w
Release Notes:
+ ++
Name | Default | Description |
---|---|---|
amplitude | 10 | |
freqHz | 5 | [Hz] |
Jmotor | 0.1 | [kg.m2] |
Jload | 2 | [kg.m2] |
ratio | 10 | |
damping | 10 |
+encapsulated model First "First example: simple drive train" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Rotational; + import SI = Modelica.SIunits; + + extends Icons.Example; + + parameter Real amplitude=10; + parameter SI.Frequency freqHz=5; + parameter SI.Inertia Jmotor=0.1; + parameter SI.Inertia Jload=2; + parameter Real ratio=10; + parameter Real damping=10; + + + Rotational.Fixed fixed; + Rotational.Torque torque; + Rotational.Inertia inertia1(J=Jmotor); + Rotational.IdealGear idealGear(ratio=ratio); + Rotational.Inertia inertia2( + J=2, + phi(start=0), + w(start=0)); + Rotational.Spring spring(c=1.e4); + Rotational.Inertia inertia3( + J=Jload, + phi(start=0), + w(start=0)); + Rotational.Damper damper(d=damping); + Sources.Sine sine(amplitude={amplitude}, freqHz={freqHz}); +equation + connect(sine.outPort, torque.inPort); + connect(torque.flange_b, inertia1.flange_a); + connect(inertia1.flange_b, idealGear.flange_a); + connect(idealGear.flange_b, inertia2.flange_a); + connect(inertia2.flange_b, spring.flange_a); + connect(spring.flange_b, inertia3.flange_a); + connect(damper.flange_a, inertia2.flange_b); + connect(damper.flange_b, fixed.flange_b); +end First; ++
+ +
This drive train contains a frictional clutch and a brake. +Simulate the system for 1 second using the following initial +values (defined already in the model):
+ +inertia1.w = 90 (or brake.w) + inertia2.w = 90 + inertia3.w = 100 ++ +
Plot the output signals
+ +tMotor Torque of motor + tClutch Torque in clutch + tBrake Torque in brake + tSpring Torque in spring ++ +
as well as the absolute angular velocities of the three inertia components +(inertia1.w, inertia2.w, inertia3.w).
+ +Release Notes:
+ ++
Name | Default | Description |
---|---|---|
startTime | 0.5 | Start time of step [s] |
+encapsulated model Friction "Drive train with clutch and brake" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Blocks.Math; + import Modelica.Mechanics.Rotational; + import Modelica.Constants.pi; + import SI = Modelica.SIunits; + + extends Icons.Example; + + parameter SI.Time startTime=0.5 "Start time of step"; + + output SI.Torque tMotor "driving torque of inertia3"; + output SI.Torque tClutch "friction torque of clutch"; + output SI.Torque tBrake "friction torque of brake"; + output SI.Torque tSpring "spring torque"; + + + Rotational.Torque torque; + Rotational.Inertia inertia3( + J=1, + phi(start=0), + w(start=100)); + Rotational.Clutch clutch(fn_max=160); + Rotational.Inertia inertia2( + J=0.05, + phi(start=0), + w(start=90)); + Rotational.SpringDamper spring(c=160, d=1); + Rotational.Inertia inertia1( + J=1, + phi(start=0), + w(start=90)); + Rotational.Brake brake(fn_max=1600); + Sources.Constant const(k={1}); + Sources.Step step(startTime={startTime}); + Sources.Step step2( + height={-1}, + offset={1}, + startTime={startTime}); + Sources.Sine sine(amplitude={200}, freqHz={50/pi}); + Math.Product product; +equation + tMotor = torque.tau; + tClutch = clutch.tau; + tBrake = brake.tau; + tSpring = spring.tau; + + connect(sine.outPort, product.inPort1); + connect(step2.outPort, product.inPort2); + connect(product.outPort, torque.inPort); + connect(torque.flange_b, inertia3.flange_a); + connect(inertia3.flange_b, clutch.flange_a); + connect(clutch.flange_b, inertia2.flange_a); + connect(const.outPort, clutch.inPort); + connect(inertia2.flange_b, spring.flange_a); + connect(spring.flange_b, brake.flange_a); + connect(brake.flange_b, inertia1.flange_a); + connect(step.outPort, brake.inPort); +end Friction; ++
+ +
This example demonstrates how variable structure +drive trains are handeled. The drive train consists +of 4 inertias and 3 clutches, where the clutches +are controlled by input signals. The system has +2^3=8 different configurations and 3^3 = 27 +different states (every clutch may be in forward +sliding, backward sliding or locked mode when the +relative angular velocity is zero). By invoking the +clutches at different time instances, the switching +of the configurations can be studied.
+ +Simulate the system for 1.2 seconds with the
+following initial values:
+J1.w = 10.
Plot the following variables:
+angular velocities of inertias (J1.w, J2.w, J3.w,
+J4.w), frictional torques of clutches (clutchX.tau),
+frictional mode of clutches (clutchX.mode) where
+mode = -1/0/+1 means backward sliding,
+locked, forward sliding.
Release Notes:
+ ++
Name | Default | Description |
---|---|---|
freqHz | 0.2 | frequency of sine function to invoke clutch1 [Hz] |
T2 | 0.4 | time when clutch2 is invoked [s] |
T3 | 0.9 | time when clutch3 is invoked [s] |
+encapsulated model CoupledClutches + "Drive train with 3 dynamically coupled clutches" + + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Rotational; + import SI = Modelica.SIunits; + + extends Icons.Example; + + parameter SI.Frequency freqHz=0.2 "frequency of sine function to invoke clutch1"; + parameter SI.Time T2=0.4 "time when clutch2 is invoked"; + parameter SI.Time T3=0.9 "time when clutch3 is invoked"; + + + Rotational.Inertia J1( + J=1, + phi(start=0), + w(start=10)); + Rotational.Torque torque; + Rotational.Clutch clutch1(peak=1.1, fn_max=20); + Sources.Sine sin1(amplitude={10}, freqHz={5}); + Sources.Step step1(startTime={T2}); + Rotational.Inertia J2(J=1); + Rotational.Clutch clutch2(peak=1.1, fn_max=20); + Rotational.Inertia J3(J=1); + Rotational.Clutch clutch3(peak=1.1, fn_max=20); + Rotational.Inertia J4(J=1); + Sources.Sine sin2( + amplitude={1}, + freqHz={freqHz}, + phase={1.57}); + Sources.Step step2(startTime={T3}); +equation + connect(sin1.outPort, torque.inPort); + connect(torque.flange_b, J1.flange_a); + connect(J1.flange_b, clutch1.flange_a); + connect(clutch1.flange_b, J2.flange_a); + connect(J2.flange_b, clutch2.flange_a); + connect(clutch2.flange_b, J3.flange_a); + connect(J3.flange_b, clutch3.flange_a); + connect(clutch3.flange_b, J4.flange_a); + connect(step2.outPort, clutch3.inPort); + connect(step1.outPort, clutch2.inPort); + connect(sin2.outPort, clutch1.inPort); +end CoupledClutches; ++
+ +
+This model contains two inertias which are connected by an ideal +gear where the friction between the teeth of the gear is modeled in +a physical meaningful way (friction may lead to stuck mode which +locks the motion of the gear). The friction is defined by an +efficiency factor (= 0.5) for forward and backward driving condition leading +to a torque dependent friction loss. Simulate for about 0.5 seconds. +The friction in the gear will take all modes +(forward and backward rolling, as well as stuck). +
+ ++You may plot: +
+ ++Inertia1.w, +Inertia2.w : angular velocities of inertias +powerLoss : power lost in the gear +gear.mode : 1 = forward rolling + 0 = stuck (w=0) + -1 = backward rolling ++
++
+encapsulated model LossyGearDemo1 + "Example to show that gear efficiency may lead to stuck motion" + + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Rotational; + import SI = Modelica.SIunits; + + extends Icons.Example; + SI.Power PowerLoss "power lost in the gear"; + Rotational.LossyGear gear(i=2, lossTable=[0, 0.5, 0.5, 0, 0]); + Rotational.Inertia Inertia1; + Rotational.Inertia Inertia2(J=1.5); + Rotational.Torque torque1; + Rotational.Torque torque2; + Sources.Sine DriveSine(amplitude={10}, freqHz={1}); + Sources.Ramp load( + height={5}, + duration={2}, + offset={-10}); +equation + connect(Inertia1.flange_b, gear.flange_a); + connect(gear.flange_b, Inertia2.flange_a); + connect(torque1.flange_b, Inertia1.flange_a); + connect(torque2.flange_b, Inertia2.flange_b); + connect(DriveSine.outPort, torque1.inPort); + connect(load.outPort, torque2.inPort); + + PowerLoss = gear.flange_a.tau*der(gear.flange_a.phi) + gear.flange_b.tau*der( + gear.flange_b.phi); +end LossyGearDemo1; ++
+ +
+This model contains bearing friction and gear friction (= efficiency). +If both friction models are stuck, there is no unique solution. +Still a reliable Modelica simulator, such as Dymola, should +be able to handle this situation. +
+ ++Simulate for about 0.5 seconds. The friction elements are +in all modes (forward and backward rolling, as well as stuck). +
+ ++You may plot: +
+ ++Inertia1.w, +Inertia2.w : angular velocities of inertias +powerLoss : power lost in the gear +bearingFriction.mode: 1 = forward rolling + 0 = stuck (w=0) + -1 = backward rolling +gear.mode : 1 = forward rolling + 0 = stuck (w=0) + -1 = backward rolling ++ +
Note: This combination of LossyGear and BearingFriction is not recommended to use, +as component LossyGear includes the functionality of component BearingFriction +(only peak not supported).
+ +++
+encapsulated model LossyGearDemo2 + "Example to show combination of LossyGear and BearingFriction" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Rotational; + import SI = Modelica.SIunits; + + extends Icons.Example; + SI.Power PowerLoss "power lost in the gear"; + + Rotational.LossyGear gear(i=2, lossTable=[0, 0.5, 0.5, 0, 0]); + Rotational.Inertia Inertia1; + Rotational.Inertia Inertia2(J=1.5); + Rotational.Torque torque1; + Rotational.Torque torque2; + Sources.Sine DriveSine(amplitude={10}, freqHz={1}); + Sources.Ramp load( + height={5}, + duration={2}, + offset={-10}); + Rotational.BearingFriction bearingFriction(tau_pos=[0, 0.5; 1, 1]); +equation + PowerLoss = gear.flange_a.tau*der(gear.flange_a.phi) + gear.flange_b.tau*der( + gear.flange_b.phi); + connect(load.outPort, torque2.inPort); + connect(torque2.flange_b, Inertia2.flange_b); + connect(Inertia2.flange_a, gear.flange_b); + connect(gear.flange_a, Inertia1.flange_b); + connect(Inertia1.flange_a, bearingFriction.flange_b); + connect(bearingFriction.flange_a, torque1.flange_b); + connect(DriveSine.outPort, torque1.inPort); +end LossyGearDemo2; ++
+
+
+This package contains connectors and partial models for 1D rotational mechanical +components. In particular +
+ ++ Flange_a Left flange of a component. + Flange_b Right flange of a component. + Rigid Rigid connection of two rotational 1D flanges + (used for elements with inertia). + Compliant Compliant connection of two rotational 1D flanges + (used for force laws such as a spring or a damper). + TwoFlanges Component with two rotational 1D flanges + AbsoluteSensor Base class to measure absolute flange variables. + Relative Sensor Base class to measure relative flange variables. ++ +
Release Notes:
+ +Copyright © 1999-2002, Modelica Association and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+This is a 1D rotational component with two rigidly connected flanges, +i.e., flange_a.phi = flange_b.phi. It is used e.g. to built up components +with inertia. +
+ +Release Notes:
+++
+partial model Rigid + "Base class for the rigid connection of two rotational 1D flanges" + + SI.Angle phi + "Absolute rotation angle of component (= flange_a.phi = flange_b.phi)"; + + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane)"; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)"; +equation + flange_a.phi = phi; + flange_b.phi = phi; +end Rigid; ++
+ +
+This is a 1D rotational component with two flanges. +It is used e.g. to built up parts of a drive train consisting +of several base components. There are specialized versions of this +base class for rigidly connected flanges (Interfaces.Rigid) and +for a compliant connection of flanges (Interfaces.Compliant). +
+ +Release Notes:
+++
+partial model TwoFlanges + "Base class for a component with two rotational 1D flanges" + Flange_a flange_a; + Flange_b flange_b; +end TwoFlanges; ++
+ +
+This is a connector for 1D rotational mechanical systems and models +a mechanical flange. The following variables are defined in this connector: +
+ ++ phi: Absolute rotation angle of the flange in [rad]. + tau: Cut-torque in the flange in [Nm]. ++ +
+There is a second connector for flanges: Flange_b. The connectors +Flange_a and Flange_b are completely identical. There is only a difference +in the icons, in order to easier identify a flange variable in a diagram. +For a discussion on the actual direction of the cut-torque tau and +of the rotation angle, see the information text of package Rotational +(section 4. Sign conventions). +
+ ++If needed, the absolute angular velocity w and the +absolute angular acceleration a of the flange can be determined by +differentiation of the flange angle phi: +
+ ++ w = der(phi); a = der(w) ++ +
Release Notes:
+++
+connector Flange_a "1D rotational flange (filled square icon)" + SI.Angle phi "Absolute rotation angle of flange"; + flow SI.Torque tau "Cut torque in the flange"; +end Flange_a; ++
+ +
+This is a connector for 1D rotational mechanical systems and models +a mechanical flange. The following variables are defined in this connector: +
+ ++ phi: Absolute rotation angle of the flange in [rad]. + tau: Cut-torque in the flange in [Nm]. ++ +
+There is a second connector for flanges: Flange_a. The connectors +Flange_a and Flange_b are completely identical. There is only a difference +in the icons, in order to easier identify a flange variable in a diagram. +For a discussion on the actual direction of the cut-torque tau and +of the rotation angle, see the information text of package Rotational +(section 4. Sign conventions). +
+ ++If needed, the absolute angular velocity w and the +absolute angular acceleration a of the flange can be determined by +differentiation of the flange angle phi: +
+ ++ w = der(phi); a = der(w) ++ + +
Release Notes:
+++
+connector Flange_b "1D rotational flange (non-filled square icon)" + SI.Angle phi "Absolute rotation angle of flange"; + flow SI.Torque tau "Cut torque in the flange"; +end Flange_b; ++
+ +
+This is a 1D rotational component with a compliant connection of two +rotational 1D flanges where inertial effects between the two +flanges are neglected. The basic assumption is that the cut-torques +of the two flanges sum-up to zero, i.e., they have the same absolute value +but opposite sign: flange_a.tau + flange_b.tau = 0. This base class +is used to built up force elements such as springs, dampers, friction. +
+ +Release Notes:
+++
+partial model Compliant + "Base class for the compliant connection of two rotational 1D flanges" + + + SI.Angle phi_rel(start=0) + "Relative rotation angle (= flange_b.phi - flange_a.phi)"; + SI.Torque tau "Torque between flanges (= flange_b.tau)"; + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane)"; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)"; +equation + phi_rel = flange_b.phi - flange_a.phi; + flange_b.tau = tau; + flange_a.tau = -tau; +end Compliant; ++
+
+
Name | Default | Description |
---|---|---|
w_small | 1 | Relative angular velocity near to zero (see model info text) [rad/s] |
+partial model FrictionBase "Base class of Coulomb friction elements" + parameter SI.AngularVelocity w_small=1 + "Relative angular velocity near to zero (see model info text)"; + + + // Equations to define the following variables have to be defined in subclasses + SI.AngularVelocity w_relfric + "Relative angular velocity between frictional surfaces"; + SI.AngularAcceleration a_relfric + "Relative angular acceleration between frictional surfaces"; + SI.Torque tau + "Friction torque (positive, if directed in opposite direction of w_rel)"; + SI.Torque tau0 "Friction torque for w=0 and forward sliding"; + SI.Torque tau0_max "Maximum friction torque for w=0 and locked"; + Boolean free "true, if frictional element is not active"; + + // Equations to define the following variables are given in this class + Real sa "Path parameter of friction characteristic tau = f(a_relfric)"; + + Boolean startForward(start=false, fixed=true) + "true, if w_rel=0 and start of forward sliding or w_rel > w_small"; + Boolean startBackward(start=false, fixed=true) + "true, if w_rel=0 and start of backward sliding or w_rel < -w_small"; + Boolean locked "true, if w_rel=0 and not sliding"; + + constant Integer Unknown=3 "Value of mode is not known"; + constant Integer Free=2 "Element is not active"; + constant Integer Forward=1 "w_rel > 0 (forward sliding)"; + constant Integer Stuck=0 + "w_rel = 0 (forward sliding, locked or backward sliding)"; + constant Integer Backward=-1 "w_rel < 0 (backward sliding)"; + Integer mode( + final min=Backward, + final max=Unknown, + start=Unknown, + fixed=true); +equation + /* Friction characteristic + (locked is introduced to help the Modelica translator determining + the different structural configurations, if for each configuration + special code shall be generated) */ + + startForward = pre(mode) == Stuck and (sa > tau0_max or pre(startForward) + and sa > tau0) or pre(mode) == Backward and w_relfric > w_small or initial + () and (w_relfric > 0); + startBackward = pre(mode) == Stuck and (sa < -tau0_max or pre(startBackward) + and sa < -tau0) or pre(mode) == Forward and w_relfric < -w_small or + initial() and (w_relfric < 0); + locked = not free and not (pre(mode) == Forward or startForward or pre(mode) + == Backward or startBackward); + + a_relfric = if locked then 0 else if free then sa else if startForward then + sa - tau0 else if startBackward then sa + tau0 else if pre(mode) == Forward + then sa - tau0 else sa + tau0; + + /* Friction torque has to be defined in a subclass. Example for a clutch: + tau = if locked then sa else if free then 0 else cgeo*fn* + (if startForward then Math.tempInterpol1( w_relfric, mue_pos, 2) else + if startBackward then -Math.tempInterpol1(-w_relfric, mue_pos, 2) else + if pre(mode) == Forward then Math.tempInterpol1( w_relfric, mue_pos, 2) + else -Math.tempInterpol1(-w_relfric, mue_pos, 2)); */ + + // finite state machine to determine configuration + mode = if free then Free else (if (pre(mode) == Forward or pre(mode) == Free + or startForward) and w_relfric > 0 then Forward else if (pre(mode) == + Backward or pre(mode) == Free or startBackward) and w_relfric < 0 then + Backward else Stuck); +end FrictionBase; ++
+ +
+This is the base class of a 1D rotational component with one flange and one +output signal in order to measure an absolute kinematic quantity in the flange +and to provide the measured signal as output signal for further processing +with the blocks of package Modelica.Blocks. +
+ +Release Notes:
+++
+partial model AbsoluteSensor + "Base class to measure a single absolute flange variable" + + extends Modelica.Icons.RotationalSensor; + Flange_a flange_a + "(left) flange to be measured (flange axis directed INTO cut plane)"; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +end AbsoluteSensor; ++
+ +
+This is a base class for 1D rotational components with two rigidly connected +flanges and one output signal in order to measure relative kinematic quantities +between the two flanges or the cut-torque in the flange and +to provide the measured signal as output signal for further processing +with the blocks of package Modelica.Blocks. +
+ +Release Notes:
+++
+partial model RelativeSensor + "Base class to measure a single relative variable between two flanges" + + + extends Modelica.Icons.RotationalSensor; + + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane)"; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)"; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +end RelativeSensor; ++
+
+
+ +
+Measures the cut-torque between two flanges in an ideal way +and provides the result as output signal outPort.signal[1] = flange_a.tau +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model TorqueSensor + "Ideal sensor to measure the torque between two flanges (= flange_a.tau)" + + + extends Modelica.Icons.RotationalSensor; + SI.Torque tau + "Torque in flange flange_a and flange_b (= flange_a.tau = -flange_b.tau)"; + Interfaces.Flange_a flange_a; + Interfaces.Flange_b flange_b; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +equation + flange_a.phi = flange_b.phi; + flange_a.tau = tau; + flange_b.tau = -tau; + tau = outPort.signal[1]; +end TorqueSensor; ++
+ +
+Measures the absolute angle phi of a flange in an ideal +way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model AngleSensor "Ideal sensor to measure the absolute flange angle" + + extends Interfaces.AbsoluteSensor; + SI.Angle phi "Absolute angle of flange"; +equation + phi = flange_a.phi; + phi = outPort.signal[1]; + 0 = flange_a.tau; +end AngleSensor; ++
+ +
+Measures the absolute angular velocity w of a flange in an ideal +way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model SpeedSensor + "Ideal sensor to measure the absolute flange angular velocity" + extends Interfaces.AbsoluteSensor; + SI.AngularVelocity w "Absolute angular velocity of flange"; +equation + w = der(flange_a.phi); + w = outPort.signal[1]; + 0 = flange_a.tau; +end SpeedSensor; ++
+ +
+Measures the absolute angular acceleration a of a flange in an ideal +way and provides the result as output signal (to be further processed with +blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model AccSensor + "Ideal sensor to measure the absolute flange angular acceleration" + + extends Interfaces.AbsoluteSensor; + SI.AngularAcceleration a "Absolute angular acceleration of flange"; + SI.AngularVelocity w "Absolute angular velocity of flange"; +equation + w = der(flange_a.phi); + a = der(w); + a = outPort.signal[1]; + 0 = flange_a.tau; +end AccSensor; ++
+ +
+Measures the relative angle phi_rel between two flanges +in an ideal way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model RelAngleSensor + "Ideal sensor to measure the relative angle between two flanges" + + extends Interfaces.RelativeSensor; + SI.Angle phi_rel + "Relative angle between two flanges (= flange_b.phi - flange_a.phi)"; +equation + phi_rel = flange_b.phi - flange_a.phi; + phi_rel = outPort.signal[1]; + 0 = flange_a.tau; + 0 = flange_b.tau; +end RelAngleSensor; ++
+ +
+Measures the relative angular velocity w_rel between two flanges +in an ideal way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model RelSpeedSensor + "Ideal sensor to measure the relative angular velocity between two flanges" + + + extends Interfaces.RelativeSensor; + SI.Angle phi_rel + "Relative angle between two flanges (flange_b.phi - flange_a.phi)"; + SI.AngularVelocity w_rel "Relative angular velocity between two flanges"; +equation + phi_rel = flange_b.phi - flange_a.phi; + w_rel = der(phi_rel); + w_rel = outPort.signal[1]; + 0 = flange_a.tau; + 0 = flange_b.tau; +end RelSpeedSensor; ++
+ +
+Measures the relative angular acceleration a_rel between two flanges +in an ideal way and provides the result as output signal outPort.signal[1] +(to be further processed with blocks of the Modelica.Blocks library). +
+ +Release Notes:
+++
+model RelAccSensor + "Ideal sensor to measure the relative angular acceleration between two flanges" + + + extends Interfaces.RelativeSensor; + SI.Angle phi_rel + "Relative angle between two flanges (flange_b.phi - flange_a.phi)"; + SI.AngularVelocity w_rel "Relative angular velocity between two flanges"; + SI.AngularAcceleration a_rel + "Relative angular aceleration between two flanges"; +equation + phi_rel = flange_b.phi - flange_a.phi; + w_rel = der(phi_rel); + a_rel = der(w_rel); + a_rel = outPort.signal[1]; + 0 = flange_a.tau; + 0 = flange_b.tau; +end RelAccSensor; ++
+
+ + + + + + + + + + + + + + + + +
+
+This package contains components to model 1-dimensional translational +mechanical systems. +
+ ++The filled and non-filled green squares at the left and +right side of a component represent mechanical flanges. +Drawing a line between such squares means that the corresponding +flanges are rigidly attached to each other. The components of this +library can be usually connected together in an arbitrary way. E.g. it is +possible to connect two springs or two sliding masses with inertia directly +together. + +
The only connection restriction is that the Coulomb friction +elements (Stop) should be only connected +together provided a compliant element, such as a spring, is in between. +The reason is that otherwise the frictional force is not uniquely +defined if the elements are stuck at the same time instant (i.e., there +does not exist a unique solution) and some simulation systems may not be +able to handle this situation, since this leads to a singularity during +simulation. It can only be resolved in a "clean way" by combining the +two connected friction elements into +one component and resolving the ambiguity of the frictional force in the +stuck mode. +
+ +Another restriction arises if the hard stops in model Stop are used, i. e. +the movement of the mass is limited by a stop at smax or smin. + This requires the states Stop.s and Stop.v . If these states are eliminated during the index reduction +the model will not work. To avoid this any inertias should be connected via springs +to the Stop element, other sliding masses, dampers or hydraulic chambers must be avoided.
+ + ++In the icon of every component an arrow is displayed in grey +color. This arrow characterizes the coordinate system in which the vectors +of the component are resolved. It is directed into the positive +translational direction (in the mathematical sense). +In the flanges of a component, a coordinate system is rigidly attached +to the flange. It is called flange frame and is directed in parallel +to the component coordinate system. As a result, e.g., the positive +cut-force of a "left" flange (flange_a) is directed into the flange, whereas +the positive cut-force of a "right" flange (flange_b) is directed out of the +flange. A flange is described by a Modelica connector containing +the following variables: +
+ ++ SIunits.Position s "absolute position of flange"; + flow Force f "cut-force in the flange"; ++ +
+This package contains the following model components: +
+ ++ Interfaces Sublibrary containing interface definitions. + Examples Examples of library usage. + + SlidingMass Translational component with inertia. + Stop Sliding mass with Coulomb friction and hard stops. + Rod Massless rod. + Spring Linear spring. + Damper Linear damper. + SpringDamper Linear spring and linear damper in parallel connection. + ElastoGap Linear spring and linear damper that can lift off. + + Position Drive a flange with a reference position given as input signal. + Accelerate Drive a flange with an acceleration given as input signal. + Move Drive a flange with a reference position, velocity and + acceleration given as input signal. + Fixed Fixed flange at a predefined position. + Force External force defined as input signal. + + ForceSensor Ideal sensor to measure the force in a flange. + PositionSensor Ideal sensor to measure absolute position of a flange. + SpeedSensor Ideal sensor to measure absolute velocity of a flange. + AccSensor Ideal sensor to measure absolute acceleration of a flange. + ++ +
+This library is designed in a fully object oriented way in order that +components can be connected together in every meaningful combination +(e.g. direct connection of two springs or two shafts with inertia). +As a consequence, most models lead to a system of +differential-algebraic equations of index 3 (= constraint +equations have to be differentiated twice in order to arrive at +a state space representation) and the Modelica translator or +the simulator has to cope with this system representation. +According to our present knowledge, this requires that the +Modelica translator is able to symbolically differentiate equations +(otherwise it is e.g. not possible to provide consistent initial +conditions; even if consistent initial conditions are present, most +numerical DAE integrators can cope at most with index 2 DAEs). +
+ +Main Author:Release + Notes:
+Copyright © 2000-2002, Modelica Association and Universität Paderborn, FB 12.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license , see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+Sliding mass with inertia, without friction and two rigidly connected flanges. +
++The sliding mass has the length L, the position coordinate s is in the middle. +Sign convention: A positive force at flange flange_a moves the sliding mass in the positive direction. +A negative force at flange flange_a moves the sliding mass to the negative direction. +
+Release Notes:
+++
+
Name | Default | Description |
---|---|---|
L | 0 | length of component from left flange to right flange (= flange_b.s - flange_a.s) [m] |
m | 1 | mass of the sliding mass [kg] |
+model SlidingMass "Sliding mass with inertia" + extends Interfaces.Rigid; + parameter SI.Mass m=1 "mass of the sliding mass"; + SI.Velocity v "absolute velocity of component"; + SI.Acceleration a "absolute acceleration of component"; + +equation + + v = der(s); + a = der(v); + m*a = flange_a.f + flange_b.f; +end SlidingMass; ++
+ +
++
This element describes the Stribeck friction characteristics of a sliding mass,
+i. e. the frictional force acting between the sliding mass and the support. Included is a
+hard stop for the position.
+The surface is fixed and there is friction between sliding mass and surface.
+The frictional force f is given for positive velocity v by:
+There are hard stops at smax and smin, i. e. if
+flange_a.s >= smin
+
+the sliding mass can move freely. and
+flange_b.s <= xmax
When the absolute velocity becomes zero, the sliding mass becomes stuck, i.e., the absolute position remains constant. In this phase the +friction force is calculated from a force balance due to the requirement that the +absolute acceleration shall be zero. The elements begin to slide when the friction +force exceeds a threshold value, called the maximum static friction force, computed via:
+ +For more details of the used friction model see the following reference:
+Beater P. (1999):
The friction model is implemented in a "clean" way by state events and leads to +continuous/discrete systems of equations which have to be solved by appropriate +numerical methods. The method is described in:
+More precise friction models take into account the elasticity of the material when +the two elements are "stuck", as well as other effects, like hysteresis. This has +the advantage that the friction element can be completely described by a differential +equation without events. The drawback is that the system becomes stiff (about 10-20 times +slower simulation) and that more material constants have to be supplied which requires more +sophisticated identification. For more details, see the following references, especially +(Armstrong and Canudas de Witt 1996):
+Release Notes:
+++
+
Name | Default | Description |
---|---|---|
L | 0 | length of component from left flange to right flange (= flange_b.s - flange_a.s) [m] |
smax | 25 | right stop for (right end of) sliding mass [m] |
smin | -25 | left stop for (left end of) sliding mass [m] |
v_small | 1e-3 | Relative velocity near to zero (see model info text) [m/s] |
m | 1 | mass [kg] |
F_prop | 1 | velocity dependent friction [N/ (m/s)] |
F_Coulomb | 5 | constant friction: Coulomb force [N] |
F_Stribeck | 10 | Stribeck effect [N] |
fexp | 2 | exponential decay [1/ (m/s)] |
+model Stop "Sliding mass with hard stop and Stribeck friction" + extends Modelica.Mechanics.Translational.Interfaces.FrictionBase(s(stateSelect= + StateSelect.always)); + Modelica.SIunits.Velocity v(stateSelect=StateSelect.always) + "Absolute velocity of flange_a and flange_b"; + Modelica.SIunits.Acceleration a + "Absolute acceleration of flange_a and flange_b"; + parameter Modelica.SIunits.Mass m=1 "mass"; + + parameter Real F_prop( + final unit="N/ (m/s)", + final min=0) = 1 "velocity dependent friction"; + parameter Modelica.SIunits.Force F_Coulomb=5 "constant friction: Coulomb force"; + parameter Modelica.SIunits.Force F_Stribeck=10 "Stribeck effect"; + parameter Real fexp( + final unit="1/ (m/s)", + final min=0) = 2 "exponential decay"; + +equation + + // Constant auxiliary variables + f0 = (F_Coulomb + F_Stribeck); + f0_max = f0*1.001; + free = f0 <= 0 and F_prop <= 0 and s > smin + L/2 and s < smax - L/2; + + // Velocity and acceleration of flanges + v = der(s); + a = der(v); + v_relfric = v; + a_relfric = a; + + // Equilibrium of forces + 0 = flange_a.f + flange_b.f - f - m*der(v); + + // Friction force + f = if locked then sa else if free then 0 else (if startForward then F_prop*v + + F_Coulomb + F_Stribeck else if startBackward then F_prop*v - F_Coulomb + - F_Stribeck else if pre(mode) == Forward then F_prop*v + F_Coulomb + + F_Stribeck*exp(-fexp*abs(v)) else F_prop*v - F_Coulomb - F_Stribeck*exp(- + fexp*abs(v))); + + + // Define events for hard stops and reinitiliaze the state variables velocity v and position s +algorithm + when (initial()) then + assert(s > smin + L/2 or s >= smin + L/2 and v >= 0, + "Error in initialization of hard stop. (s - L/2) must be >= smin "); + assert(s < smax - L/2 or s <= smax - L/2 and v <= 0, + "Error in initialization of hard stop. (s + L/2) must be <= smax "); + end when; + + when not (s < smax - L/2) then + reinit(s, smax - L/2); + if (not initial() or v > 0) then + reinit(v, 0); + end if; + end when; + + when not (s > smin + L/2) then + reinit(s, smin + L/2); + if (not initial() or v < 0) then + reinit(v, 0); + end if; + end when; +end Stop; ++
+ +
+Rod without inertia and two rigidly connected flanges. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
L | 0 | length of component from left flange to right flange (= flange_b.s - flange_a.s) [m] |
+model Rod "Rod without inertia" + extends Interfaces.Rigid; + +equation + 0 = flange_a.f + flange_b.f; +end Rod; ++
+ +
+A linear 1D translational spring. The component can be connected either +between two sliding masses, or between +a sliding mass and the housing (components FixedLeft, FixedRight), to describe +a coupling of the slidin mass with the housing via a spring. +
+Release Notes:
+++
+
Name | Default | Description |
---|---|---|
s_rel0 | 0 | unstretched spring length [m] |
c | 1 | spring constant [N/m] |
+model Spring "Linear 1D translational spring" + extends Interfaces.Compliant; + parameter SI.Distance s_rel0=0 "unstretched spring length"; + parameter Real c( + final unit="N/m", + final min=0) = 1 "spring constant "; + +equation + f = c*(s_rel - s_rel0); +end Spring; ++
+ +
+Linear, velocity dependent damper element. It can be either connected +between a sliding mass and the housing (FixedLeft, FixedRight elements), or +between two sliding masses. +
+Release Notes:
+++
+
Name | Default | Description |
---|---|---|
d | 0 | damping constant [N/ (m/s)] [N/ (m/s)] |
+model Damper "Linear 1D translational damper" + extends Interfaces.Compliant; + parameter Real d( + final unit="N/ (m/s)", + final min=0) = 0 "damping constant [N/ (m/s)]"; + SI.Velocity v_rel "relative velocity between flange L and R"; +equation + v_rel = der(s_rel); + f = d*v_rel; +end Damper; ++
+ +
+A spring and damper element connected in parallel. +The component can be +connected either between two sliding masses to describe the elasticity +and damping, or between a sliding mass and the housing (FixedLeft, FixedRight elements), +to describe a coupling of the sliding mass with the housing via a spring/damper. +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
s_rel0 | 0 | unstretched spring length [m] |
c | 1 | spring constant [N/m] |
d | 1 | damping constant [N/(m/s)] |
+model SpringDamper + "Linear 1D translational spring and damper in parallel" + extends Interfaces.Compliant; + parameter SI.Position s_rel0=0 "unstretched spring length"; + parameter Real c( + final unit="N/m", + final min=0) = 1 "spring constant"; + parameter Real d( + final unit="N/(m/s)", + final min=0) = 1 "damping constant"; + SI.Velocity v_rel "relative velocity between flange L and R"; + +equation + v_rel = der(s_rel); + f = c*(s_rel - s_rel0) + d*v_rel; +end SpringDamper; ++
+ +
+A linear translational spring damper combination that can lift off. +The component can be connected +between between +a sliding mass and the housing (components FixedLeft, FixedRight), to describe +the contact of a sliding mass with the housing. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
s_rel0 | 0 | unstretched spring length [m] |
c | 1 | spring constant [N/m] |
d | 1 | damping constant [N/ (m/s)] |
+model ElastoGap "1D translational spring damper combination with gap" + + extends Interfaces.Compliant; + parameter SI.Position s_rel0=0 "unstretched spring length"; + parameter Real c( + final unit="N/m", + final min=0) = 1 "spring constant"; + parameter Real d( + final unit="N/ (m/s)", + final min=0) = 1 "damping constant"; + SI.Velocity v_rel "relative velocity between flange L and R"; + Boolean Contact "false, if s_rel > l "; + +equation + + v_rel = der(s_rel); + Contact = s_rel < s_rel0; + f = if Contact then (c*(s_rel - s_rel0) + d*v_rel) else 0; +end ElastoGap; ++
+ +
+The input signal inPort.signal[1] defines the reference +position s_ref in [m]. Flange flange_b is forced +to move according to this reference motion. According to parameter +exact (default = false), this is done in the following way: +
+The input signal can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
exact | false | true/false exact treatment/filtering the input signal |
f_crit | 50 | if exact=false, critical frequency of filter to filter input signal [Hz] |
+model Position + "Forced movement of a flange according to a reference position" + parameter Boolean exact=false + "true/false exact treatment/filtering the input signal"; + parameter SI.Frequency f_crit=50 + "if exact=false, critical frequency of filter to filter input signal"; + + output SI.Position s_ref "reference position defined with the input signal"; + output SI.Position s "absolute position of flange_b"; + output SI.Velocity v "absolute velocity of flange_b"; + output SI.Acceleration a "absolute acceleration of flange_b"; +protected + parameter Real w_crit=2*Modelica.Constants.pi*f_crit + "critical frequency in [1/s]"; + constant Real af=1.3617 "s coefficient of Bessel filter"; + constant Real bf=0.6180 "s*s coefficient of Bessel filter"; +public + Interfaces.Flange_b flange_b; + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Flange position as input signal"; +equation + s_ref = inPort.signal[1]; + s = flange_b.s; + v = der(s); + a = der(v); + + if exact then + s = s_ref; + else + // Filter: a = s_ref/(1 + (af/w_crit)*S + (bf/w_crit^2)*S^2) + a = ((s_ref - s)*w_crit - af*v)*(w_crit/bf); + end if; + +initial equation + if not exact then + s = s_ref; + end if; +end Position; ++
+ +
+The input signal "a" in [m/s2] of connector "i" moves the 1D translational flange +connector flange_b with a predefined acceleration, i.e., the flange +is forced to move with this acceleration. The velocity and the +position of the flange are also predefined and are determined by +integration of the acceleration. +
+ ++The acceleration "a(t)" can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Source. +
+Release Notes:
+++
+
Name | Default | Description |
---|---|---|
s_start | 0 | Start position [m] |
v_start | 0 | Start velocity [m/s] |
+model Accelerate + "Forced movement of a flange according to an acceleration signal" + parameter SI.Position s_start=0 "Start position"; + parameter SI.Velocity v_start=0 "Start velocity"; + + SI.Acceleration a "absolute acceleration of flange_b"; + SI.Velocity v(final start=v_start, final fixed=true) + "absolute velocity of flange_b"; + SI.Position s(final start=s_start, final fixed=true) + "absolute position of flange_b"; + + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Connector of input signal used as force"; + Interfaces.Flange_b flange_b; +equation + s = flange_b.s; + v = der(s); + a = der(v); + a = inPort.signal[1]; +end Accelerate; ++
+ +
+Flange flange_b is forced to move with a predefined motion +according to the input signals: +
+ ++ inPort.signal[1]: position of flange + inPort.signal[2]: velocity of flange + inPort.signal[3]: acceleration of flange ++ +
+The user has to guarantee that the input signals are consistent to each other, +i.e., that inPort.signal[2] is the derivative of inPort.signal[1] and that +inPort.signal[3] is the derivative of inPort.signal[2]. There are, however, +also applications where by purpose these conditions do not hold. For example, +if only the position dependent terms of a mechanical system shall be +calculated, one may provide position = position(t) and set the velocity +and the acceleration to zero. +
+ ++The input signals can be provided from one of the signal generator +blocks of the block library Modelica.Blocks.Sources. +
+ ++Note, this model utilizes the non-standard function constrain(..) +and assumes that this function is supported by the Modelica translator: +
++ Real r[:], rd[:], rdd[:]; + ... + r = .. + rd = ... + rdd = ... + constrain(r,rd,rdd); ++
+where r, rd and rdd are variables which need to be computed +somewhere else. A simple implementation of constrain() is: +
+ ++ r = 0; ++ +
+However, this implementation requires that r(t) is given as analytical, +smooth function in order that it can be differentiated and it does +not allow applications such as the one sketched above. +Function constrain() +is used to explicitly inform the Modelica translator that +rd is the derivative of r and rdd is the derivative of rd +and that all derivatives need to be identical to zero. +The Modelica translator can utilize this information to use +rd and rdd whenever the Pantelides algorithm requires to compute +the derivatives of r (and takes rd and rdd instead of actually +differentiating r). +
+ +Release Notes:
+++
+model Move + "Forced movement of a flange according to a position, velocity and acceleration signal" + + + SI.Position s "absolute position of flange_b"; + SI.Velocity v "absolute velocity of flange_b"; + SI.Acceleration a "absolute acceleration of flange_b"; + +protected + Real constraintResidue; + Real constraintResidue_d; + Real constraintResidue_dd; +public + Modelica.Blocks.Interfaces.InPort inPort(final n=3); + Interfaces.Flange_b flange_b; +equation + s = flange_b.s; + v = der(s); + a = der(v); + + constraintResidue = inPort.signal[1] - s; + constraintResidue_d = inPort.signal[2] - v; + constraintResidue_dd = inPort.signal[3] - a; + constrain(constraintResidue, constraintResidue_d, constraintResidue_dd); +end Move; ++
+ +
+The flange of a 1D translational mechanical system fixed +at an position s0 in the housing. May be used: +
+ +Release Notes:
+++
+
Name | Default | Description |
---|---|---|
s0 | 0 | fixed offset position of housing [m] |
+model Fixed "Fixed flange" + parameter SI.Position s0=0 "fixed offset position of housing"; + + Interfaces.Flange_b flange_b; +equation + flange_b.s = s0; +end Fixed; ++
+ +
+The input signal "s" in [N] characterizes an external +force which acts (with positive sign) at a flange, +i.e., the component connected to the flange is driven by force f. +
+ + ++Input signal s can be provided from one of the signal generator +blocks of Modelica.Blocks.Source. +
+Release Notes:
+++
+model Force + "External force acting on a drive train element as input signal" + + SI.Force f "driving force"; + + Interfaces.Flange_b flange_b; + Modelica.Blocks.Interfaces.InPort inPort(final n=1) + "Connector of input signal used as force"; +equation + f = inPort.signal[1]; + flange_b.f = -f; +end Force; ++
+ +
+Usually, the absolute position and the absolute velocity of +Modelica.Mechanics.Translational.Inertia models are used as state variables. +In some circumstances, relative quantities are better suited, e.g., +because it may be easier to supply initial values. +In such cases, model RelativeStates allows the definition of state variables +in the following way: +
+ ++An example is given in the next figure +
+ + + ++Here, the relative position and the relative velocity between +the two masses are used as state variables. Additionally, the +simulator selects either the absolute position and absolute +velocity of model mass1 or of model mass2 as state variables. +
+ +Release Notes:
+++
+model RelativeStates "Definition of relative state variables" + extends Interfaces.TwoFlanges; + SI.Position s_rel(stateSelect=StateSelect.prefer) + "relative position used as state variable"; + SI.Velocity v_rel(stateSelect=StateSelect.prefer) + "relative velocity used as state variable"; + SI.Acceleration a_rel "relative angular acceleration"; +equation + s_rel = flange_b.s - flange_a.s; + v_rel = der(s_rel); + a_rel = der(v_rel); + flange_a.f = 0; + flange_b.f = 0; +end RelativeStates; ++
+
+
+This package contains example models to demonstrate the usage of the +Translational package. Open the models and +simulate them according to the provided description in the models. +The following examples are present: +
+ ++ SignConvention Examples for the used sign conventions using simple, basic elements + InitialConditions Setting of initial conditions + Accelerate Use of model accelerate + Damper Use of damper elements + Oscillator Oscillator demonstrates the use of initial conditions + Sensors Sensors for translational systems + Friction Stribeck friction characteristics + PreLoad Positioning of a spool using ElastoGap models ++ +
+
+
+ +
+If all arrows point in the same direction a positive force +results in a positive acceleration a, velocity v and position s. +
+For a force of 1 N and a mass of 1 Kg this leads to ++ a = 1 m/s2 + v = 1 m/s after 1 s (SlidingMass1.v) + s = 0.5 m after 1 s (SlidingMass1.s) ++The acceleration is not available for plotting. +
+
+System 1) and 2) are equivalent. It doesn't matter whether the +force pushes at flange_a in system 1 or pulls at flange_b in system 2. ++It is of course possible to ignore the arrows and connect the models +in an arbitrary way. But then it is hard see in what direction the +force acts. +
+In the third system the two arrows are opposed which means that the +force acts in the opposite direction (in the same direction as in +the two other examples). +
+ +Release Notes:
+++
+encapsulated model SignConvention + "Examples for the used sign conventions." + + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.SlidingMass SlidingMass1(L=1); + Translational.Force Force1; + Sources.Constant Constant1; + Translational.SlidingMass SlidingMass2(L=1); + Translational.Force Force2; + Sources.Constant Constant2; + Translational.SlidingMass SlidingMass3(L=1); + Translational.Force Force3; + Sources.Constant Constant3; +equation + connect(Constant1.outPort, Force1.inPort); + connect(Constant2.outPort, Force2.inPort); + connect(Force3.inPort, Constant3.outPort); + connect(Force1.flange_b, SlidingMass1.flange_a); + connect(Force2.flange_b, SlidingMass2.flange_b); + connect(SlidingMass3.flange_b, Force3.flange_b); +end SignConvention; ++
+ +
There are several ways to set initial conditions. + +In the first system the position of the sliding mass m3 was defined +by using the modifier s(start=4.5), the position of m5 by s(start=12.5). +These positions were chosen such that the system is a rest. To calculate +these values start at the left (Fixed1) with a value of 1 m. The spring +has an unstreched length of 2 m and m3 an length of 3 m, which leads to + + 1 m (Fixed1) + + 2 m (Spring S2) + + 3/2 m (half of the length of SlidingMass m3) + ------- + 4,5 m = s(start = 4.5) for m3 + + 3/2 m (half of the length of SlidingMass m3) + + 4 m (SpringDamper 4 + + 5/2 m (half of length of SlidingMass m5) + ------- + 12,5 m = s(start = 12.5) for m5 + +This selection of initial conditions has the effect that Dymola selects +those variables (m3.s and m5.s) as state variables. + +In the second example the length of the springs are given as start values +but they cannot be used as state for pure springs (only for the spring/damper +combination). In this case the system is not at rest. + +
++
Release Notes:
++ + ++
+encapsulated model InitialConditions "Setting of initial conditions" + import Modelica.Icons; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.SlidingMass M3(L=3, s(start=4.5)); + Translational.Spring S2(s_rel0=2, c=1e3); + Translational.Fixed Fixed1(s0=1); + Translational.SpringDamper SD4(s_rel0=4, c=111); + Translational.SlidingMass M5(L=5, s(start=12.5)); + Translational.SlidingMass M1(L=1); + Translational.Spring S1( + s_rel0=1, + c=1e3, + s_rel(start=1)); + Translational.Fixed Fixed2(s0=-1); + Translational.SpringDamper SD1( + s_rel0=1, + c=111, + s_rel(start=1)); + Translational.SlidingMass M2(L=2); +equation + connect(Fixed1.flange_b, S2.flange_a); + connect(S2.flange_b, M3.flange_a); + connect(M3.flange_b, SD4.flange_a); + connect(SD4.flange_b, M5.flange_a); + connect(Fixed2.flange_b, S1.flange_a); + connect(S1.flange_b, M1.flange_a); + connect(M1.flange_b, SD1.flange_a); + connect(SD1.flange_b, M2.flange_a); +end InitialConditions; ++
+ +
When using the models of the translational sublibrary +it is recommended to make sure that all arrows point in +the same direction because then all component have the +same reference system. + +In the example the distance from flange_a of Rod1 to flange_b +of Rod2 is 2 m. The distance from flange_a of Rad1 to flange_b +of Rod3 is also 2 m though it is difficult to see that. Without +the arrows it would be almost impossible to notice. + +That all arrows point in the same direction is a sufficient +condition for an easy use of the library. There are cases +where horizontally flipped models can be used without +problems. + ++
Release Notes:
++ + ++
+encapsulated model WhyArrows + "Use of arrows in Mechanics.Translational" + import Modelica.Icons; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.Fixed Fixed1; + Translational.Rod Rod1(L=1); + Translational.Rod Rod2(L=1); + Translational.Rod Rod3(L=1); + Translational.Sensors.PositionSensor PositionSensor2; + Translational.Sensors.PositionSensor PositionSensor1; + Translational.Sensors.PositionSensor PositionSensor3; + Translational.Fixed Fixed3(s0=-1.9); + Translational.Spring Spring1(s_rel0=2, c=11); + Translational.SlidingMass SlidingMass1(L=2); + Translational.Fixed Fixed2(s0=-1.9); + Translational.Spring Spring2(s_rel0=2, c=11); + Translational.SlidingMass SlidingMass2(L=2); +equation + connect(Rod1.flange_b, Fixed1.flange_b); + connect(Fixed1.flange_b, Rod2.flange_a); + connect(Rod3.flange_a, Fixed1.flange_b); + connect(Rod2.flange_b, PositionSensor2.flange_a); + connect(PositionSensor1.flange_a, Rod1.flange_a); + connect(PositionSensor3.flange_a, Rod3.flange_b); + connect(Fixed3.flange_b, Spring1.flange_a); + connect(Spring1.flange_b, SlidingMass1.flange_b); + connect(Fixed2.flange_b, Spring2.flange_a); + connect(Spring2.flange_b, SlidingMass2.flange_b); +end WhyArrows; ++
+ +
+encapsulated model Accelerate "Use of model accelerate." + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.Accelerate Accelerate1; + Translational.SlidingMass SlidingMass1(L=1); + Sources.Constant Constant1; +equation + connect(Constant1.outPort, Accelerate1.inPort); + connect(Accelerate1.flange_b, SlidingMass1.flange_a); +end Accelerate; ++
+ +
Release notes: +-------------- + +2001 - 7 - 14: Damping parameters increased (from 1 to 25) ++
+encapsulated model Damper "Use of damper models." + import Modelica.Icons; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.SlidingMass SlidingMass1( + L=1, + v(start=10), + s(start=3)); + Translational.Damper Damper1(d=25); + Translational.Fixed Fixed1(s0=4.5); + Translational.SlidingMass SlidingMass2( + L=1, + v(start=10), + s(start=3)); + Translational.Damper Damper2(d=25); + Translational.Fixed Fixed2(s0=4.5); + Translational.SlidingMass SlidingMass3( + L=1, + v(start=10), + s(start=3)); + Translational.Fixed Fixed3(s0=4.5); + Translational.Spring Spring1(s_rel0=1); + Translational.SpringDamper SpringDamper1(s_rel0=1, d=25); +equation + connect(SlidingMass1.flange_b, Damper1.flange_a); + connect(Damper1.flange_b, Fixed1.flange_b); + connect(SlidingMass2.flange_b, Damper2.flange_a); + connect(Damper2.flange_b, Fixed2.flange_b); + connect(Damper2.flange_b, Spring1.flange_b); + connect(Damper2.flange_a, Spring1.flange_a); + connect(SlidingMass3.flange_b, SpringDamper1.flange_a); + connect(SpringDamper1.flange_b, Fixed3.flange_b); +end Damper; ++
+ +
A spring - mass system is a mechanical oscillator. If no +damping is included and the system is excited at resonance +frequency infinite amplitudes will result. + +The resonant frequency is given by + +omega_res = sqrt(c / m) + +with: c spring stiffness + m mass + +To make sure that the system is initially at rest the initial +conditions s(start=0) and v(start=0) for the SlindingMass +are set. + +If damping is added the amplitudes are bounded. ++
Release Notes:
+++
+encapsulated model Oscillator + "Oscillator demonstrates the use of initial conditions." + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.SlidingMass SlidingMass1( + L=1, + s(start=-0.5), + v(start=0.0)); + Translational.Spring Spring1(s_rel0=1, c=10000); + Translational.Fixed Fixed1(s0=1.0); + Translational.Force Force1; + Sources.Sine Sine1(freqHz={15.9155}); + Translational.SlidingMass SlidingMass2( + L=1, + s(start=-0.5), + v(start=0.0)); + Translational.Spring Spring2(s_rel0=1, c=10000); + Translational.Fixed Fixed2(s0=1.0); + Translational.Force Force2; + Sources.Sine Sine2(freqHz={15.9155}); + Translational.Damper Damper1(d=10); +equation + connect(Sine1.outPort, Force1.inPort); + connect(Sine2.outPort, Force2.inPort); + connect(Force1.flange_b, SlidingMass1.flange_a); + connect(Spring1.flange_b, Fixed1.flange_b); + connect(SlidingMass1.flange_b, Spring1.flange_a); + connect(Force2.flange_b, SlidingMass2.flange_a); + connect(Spring2.flange_a, Damper1.flange_a); + connect(SlidingMass2.flange_b, Spring2.flange_a); + connect(Damper1.flange_b, Spring2.flange_b); + connect(Spring2.flange_b, Fixed2.flange_b); +end Oscillator; ++
+ +
These sensors measure + + force f in N + position s in m + velocity v in m/s + acceleration a in m/s2 + +Dhe measured velocity and acceleration is independent on +the flange the sensor is connected to. The position +depends on the flange (flange_a or flange_b) and the +length L of the component. + +Plot PositionSensor1.s, PositionSensor2.s and SlidingMass1.s +to see the difference. ++
Release Notes:
+++
+encapsulated model Sensors "Sensors for translational systems." + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.Sensors.ForceSensor ForceSensor1; + Translational.Sensors.SpeedSensor SpeedSensor1; + Translational.Sensors.PositionSensor PositionSensor1; + Translational.Sensors.AccSensor AccSensor1; + Translational.SlidingMass SlidingMass1(L=1); + Translational.Force Force1; + Sources.Sine Sine1(amplitude={10}, freqHz={4}); + Translational.Sensors.PositionSensor PositionSensor2; +equation + connect(Sine1.outPort, Force1.inPort); + connect(ForceSensor1.flange_b, SlidingMass1.flange_a); + connect(SlidingMass1.flange_b, PositionSensor2.flange_a); + connect(Force1.flange_b, ForceSensor1.flange_a); + connect(SlidingMass1.flange_a, PositionSensor1.flange_a); + connect(PositionSensor1.flange_a, SpeedSensor1.flange_a); + connect(SpeedSensor1.flange_a, AccSensor1.flange_a); +end Sensors; ++
+ +
1) Simulate and then plot Stop1.f as a function of Stop1.v + This gives the Stribeck curve. + +2) This model gives an example for a hard stop. However there + can arise some problems with the used modeling approach (use of + Reinit, convergence problems). In this case use the ElastoGap + to model a stop (see example Preload). ++
Release Notes:
+++
+encapsulated model Friction "Use of model Stop" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + Translational.Stop Stop1(L=1); + Translational.Force Force1; + Sources.Sine Sine1(amplitude={25}, freqHz={0.25}); + Translational.Stop Stop2( + L=1, + smax=0.9, + smin=-0.9, + F_Coulomb=3, + F_Stribeck=5, + s(start=0), + v(start=-5)); + Translational.Spring Spring1(s_rel0=1, c=500); + Translational.Fixed Fixed1(s0=-1.75); +equation + connect(Sine1.outPort, Force1.inPort); + connect(Force1.flange_b, Stop1.flange_a); + connect(Fixed1.flange_b, Spring1.flange_a); + connect(Spring1.flange_b, Stop2.flange_a); +end Friction; ++
+ +
When designing hydraulic valves it is often necessary to hold the spool in +a certain position as long as an external force is below a threshold value. +If this force exceeds the treshold value a linear relation between force +and position is desired. +There are designs that need only one spring to accomplish this task. Using +the ElastoGap elements this design can be modelled easily. +Drawing of spool. +
+
+
+Spool position s as a function of working force f. +
++
Release Notes:
+++
+encapsulated model PreLoad + "Preload of a spool using ElastoGap models." + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Mechanics.Translational; + + extends Icons.Example; + + Translational.ElastoGap InnerContactA( + s_rel0=1e-3, + c=1000e3, + d=250); + Translational.ElastoGap InnerContactB( + s_rel0=1e-3, + c=1000e3, + d=250); + Translational.SlidingMass Spool( + L=0.19, + m=0.150, + s(start=14.75e-3)); + Translational.Fixed FixedLe(s0=-95.5e-3); + Translational.SlidingMass SpringPlateA( + L=2e-3, + m=10e-3, + s(start=-93e-3)); + Translational.SlidingMass SpringPlateB( + L=2e-3, + m=10e-3, + s(start=-69.25e-3)); + Translational.Spring Spring(c=20e3, s_rel0=25e-3); + Translational.ElastoGap OuterContactA( + s_rel0=1.5e-3, + c=1000e3, + d=250); + Translational.ElastoGap OuterContactB( + c=1000e3, + d=250, + s_rel0=1.5e-3); + Translational.Rod Rod1(L=7e-3); + Translational.Damper Friction(d=2500); + Translational.Force Force1; + Translational.Rod Housing(L=30.5e-3); + Translational.Rod Rod3(L=5.75e-3); + Translational.Rod Rod4(L=5.75e-3); + Translational.Rod Rod2(L=7e-3); + Sources.Sine Sine1(amplitude={150}, freqHz={0.01}); +equation + connect(OuterContactA.flange_b, SpringPlateA.flange_a); + connect(SpringPlateA.flange_b, Spring.flange_a); + connect(Spring.flange_b, SpringPlateB.flange_a); + connect(SpringPlateB.flange_b, OuterContactB.flange_a); + connect(FixedLe.flange_b, OuterContactA.flange_a); + connect(Friction.flange_a, FixedLe.flange_b); + connect(FixedLe.flange_b, Housing.flange_a); + connect(OuterContactB.flange_b, Housing.flange_b); + connect(SpringPlateA.flange_b, Rod1.flange_a); + connect(InnerContactA.flange_a, Rod3.flange_a); + connect(InnerContactA.flange_b, Rod1.flange_b); + connect(Rod2.flange_a, InnerContactB.flange_a); + connect(Rod4.flange_b, InnerContactB.flange_b); + connect(Friction.flange_b, Rod3.flange_a); + connect(Sine1.outPort, Force1.inPort); + connect(Force1.flange_b, Spool.flange_a); + connect(Rod3.flange_b, Rod4.flange_a); + connect(Rod2.flange_b, SpringPlateB.flange_a); + connect(Spool.flange_a, Rod4.flange_a); +end PreLoad; ++
+
+ +
+The following variables are transported through this connector: +
+ + s: Absolute position of the flange in [m]. A positive translation + means that the flange is translated along the flange axis. + f: Cut-force in direction of the flange axis in [N]. ++
++
+connector Flange_b + "right 1D translational flange (flange axis directed OUT OF cut plane)" + + SI.Position s "absolute position of flange"; + flow SI.Force f "cut force directed into flange"; +end Flange_b; ++
+
+ +
+This is a 1D translational component with two rigidly connected flanges. +The distance between the left and the right flange is always constant, i. e. L. +The forces at the right and left flange can be different. +It is used e.g. to built up sliding masses. + +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
L | 0 | length of component from left flange to right flange (= flange_b.s - flange_a.s) [m] |
+partial model Rigid + "Rigid connection of two translational 1D flanges " + SI.Position s + "absolute position of center of component (s = flange_a.s + L/2 = flange_b.s - L/2)" + ; + parameter SI.Length L=0 + "length of component from left flange to right flange (= flange_b.s - flange_a.s)" + ; + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane, i. e. from left to right)" + ; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane, i. e. from right to left)" + ; +equation + flange_a.s = s - L/2; + flange_b.s = s + L/2; +end Rigid; ++
+ +
Release Notes:
+++
+
Name | Default | Description |
---|---|---|
L | 0 | length of component from left flange to right flange (= flange_b.s - flange_a.s) [m] |
smax | 25 | right stop for (right end of) sliding mass [m] |
smin | -25 | left stop for (left end of) sliding mass [m] |
v_small | 1e-3 | Relative velocity near to zero (see model info text) [m/s] |
+partial model FrictionBase "Base class of Coulomb friction elements" + extends Rigid; + parameter SI.Position smax=25 "right stop for (right end of) sliding mass"; + parameter SI.Position smin=-25 "left stop for (left end of) sliding mass"; + parameter SI.Velocity v_small=1e-3 + "Relative velocity near to zero (see model info text)"; + + + // Equations to define the following variables have to be defined in subclasses + SI.Velocity v_relfric "Relative velocity between frictional surfaces"; + SI.Acceleration a_relfric + "Relative acceleration between frictional surfaces"; + SI.Force f + "Friction force (positive, if directed in opposite direction of v_rel)"; + SI.Force f0 "Friction force for v=0 and forward sliding"; + SI.Force f0_max "Maximum friction force for v=0 and locked"; + Boolean free "true, if frictional element is not active"; + + // Equations to define the following variables are given in this class + Real sa "Path parameter of friction characteristic f = f(a_relfric)"; + + Boolean startForward + "true, if v_rel=0 and start of forward sliding or v_rel > v_small"; + Boolean startBackward + "true, if v_rel=0 and start of backward sliding or v_rel < -v_small"; + Boolean locked "true, if v_rel=0 and not sliding"; + + constant Integer Unknown=3 "Value of mode is not known"; + constant Integer Free=2 "Element is not active"; + constant Integer Forward=1 "v_rel > 0 (forward sliding)"; + constant Integer Stuck=0 + "v_rel = 0 (forward sliding, locked or backward sliding)"; + constant Integer Backward=-1 "v_rel < 0 (backward sliding)"; + Integer mode( + final min=Backward, + final max=Unknown, + start=Unknown); +equation + /* Friction characteristic + (locked is introduced to help the Modelica translator determining + the different structural configurations, if for each configuration + special code shall be generated) + */ + + startForward = pre(mode) == Stuck and (sa > f0_max and s < (smax - L/2) or + pre(startForward) and sa > f0 and s < (smax - L/2)) or pre(mode) == + Backward and v_relfric > v_small or initial() and (v_relfric > 0); + startBackward = pre(mode) == Stuck and (sa < -f0_max and s > (smin + L/2) or + pre(startBackward) and sa < -f0 and s > (smin + L/2)) or pre(mode) == + Forward and v_relfric < -v_small or initial() and (v_relfric < 0); + + locked = not free and not (pre(mode) == Forward or startForward or pre(mode) + == Backward or startBackward); + + a_relfric = if locked then 0 else if free then sa else if startForward then + sa - f0 else if startBackward then sa + f0 else if pre(mode) == Forward + then sa - f0 else sa + f0; + + /* Friction torque has to be defined in a subclass. Example for a clutch: + f = if locked then sa else if free then 0 else cgeo*fn* + (if startForward then Math.tempInterpol1( w_relfric, mue_pos, 2) + else if startBackward then -Math.tempInterpol1(-w_relfric, mue_pos, 2) + else if pre(mode) == Forward then Math.tempInterpol1(w_relfric, mue_pos, 2) + else -Math.tempInterpol1(-w_relfric, mue_pos, 2)); + */ + + // finite state machine to determine configuration + + mode = if free then Free else (if (pre(mode) == Forward or pre(mode) == Free + or startForward) and v_relfric > 0 and s < (smax - L/2) then Forward else + if (pre(mode) == Backward or pre(mode) == Free or startBackward) and + v_relfric < 0 and s > (smin + L/2) then Backward else Stuck); + +end FrictionBase; ++
+ +
+This is a 1D translational component with a compliant connection of two +translational 1D flanges where inertial effects between the two +flanges are not included. The absolute value of the force at the left and the right +flange is the same. It is used to built up springs, dampers etc. +
Release Notes:
+++
+partial model Compliant + "Compliant connection of two translational 1D flanges" + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)"; + SI.Distance s_rel "relative distance (= flange_b.s - flange_a.s)"; + flow SI.Force f + "forcee between flanges (positive in direction of flange axis R)"; +equation + s_rel = flange_b.s - flange_a.s; + flange_b.f = f; + flange_a.f = -f; +end Compliant; ++
+ +
+This is a 1D translational component with two flanges. +It is used e.g. to built up parts of a drive train consisting +of several base components. +
+ +Release Notes:
+++
+partial model TwoFlanges + "Component with two translational 1D flanges " + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)"; +end TwoFlanges; ++
+ +
+The following variables are transported through this connector: +
+ + s: Absolute position of the flange in [m]. A positive translation + means that the flange is translated along the flange axis. + f: Cut-force in direction of the flange axis in [N]. ++
++
+connector Flange_a + "(left) 1D translational flange (flange axis directed INTO cut plane, e. g. from left to right)" + + + + SI.Position s "absolute position of flange"; + flow SI.Force f "cut force directed into flange"; +end Flange_a; ++
+ +
+This is the superclass of a 1D translational component with one flange and one +output signal in order to measure an absolute kinematic quantity in the flange +and to provide the measured signal as output signal for further processing +with the Modelica.Blocks blocks. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+++
+partial model AbsoluteSensor + "Device to measure a single absolute flange variable" + + extends Modelica.Icons.TranslationalSensor; + + Flange_a flange_a + "(left) flange to be measured (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +end AbsoluteSensor; ++
+ +
+This is a superclass for 1D translational components with two rigidly connected +flanges and one output signal in order to measure relative kinematic quantities +between the two flanges or the cut-force in the flange and +to provide the measured signal as output signal for further processing +with the Modelica.Blocks blocks. +
+ +Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+++
+partial model RelativeSensor + "Device to measure a single relative variable between two flanges" + + extends Modelica.Icons.TranslationalSensor; + + Flange_a flange_a + "(left) driving flange (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Flange_b flange_b + "(right) driven flange (flange axis directed OUT OF cut plane)"; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +end RelativeSensor; ++
+
+
+ +
+Measures the absolute position s of a flange in an ideal way and provides the result as +output signals (to be further processed with blocks of the +Modelica.Blocks library). +
+Release Notes:
+++
+model PositionSensor "Ideal sensor to measure the absolute position" + extends Modelica.Icons.TranslationalSensor; + + SI.Position s "Absolute position of flange"; + + Interfaces.Flange_a flange_a + "(left) flange to be measured (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +equation + s = flange_a.s; + s = outPort.signal[1]; + 0 = flange_a.f; +end PositionSensor; ++
+ +
+Measures the cut-force between two flanges in an ideal way +and provides the result as output signal (to be further processed +with blocks of the Modelica.Blocks library). +
+Release Notes:
+++
+model ForceSensor + "Ideal sensor to measure the force between two flanges" + extends Interfaces.RelativeSensor; + SI.Force f "force in flange_a and flange_b (f = flange_a.f = -flange_b.f)" + ; +equation + flange_a.s = flange_b.s; + flange_a.f = f; + flange_b.f = -f; + f = outPort.signal[1]; +end ForceSensor; ++
+ +
+Measures the absolute velocity v of a flange in an ideal way and provides the result as +output signals (to be further processed with blocks of the +Modelica.Blocks library). +
+Release Notes:
+++
+model SpeedSensor "Ideal sensor to measure the absolute velocity" + extends Modelica.Icons.TranslationalSensor; + SI.Position s "Absolute position of flange"; + SI.Velocity v "Absolute velocity of flange"; + + Interfaces.Flange_a flange_a + "(left) flange to be measured (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +equation + s = flange_a.s; + v = der(s); + v = outPort.signal[1]; + 0 = flange_a.f; +end SpeedSensor; ++
+ +
+Measures the absolute acceleration a +of a flange in an ideal way and provides the result as +output signals (to be further processed with blocks of the +Modelica.Blocks library). +
+Release Notes:
+++
+model AccSensor "Ideal sensor to measure the absolute acceleration" + extends Modelica.Icons.TranslationalSensor; + SI.Velocity v "Absolute velocity of flange"; + SI.Acceleration a "Absolute acceleration of a flange"; + + Interfaces.Flange_a flange_a + "(left) flange to be measured (flange axis directed INTO cut plane, e. g. from left to right)" + ; + Modelica.Blocks.Interfaces.OutPort outPort(final n=1); +equation + v = der(flange_a.s); + a = der(v); + a = outPort.signal[1]; + 0 = flange_a.f; +end AccSensor; ++
+
+
This package provides predefined types, such as Mass, +Length, Time, based on the international standard +on units:
+ +For more information on units, see also the book of +Francois Cardarelli "Scientific Unit Conversion - A Practical +Guide to Metrication" +(Springer 1997).
+ +The following conventions are used in this package:
+ ++ Chapter 1: Space and Time + Chapter 2: Periodic and Related Phenomena + Chapter 3: Mechanics + Chapter 4: Heat + Chapter 5: Electricity and Magnetism + Chapter 6: Light and Related Electro-Magnetic Radiations + Chapter 7: Acoustics + Chapter 8: Physical Chemistry + Chapter 9: Atomic and Nuclear Physics + Chapter 10: Nuclear Reactions and Ionizing Radiations + Chapter 11: (not defined in ISO 31-1992) + Chapter 12: Characteristic Numbers + Chapter 13: Solid State Physics ++
Release Notes:
+Copyright © 1999-2002, Modelica Association and DLR.
+ +The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo".
+ ++
+type SolidAngle = Real (final quantity="SolidAngle", final unit="sr");
+type Length = Real (final quantity="Length", final unit="m");
+type PathLength = Length;
+type Position = Length;
+type Distance = Length (min=0);
+type Breadth = Distance;
+type Height = Distance;
+type Thickness = Distance;
+type Radius = Distance;
+type Diameter = Distance;
+type Area = Real (final quantity="Area", final unit="m2");
+type Volume = Real (final quantity="Volume", final unit="m3");
+type Time = Real (final quantity="Time", final unit="s");
+type Duration = Time;
+type AngularVelocity = Real ( + final quantity="AngularVelocity", + final unit="rad/s", + displayUnit="rev/min");
+type AngularAcceleration = Real (final quantity="AngularAcceleration", final + unit="rad/s2");
+type Velocity = Real (final quantity="Velocity", final unit="m/s");
+type Acceleration = Real (final quantity="Acceleration", final unit="m/s2");
+type Period = Real (final quantity="Time", final unit="s");
+type Frequency = Real (final quantity="Frequency", final unit="Hz");
+type AngularFrequency = Real (final quantity="AngularFrequency", final unit= + "s-1");
+type Wavelength = Real (final quantity="Wavelength", final unit="m");
+type Wavelenght = Wavelength;
+type WaveNumber = Real (final quantity="WaveNumber", final unit="m-1");
+type CircularWaveNumber = Real (final quantity="CircularWaveNumber", final unit + ="rad/m");
+type AmplitudeLevelDifference = Real (final quantity="AmplitudeLevelDifference" + , final unit="dB");
+type PowerLevelDifference = Real (final quantity="PowerLevelDifference", final + unit="dB");
+type DampingCoefficient = Real (final quantity="DampingCoefficient", final unit + ="s-1");
+type LogarithmicDecrement = Real (final quantity="LogarithmicDecrement", final + unit="Np/S");
+type AttenuationCoefficient = Real (final quantity="AttenuationCoefficient", + final unit="m-1");
+type PhaseCoefficient = Real (final quantity="PhaseCoefficient", final unit= + "m-1");
+type PropagationCoefficient = Real (final quantity="PropagationCoefficient", + final unit="m-1");
+type Damping = DampingCoefficient;
+type Mass = Real ( + quantity="Mass", + final unit="kg", + min=0);
+type Density = Real ( + final quantity="Density", + final unit="kg/m3", + displayUnit="g/cm3", + min=0);
+type RelativeDensity = Real ( + final quantity="RelativeDensity", + final unit="1", + min=0);
+type SpecificVolume = Real ( + final quantity="SpecificVolume", + final unit="m3/kg", + min=0);
+type LinearDensity = Real ( + final quantity="LinearDensity", + final unit="kg/m", + min=0);
+type SurfaceDensity = Real ( + final quantity="SurfaceDensity", + final unit="kg/m2", + min=0);
+type Momentum = Real (final quantity="Momentum", final unit="kg.m/s");
+type Impulse = Real (final quantity="Impulse", final unit="N.s");
+type AngularMomentum = Real (final quantity="AngularMomentum", final unit= + "kg.m2/s");
+type AngularImpulse = Real (final quantity="AngularImpulse", final unit="N.m.s" + );
+type MomentOfInertia = Real (final quantity="MomentOfInertia", final unit= + "kg.m2");
+type Inertia = MomentOfInertia;
+type Force = Real (final quantity="Force", final unit="N");
+type Weight = Force;
+type Torque = Real (final quantity="Torque", final unit="N.m");
+type MomentOfForce = Torque;
+type Pressure = Real ( + final quantity="Pressure", + final unit="Pa", + displayUnit="bar");
+type AbsolutePressure = Pressure (min=0);
+type BulkModulus = AbsolutePressure;
+type Stress = Real (final unit="Pa");
+type NormalStress = Stress;
+type ShearStress = Stress;
+type Strain = Real (final quantity="Strain", final unit="1");
+type LinearStrain = Strain;
+type ShearStrain = Strain;
+type VolumeStrain = Real (final quantity="VolumeStrain", final unit="1");
+type PoissonNumber = Real (final quantity="PoissonNumber", final unit="1");
+type ModulusOfElasticity = Stress;
+type ShearModulus = Stress;
+type SecondMomentOfArea = Real (final quantity="SecondMomentOfArea", final unit + ="m4");
+type SecondPolarMomentOfArea = SecondMomentOfArea;
+type SectionModulus = Real (final quantity="SectionModulus", final unit="m3");
+type CoefficientOfFriction = Real (final quantity="CoefficientOfFriction", + final unit="1");
+type DynamicViscosity = Real ( + final quantity="DynamicViscosity", + final unit="Pa.s", + min=0);
+type KinematicViscosity = Real ( + final quantity="KinematicViscosity", + final unit="m2/s", + min=0);
+type SurfaceTension = Real (final quantity="SurfaceTension", final unit="N/m");
+type Work = Real (final quantity="Work", final unit="J");
+type Energy = Real (final quantity="Energy", final unit="J");
+type EnergyDensity = Real (final quantity="EnergyDensity", final unit="J/m3");
+type PotentialEnergy = Energy;
+type KineticEnergy = Energy;
+type Power = Real (final quantity="Power", final unit="W");
+type EnergyFlowRate = Power;
+type EnthalpyFlowRate = Real (final quantity="EnthalpyFlowRate", final unit="W" + );
+type Efficiency = Real ( + final quantity="Efficiency", + final unit="1", + min=0);
+type MassFlowRate = Real (quantity="MassFlowRate", final unit="kg/s");
+type VolumeFlowRate = Real (final quantity="VolumeFlowRate", final unit="m3/s");
+type MomentumFlux = Real (final quantity="MomentumFlux", final unit="N");
+type AngularMomentumFlux = Real (final quantity="AngularMomentumFlux", final + unit="N.m");
+type ThermodynamicTemperature = Real ( + final quantity="ThermodynamicTemperature", + final unit="K", + displayUnit="degC");
+type Temp_K = ThermodynamicTemperature;
+type Temperature = ThermodynamicTemperature;
+type CelsiusTemperature = Real (final quantity="CelsiusTemperature", final unit + ="degC");
+type Temp_C = CelsiusTemperature;
+type LinearExpansionCoefficient = Real (final quantity= + "LinearExpansionCoefficient", final unit="1/K");
+type CubicExpansionCoefficient = Real (final quantity= + "CubicExpansionCoefficient", final unit="1/K");
+type RelativePressureCoefficient = Real (final quantity= + "RelativePressureCoefficient", final unit="1/K");
+type PressureCoefficient = Real (final quantity="PressureCoefficient", final + unit="Pa/K");
+type Compressibility = Real (final quantity="Compressibility", final unit= + "1/Pa");
+type IsothermalCompressibility = Compressibility;
+type IsentropicCompressibility = Compressibility;
+type Heat = Real (final quantity="Energy", final unit="J");
+type HeatFlowRate = Real (final quantity="Power", final unit="W");
+type HeatFlux = Real (final quantity="HeatFlux", final unit="W/m^2");
+type DensityOfHeatFlowRate = Real (final quantity="DensityOfHeatFlowRate", + final unit="W/m2");
+type ThermalConductivity = Real (final quantity="ThermalConductivity", final + unit="W/(m.K)");
+type CoefficientOfHeatTransfer = Real (final quantity= + "CoefficientOfHeatTransfer", final unit="W/(m2.K)");
+type SurfaceCoefficientOfHeatTransfer = CoefficientOfHeatTransfer;
+type ThermalInsulance = Real (final quantity="ThermalInsulance", final unit= + "m2.K/W");
+type ThermalResistance = Real (final quantity="ThermalResistance", final unit= + "K/W");
+type ThermalConductance = Real (final quantity="ThermalConductance", final unit + ="W/K");
+type ThermalDiffusivity = Real (final quantity="ThermalDiffusivity", final unit + ="m2/s");
+type HeatCapacity = Real (final quantity="HeatCapacity", final unit="J/K");
+type SpecificHeatCapacity = Real (final quantity="SpecificHeatCapacity", final + unit="J/(kg.K)");
+type SpecificHeatCapacityAtConstantPressure = SpecificHeatCapacity;
+type SpecificHeatCapacityAtConstantVolume = SpecificHeatCapacity;
+type SpecificHeatCapacityAtSaturation = SpecificHeatCapacity;
+type RatioOfSpecificHeatCapacities = Real (final quantity= + "RatioOfSpecificHeatCapacities", final unit="1");
+type IsentropicExponent = Real (final quantity="IsentropicExponent", final unit + ="1");
+type Entropy = Real (final quantity="Entropy", final unit="J/K");
+type SpecificEntropy = Real (final quantity="SpecificEntropy", final unit= + "J/(kg.K)");
+type InternalEnergy = Heat;
+type Enthalpy = Heat;
+type HelmholtzFreeEnergy = Heat;
+type GibbsFreeEnergy = Heat;
+type SpecificEnergy = Real (final quantity="SpecificEnergy", final unit="J/kg");
+type SpecificInternalEnergy = SpecificEnergy;
+type SpecificEnthalpy = SpecificEnergy;
+type SpecificHelmholtzFreeEnergy = SpecificEnergy;
+type SpecificGibbsFreeEnergy = SpecificEnergy;
+type MassieuFunction = Real (final quantity="MassieuFunction", final unit="J/K" + );
+type PlanckFunction = Real (final quantity="PlanckFunction", final unit="J/K");
+type DerDensityByEnthalpy = Real (final unit="kg.s^2/m^5");
+type DerDensityByPressure = Real (final unit="s^2/m^2");
+type DerDensityByTemperature = Real (final unit="kg/(m^3.K)");
+type DerEnthalpyByPressure = Real (final unit="J.m.s^2/kg^2");
+type DerEnergyByDensity = Real (final unit="J.m^3/kg");
+type DerEnergyByPressure = Real (final unit="J.m.s^2/kg");
+type ElectricCurrent = Real (final quantity="ElectricCurrent", final unit="A");
+type Current = ElectricCurrent;
+type ElectricCharge = Real (final quantity="ElectricCharge", final unit="C");
+type Charge = ElectricCharge;
+type VolumeDensityOfCharge = Real ( + final quantity="VolumeDensityOfCharge", + final unit="C/m3", + min=0);
+type SurfaceDensityOfCharge = Real ( + final quantity="SurfaceDensityOfCharge", + final unit="C/m2", + min=0);
+type ElectricFieldStrength = Real (final quantity="ElectricFieldStrength", + final unit="V/m");
+type ElectricPotential = Real (final quantity="ElectricPotential", final unit= + "V");
+type Voltage = ElectricPotential;
+type PotentialDifference = ElectricPotential;
+type ElectromotiveForce = ElectricPotential;
+type ElectricFluxDensity = Real (final quantity="ElectricFluxDensity", final + unit="C/m2");
+type ElectricFlux = Real (final quantity="ElectricFlux", final unit="C");
+type Capacitance = Real ( + final quantity="Capacitance", + final unit="F", + min=0);
+type Permittivity = Real ( + final quantity="Permittivity", + final unit="F/m", + min=0);
+type PermittivityOfVacuum = Permittivity;
+type RelativePermittivity = Real (final quantity="RelativePermittivity", final + unit="1");
+type ElectricSusceptibility = Real (final quantity="ElectricSusceptibility", + final unit="1");
+type ElectricPolarization = Real (final quantity="ElectricPolarization", final + unit="C/m2");
+type Electrization = Real (final quantity="Electrization", final unit="V/m");
+type ElectricDipoleMoment = Real (final quantity="ElectricDipoleMoment", final + unit="C.m");
+type CurrentDensity = Real (final quantity="CurrentDensity", final unit="A/m2");
+type LinearCurrentDensity = Real (final quantity="LinearCurrentDensity", final + unit="A/m");
+type MagneticFieldStrength = Real (final quantity="MagneticFieldStrength", + final unit="A/m");
+type MagneticPotentialDifference = Real (final quantity= + "MagneticPotentialDifference", final unit="A");
+type MagnetomotiveForce = Real (final quantity="MagnetomotiveForce", final unit + ="A");
+type CurrentLinkage = Real (final quantity="CurrentLinkage", final unit="A");
+type MagneticFluxDensity = Real (final quantity="MagneticFluxDensity", final + unit="T");
+type MagneticFlux = Real (final quantity="MagneticFlux", final unit="Wb");
+type MagneticVectorPotential = Real (final quantity="MagneticVectorPotential", + final unit="Wb/m");
+type Inductance = Real ( + final quantity="Inductance", + final unit="H", + min=0);
+type SelfInductance = Inductance;
+type MutualInductance = Inductance;
+type CouplingCoefficient = Real (final quantity="CouplingCoefficient", final + unit="1");
+type LeakageCoefficient = Real (final quantity="LeakageCoefficient", final unit + ="1");
+type Permeability = Real (final quantity="Permeability", final unit="H/m");
+type PermeabilityOfVacuum = Permeability;
+type RelativePermeability = Real (final quantity="RelativePermeability", final + unit="1");
+type MagneticSusceptibility = Real (final quantity="MagneticSusceptibility", + final unit="1");
+type ElectromagneticMoment = Real (final quantity="ElectromagneticMoment", + final unit="A.m2");
+type MagneticDipoleMoment = Real (final quantity="MagneticDipoleMoment", final + unit="Wb.m");
+type Magnetization = Real (final quantity="Magnetization", final unit="A/m");
+type MagneticPolarization = Real (final quantity="MagneticPolarization", final + unit="T");
+type ElectromagneticEnergyDensity = Real (final quantity="EnergyDensity", + final unit="J/m3");
+type PoyntingVector = Real (final quantity="PoyntingVector", final unit="W/m2");
+type Resistance = Real ( + final quantity="Resistance", + final unit="Ohm", + min=0);
+type Resistivity = Real (final quantity="Resistivity", final unit="Ohm.m");
+type Conductivity = Real (final quantity="Conductivity", final unit="S/m");
+type Reluctance = Real (final quantity="Reluctance", final unit="H-1");
+type Permeance = Real (final quantity="Permeance", final unit="H");
+type PhaseDifference = Real ( + final quantity="Angle", + final unit="rad", + displayUnit="deg");
+type Impedance = Resistance;
+type ModulusOfImpedance = Resistance;
+type Reactance = Resistance;
+type QualityFactor = Real (final quantity="QualityFactor", final unit="1");
+type LossAngle = Real ( + final quantity="Angle", + final unit="rad", + displayUnit="deg");
+type Conductance = Real ( + final quantity="Conductance", + final unit="S", + min=0);
+type Admittance = Conductance;
+type ModulusOfAdmittance = Conductance;
+type Susceptance = Conductance;
+type InstantaneousPower = Real (final quantity="Power", final unit="W");
+type ActivePower = Real (final quantity="Power", final unit="W");
+type ApparentPower = Real (final quantity="Power", final unit="VA");
+type ReactivePower = Real (final quantity="Power", final unit="var");
+type PowerFactor = Real (final quantity="PowerFactor", final unit="1");
+type Transconductance = Real (final quantity="Transconductance", final unit= + "A/(V*V)");
+type InversePotential = Real (final quantity="InversePotential", final unit= + "1/V");
+type RadiantEnergy = Real (final quantity="Energy", final unit="J");
+type RadiantEnergyDensity = Real (final quantity="EnergyDensity", final unit= + "J/m3");
+type SpectralRadiantEnergyDensity = Real (final quantity= + "SpectralRadiantEnergyDensity", final unit="J/m4");
+type RadiantPower = Real (final quantity="Power", final unit="W");
+type RadiantEnergyFluenceRate = Real (final quantity="RadiantEnergyFluenceRate" + , final unit="W/m2");
+type RadiantIntensity = Real (final quantity="RadiantIntensity", final unit= + "W/sr");
+type Radiance = Real (final quantity="Radiance", final unit="W/sr.m2");
+type RadiantExtiance = Real (final quantity="RadiantExtiance", final unit= + "W/m2");
+type Irradiance = Real (final quantity="Irradiance", final unit="W/m2");
+type Emissivity = Real (final quantity="Emissivity", final unit="1");
+type SpectralEmissivity = Real (final quantity="SpectralEmissivity", final unit + ="1");
+type DirectionalSpectralEmissivity = Real (final quantity= + "DirectionalSpectralEmissivity", final unit="1");
+type LuminousIntensity = Real (final quantity="LuminousIntensity", final unit= + "cd");
+type LuminousFlux = Real (final quantity="LuminousFlux", final unit="lm");
+type QuantityOfLight = Real (final quantity="QuantityOfLight", final unit= + "lm.s");
+type Luminance = Real (final quantity="Luminance", final unit="cd/m2");
+type LuminousExitance = Real (final quantity="LuminousExitance", final unit= + "lm/m2");
+type Illuminance = Real (final quantity="Illuminance", final unit="lx");
+type LightExposure = Real (final quantity="LightExposure", final unit="lx.s");
+type LuminousEfficacy = Real (final quantity="LuminousEfficacy", final unit= + "lm/W");
+type SpectralLuminousEfficacy = Real (final quantity="SpectralLuminousEfficacy" + , final unit="lm/W");
+type LuminousEfficiency = Real (final quantity="LuminousEfficiency", final unit + ="1");
+type SpectralLuminousEfficiency = Real (final quantity= + "SpectralLuminousEfficiency", final unit="1");
+type CIESpectralTristimulusValues = Real (final quantity= + "CIESpectralTristimulusValues", final unit="1");
+type ChromaticityCoordinates = Real (final quantity="CromaticityCoordinates", + final unit="1");
+type SpectralAbsorptionFactor = Real (final quantity="SpectralAbsorptionFactor" + , final unit="1");
+type SpectralReflectionFactor = Real (final quantity="SpectralReflectionFactor" + , final unit="1");
+type SpectralTransmissionFactor = Real (final quantity= + "SpectralTransmissionFactor", final unit="1");
+type SpectralRadianceFactor = Real (final quantity="SpectralRadianceFactor", + final unit="1");
+type LinearAttenuationCoefficient = Real (final quantity= + "AttenuationCoefficient", final unit="m-1");
+type LinearAbsorptionCoefficient = Real (final quantity= + "LinearAbsorptionCoefficient", final unit="m-1");
+type MolarAbsorptionCoefficient = Real (final quantity= + "MolarAbsorptionCoefficient", final unit="m2/mol");
+type RefractiveIndex = Real (final quantity="RefractiveIndex", final unit="1");
+type StaticPressure = Real ( + final quantity="Pressure", + final unit="Pa", + displayUnit="bar", + min=0);
+type SoundPressure = StaticPressure;
+type SoundParticleDisplacement = Real (final quantity="Length", final unit="m");
+type SoundParticleVelocity = Real (final quantity="Velocity", final unit="m/s");
+type SoundParticleAcceleration = Real (final quantity="Acceleration", final + unit="m/s2");
+type VelocityOfSound = Real (final quantity="Velocity", final unit="m/s");
+type SoundEnergyDensity = Real (final quantity="EnergyDensity", final unit= + "J/m3");
+type SoundPower = Real (final quantity="Power", final unit="W");
+type SoundIntensity = Real (final quantity="SoundIntensity", final unit="W/m2");
+type AcousticImpedance = Real (final quantity="AcousticImpedance", final unit= + "Pa.s/m3");
+type SpecificAcousticImpedance = Real (final quantity= + "SpecificAcousticImpedance", final unit="Pa.s/m");
+type MechanicalImpedance = Real (final quantity="MechanicalImpedance", final + unit="N.s/m");
+type SoundPressureLevel = Real (final quantity="SoundPressureLevel", final unit + ="dB");
+type SoundPowerLevel = Real (final quantity="SoundPowerLevel", final unit="dB");
+type DissipationCoefficient = Real (final quantity="DissipationCoefficient", + final unit="1");
+type ReflectionCoefficient = Real (final quantity="ReflectionCoefficient", + final unit="1");
+type TransmissionCoefficient = Real (final quantity="TransmissionCoefficient", + final unit="1");
+type AcousticAbsorptionCoefficient = Real (final quantity= + "AcousticAbsorptionCoefficient", final unit="1");
+type SoundReductionIndex = Real (final quantity="SoundReductionIndex", final + unit="dB");
+type EquivalentAbsorptionArea = Real (final quantity="Area", final unit="m2");
+type ReverberationTime = Real (final quantity="Time", final unit="s");
+type LoundnessLevel = Real (final quantity="LoundnessLevel", final unit="phon");
+type Loundness = Real (final quantity="Loundness", final unit="sone");
+type RelativeAtomicMass = Real (final quantity="RelativeAtomicMass", final unit + ="1");
+type RelativeMolecularMass = Real (final quantity="RelativeMolecularMass", + final unit="1");
+type NumberOfMolecules = Real (final quantity="NumberOfMolecules", final unit= + "1");
+type AmountOfSubstance = Real ( + final quantity="AmountOfSubstance", + final unit="mol", + min=0);
+type MolarMass = Real (final quantity="MolarMass", final unit="kg/mol");
+type MolarVolume = Real (final quantity="MolarVolume", final unit="m3/mol");
+type MolarInternalEnergy = Real (final quantity="MolarInternalEnergy", final + unit="J/mol");
+type MolarHeatCapacity = Real (final quantity="MolarHeatCapacity", final unit= + "J/(mol.K)");
+type MolarEntropy = Real (final quantity="MolarEntropy", final unit="J/(mol.K)" + );
+type NumberDensityOfMolecules = Real (final quantity="NumberDensityOfMolecules" + , final unit="m-3");
+type MolecularConcentration = Real (final quantity="MolecularConcentration", + final unit="m-3");
+type MassConcentration = Real (final quantity="MassConcentration", final unit= + "kg/m3");
+type MassFraction = Real (final quantity="MassFraction", final unit="1");
+type Concentration = Real (final quantity="Concentration", final unit="mol/m3");
+type VolumeFraction = Real (final quantity="VolumeFraction", final unit="1");
+type MoleFraction = Real (final quantity="MoleFraction", final unit="1");
+type ChemicalPotential = Real (final quantity="ChemicalPotential", final unit= + "J/mol");
+type AbsoluteActivity = Real (final quantity="AbsoluteActivity", final unit="1" + );
+type PartialPressure = Real ( + final quantity="Pressure", + final unit="Pa", + displayUnit="bar", + min=0);
+type Fugacity = Real (final quantity="Fugacity", final unit="Pa");
+type StandardAbsoluteActivity = Real (final quantity="StandardAbsoluteActivity" + , final unit="1");
+type ActivityCoefficient = Real (final quantity="ActivityCoefficient", final + unit="1");
+type ActivityOfSolute = Real (final quantity="ActivityOfSolute", final unit="1" + );
+type ActivityCoefficientOfSolute = Real (final quantity= + "ActivityCoefficientOfSolute", final unit="1");
+type StandardAbsoluteActivityOfSolute = Real (final quantity= + "StandardAbsoluteActivityOfSolute", final unit="1");
+type ActivityOfSolvent = Real (final quantity="ActivityOfSolvent", final unit= + "1");
+type OsmoticCoefficientOfSolvent = Real (final quantity= + "OsmoticCoefficientOfSolvent", final unit="1");
+type StandardAbsoluteActivityOfSolvent = Real (final quantity= + "StandardAbsoluteActivityOfSolvent", final unit="1");
+type OsmoticPressure = Real ( + final quantity="Pressure", + final unit="Pa", + displayUnit="bar", + min=0);
+type StoichiometricNumber = Real (final quantity="StoichiometricNumber", final + unit="1");
+type Affinity = Real (final quantity="Affinity", final unit="J/mol");
+type MassOfMolecule = Real (final quantity="Mass", final unit="kg");
+type ElectricDipoleMomentOfMolecule = Real (final quantity= + "ElectricDipoleMomentOfMolecule", final unit="C.m");
+type ElectricPolarizabilityOfAMolecule = Real (final quantity= + "ElectricPolarizabilityOfAMolecule", final unit="C.m2/V");
+type MicrocanonicalPartitionFunction = Real (final quantity= + "MicrocanonicalPartitionFunction", final unit="1");
+type CanonicalPartitionFunction = Real (final quantity= + "CanonicalPartitionFunction", final unit="1");
+type GrandCanonicalPartitionFunction = Real (final quantity= + "GrandCanonicalPartitionFunction", final unit="1");
+type MolecularPartitionFunction = Real (final quantity= + "MolecularPartitionFunction", final unit="1");
+type StatisticalWeight = Real (final quantity="StatisticalWeight", final unit= + "1");
+type MeanFreePath = Length;
+type DiffusionCoefficient = Real (final quantity="DiffusionCoefficient", final + unit="m2/s");
+type ThermalDiffusionRatio = Real (final quantity="ThermalDiffusionRatio", + final unit="1");
+type ThermalDiffusionFactor = Real (final quantity="ThermalDiffusionFactor", + final unit="1");
+type ThermalDiffusionCoefficient = Real (final quantity= + "ThermalDiffusionCoefficient", final unit="m2/s");
+type ElementaryCharge = Real (final quantity="ElementaryCharge", final unit="C" + );
+type ChargeNumberOfIon = Real (final quantity="ChargeNumberOfIon", final unit= + "1");
+type FaradayConstant = Real (final quantity="FaradayConstant", final unit= + "C/mol");
+type IonicStrength = Real (final quantity="IonicStrength", final unit="mol/kg");
+type DegreeOfDissociation = Real (final quantity="DegreeOfDissociation", final + unit="1");
+type ElectrolyticConductivity = Real (final quantity="ElectrolyticConductivity" + , final unit="S/m");
+type MolarConductivity = Real (final quantity="MolarConductivity", final unit= + "S.m2/mol");
+type TransportNumberOfIonic = Real (final quantity="TransportNumberOfIonic", + final unit="1");
+type ProtonNumber = Real (final quantity="ProtonNumber", final unit="1");
+type NeutronNumber = Real (final quantity="NeutronNumber", final unit="1");
+type NucleonNumber = Real (final quantity="NucleonNumber", final unit="1");
+type AtomicMassConstant = Real (final quantity="Mass", final unit="kg");
+type MassOfElectron = Real (final quantity="Mass", final unit="kg");
+type MassOfProton = Real (final quantity="Mass", final unit="kg");
+type MassOfNeutron = Real (final quantity="Mass", final unit="kg");
+type HartreeEnergy = Real (final quantity="Energy", final unit="J");
+type MagneticMomentOfParticle = Real (final quantity="MagneticMomentOfParticle" + , final unit="A.m2");
+type BohrMagneton = MagneticMomentOfParticle;
+type NuclearMagneton = MagneticMomentOfParticle;
+type GyromagneticCoefficient = Real (final quantity="GyromagneticCoefficient", + final unit="A.m2/(J.s)");
+type GFactorOfAtom = Real (final quantity="GFactorOfAtom", final unit="1");
+type GFactorOfNucleus = Real (final quantity="GFactorOfNucleus", final unit="1" + );
+type LarmorAngularFrequency = Real (final quantity="AngularFrequency", final + unit="s-1");
+type NuclearPrecessionAngularFrequency = Real (final quantity= + "AngularFrequency", final unit="s-1");
+type CyclotronAngularFrequency = Real (final quantity="AngularFrequency", + final unit="s-1");
+type NuclearQuadrupoleMoment = Real (final quantity="NuclearQuadrupoleMoment", + final unit="m2");
+type NuclearRadius = Real (final quantity="Length", final unit="m");
+type ElectronRadius = Real (final quantity="Length", final unit="m");
+type ComptonWavelength = Real (final quantity="Length", final unit="m");
+type MassExcess = Real (final quantity="Mass", final unit="kg");
+type MassDefect = Real (final quantity="Mass", final unit="kg");
+type RelativeMassExcess = Real (final quantity="RelativeMassExcess", final unit + ="1");
+type RelativeMassDefect = Real (final quantity="RelativeMassDefect", final unit + ="1");
+type PackingFraction = Real (final quantity="PackingFraction", final unit="1");
+type BindingFraction = Real (final quantity="BindingFraction", final unit="1");
+type MeanLife = Real (final quantity="Time", final unit="s");
+type LevelWidth = Real (final quantity="LevelWidth", final unit="J");
+type Activity = Real (final quantity="Activity", final unit="Bq");
+type SpecificActivity = Real (final quantity="SpecificActivity", final unit= + "Bq/kg");
+type DecayConstant = Real (final quantity="DecayConstant", final unit="s-1");
+type HalfLife = Real (final quantity="Time", final unit="s");
+type AlphaDisintegrationEnergy = Real (final quantity="Energy", final unit="J");
+type MaximumBetaParticleEnergy = Real (final quantity="Energy", final unit="J");
+type BetaDisintegrationEnergy = Real (final quantity="Energy", final unit="J");
+type ReactionEnergy = Real (final quantity="Energy", final unit="J");
+type ResonanceEnergy = Real (final quantity="Energy", final unit="J");
+type CrossSection = Real (final quantity="Area", final unit="m2");
+type TotalCrossSection = Real (final quantity="Area", final unit="m2");
+type AngularCrossSection = Real (final quantity="AngularCrossSection", final + unit="m2/sr");
+type SpectralCrossSection = Real (final quantity="SpectralCrossSection", final + unit="m2/J");
+type SpectralAngularCrossSection = Real (final quantity= + "SpectralAngularCrossSection", final unit="m2/(sr.J)");
+type MacroscopicCrossSection = Real (final quantity="MacroscopicCrossSection", + final unit="m-1");
+type TotalMacroscopicCrossSection = Real (final quantity= + "TotalMacroscopicCrossSection", final unit="m-1");
+type ParticleFluence = Real (final quantity="ParticleFluence", final unit="m-2" + );
+type ParticleFluenceRate = Real (final quantity="ParticleFluenceRate", final + unit="s-1.m2");
+type EnergyFluence = Real (final quantity="EnergyFluence", final unit="J/m2");
+type EnergyFluenceRate = Real (final quantity="EnergyFluenceRate", final unit= + "W/m2");
+type CurrentDensityOfParticles = Real (final quantity= + "CurrentDensityOfParticles", final unit="m-2.s-1");
+type MassAttenuationCoefficient = Real (final quantity= + "MassAttenuationCoefficient", final unit="m2/kg");
+type MolarAttenuationCoefficient = Real (final quantity= + "MolarAttenuationCoefficient", final unit="m2/mol");
+type AtomicAttenuationCoefficient = Real (final quantity= + "AtomicAttenuationCoefficient", final unit="m2");
+type HalfThickness = Real (final quantity="Length", final unit="m");
+type TotalLinearStoppingPower = Real (final quantity="TotalLinearStoppingPower" + , final unit="J/m");
+type TotalAtomicStoppingPower = Real (final quantity="TotalAtomicStoppingPower" + , final unit="J.m2");
+type TotalMassStoppingPower = Real (final quantity="TotalMassStoppingPower", + final unit="J.m2/kg");
+type MeanLinearRange = Real (final quantity="Length", final unit="m");
+type MeanMassRange = Real (final quantity="MeanMassRange", final unit="kg/m2");
+type LinearIonization = Real (final quantity="LinearIonization", final unit= + "m-1");
+type TotalIonization = Real (final quantity="TotalIonization", final unit="1");
+type Mobility = Real (final quantity="Mobility", final unit="m2/V.s");
+type IonNumberDensity = Real (final quantity="IonNumberDensity", final unit= + "m-3");
+type RecombinationCoefficient = Real (final quantity="RecombinationCoefficient" + , final unit="m3/s");
+type NeutronNumberDensity = Real (final quantity="NeutronNumberDensity", final + unit="m-3");
+type NeutronSpeed = Real (final quantity="Velocity", final unit="m/s");
+type NeutronFluenceRate = Real (final quantity="NeutronFluenceRate", final unit + ="s-1.m-2");
+type TotalNeutronSourceDensity = Real (final quantity= + "TotalNeutronSourceDesity", final unit="s-1.m-3");
+type SlowingDownDensity = Real (final quantity="SlowingDownDensity", final unit + ="s-1.m-3");
+type ResonanceEscapeProbability = Real (final quantity= + "ResonanceEscapeProbability", final unit="1");
+type Lethargy = Real (final quantity="Lethargy", final unit="1");
+type SlowingDownArea = Real (final quantity="Area", final unit="m2");
+type DiffusionArea = Real (final quantity="Area", final unit="m2");
+type MigrationArea = Real (final quantity="Area", final unit="m2");
+type SlowingDownLength = Real (final quantity="SLength", final unit="m");
+type DiffusionLength = Length;
+type MigrationLength = Length;
+type NeutronYieldPerFission = Real (final quantity="NeutronYieldPerFission", + final unit="1");
+type NeutronYieldPerAbsorption = Real (final quantity= + "NeutronYieldPerAbsorption", final unit="1");
+type FastFissionFactor = Real (final quantity="FastFissionFactor", final unit= + "1");
+type ThermalUtilizationFactor = Real (final quantity="ThermalUtilizationFactor" + , final unit="1");
+type NonLeakageProbability = Real (final quantity="NonLeakageProbability", + final unit="1");
+type Reactivity = Real (final quantity="Reactivity", final unit="1");
+type ReactorTimeConstant = Real (final quantity="Time", final unit="s");
+type EnergyImparted = Real (final quantity="Energy", final unit="J");
+type MeanEnergyImparted = Real (final quantity="Energy", final unit="J");
+type SpecificEnergyImparted = Real (final quantity="SpecificEnergy", final unit + ="Gy");
+type AbsorbedDose = Real (final quantity="AbsorbedDose", final unit="Gy");
+type DoseEquivalent = Real (final quantity="DoseEquivalent", final unit="Sv");
+type AbsorbedDoseRate = Real (final quantity="AbsorbedDoseRate", final unit= + "Gy/s");
+type LinearEnergyTransfer = Real (final quantity="LinearEnergyTransfer", final + unit="J/m");
+type Kerma = Real (final quantity="Kerma", final unit="Gy");
+type KermaRate = Real (final quantity="KermaRate", final unit="Gy/s");
+type MassEnergyTransferCoefficient = Real (final quantity= + "MassEnergyTransferCoefficient", final unit="m2/kg");
+type Exposure = Real (final quantity="Exposure", final unit="C/kg");
+type ExposureRate = Real (final quantity="ExposureRate", final unit="C/(kg.s)");
+type ReynoldsNumber = Real (final quantity="ReynoldsNumber", final unit="1");
+type EulerNumber = Real (final quantity="EulerNumber", final unit="1");
+type FroudeNumber = Real (final quantity="FroudeNumber", final unit="1");
+type GrashofNumber = Real (final quantity="GrashofNumber", final unit="1");
+type WeberNumber = Real (final quantity="WeberNumber", final unit="1");
+type MachNumber = Real (final quantity="MachNumber", final unit="1");
+type KnudsenNumber = Real (final quantity="KnudsenNumber", final unit="1");
+type StrouhalNumber = Real (final quantity="StrouhalNumber", final unit="1");
+type FourierNumber = Real (final quantity="FourierNumber", final unit="1");
+type PecletNumber = Real (final quantity="PecletNumber", final unit="1");
+type RayleighNumber = Real (final quantity="RayleighNumber", final unit="1");
+type NusseltNumber = Real (final quantity="NusseltNumber", final unit="1");
+type BiotNumber = NusseltNumber;
+type StantonNumber = Real (final quantity="StantonNumber", final unit="1");
+type FourierNumberOfMassTransfer = Real (final quantity= + "FourierNumberOfMassTransfer", final unit="1");
+type PecletNumberOfMassTransfer = Real (final quantity= + "PecletNumberOfMassTransfer", final unit="1");
+type GrashofNumberOfMassTransfer = Real (final quantity= + "GrashofNumberOfMassTransfer", final unit="1");
+type NusseltNumberOfMassTransfer = Real (final quantity= + "NusseltNumberOfMassTransfer", final unit="1");
+type StantonNumberOfMassTransfer = Real (final quantity= + "StantonNumberOfMassTransfer", final unit="1");
+type PrandtlNumber = Real (final quantity="PrandtlNumber", final unit="1");
+type SchmidtNumber = Real (final quantity="SchmidtNumber", final unit="1");
+type LewisNumber = Real (final quantity="LewisNumber", final unit="1");
+type MagneticReynoldsNumber = Real (final quantity="MagneticReynoldsNumber", + final unit="1");
+type AlfvenNumber = Real (final quantity="AlfvenNumber", final unit="1");
+type HartmannNumber = Real (final quantity="HartmannNumber", final unit="1");
+type CowlingNumber = Real (final quantity="CowlingNumber", final unit="1");
+type BraggAngle = Angle;
+type OrderOfReflexion = Real (final quantity="OrderOfReflexion", final unit="1" + );
+type ShortRangeOrderParameter = Real (final quantity="RangeOrderParameter", + final unit="1");
+type LongRangeOrderParameter = Real (final quantity="RangeOrderParameter", + final unit="1");
+type DebyeWallerFactor = Real (final quantity="DebyeWallerFactor", final unit= + "1");
+type CircularWavenumber = Real (final quantity="CircularWavenumber", final unit + ="m-1");
+type FermiCircularWavenumber = Real (final quantity="FermiCircularWavenumber", + final unit="m-1");
+type DebyeCircularWavenumber = Real (final quantity="DebyeCircularWavenumber", + final unit="m-1");
+type DebyeCircularFrequency = Real (final quantity="AngularFrequency", final + unit="s-1");
+type DebyeTemperature = ThermodynamicTemperature;
+type SpectralConcentration = Real (final quantity="SpectralConcentration", + final unit="s/m3");
+type GrueneisenParameter = Real (final quantity="GrueneisenParameter", final + unit="1");
+type MadelungConstant = Real (final quantity="MadelungConstant", final unit="1" + );
+type DensityOfStates = Real (final quantity="DensityOfStates", final unit= + "J-1/m-3");
+type ResidualResistivity = Real (final quantity="ResidualResistivity", final + unit="Ohm.m");
+type LorenzCoefficient = Real (final quantity="LorenzCoefficient", final unit= + "V2/K2");
+type HallCoefficient = Real (final quantity="HallCoefficient", final unit= + "m3/C");
+type ThermoelectromotiveForce = Real (final quantity="ThermoelectromotiveForce" + , final unit="V");
+type SeebeckCoefficient = Real (final quantity="SeebeckCoefficient", final unit + ="V/K");
+type PeltierCoefficient = Real (final quantity="PeltierCoefficient", final unit + ="V");
+type ThomsonCoefficient = Real (final quantity="ThomsonCoefficient", final unit + ="V/K");
+type RichardsonConstant = Real (final quantity="RichardsonConstant", final unit + ="A/(m2.K2)");
+type FermiEnergy = Real (final quantity="Energy", final unit="eV");
+type GapEnergy = Real (final quantity="Energy", final unit="eV");
+type DonorIonizationEnergy = Real (final quantity="Energy", final unit="eV");
+type AcceptorIonizationEnergy = Real (final quantity="Energy", final unit="eV");
+type FermiTemperature = ThermodynamicTemperature;
+type ElectronNumberDensity = Real (final quantity="ElectronNumberDensity", + final unit="m-3");
+type HoleNumberDensity = Real (final quantity="HoleNumberDensity", final unit= + "m-3");
+type IntrinsicNumberDensity = Real (final quantity="IntrinsicNumberDensity", + final unit="m-3");
+type DonorNumberDensity = Real (final quantity="DonorNumberDensity", final unit + ="m-3");
+type AcceptorNumberDensity = Real (final quantity="AcceptorNumberDensity", + final unit="m-3");
+type EffectiveMass = Mass;
+type MobilityRatio = Real (final quantity="MobilityRatio", final unit="1");
+type RelaxationTime = Time;
+type CarrierLifeTime = Time;
+type ExchangeIntegral = Real (final quantity="Energy", final unit="eV");
+type CurieTemperature = ThermodynamicTemperature;
+type NeelTemperature = ThermodynamicTemperature;
+type LondonPenetrationDepth = Length;
+type CoherenceLength = Length;
+type LandauGinzburgParameter = Real (final quantity="LandauGinzburgParameter", + final unit="1");
+type FluxiodQuantum = Real (final quantity="FluxiodQuantum", final unit="Wb");
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
This package provides conversion functions from the non SI Units +defined in package Modelica.SIunits.Conversions.NonSIunits to the +corresponding SI Units defined in package Modelica.SIunits and vice +versa. It is recommended to use these functions in the following +way:
+ ++ import SI = Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + ... + parameter SI.Temperature T = from_degC(25); // convert 25 degree Celsius to Kelvin + parameter SI.Angle phi = from_deg(180); // convert 180 degree to radian + parameter SI.AngularVelocity w = from_rpm(3600); // convert 3600 revolutions per minutes + // to radian per seconds ++ +
The following conversion functions are provided. Note, that all +of them have one Real input and one Real output argument:
+ +Function | +Description | +
---|---|
to_degC +from_degC |
+Convert from Kelvin to degree Celsius +Convert from degree Celsius to Kelvin |
+
to_degF +from_degF |
+Convert from Kelvin to degree Fahrenheit +Convert from degree Fahrenheit to Kelvin |
+
to_degRk +from_degRk |
+Convert from Kelvin to degree Rankine +Convert from degree Rankine to Kelvin |
+
to_deg +from_deg |
+Convert from radian to degree +Convert from degree to radian |
+
to_rpm +from_rpm |
+Convert from radian per second to revolutions per minute +Convert from revolutions per minute to radian per second |
+
to_kmh +from_kmh |
+Convert from metre per second to kilometre per hour +Convert from kilometre per hour to metre per second |
+
to_day +from_day |
+Convert from second to day +Convert from day to second |
+
to_hour +from_hour |
+Convert from second to hour +Convert from hour to second |
+
to_minute +from_minute |
+Convert from second to minute +Convert from minute to second |
+
to_litre +from_litre |
+Convert from cubic metre to litre +Convert from litre to cubic metre |
+
to_kWh +from_kWh |
+Convert from Joule to kilo Watt hour +Convert from kilo Watt hour to Joule |
+
to_bar +from_bar |
+Convert from Pascal to bar +Convert from bar to Pascal |
+
to_gps +from_gps |
+Convert from kilogram per second to gram per second +Convert from gram per second to kilogram per second |
+
There is the additional partial function ConversionIcon +in this package. It contains just the base icon for all the conversion +functions.
+ ++
+
+
+function to_degC "Convert from Kelvin to °Celsius" + extends ConversionIcon; + input Temperature Kelvin "Kelvin value"; + output NonSIunits.Temperature_degC Celsius "Celsius value"; +algorithm + Celsius := Kelvin + Modelica.Constants.T_zero; +end to_degC; ++
+
+function from_degC "Convert from °Celsius to Kelvin" + extends ConversionIcon; + input NonSIunits.Temperature_degC Celsius "Celsius value"; + output Temperature Kelvin "Kelvin value"; +algorithm + Kelvin := Celsius - Modelica.Constants.T_zero; +end from_degC; ++
+
+function to_degF "Convert from Kelvin to °Fahrenheit" + extends ConversionIcon; + input Temperature Kelvin "Kelvin value"; + output NonSIunits.Temperature_degF Fahrenheit "Fahrenheit value"; +algorithm + Fahrenheit := (Kelvin + Modelica.Constants.T_zero)*(9/5) + 32; +end to_degF; ++
+
+function from_degF "Convert from °Fahrenheit to Kelvin" + extends ConversionIcon; + input NonSIunits.Temperature_degF Fahrenheit "Fahrenheit value"; + output Temperature Kelvin "Kelvin value"; +algorithm + Kelvin := (Fahrenheit - 32)*(5/9) - Modelica.Constants.T_zero; +end from_degF; ++
+
+function to_degRk "Convert from Kelvin to °Rankine" + extends ConversionIcon; + input Temperature Kelvin "Kelvin value"; + output NonSIunits.Temperature_degRk Rankine "Rankine value"; +algorithm + Rankine := (9/5)*Kelvin; +end to_degRk; ++
+
+function from_degRk "Convert from °Rankine to Kelvin" + extends ConversionIcon; + input NonSIunits.Temperature_degRk Rankine "Rankine value"; + output Temperature Kelvin "Kelvin value"; +algorithm + Kelvin := (5/9)*Rankine; +end from_degRk; ++
+
+function to_deg "Convert from radian to degree" + extends ConversionIcon; + input Angle radian "radian value"; + output NonSIunits.Angle_deg degree "degree value"; +algorithm + degree := (180.0/Modelica.Constants.pi)*radian; +end to_deg; ++
+
+function from_deg "Convert from degree to radian" + extends ConversionIcon; + input NonSIunits.Angle_deg degree "degree value"; + output Angle radian "radian value"; +algorithm + radian := (Modelica.Constants.pi/180.0)*degree; +end from_deg; ++
+
+function to_rpm + "Convert from radian per second to revolutions per minute" + extends ConversionIcon; + input AngularVelocity rs "radian per second value"; + output NonSIunits.AngularVelocity_rpm rpm "revolutions per minute value"; +algorithm + rpm := (30/Modelica.Constants.pi)*rs; +end to_rpm; ++
+
+function from_rpm + "Convert from revolutions per minute to radian per second" + extends ConversionIcon; + input NonSIunits.AngularVelocity_rpm rpm "revolutions per minute value"; + output AngularVelocity rs "radian per second value"; +algorithm + rs := (Modelica.Constants.pi/30)*rpm; +end from_rpm; ++
+
+function to_kmh "Convert from metre per second to kilometre per hour" + + extends ConversionIcon; + input Velocity ms "metre per second value"; + output NonSIunits.Velocity_kmh kmh "kilometre per hour value"; +algorithm + kmh := 3.6*ms; +end to_kmh; ++
+
+function from_kmh + "Convert from kilometre per hour to metre per second" + extends ConversionIcon; + input NonSIunits.Velocity_kmh kmh "kilometre per hour value"; + output Velocity ms "metre per second value"; +algorithm + ms := kmh/3.6; +end from_kmh; ++
+
+function to_day "Convert from second to day" + extends ConversionIcon; + input Time s "second value"; + output NonSIunits.Time_day day "day value"; +algorithm + day := s/86400; +end to_day; ++
+
+function from_day "Convert from day to second" + extends ConversionIcon; + input NonSIunits.Time_day day "day value"; + output Time s "second value"; +algorithm + s := 86400*day; +end from_day; ++
+
+function to_hour "Convert from second to hour" + extends ConversionIcon; + input Time s "second value"; + output NonSIunits.Time_hour hour "hour value"; +algorithm + hour := s/3600; +end to_hour; ++
+
+function from_hour "Convert from hour to second" + extends ConversionIcon; + input NonSIunits.Time_hour hour "hour value"; + output Time s "second value"; +algorithm + s := 3600*hour; +end from_hour; ++
+
+function to_minute "Convert from second to minute" + extends ConversionIcon; + input Time s "second value"; + output NonSIunits.Time_minute minute "minute value"; +algorithm + minute := s/60; +end to_minute; ++
+
+function from_minute "Convert from minute to second" + extends ConversionIcon; + input NonSIunits.Time_minute minute "minute value"; + output Time s "second value"; +algorithm + s := 60*minute; +end from_minute; ++
+
+function to_litre "Convert from cubic metre to litre" + extends ConversionIcon; + input Volume m3 "cubic metre value"; + output NonSIunits.Volume_litre litre "litre value"; +algorithm + litre := 1000*m3; +end to_litre; ++
+
+function from_litre "Convert from litre to cubic metre" + extends ConversionIcon; + input NonSIunits.Volume_litre litre "litre value"; + output Volume m3 "cubic metre value"; +algorithm + m3 := litre/1000; +end from_litre; ++
+
+function to_kWh "Convert from Joule to kilo Watt hour" + extends ConversionIcon; + input Energy J "Joule value"; + output NonSIunits.Energy_kWh kWh "kWh value"; +algorithm + kWh := J/3.6e6; +end to_kWh; ++
+
+function from_kWh "Convert from kilo Watt hour to Joule" + extends ConversionIcon; + input NonSIunits.Energy_kWh kWh "kWh value"; + output Energy J "Joule value"; +algorithm + J := 3.6e6*kWh; +end from_kWh; ++
+
+function to_bar "Convert from Pascal to bar" + extends ConversionIcon; + input Pressure Pa "Pascal value"; + output NonSIunits.Pressure_bar bar "bar value"; +algorithm + bar := Pa/1e5; +end to_bar; ++
+
+function from_bar "Convert from bar to Pascal" + extends ConversionIcon; + input NonSIunits.Pressure_bar bar "bar value"; + output Pressure Pa "Pascal value"; +algorithm + Pa := 1e5*bar; +end from_bar; ++
+
+function to_gps "Convert from kilogram per second to gram per second" + + extends ConversionIcon; + input MassFlowRate kgps "kg/s value"; + output NonSIunits.MassFlowRate_gps gps "g/s value"; +algorithm + gps := 1000*kgps; +end to_gps; ++
+
+function from_gps + "Convert from gram per second to kilogram per second" + extends ConversionIcon; + input NonSIunits.MassFlowRate_gps gps "g/s value"; + output MassFlowRate kgps "kg/s value"; +algorithm + kgps := gps/1000; +end from_gps; ++
+
+partial function ConversionIcon "Base icon for conversion functions" +end ConversionIcon; ++
+
+
+
+This package provides predefined types, such as Angle_deg (angle in +degree), AngularVelocity_rpm (angular velocity in revolutions per +minute) or Temperature_degF (temperature in degree Fahrenheit), +which are in common use but are not part of the international standard on +units according to ISO 31-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".
+ +If possible, the types in this package should not be used. Use instead +types of package Modelica.SIunits. For more information on units, see also +the book of Francois Cardarelli Scientific Unit Conversion - A +Practical Guide to Metrication (Springer 1997).
+ +Some units, such as Temperature_degC/Temp_C are both defined in +Modelica.SIunits and in Modelica.Conversions.NonSIunits. The reason is that these +definitions have been placed erroneously in Modelica.SIunits although they +are not SIunits. For backward compatibility, these type definitions are +still kept in Modelica.SIunits.
+ ++
+
+type Temperature_degF = Real (final quantity="ThermodynamicTemperature", final + unit="degF");
+type Temperature_degRk = Real (final quantity="ThermodynamicTemperature", + final unit="degRk");
+type Angle_deg = Real (final quantity="Angle", final unit="deg");
+type AngularVelocity_rpm = Real (final quantity="AngularVelocity", final unit= + "rev/min");
+type Velocity_kmh = Real (final quantity="Velocity", final unit="km/h");
+type Time_day = Real (final quantity="Time", final unit="d");
+type Time_hour = Real (final quantity="Time", final unit="h");
+type Time_minute = Real (final quantity="Time", final unit="min");
+type Volume_litre = Real (final quantity="Volume", final unit="l");
+type Energy_kWh = Real (final quantity="Energy", final unit="kWh");
+type Pressure_bar = Real (final quantity="Pressure", final unit="bar");
+type MassFlowRate_gps = Real (final quantity="MassFlowRate", final unit="g/s");
+
+
+
+
+ + + + + + + + + + + + + + + + +
+
+This package contains components to model 1-dimensional heat transfer +with lumped elements. This allows especially to model heat transfer in +machines provided the parameters of the lumped elements, such as +the heat capacity of a part, can be determined by measurements +(due to the complex geometries and many materials used in machines, +calculating the lumped element parameters from some basic analytic +formulas is usually not possible). +
+ ++Example models how to use this library are given in subpackage Examples. +For a first simple example, see Examples.TwoMasses where two masses +with different initial temperatures are getting in contact to each +other and arriving after some time at a common temperature. +A more realistic example is provided in Examples.Drive where the +heating of an electrical motor is modelled, see the following screen shot +of this example: +
+ + + ++The filled and non-filled red squares at the left and +right side of a component represent thermal ports (connector HeatPort). +Drawing a line between such squares means that they are thermally connected. +The variables of a HeatPort connector are the temperature T at the port +and the heat flow rate Q_dot flowing into the component (if Q_dot is positive, +the heat flows into the element, otherwise it flows out of the element): +
+ +Modelica.SIunits.Temperature T "absolute temperature at port in Kelvin"; + Modelica.SIunits.HeatFlowRate Q_dot "flow rate at the port in Watt"; ++ +
+Note, that all temperatures of this package, including initial conditions, +are given in Kelvin. For convenience, in subpackages HeatTransfer.Celsius, + HeatTransfer.Fahrenheit and HeatTransfer.Rankine components are provided such that source and +sensor information is available in degree Celsius, degree Fahrenheit, or degree Rankine, +respectively. Additionally, in package SIunits.Conversions conversion +functions between the units Kelvin and Celsius, Fahrenheit, Rankine are +provided. These functions may be used in the following way: +
+ +import SI=Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + ... + parameter SI.Temperature T = from_degC(25); // convert 25 degree Celsius to Kelvin ++ +
+This package contains the following model components: +
+ +Examples (subpackage) Examples of library usage. + Interfaces (subpackage) Interface definitions. + + HeatCapacitor Lumped thermal element storing heat. + ThermalConductor Lumped thermal element transporting heat without + storing it. + Convection Lumped thermal element for heat convection. + BodyRadiation Lumped thermal element for radiation heat transfer + between two bodies + + FixedTemperature Fixed temperature boundary condition. + PrescribedTemperature Variable temperature boundary condition + FixedHeatFlow Fixed heat flow boundary condition. + PrescribedHeatFlow Variable heat flow boundary condition. + + TemperatureSensor Absolute temperature sensor. + RelTemperatureSensor Relative temperature sensor. + HeatFlowSensor Sensor to determine the heat flow rate + between two ports. + + Celsius (subpackage) Elements with Celsius interface. + Fahrenheit (subpackage) Elements with Fahrenheit interface. + Rankine (subpackage) Elements with Rankine interface. ++ +
+There are several other components available, such as AxialConduction (discretized PDE in +axial direction), which have been temporarily removed from this library. The reason is that +these components reference material properties, such as thermal conductivity, and currently +the Modelica design group is discussing a general scheme to describe material properties. +
+ +
+For technical details in the design of this library, see the following reference:
+Michael Tiller (2001):
+Introduction to Physical Modeling with Modelica.
+Kluwer Academic Publishers Boston.
+
Release Notes:
+
+Acknowledgements:
+Several helpful remarks from the following persons are acknowledged:
+John Batteh, Ford Motors, Dearborn, U.S.A;
+Anton Haumer, Technical Consulting & Electrical Engineering, Austria;
+Ludwig Marvan, VA TECH ELIN EBG Elektronik GmbH, Wien, Austria;
+Hans Olsson, Dynasim AB, Sweden;
+Hubertus Tummescheit, Lund Institute of Technology, Lund, Sweden.
+
Copyright © 2001-2002, Modelica Association, Michael Tiller and DLR.
+ ++The Modelica package is free software; it can be redistributed and/or modified +under the terms of the Modelica license, see the license conditions +and the accompanying disclaimer in the documentation of package +Modelica in file "Modelica/package.mo". +
++
+
+ +
+This is a generic model for the heat capacity of a material. +No specific geometry is assumed beyond a total volume with +uniform temperature for the entire volume. +Furthermore, it is assumed that the heat capacity +is constant (indepedent of temperature). +
+ ++The temperature T [Kelvin] of this component is a state. +A default of T = 25 degree Celsius (= SIunits.Conversions.from_degC(25)) +is used as start value for initialization. +This usually means that at start of integration the temperature of this +component is 25 degrees Celsius. You may, of course, define a different +temperature as start value for initialization. Alternatively, it is possible +to set parameter steadyStateStart to true. In this case +the additional equation 'der(T) = 0' is used during +initialization, i.e., the temperature T is computed in such a way that +the component starts in steady state. This is useful in cases, +where one would like to start simulation in a suitable operating +point without being forced to integrate for a long time to arrive +at this point. +
+ ++Note, that parameter steadyStateStart is not available in +the parameter menue of the simulation window, because its value +is utilized during translation to generate quite different +equations depending on its setting. Therefore, the value of this +parameter can only be changed before translating the model. +
+ ++This component may be used for complicated geometries where +the heat capacity C is determined my measurements. If the component +consists mainly of one type of material, the mass m of the +component may be measured or calculated and multiplied with the +specific heat capacity cp of the component material to +compute C: +
+ ++ C = cp*m. + + Typical values for cp at 20 degC in J/(kg.K): + + aluminium 896 + concrete 840 + copper 383 + iron 452 + silver 235 + steel 420 ... 500 (V2A) + wood 2500 ++ +
++
+
Name | Default | Description |
---|---|---|
C | Heat capacity of part (= cp*m) [J/K] | |
steadyStateStart | false | true, if component shall start in steady state |
+model HeatCapacitor "Lumped thermal element storing heat" + parameter SI.HeatCapacity C "Heat capacity of part (= cp*m)"; + parameter Boolean steadyStateStart=false + "true, if component shall start in steady state"; + SI.Temperature T(start=from_degC(25)) "Temperature of part"; + Interfaces.HeatPort_a port; +equation + T = port.T; + C*der(T) = port.Q_dot; + +initial equation + if steadyStateStart then + der(T) = 0; + end if; +end HeatCapacitor; ++
+ +
+This is a model for transport of heat without storing it. +It may be used for complicated geometries where +the thermal conductance G (= inverse of thermal resistance) +is determined by measurements and is assumed to be constant +over the range of operations. If the component consists mainly of +one type of material and a regular geometry, it may be calculated, +e.g., with one of the following equations: +
+ ++ Conductance for a box geometry under the assumption + that heat flows along the box length:
++ G = k*A/L + + k: Thermal conductivity (material constant) + A: Area of box + L: Length of box ++
+ Conductance for a cylindrical geometry under the assumption + that heat flows from the inside to the outside radius + of the cylinder:
++ G = 2*pi*k*L/log(r_out/r_in) + + pi : Modelica.Constants.pi + k : Thermal conductivity (material constant) + L : Length of cylinder + log : Modelica.Math.log; + r_out: Outer radius of cylinder + r_in : Inner radius of cylinder ++
+ Typical values for k at 20 degC in W/(m.K): + + aluminium 220 + concrete 1 + copper 384 + iron 74 + silver 407 + steel 45 .. 15 (V2A) + wood 0.1 ... 0.2 ++ +
++
+
Name | Default | Description |
---|---|---|
G | Constant thermal conductance of material [W/K] |
+model ThermalConductor + "Lumped thermal element transporting heat without storing it" + extends Interfaces.Element1D; + parameter SI.ThermalConductance G "Constant thermal conductance of material"; + +equation + Q_dot = G*dT; +end ThermalConductor; ++
+ +
+This is a model of linear heat convection, e.g., the heat transfer +between a plate and the surrounding air. It may be used for complicated +solid geometries and fluid flow over the solid by determining the +convective thermal conductance Gc by measurements. The basic constitutive +equation for convection is +
+ ++ Q_dot = Gc*(solid.T - fluid.T); + + Q_dot: Heat flow rate from connector 'solid' (e.g. a plate) + to connector 'fluid' (e.g. the surrounding air) ++ +
+Gc = G.signal[1] is an input signal to the component, since Gc is +nearly never constant in practice. For example, Gc may be a function +of the speed of a cooling fan. For simple situations, +Gc may be calculated according to +
+ ++ Gc = A*h + + A: Convection area (e.g. perimeter*length of a box) + h: Heat transfer coefficient ++ +
+where the heat transfer coefficient h is calculated +from properties of the fluid flowing over the solid. Examples: +
+ ++Machines cooled by air (empirical, very rough approximation according +to R. Fischer: Elektrische Maschinen, 10th edition, Hanser-Verlag 1999, +p. 378): +
+ ++ h = 7.8*v^0.78 [W/(m2.K)] (forced convection) + = 12 [W/(m2.K)] (free convection) + + where + v: Air velocity in [m/s] ++ + +
Laminar flow with constant velocity of a fluid along a +flat plate where the heat flow rate from the plate +to the fluid (= solid.Q_dot) is kept constant +(according to J.P.Holman: Heat Transfer, 8th edition, +McGraw-Hill, 1997, p.270): +
+ ++ h = Nu*k/x; + Nu = 0.453*Re^(1/2)*Pr^(1/3); + + where + h : Heat transfer coefficient + Nu : = h*x/k (Nusselt number) + Re : = v*x*rho/mue (Reynolds number) + Pr : = cp*mue/k (Prandtl number) + v : Absolute velocity of fluid + x : distance from leading edge of flat plate + rho: density of fluid (material constant + mue: dynamic viscosity of fluid (material constant) + cp : specific heat capacity of fluid (material constant) + k : thermal conductivity of fluid (material constant) + + and the equation for h holds, provided + Re < 5e5 and 0.6 < Pr < 50 ++ +
++
+model Convection "Lumped thermal element for heat convection" + SI.ThermalConductance Gc "Convective thermal conductance of element"; + SI.HeatFlowRate Q_dot "Heat flow rate from solid -> fluid"; + SI.Temperature dT "= solid.T - fluid.T"; + Modelica.Blocks.Interfaces.InPort G(final n=1, redeclare type SignalType + = SI.ThermalConductance) + "Signal representing the convective thermal conductance in [W/K]"; + Interfaces.HeatPort_a solid; + Interfaces.HeatPort_b fluid; +equation + Gc = G.signal[1]; + dT = solid.T - fluid.T; + solid.Q_dot = Q_dot; + fluid.Q_dot = -Q_dot; + Q_dot = Gc*dT; +end Convection; ++
+ +
+This is a model describing the thermal radiation, i.e., electromagnetic +radiation emitted between two bodies as a result of their temperatures. +The following constitutive equation is used: +
+ ++ Q_dot = Gr*sigma*(port_a.T^4 - port_b.T^4); ++ +
+where Gr is the radiation conductance and sigma is the Stefan-Boltzmann +constant (= Modelica.Constants.sigma). Gr may be determined by +measurements and is assumed to be constant over the range of operations. +
+ ++For simple cases, Gr may be analytically computed. The analytical +equations use epsilon, the emission value of a body which is in the +range 0..1. Epsilon=1, if the body absorbs all radiation (= black body). +Epsilon=0, if the body reflects all radiation and does not absorb any. +
+ ++ Typical values for epsilon: + + aluminium, polished 0.04 + copper, polished 0.04 + gold, polished 0.02 + paper 0.09 + rubber 0.95 + silver, polished 0.02 + wood 0.85..0.9 ++ +
Analytical Equations for Gr
+ ++Small convex object in large enclosure +(e.g., a hot machine in a room): +
+ ++ Gr = e*A + + where + e: Emission value of object (0..1) + A: Surface area of object where radiation + heat transfer takes place ++ + +
Two parallel plates:
+ ++ Gr = A/(1/e1 + 1/e2 - 1) + + where + e1: Emission value of plate1 (0..1) + e2: Emission value of plate2 (0..1) + A : Area of plate1 (= area of plate2) ++ + + +
Two long cylinders in each other, where radiation takes +place from the inner to the outer cylinder): +
+ ++ Gr = 2*pi*r1*L/(1/e1 + (1/e2 - 1)*(r1/r2)) + + where + pi: = Modelica.Constants.pi + r1: Radius of inner cylinder + r2: Radius of outer cylinder + L : Length of the two cylinders + e1: Emission value of inner cylinder (0..1) + e2: Emission value of outer cylinder (0..1) ++ +
++
+
Name | Default | Description |
---|---|---|
Gr | Net radiation conductance between two surfaces (see docu) [m2] |
+model BodyRadiation + "Lumped thermal element for radiation heat transfer" + extends Interfaces.Element1D; + parameter Real Gr(unit="m2") + "Net radiation conductance between two surfaces (see docu)"; +equation + Q_dot = Gr*Modelica.Constants.sigma*(port_a.T^4 - port_b.T^4); +end BodyRadiation; ++
+ +
+This model defines a fixed temperature T at its port in Kelvin, +i.e., it defines a fixed temperature as a boundary condition. +
+++
+
Name | Default | Description |
---|---|---|
T | Fixed temperature at port [K] |
+model FixedTemperature + "Fixed temperature boundary condition in Kelvin" + + parameter SI.Temperature T "Fixed temperature at port"; + Interfaces.HeatPort_b port; +equation + port.T = T; +end FixedTemperature; ++
+ +
+This model represents a variable temperature boundary condition. +The temperature in [K] is given as input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+++
+model PrescribedTemperature + "Variable temperature boundary condition in Kelvin" + + Interfaces.HeatPort_b port; + Modelica.Blocks.Interfaces.InPort T(final n=1, redeclare type SignalType + = SI.Temperature); +equation + port.T = T.signal[1]; +end PrescribedTemperature; ++
+ +
+This model allows a specified amount of heat flow rate to be "injected" +into a thermal system at a given port. The constant amount of heat +flow rate Q_dot is given as a parameter. The heat flows into the +component to which the component FixedHeatFlow is connected, +if parameter Q_dot is positive. +
+++
+
Name | Default | Description |
---|---|---|
Q_dot | Fixed heat flow rate at port [W] |
+model FixedHeatFlow "Fixed heat flow boundary condition" + parameter SI.HeatFlowRate Q_dot "Fixed heat flow rate at port"; + Interfaces.HeatPort_b port; +equation + port.Q_dot = -Q_dot; +end FixedHeatFlow; ++
+ +
+This model allows a specified amount of heat flow rate to be "injected" +into a thermal system at a given port. The amount of heat +is given by the input signal into the model. The heat flows into the +component to which the component PrescribedHeatFlow is connected, +if the input signal is positive. +
+++
+model PrescribedHeatFlow "Prescribed heat flow boundary condition" + Modelica.Blocks.Interfaces.InPort Q_dot(final n=1); + Interfaces.HeatPort_b port; +equation + port.Q_dot = -Q_dot.signal[1]; +end PrescribedHeatFlow; ++
+ +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Kelvin as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+++
+model TemperatureSensor "Absolute temperature sensor in Kelvin" + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = SI.Temperature); + Interfaces.HeatPort_a port; +equation + T.signal[1] = port.T; + port.Q_dot = 0; + +end TemperatureSensor; ++
+ +
+The relative temperature "port_a.T - port_b.T" is determined between +the two ports of this component and is provided as output signal in Kelvin. +
+++
+model RelTemperatureSensor "Relative Temperature sensor" + extends Modelica.Icons.TranslationalSensor; + Interfaces.HeatPort_a port_a; + Interfaces.HeatPort_b port_b; + Modelica.Blocks.Interfaces.OutPort T_rel(redeclare type SignalType = SI.Temperature); +equation + T_rel.signal[1] = port_a.T - port_b.T; + 0 = port_a.Q_dot; + 0 = port_b.Q_dot; +end RelTemperatureSensor; ++
+ +
+This model is capable of monitoring the heat flow rate flowing through +this component. The sensed value of heat flow rate is the amount that +passes through this sensor while keeping the temperature drop across the +sensor zero. This is an ideal model so it does not absorb any energy +and it has no direct effect on the thermal response of a system it is included in. +The output signal is positive, if the heat flows from port_a +to port_b. +
+++
+model HeatFlowSensor "Heat flow rate sensor" + extends Modelica.Icons.RotationalSensor; + output SI.HeatFlowRate Q_dot "Heat flow rate from port_a to port_b"; + Modelica.Blocks.Interfaces.OutPort heat(redeclare type SignalType = SI.HeatFlowRate) "Heat flow from port_a -> port_b"; + Interfaces.HeatPort_a port_a; + Interfaces.HeatPort_b port_b; +equation + port_a.T = port_b.T; + port_a.Q_dot + port_b.Q_dot = 0; + Q_dot = port_a.Q_dot; + heat.signal[1] = Q_dot; +end HeatFlowSensor; ++
+
+
+The components of this package are provided for the convenience of +people working mostly with Celsius units, since all models +in package HeatTransfer are based on Kelvin units. +
+ ++Note, that in package SIunits.Conversions, functions are provided +to convert between the units Kelvin, degree Celsius, degree Fahrenheit, +and degree Rankine. These functions allow, e.g., a direct conversion +of units at all places where Kelvin is required as parameter. +Example: +
+ ++ import SIunits.Conversions.*; + Modelica.Thermal.HeatTransfer.HeatCapacitor C(T0 = from_degC(20)); ++ +
+
+
+ +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Celsius as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+++
+model TemperatureSensor "Absolute temperature sensor in °Celsius" + + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = NonSI.Temperature_degC); + Interfaces.HeatPort_a port; +equation + T.signal[1] = to_degC(port.T); + port.Q_dot = 0; +end TemperatureSensor; ++
+ +
+This model defines a fixed temperature T at its port in [degC], +i.e., it defines a fixed temperature as a boundary condition. +
+++
+
Name | Default | Description |
---|---|---|
T | Fixed Temperature at the port [degC] |
+model FixedTemperature + "Fixed temperature boundary condition in degree Celsius" + parameter NonSI.Temperature_degC T "Fixed Temperature at the port"; + Interfaces.HeatPort_b port; +equation + port.T = from_degC(T); +end FixedTemperature; ++
+ +
+This component converts all input signals from Celsius to Kelvin +and provides them as output signals. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+model ToKelvin "Conversion block from °Celsius to Kelvin" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + Modelica.Blocks.Interfaces.InPort Celsius(final n=n); + Modelica.Blocks.Interfaces.OutPort Kelvin(final n=n); +equation + Kelvin.signal = from_degC(Celsius.signal); +end ToKelvin; ++
+ +
+This component converts all input signals from Kelvin to Celsius +and provides them as output signals. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+model FromKelvin "Conversion from Kelvin to °Celsius" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + Modelica.Blocks.Interfaces.InPort Kelvin(final n=n); + Modelica.Blocks.Interfaces.OutPort Celsius(final n=n); +equation + Celsius.signal = to_degC(Kelvin.signal); +end FromKelvin; ++
+ +
+This model represents a variable temperature boundary condition +The temperature value in [degC] is given by the input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+++
+model PrescribedTemperature + "Variable temperature boundary condition in °Celsius" + + Interfaces.HeatPort_b port; + Modelica.Blocks.Interfaces.InPort T(final n=1); +equation + port.T = from_degC(T.signal[1]); +end PrescribedTemperature; ++
+
+
+ +
+This example demonstrates the thermal response of two masses connected by +a conducting element. The two masses have the same heat capacity but different +initial temperatures (T1=100 [degC], T2= 0 [degC]). The mass with the higher +temperature will cool off while the mass with the lower temperature heats up. +They will each asymptotically approach the calculated temperature T_final_K +(T_final_degC) that results from dividing the total initial energy in the system by the sum +of the heat capacities of each element. +
+ +
+Simulate for 5 s and plot the variables
+mass1.T, mass2.T, T_final_K or
+Tsensor1.T.signal, Tsensor2.T.signal, T_final_degC
+
++
+
Name | Default | Description |
---|---|---|
T_final_K | Projected final temperature [K] | |
T_final_degC | Projected final temperature [degC] |
+encapsulated model TwoMasses "Simple conduction demo" + import Modelica.Icons; + import Modelica.Thermal.HeatTransfer; + import SI = Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + + extends Icons.Example; + parameter SI.Temperature T_final_K(fixed=false) "Projected final temperature"; + parameter NonSI.Temperature_degC T_final_degC(fixed=false) + "Projected final temperature"; + HeatTransfer.HeatCapacitor mass1(C=15, T(start=from_degC(100))); + HeatTransfer.HeatCapacitor mass2(C=15, T(start=from_degC(0))); + HeatTransfer.ThermalConductor conduction(G=10); + HeatTransfer.Celsius.TemperatureSensor Tsensor1; + HeatTransfer.Celsius.TemperatureSensor Tsensor2; +equation + connect(mass1.port, conduction.port_a); + connect(conduction.port_b, mass2.port); + connect(mass1.port, Tsensor1.port); + connect(mass2.port, Tsensor2.port); +initial equation + T_final_K = (mass1.port.T*mass1.C + mass2.port.T*mass2.C)/(mass1.C + mass2.C) + ; + T_final_degC = to_degC(T_final_K); +end TwoMasses; ++
+ +
+This example contains a simple first order thermal model of +a frequency inverter. The periodic power losses in the +frequency inverter are described by two tables. +"conductionTable" describes the convection conduction G +and "lossTable" the generated power loss P_loss dependent +on the time.
+ ++The power dissipation to the environment is approximated by +heat flow through a thermal conductance, partially storage +of the heat in a heat capacitor and finally by forced +convection to the environment, defined in the two tables. +
+ ++Simulate for 5 s and plot the heat flow rate and the +temperature in the frequency inverter. +
+++
+encapsulated model FrequencyInverter + "First order thermal model of a frequency inverter" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Thermal.HeatTransfer; + import SI = Modelica.SIunits; + import Modelica.SIunits.Conversions.*; + + extends Icons.Example; + + Sources.TimeTable conductionTable(table=[0, 0.007; 1, 0.014; 2, 0.007; 3, + 0.014; 4, 0.007; 5, 0.014]); + Sources.TimeTable lossTable(table=[0, 10000; 1, 7000; 2, 10000; 3, 7000; 4 + , 10000; 5, 7000]); + HeatTransfer.HeatCapacitor C(C=30000); + HeatTransfer.Celsius.TemperatureSensor Tsensor; + HeatTransfer.ThermalConductor G(G=50); + HeatTransfer.Convection convection; + HeatTransfer.PrescribedHeatFlow Q_dot; + HeatTransfer.Celsius.FixedTemperature environment(T=20); +equation + connect(Q_dot.port, G.port_a); + connect(Q_dot.port, Tsensor.port); + connect(G.port_b, convection.solid); + connect(C.port, G.port_b); + connect(environment.port, convection.fluid); + connect(lossTable.outPort, Q_dot.Q_dot); + connect(conductionTable.outPort, convection.G); +end FrequencyInverter; ++
+ +
+A constant voltage of 10 V is applied to a +temperature dependent resistor of 10*(1+(T-20C)/(235+20C)) Ohms, +whose losses v**2/r are dissipated via a +thermal conductance of 0.1 W/K to ambient temperature 20 degree C. +The resistor is assumed to have a thermal capacity of 1 J/K, +having ambient temparature at the beginning of the experiment. +The temperature of this heating resistor is held by an OnOff-controller +at reference temperature within a given bandwith +/- 1 K +by switching on and off the voltage source. +The reference temperature starts at 25 degree C +and rises between t = 2 and 8 seconds linear to 50 degree C. +An approppriate simulating time would be 10 seconds. +
+++
+
Name | Default | Description |
---|---|---|
TAmb | 20 | Ambient Temperature [degC] |
TDif | 2 | Error in Temperature [degC] |
+encapsulated model ControlledTemperature + "Control temperature of a resistor" + import Modelica.Icons; + import Modelica.Blocks.Sources; + import Modelica.Electrical.Analog; + import Modelica.Thermal.HeatTransfer; + import SI = Modelica.SIunits; + import NonSI = Modelica.SIunits.Conversions.NonSIunits; + import Modelica.SIunits.Conversions.*; + + extends Icons.Example; + + parameter NonSI.Temperature_degC TAmb=20 "Ambient Temperature"; + parameter NonSI.Temperature_degC TDif=2 "Error in Temperature"; + output NonSI.Temperature_degC TRes "Resulting Temperature"; + Analog.Basic.Ground Ground1; + Analog.Sources.ConstantVoltage ConstantVoltage1(V=10); + HeatTransfer.HeatCapacitor HeatCapacitor1(C=1, T(start=from_degC(TAmb))); + Analog.Basic.HeatingResistor HeatingResistor1( + R_ref=10, + T_ref=from_degC(20), + alpha=1/(235 + 20)); + HeatTransfer.Celsius.FixedTemperature FixedTemperature1(T=TAmb); + HeatTransfer.Celsius.TemperatureSensor TemperatureSensor1; + HeatTransfer.ThermalConductor ThermalConductor1(G=0.1); + SwitchController SwitchController1(bandwidth=TDif); + Analog.Ideal.IdealSwitch IdealSwitch1; + Sources.Ramp Ramp1( + height={25}, + duration={6}, + offset={25}, + startTime={2}); + + encapsulated block SwitchController + "On-off controller for use with Modelica.Electrical.Analog.Ideal.IdealSwitch" + + + import Modelica.Blocks; + extends Blocks.Interfaces.MI2BooleanMOs(final n=1); + + parameter Real bandwidth=0.1 "Bandwidth around reference signal"; + + protected + Real u=inPort2.signal[1] "Input signal"; + Real uRef=inPort1.signal[1] "Reference input signal"; + Boolean y=outPort.signal[1] "Output signal"; + equation + y = (u > uRef + bandwidth/2) or (pre(y) and not (u < uRef - bandwidth/2)); + end SwitchController; +equation + + connect(ConstantVoltage1.n, HeatingResistor1.n); + connect(ConstantVoltage1.n, Ground1.p); + connect(HeatingResistor1.heatPort, ThermalConductor1.port_a); + connect(ThermalConductor1.port_b, FixedTemperature1.port); + connect(HeatingResistor1.heatPort, TemperatureSensor1.port); + connect(HeatingResistor1.heatPort, HeatCapacitor1.port); + connect(TemperatureSensor1.T, SwitchController1.inPort2); + connect(ConstantVoltage1.p, IdealSwitch1.p); + connect(IdealSwitch1.n, HeatingResistor1.p); + connect(SwitchController1.inPort1, Ramp1.outPort); + connect(SwitchController1.outPort, IdealSwitch1.control); + + TRes = to_degC(HeatingResistor1.heatPort.T); +end ControlledTemperature; ++
+ +
The block SwitchController sets the output signal to false when +the input signal falls below the reference signal minus half of +the bandwidth and sets the output signal to true when the input +signal exceeds the reference signal plus half of the bandwidth.
+ +The reference signal is represented by inPort1 and the input +signal by inPort2.
+ +Note: This component will be removed when package +ModelicaAdditions.Blocks.Logical is incorporated into the Modelica +Standard library.
+++
+
Name | Default | Description |
---|---|---|
bandwidth | 0.1 | Bandwidth around reference signal |
+encapsulated block SwitchController + "On-off controller for use with Modelica.Electrical.Analog.Ideal.IdealSwitch" + + + import Modelica.Blocks; + extends Blocks.Interfaces.MI2BooleanMOs(final n=1); + + parameter Real bandwidth=0.1 "Bandwidth around reference signal"; + +protected + Real u=inPort2.signal[1] "Input signal"; + Real uRef=inPort1.signal[1] "Reference input signal"; + Boolean y=outPort.signal[1] "Output signal"; +equation + y = (u > uRef + bandwidth/2) or (pre(y) and not (u < uRef - bandwidth/2)); +end SwitchController; ++
+
+
+The components of this package are provided for the convenience of +people working mostly with Fahrenheit units, since all models +in package HeatTransfer are based on Kelvin units. +
+ ++Note, that in package SIunits.Conversions, functions are provided +to convert between the units Kelvin, degree Celsius, degree Fahrenheit +and degree Rankine. These functions allow, e.g., a direct conversion +of units at all places where Kelvin is required as parameter. +Example: +
+ ++ import SIunits.Conversions.*; + Modelica.Thermal.HeatTransfer.HeatCapacitor C(T0 = from_degF(70)); ++ +
+
+
+ +
+This component converts all input signals from degree Fahrenheit to Kelvin +and provides them as output signals. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+model ToKelvin "Conversion block from °Fahrenheit to Kelvin" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + Modelica.Blocks.Interfaces.InPort Fahrenheit(final n=n); + Modelica.Blocks.Interfaces.OutPort Kelvin(final n=n); +equation + Kelvin.signal = from_degF(Fahrenheit.signal); +end ToKelvin; ++
+ +
+This component converts all input signals from Kelvin to Fahrenheit +and provides them as output signals. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+model FromKelvin "Conversion from Kelvin to °Fahrenheit" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + Modelica.Blocks.Interfaces.InPort Kelvin(final n=n); + Modelica.Blocks.Interfaces.OutPort Fahrenheit(final n=n); +equation + Fahrenheit.signal = to_degF(Kelvin.signal); +end FromKelvin; ++
+ +
+This model defines a fixed temperature T at its port in [degF], +i.e., it defines a fixed temperature as a boundary condition. +
+++
+
Name | Default | Description |
---|---|---|
T | Fixed Temperature at the port [degF] |
+model FixedTemperature + "Fixed temperature boundary condition in °Fahrenheit" + parameter NonSI.Temperature_degF T "Fixed Temperature at the port"; + Interfaces.HeatPort_b port; +equation + port.T = from_degF(T); +end FixedTemperature; ++
+ +
+This model represents a variable temperature boundary condition +The temperature value in [degF] is given by the input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+++
+model PrescribedTemperature + "Variable temperature boundary condition in °Fahrenheit" + + Interfaces.HeatPort_b port; + Modelica.Blocks.Interfaces.InPort T(final n=1); +equation + port.T = from_degF(T.signal[1]); +end PrescribedTemperature; ++
+ +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Fahrenheit as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+++
+model TemperatureSensor "Absolute temperature sensor in °Fahrenheit" + + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = NonSI.Temperature_degF); + Interfaces.HeatPort_a port; +equation + T.signal[1] = to_degF(port.T); + port.Q_dot = 0; +end TemperatureSensor; ++
+
+
+ +
This connector is used for 1-dimensional heat flow between components. +The variables in the connector are:
+ +T Temperature in [Kelvin]. + Q_dot Heat flow rate in [Watt]. ++ +
According to the Modelica sign convention, a positive heat flow +rate Q_dot is considered to flow into a component. This +convention has to be used whenever this connector is used in a model +class.
+ +Note, that the two connector classes HeatPort_a and +HeatPort_b are identical with the only exception of the different +icon layout.
++
+connector HeatPort_a + "Thermal port for 1-dim. heat transfer (filled rectangular icon)" + + extends HeatPort; + +end HeatPort_a; ++
+ +
+This partial model contains the basic connectors and variables to +allow heat transfer models to be created that do not store energy, +This model defines and includes equations for the temperature +drop across the element, dT, and the heat flow rate +through the element from port_a to port_b, Q_dot. +
+ ++By extending this model, it is possible to write simple +constitutive equations for many types of heat transfer components. +
+ +++
+partial model Element1D + "Partial heat transfer element with two HeatPort connectors that does not store energy" + + + SI.HeatFlowRate Q_dot "Heat flow rate from port_a -> port_b"; + SI.Temperature dT "port_a.T - port_b.T"; +public + HeatPort_a port_a; + HeatPort_b port_b; +equation + dT = port_a.T - port_b.T; + port_a.Q_dot = Q_dot; + port_b.Q_dot = -Q_dot; +end Element1D; ++
+ +
This connector is used for 1-dimensional heat flow between components. +The variables in the connector are:
+ +T Temperature in [Kelvin]. + Q_dot Heat flow rate in [Watt]. ++ +
According to the Modelica sign convention, a positive heat flow +rate Q_dot is considered to flow into a component. This +convention has to be used whenever this connector is used in a model +class.
+ +Note, that the two connector classes HeatPort_a and +HeatPort_b are identical with the only exception of the different +icon layout.
++
+connector HeatPort_b + "Thermal port for 1-dim. heat transfer (unfilled rectangular icon)" + + + extends HeatPort; + +end HeatPort_b; ++
+
+partial connector HeatPort "Thermal port for 1-dim. heat transfer" + SI.Temperature T "Port temperature"; + flow SI.HeatFlowRate Q_dot + "Heat flow rate (positive if flowing from outside into the component)"; +end HeatPort; ++
+
+
+The components of this package are provided for the convenience of +people working mostly with Rankine units, since all models +in package HeatTransfer are based on Kelvin units. +
+ ++Note, that in package SIunits.Conversions, functions are provided +to convert between the units Kelvin, degree Celsius, degree Fahrenheit +and degree Rankine. These functions allow, e.g., a direct conversion +of units at all places where Kelvin is required as parameter. +Example: +
+ ++ import SIunits.Conversions.*; + Modelica.Thermal.HeatTransfer.HeatCapacitor C(T0 = from_degRk(500)); ++ +
+
+
+ +
+This component converts all input signals from degree Rankine to Kelvin +and provides them as output signals. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+model ToKelvin "Conversion block from °Rankine to Kelvin" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + Modelica.Blocks.Interfaces.InPort Rankine(final n=n); + Modelica.Blocks.Interfaces.OutPort Kelvin(final n=n); +equation + Kelvin.signal = from_degRk(Rankine.signal); +end ToKelvin; ++
+ +
+This component converts all input signals from Kelvin to Rankine +and provides them as output signals. +
+++
+
Name | Default | Description |
---|---|---|
n | 1 | Number of inputs (= number of outputs) |
+model FromKelvin "Conversion from Kelvin to °Rankine" + parameter Integer n=1 "Number of inputs (= number of outputs)"; + Modelica.Blocks.Interfaces.InPort Kelvin(final n=n); + Modelica.Blocks.Interfaces.OutPort Rankine(final n=n); +equation + Rankine.signal = to_degRk(Kelvin.signal); +end FromKelvin; ++
+ +
+This model defines a fixed temperature T at its port in degree Rankine, +[degRk], i.e., it defines a fixed temperature as a boundary condition. +
+++
+
Name | Default | Description |
---|---|---|
T | Fixed Temperature at the port [degRk] |
+model FixedTemperature + "Fixed temperature boundary condition in °Rankine" + + parameter NonSI.Temperature_degRk T "Fixed Temperature at the port"; + Interfaces.HeatPort_b port; +equation + port.T = from_degRk(T); +end FixedTemperature; ++
+ +
+This model represents a variable temperature boundary condition +The temperature value in degree Rankine, [degRk] is given by the input signal +to the model. The effect is that an instance of this model acts as +an infinite reservoir able to absorb or generate as much energy +as required to keep the temperature at the specified value. +
+++
+model PrescribedTemperature + "Variable temperature boundary condition in °Rankine" + + Interfaces.HeatPort_b port; + Modelica.Blocks.Interfaces.InPort T(final n=1); +equation + port.T = from_degRk(T.signal[1]); +end PrescribedTemperature; ++
+ +
+This is an ideal absolute temperature sensor which returns +the temperature of the connected port in Rankine as an output +signal. The sensor itself has no thermal interaction with +whatever it is connected to. Furthermore, no +thermocouple-like lags are associated with this +sensor model. +
+++
+model TemperatureSensor "Absolute temperature sensor in °Rankine" + + Modelica.Blocks.Interfaces.OutPort T(redeclare type SignalType = NonSI.Temperature_degRk); + Interfaces.HeatPort_a port; +equation + T.signal[1] = to_degRk(port.T); + port.Q_dot = 0; +end TemperatureSensor; ++
+
Package Modelica is a standardized and pre-defined package that is developed together with the Modelica language from the -Modelica Design Group, see +Modelica Association, see http://www.Modelica.org. It is also called Modelica Standard Library. -It provides constants, types, connectors, partial models and model -components +It provides constants, types, connectors, partial models and model +components in various disciplines.
The Modelica package is free software and can be redistributed and/or -modified under the terms of the Modelica License and the accompanying -disclaimer, displayed at the end of this documentation. +modified under the terms of the Modelica License and the accompanying +disclaimer, displayed at the end of this documentation.
@@ -39,57 +40,45 @@ The Modelica package consists currently of the following subpackages Icons Icon definitions of general interest Math Mathematical functions (such as sin, cos) SIunits SI-unit type definitions (such as Voltage, Torque) - + Blocks Input/output blocks. Electrical Electric and electronic components. - Mechanics Mechanical components (currently only 1D-rotational). + Mechanics Mechanical components + (currently: 1D-rotational and 1D-translational components) + Thermal Thermal components + (currently: 1-D heat transfer with lumped elements)
-In the near future these packages will be extended and more sublibraries -will be added, especially for thermo-hydraulic systems, 1D-translational -and 3D-mechanical systems, electric power devices etc. -
- --In the Modelica package the following conventions are used: +In the Modelica package the following conventions are used:
- p,n: positive and negative side of a partial model. - a,b: side \"a\" and side \"b\" of a partial model - (= connectors are completely equivalent). + p,n: positive and negative side of a partial model. + a,b: side \"a\" and side \"b\" of a partial model + (= connectors are completely equivalent).
Release Notes:
+ IdealGearR2T Ideal gear transforming rotational in translational motion. + Position Forced movement of a flange with a reference angle + given as input signal + RelativeStates Definition of relative state variables ++
+ replaceable type SignalType = Real ++ in order that the type of the signal of an input/output block + can be changed to a physical type, for example: + +
+ Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque)) ++
THE MODELICA PACKAGE LICENSE (Version 1.0 of June 29, 1999)
+THE MODELICA LICENSE (Version 1.1 of June 30, 2000)
--The Modelica package (including its accompanying C-files) are permitted to -be redistributed and used in source and binary forms, with or without -modification, provided that the following conditions are met: -
+Redistribution and use in source and binary forms, with or without +modification are permitted, provided that the following conditions are met:
DISCLAIMER
--The Modelica package in its original or in a modified form is provided -\"as is\" and the copyright holder assumes no responsibility for its contents -what so ever. Any express or implied warranties, including, but not +
DISCLAIMER +
The software (sources, binaries, etc.) in their original or in a modified +form are provided +\"as is\" and the copyright holders assume no responsibility for its contents +what so ever. Any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the +particular purpose are disclaimed. In no event shall the copyright holders, or any party who modify and/or redistribute the package, be liable for any direct, indirect, incidental, special, exemplary, or consequential damages, arising in any way out of the use of this software, @@ -157,19 +204,8 @@ even if advised of the possibility of such damage.
Copyright (C) 1999, Modelica Design Group.
+Copyright © 1999-2002, Modelica Association.
-"), - Coordsys( - extent=[0, 0; 517, 370], - grid=[2, 2], - component=[20, 20]), - Window( - x=0.01, - y=0.14, - width=0.51, - height=0.62, - library=1, - autolayout=1)); +")); end Modelica;