From c025e058b032a9542ceba9ca0335a6a59ed6da00 Mon Sep 17 00:00:00 2001 From: otter Date: Sun, 9 Dec 2007 23:59:38 +0000 Subject: [PATCH] Combined MultiBody.Joints.Prismatic/ActuatedPrismatic in one joint "Prismatic". Via the new flag "useAxisFlange", the optional axis/support flanges are enabled. Changed the previous "bearing" connector to "support" connector. Adapted all occurrences of ActuatedPrismatic joint to the new Prismatic joint. For unknown reasons, also some other files are updated, although no changes have been performed. git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@912 7ce873d0-865f-4ce7-a662-4bb36ea78beb --- Modelica/Blocks/Continuous.mo | 3 +- Modelica/Blocks/Interfaces.mo | 112 +-- Modelica/Blocks/Logical.mo | 10 +- Modelica/Blocks/Math.mo | 13 +- Modelica/Blocks/Nonlinear.mo | 30 +- Modelica/Blocks/Routing.mo | 9 +- Modelica/Blocks/Sources.mo | 18 +- Modelica/Electrical/Analog/Basic.mo | 3 +- .../Analog/Examples/CauerLowPassSC.mo | 4 +- .../Electrical/Analog/Examples/Rectifier.mo | 6 +- Modelica/Electrical/Analog/Ideal.mo | 12 +- Modelica/Electrical/Analog/Sensors.mo | 2 +- Modelica/Electrical/Analog/Sources.mo | 10 +- Modelica/Electrical/Digital.mo | 11 +- Modelica/Electrical/Machines.mo | 15 +- Modelica/Math/package.mo | 4 +- .../Examples/Elementary/SpringDamperSystem.mo | 2 +- .../Examples/Elementary/SpringMassSystem.mo | 10 +- .../MultiBody/Examples/Loops/Engine1b.mo | 4 +- .../MultiBody/Examples/Loops/Utilities.mo | 4 +- .../MultiBody/Examples/Systems/RobotR3.mo | 12 +- Modelica/Mechanics/MultiBody/Forces.mo | 17 +- Modelica/Mechanics/MultiBody/Joints.mo | 777 ++++------------ Modelica/Mechanics/MultiBody/Visualizers.mo | 3 +- Modelica/Mechanics/Rotational.mo | 7 +- Modelica/Mechanics/Translational.mo | 2 +- .../ConvertModelica_from_2.2.2_to_3.0.mos | 9 + Modelica/StateGraph.mo | 46 +- Modelica/Thermal/FluidHeatFlow.mo | 846 +++++++++--------- Modelica/Thermal/HeatTransfer.mo | 754 ++++++++-------- Modelica/Utilities/package.mo | 1 + 31 files changed, 1167 insertions(+), 1589 deletions(-) diff --git a/Modelica/Blocks/Continuous.mo b/Modelica/Blocks/Continuous.mo index ad972945e3..c2f47468d3 100644 --- a/Modelica/Blocks/Continuous.mo +++ b/Modelica/Blocks/Continuous.mo @@ -816,8 +816,7 @@ This is discussed in the description of package lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid), - Line(points={{-80,-80},{-80,50},{-80,-20},{60,80}}, color={0,0,127}), - + Line(points={{-80,-80},{-80,50},{-80,-20},{60,80}}, color={0,0,127}), Text( extent={{-20,-20},{80,-60}}, lineColor={192,192,192}, diff --git a/Modelica/Blocks/Interfaces.mo b/Modelica/Blocks/Interfaces.mo index 22765249df..d2125a7ac2 100644 --- a/Modelica/Blocks/Interfaces.mo +++ b/Modelica/Blocks/Interfaces.mo @@ -1098,16 +1098,16 @@ in the Blocks.Logical library. annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Ellipse( extent={{-71,7},{-85,-7}}, - lineColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse( extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -1139,24 +1139,24 @@ with a 3D icon (e.g. used in Blocks.Logical library). grid={1,1}), graphics={ Ellipse( extent={{-71,7},{-85,-7}}, - lineColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse( extent={{-71,-74},{-85,-88}}, - lineColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse( extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -1192,31 +1192,31 @@ with a 3D icon (e.g. used in Blocks.Logical library). grid={1,1}), graphics={ Ellipse( extent={{-71,74},{-85,88}}, - lineColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u1 > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse( extent={{-71,7},{-85,-7}}, - lineColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u2 > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse( extent={{-71,-74},{-85,-88}}, - lineColor=DynamicSelect({235,235,235}, if u3 > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u3 > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u3 > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u3 > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse( extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Documentation(info=" Block has three continuous Boolean input and one continuous Boolean output signal @@ -1236,10 +1236,10 @@ with a 3D icon (e.g. used in Blocks.Logical library). annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Ellipse( extent={{-71,7},{-85,-7}}, - lineColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if u > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -1260,10 +1260,10 @@ with a 3D icon (e.g. used in Blocks.Logical library). annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Ellipse( extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -1298,10 +1298,10 @@ with a 3D icon (e.g. used in Blocks.Logical library). fillPattern=FillPattern.Solid), Ellipse( extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={ @@ -1365,10 +1365,10 @@ and a 3D icon (e.g. used in Blocks.Logical library). textString="%threshold"), Ellipse( extent={{71,7},{85,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), @@ -1405,10 +1405,10 @@ as well as a 3D icon (e.g. used in Blocks.Logical library). borderPattern=BorderPattern.Raised), Ellipse( extent={{73,7},{87,-7}}, - lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), - fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} - else {235,235,235}), + lineColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), + fillColor=DynamicSelect({235,235,235}, if y > 0.5 then {0,255,0} else + {235,235,235}), fillPattern=FillPattern.Solid), Ellipse(extent={{32,10},{52,-10}}, lineColor={0,0,255}), Line(points={{-100,-80},{42,-80},{42,0}}, color={0,0,255})}), diff --git a/Modelica/Blocks/Logical.mo b/Modelica/Blocks/Logical.mo index 10ffe9555d..ebe6325bdb 100644 --- a/Modelica/Blocks/Logical.mo +++ b/Modelica/Blocks/Logical.mo @@ -818,7 +818,7 @@ The default value of this parameter is false. Line(points={{-78,-2},{-6,18},{82,-12}}, color={255,0,0}), Line(points={{-78,12},{-6,30},{82,0}}, color={0,0,0}), Line(points={{-78,-16},{-6,4},{82,-26}}, color={0,0,0}), - Line(points={{-82,-18},{-56,-18},{-56,-40},{64,-40},{64,-20},{90,-20}}, + Line(points={{-82,-18},{-56,-18},{-56,-40},{64,-40},{64,-20},{90,-20}}, color={255,0,255})}), Documentation(info="

The block OnOffController sets the output signal y to true when the input signal u falls below the reference signal minus half of @@ -884,7 +884,7 @@ signal u exceeds the reference signal plus half of the bandwidth.< lineColor={0,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), - Line(points={{-80,-68},{-60,-68},{-60,-42},{8,-42},{8,-68},{60,-68}}, + Line(points={{-80,-68},{-60,-68},{-60,-42},{8,-42},{8,-68},{60,-68}}, color={255,0,255}), Line( points={{-60,40},{-60,-42}}, @@ -1054,7 +1054,7 @@ handled properly.

lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid), - Line(points={{-80,-70},{-60,-70},{-60,-26},{38,-26},{38,-70},{66,-70}}, + Line(points={{-80,-70},{-60,-70},{-60,-26},{38,-26},{38,-70},{66,-70}}, color={255,0,255}), Line(points={{-80,0},{-62,0},{40,90},{40,0},{68,0}}, color={0,0,255})}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -1071,9 +1071,9 @@ handled properly.

lineColor={0,0,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), - Line(points={{-80,-68},{-60,-68},{-60,-40},{20,-40},{20,-68},{60,-68}}, + Line(points={{-80,-68},{-60,-68},{-60,-40},{20,-40},{20,-68},{60,-68}}, color={255,0,255}), - Line(points={{-80,-20},{-60,-20},{20,60},{20,-20},{60,-20},{60,-20}}, + Line(points={{-80,-20},{-60,-20},{20,60},{20,-20},{60,-20},{60,-20}}, color={0,0,255}), Text( extent={{-88,6},{-54,-4}}, diff --git a/Modelica/Blocks/Math.mo b/Modelica/Blocks/Math.mo index b7c14de6f2..c6daff4fe5 100644 --- a/Modelica/Blocks/Math.mo +++ b/Modelica/Blocks/Math.mo @@ -1707,8 +1707,7 @@ as cos of the input u: 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}}, color={0,0,0}), - + 39.1},{73.6,47.4},{76,56.1},{77.6,63.8},{80,80}}, color={0,0,0}), Line(points={{-90,0},{68,0}}, color={192,192,192}), Polygon( points={{90,0},{68,8},{68,-8},{90,0}}, @@ -1756,8 +1755,7 @@ as cos of the input u: 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}}, color={0,0,0}), - + 39.1},{73.6,47.4},{76,56.1},{77.6,63.8},{80,80}}, color={0,0,0}), Text( extent={{70,-6},{94,-26}}, lineColor={160,160,164}, @@ -2526,8 +2524,7 @@ This blocks computes the output y as the fillPattern=FillPattern.Solid), Line(points={{-100,-80.3976},{84,-80.3976}}, color={192,192,192}), Polygon( - points={{100,-80.3976},{84,-74.3976},{84,-86.3976},{100,-80.3976}}, - + points={{100,-80.3976},{84,-74.3976},{84,-86.3976},{100,-80.3976}}, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid), @@ -2595,7 +2592,7 @@ This blocks computes the output y as the fillPattern=FillPattern.Solid), 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}}, + {-47,38.1},{-31.8,48.1},{-10.1,58},{22.1,68},{68.7,78.1},{80,80}}, color={0,0,0}), Line(points={{-90,0},{68,0}}, color={192,192,192}), Polygon( @@ -2631,7 +2628,7 @@ This blocks computes the output y as the fillPattern=FillPattern.Solid), 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}}, + {-47,38.1},{-31.8,48.1},{-10.1,58},{22.1,68},{68.7,78.1},{80,80}}, color={0,0,0}), Text( extent={{-105,72},{-85,88}}, diff --git a/Modelica/Blocks/Nonlinear.mo b/Modelica/Blocks/Nonlinear.mo index 14c46c0d46..384ee05f1c 100644 --- a/Modelica/Blocks/Nonlinear.mo +++ b/Modelica/Blocks/Nonlinear.mo @@ -171,8 +171,7 @@ is passed as output. Line(points={{-100,-80},{-64,-80},{-64,-70}}, color={0,0,127}), Polygon(points={{-64,-70},{-66,-74},{-62,-74},{-64,-70}}, lineColor={ 0,0,127}), - Polygon(points={{66,70},{64,74},{68,74},{66,70}}, lineColor={0,0,127}), - + Polygon(points={{66,70},{64,74},{68,74},{66,70}}, lineColor={0,0,127}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, @@ -211,8 +210,7 @@ is passed as output. textString="uMax"), Line(points={{-100,80},{40,80},{40,40}}, color={0,0,255}), Line(points={{-100,-80},{-40,-80},{-40,-40}}, color={0,0,255}), - Polygon(points={{40,40},{35,50},{45,50},{40,40}}, lineColor={0,0,255}), - + Polygon(points={{40,40},{35,50},{45,50},{40,40}}, lineColor={0,0,255}), Polygon(points={{-40,-40},{-45,-50},{-35,-50},{-40,-40}}, lineColor={ 0,0,255})})); @@ -357,8 +355,7 @@ The Input signal is delayed by a given time instant, or more precisely: 74.6},{-55.8,79.1},{-50.2,79.8},{-44.6,76.6},{-38.9,69.7},{-33.3, 59.4},{-26.9,44.1},{-18.83,21.2},{-1.9,-30.8},{5.3,-50.2},{11.7, -64.2},{17.3,-73.1},{23,-78.4},{28.6,-80},{34.2,-77.6},{39.9,-71.5}, - {45.5,-61.9},{51.9,-47.2},{60,-24.8},{68,0}}, color={0,0,127}), - + {45.5,-61.9},{51.9,-47.2},{60,-24.8},{68,0}}, color={0,0,127}), Line(points={{-62,0},{-50.7,34.2},{-43.5,53.1},{-37.1,66.4},{-31.4, 74.6},{-25.8,79.1},{-20.2,79.8},{-14.6,76.6},{-8.9,69.7},{-3.3, 59.4},{3.1,44.1},{11.17,21.2},{28.1,-30.8},{35.3,-50.2},{41.7,-64.2}, @@ -390,8 +387,7 @@ The Input signal is delayed by a given time instant, or more precisely: 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}}, color={0,0,255}), - + {57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, color={0,0,255}), Text( extent={{-24,98},{-2,78}}, lineColor={0,0,0}, @@ -503,14 +499,12 @@ chapter 11.9, page 412-414, Huethig Verlag Heidelberg, 1994 74.6},{-57.8,79.1},{-52.2,79.8},{-46.6,76.6},{-40.9,69.7},{-35.3, 59.4},{-28.9,44.1},{-20.83,21.2},{-3.9,-30.8},{3.3,-50.2},{9.7, -64.2},{15.3,-73.1},{21,-78.4},{26.6,-80},{32.2,-77.6},{37.9,-71.5}, - {43.5,-61.9},{49.9,-47.2},{58,-24.8},{66,0}}, color={0,0,127}), - + {43.5,-61.9},{49.9,-47.2},{58,-24.8},{66,0}}, color={0,0,127}), Line(points={{-72,0},{-60.7,34.2},{-53.5,53.1},{-47.1,66.4},{-41.4, 74.6},{-35.8,79.1},{-30.2,79.8},{-24.6,76.6},{-18.9,69.7},{-13.3, 59.4},{-6.9,44.1},{1.17,21.2},{18.1,-30.8},{25.3,-50.2},{31.7,-64.2}, {37.3,-73.1},{43,-78.4},{48.6,-80},{54.2,-77.6},{59.9,-71.5},{ - 65.5,-61.9},{71.9,-47.2},{80,-24.8},{88,0}}, color={160,160,164}), - + 65.5,-61.9},{71.9,-47.2},{80,-24.8},{88,0}}, color={160,160,164}), Text( extent={{-10,100},{100,38}}, lineColor={160,160,164}, @@ -545,8 +539,7 @@ chapter 11.9, page 412-414, Huethig Verlag Heidelberg, 1994 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}}, color={0,0,255}), - + {57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, color={0,0,255}), Text( extent={{-24,98},{-2,78}}, lineColor={0,0,0}, @@ -650,8 +643,7 @@ the following relationship: 74.6},{-55.8,79.1},{-50.2,79.8},{-44.6,76.6},{-38.9,69.7},{-33.3, 59.4},{-26.9,44.1},{-18.83,21.2},{-1.9,-30.8},{5.3,-50.2},{11.7, -64.2},{17.3,-73.1},{23,-78.4},{28.6,-80},{34.2,-77.6},{39.9,-71.5}, - {45.5,-61.9},{51.9,-47.2},{60,-24.8},{68,0}}, color={0,0,127}), - + {45.5,-61.9},{51.9,-47.2},{60,-24.8},{68,0}}, color={0,0,127}), Line(points={{-64,0},{-52.7,34.2},{-45.5,53.1},{-39.1,66.4},{-33.4, 74.6},{-27.8,79.1},{-22.2,79.8},{-16.6,76.6},{-10.9,69.7},{-5.3, 59.4},{1.1,44.1},{9.17,21.2},{26.1,-30.8},{33.3,-50.2},{39.7,-64.2}, @@ -690,8 +682,7 @@ the following relationship: 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}}, color={0,0,255}), - + {57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, color={0,0,255}), Line(points={{-100,0},{84,0}}, color={192,192,192}), Polygon( points={{100,0},{84,6},{84,-6},{100,0}}, @@ -751,8 +742,7 @@ the following relationship: 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}}, color={0,0,255}), - + {57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, color={0,0,255}), Text( extent={{-69,98},{-40,78}}, lineColor={0,0,255}, diff --git a/Modelica/Blocks/Routing.mo b/Modelica/Blocks/Routing.mo index 81f67ed9a5..aa7840f0ea 100644 --- a/Modelica/Blocks/Routing.mo +++ b/Modelica/Blocks/Routing.mo @@ -44,8 +44,7 @@ block ExtractSignal "Extract signals from an input signal vector" Line(points={{-72,-2},{-60.0698,-12.907},{-49.0698,-12.907}}, color={ 0,0,127}), Polygon( - points={{-48.8808,-11},{-48.8808,-15},{-44.8808,-13},{-48.8808,-11}}, - + points={{-48.8808,-11},{-48.8808,-15},{-44.8808,-13},{-48.8808,-11}}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, lineColor={0,0,127}), @@ -133,8 +132,7 @@ block ExtractSignal "Extract signals from an input signal vector" Line(points={{-72,-2},{-60.0698,-12.907},{-49.0698,-12.907}}, color={ 0,0,255}), Polygon( - points={{-48.8808,-11},{-48.8808,-15},{-44.8808,-13},{-48.8808,-11}}, - + points={{-48.8808,-11},{-48.8808,-15},{-44.8808,-13},{-48.8808,-11}}, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), @@ -254,8 +252,7 @@ block Extractor Line(points={{-62,-2},{-50.0698,-12.907},{-39.0698,-12.907}}, color={ 0,0,127}), Polygon( - points={{-38.8808,-11},{-38.8808,-15},{-34.8808,-13},{-38.8808,-11}}, - + points={{-38.8808,-11},{-38.8808,-15},{-34.8808,-13},{-38.8808,-11}}, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), diff --git a/Modelica/Blocks/Sources.mo b/Modelica/Blocks/Sources.mo index 0b985a5214..f65185bfb5 100644 --- a/Modelica/Blocks/Sources.mo +++ b/Modelica/Blocks/Sources.mo @@ -142,10 +142,10 @@ Variable y is both a variable and a connector. lineColor={0,0,255}), Polygon( points={{100,10},{120,0},{100,-10},{100,10}}, - lineColor=DynamicSelect({255,0,255}, if y > 0.5 then {0,255,0} - else {255,0,255}), - fillColor=DynamicSelect({255,255,255}, if y > 0.5 then {0,255,0} - else {255,255,255}), + lineColor=DynamicSelect({255,0,255}, if y > 0.5 then {0,255,0} else + {255,0,255}), + fillColor=DynamicSelect({255,255,255}, if y > 0.5 then {0,255,0} else + {255,255,255}), fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem( preserveAspectRatio=true, @@ -2278,7 +2278,7 @@ a flange according to a given acceleration. fillColor={192,192,192}, fillPattern=FillPattern.Solid), Line(points={{-48,-50},{-48,70},{52,70},{52,-50},{-48,-50},{-48,-20}, - {52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-51}}, + {52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-51}}, color={0,0,0}), Text( extent={{-150,-150},{150,-110}}, @@ -2306,7 +2306,7 @@ a flange according to a given acceleration. fillColor={192,192,192}, fillPattern=FillPattern.Solid), 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}}, + 80,0},{80,30},{-20,30},{-20,60},{80,60},{80,90},{30,90},{30,-31}}, color={0,0,0}), Text( extent={{-70,-42},{-32,-54}}, @@ -2737,7 +2737,7 @@ Several matrices may be defined one after another. fillColor={255,255,0}, fillPattern=FillPattern.Solid), Line(points={{-48,-50},{-48,70},{52,70},{52,-50},{-48,-50},{-48,-20}, - {52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-51}}, + {52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-51}}, color={0,0,0})}), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 100,100}}), graphics={ @@ -2759,7 +2759,7 @@ Several matrices may be defined one after another. fillColor={192,192,192}, fillPattern=FillPattern.Solid), 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},{20,90},{20,-30}}, + 80,0},{80,30},{-20,30},{-20,60},{80,60},{80,90},{20,90},{20,-30}}, color={0,0,0}), Text( extent={{-71,-42},{-32,-54}}, @@ -3179,7 +3179,7 @@ at sample times (defined by parameter period) and is otherwise fillColor={192,192,192}, fillPattern=FillPattern.Solid), Line(points={{-34,-54},{-34,66},{16,66},{16,-54},{-34,-54},{-34,-24}, - {16,-24},{16,6},{-34,6},{-34,36},{16,36},{16,66},{16,66},{16,-55}}, + {16,-24},{16,6},{-34,6},{-34,36},{16,36},{16,66},{16,66},{16,-55}}, color={0,0,0}), Text( extent={{-29,59},{10,44}}, diff --git a/Modelica/Electrical/Analog/Basic.mo b/Modelica/Electrical/Analog/Basic.mo index c6f009ab87..bbf66a62dd 100644 --- a/Modelica/Electrical/Analog/Basic.mo +++ b/Modelica/Electrical/Analog/Basic.mo @@ -1189,8 +1189,7 @@ The left port voltage is zero. Any current gain can be chosen. extent={{-104,-76},{97,-127}}, textString="%name", lineColor={0,0,255}), - Line(points={{-100,50},{-30,50},{-30,-50},{-100,-50}}, color={0,0,255}), - + Line(points={{-100,50},{-30,50},{-30,-50},{-100,-50}}, color={0,0,255}), Ellipse(extent={{10,20},{50,-20}}, lineColor={0,0,255}), Line(points={{-20,60},{20,60}}, color={0,0,255}), Polygon( diff --git a/Modelica/Electrical/Analog/Examples/CauerLowPassSC.mo b/Modelica/Electrical/Analog/Examples/CauerLowPassSC.mo index 72d11f466d..4ee2e026e2 100644 --- a/Modelica/Electrical/Analog/Examples/CauerLowPassSC.mo +++ b/Modelica/Electrical/Analog/Examples/CauerLowPassSC.mo @@ -103,8 +103,8 @@ model Rp "positive resistance" lineColor={0,0,0}, textString="R=%R"), Line(points={{-74,0},{-80,0},{-60,0}}, color={85,255,85}), - Line(points={{-80,-20},{-60,-20},{-60,-16},{-40,-10},{-4,-10}}, color - ={85,255,85}), + Line(points={{-80,-20},{-60,-20},{-60,-16},{-40,-10},{-4,-10}}, color= + {85,255,85}), Line(points={{4,-10},{40,-10},{60,-16},{60,-20},{80,-20}}, color={85, 255,85}), Line(points={{80,0},{60,0}}, color={85,255,85}), diff --git a/Modelica/Electrical/Analog/Examples/Rectifier.mo b/Modelica/Electrical/Analog/Examples/Rectifier.mo index 37052919e8..728a236e06 100644 --- a/Modelica/Electrical/Analog/Examples/Rectifier.mo +++ b/Modelica/Electrical/Analog/Examples/Rectifier.mo @@ -21,11 +21,9 @@ annotation ( extent={{-80,90},{80,70}}, lineColor={0,0,0}, textString="Rectifier"), - Line(points={{-16,18},{-16,2},{-18,6},{-14,6},{-16,2}}, color={0,0,0}), - + Line(points={{-16,18},{-16,2},{-18,6},{-14,6},{-16,2}}, color={0,0,0}), Line(points={{-30,22},{-26,20},{-30,18},{-30,22}}, color={0,0,0}), - Line(points={{32,30},{32,-30},{30,-26},{34,-26},{32,-30}}, color={0,0,0}), - + Line(points={{32,30},{32,-30},{30,-26},{34,-26},{32,-30}}, color={0,0,0}), Text( extent={{-38,16},{-22,8}}, lineColor={0,0,0}, diff --git a/Modelica/Electrical/Analog/Ideal.mo b/Modelica/Electrical/Analog/Ideal.mo index 24dc09c683..c8a6db8b6c 100644 --- a/Modelica/Electrical/Analog/Ideal.mo +++ b/Modelica/Electrical/Analog/Ideal.mo @@ -1032,8 +1032,7 @@ If the input voltage is vin > 0, the output voltage is out.v = VMax. fillColor={255,255,255}, fillPattern=FillPattern.Solid, lineColor={0,0,255}), - Line(points={{-45,-10},{-10,-10},{-10,10},{20,10}}, color={0,0,255}), - + Line(points={{-45,-10},{-10,-10},{-10,10},{20,10}}, color={0,0,255}), Line(points={{0,35},{0,80}}, color={0,0,255}), Line(points={{0,-35},{0,-80}}, color={0,0,255}), Line(points={{-90,50},{-60,50}}, color={0,0,255}), @@ -1051,8 +1050,7 @@ If the input voltage is vin > 0, the output voltage is out.v = VMax. fillColor={255,255,255}, fillPattern=FillPattern.Solid, lineColor={0,0,255}), - Line(points={{-45,-10},{-10,-10},{-10,10},{20,10}}, color={0,0,255}), - + Line(points={{-45,-10},{-10,-10},{-10,10},{20,10}}, color={0,0,255}), Line(points={{0,35},{0,80}}, color={0,0,255}), Line(points={{0,-35},{0,-80}}, color={0,0,255}), Line(points={{-96,50},{-60,50}}, color={0,0,255}), @@ -1366,8 +1364,7 @@ where the constant G is called the gyration conductance. lineThickness=1, fillColor={255,255,255}, fillPattern=FillPattern.Solid), - Line(points={{-90,50},{-40,50},{-40,-50},{-90,-50}}, color={0,0,255}), - + Line(points={{-90,50},{-40,50},{-40,-50},{-90,-50}}, color={0,0,255}), Text( extent={{-100,100},{100,70}}, textString="%name", @@ -1399,8 +1396,7 @@ where the constant G is called the gyration conductance. lineColor={255,255,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid), - Line(points={{-96,50},{-40,50},{-40,-50},{-96,-50}}, color={0,0,255}), - + Line(points={{-96,50},{-40,50},{-40,-50},{-96,-50}}, color={0,0,255}), Line(points={{-30,60},{20,60}}, color={0,0,255}), Polygon( points={{20,63},{30,60},{20,57},{20,63}}, diff --git a/Modelica/Electrical/Analog/Sensors.mo b/Modelica/Electrical/Analog/Sensors.mo index 5dcf4c6de7..ce2d74bd3c 100644 --- a/Modelica/Electrical/Analog/Sensors.mo +++ b/Modelica/Electrical/Analog/Sensors.mo @@ -75,7 +75,7 @@ Modelica in file \"Modelica/package.mo\".
Diagram(coordinateSystem( preserveAspectRatio=true, extent={{-100,-100},{100,100}}, - grid={1,1}), graphics={Line(points={{-70,0},{-96,0}}, color={0,0,0}), + grid={1,1}), graphics={Line(points={{-70,0},{-96,0}}, color={0,0,0}), Line(points={{100,0},{70,0}}, color={0,0,255})}), Documentation(revisions=" "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, - -100},{100,100}}), graphics={Ellipse(extent={{-100,30},{20,-90}}, + -100},{100,100}}), graphics={Ellipse(extent={{-100,30},{20,-90}}, lineColor={0,0,255}), Ellipse(extent={{-40,30},{80,-90}}, lineColor={0,0,255})})); @@ -6449,8 +6449,7 @@ output is length of the space phasor divided by sqrt(2), thus giving in sinusoid lineColor={0,0,255}, textString="P Q"), Line(points={{0,-70},{0,-90}}, color={0,0,255}), - Line(points={{-10,70},{-10,80},{-50,80},{-50,100}}, color={0,0,255}), - + Line(points={{-10,70},{-10,80},{-50,80},{-50,100}}, color={0,0,255}), Line(points={{10,70},{10,80},{50,80},{50,100}}, color={0,0,255})}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), @@ -6885,8 +6884,7 @@ a ground has to be used where necessary for currents flowing back. -20},{-13.33,-17.32},{-6.67,-10},{0,0}}, color={0,0,255}), Line(points={{-90,0},{-83.33,10},{-76.67,17.32},{-70,20},{-63.33, 17.32},{-56.67,10},{-50,0},{-43.33,-10},{-36.67,-17.32},{-30, - -20},{-23.33,-17.32},{-16.67,-10},{-10,0}}, color={0,0,255}), - + -20},{-23.33,-17.32},{-16.67,-10},{-10,0}}, color={0,0,255}), Line(points={{-70,0},{-63.33,10},{-56.67,17.32},{-50,20},{-43.33, 17.32},{-36.67,10},{-30,0},{-23.33,-10},{-16.67,-17.32},{-10, -20},{-3.33,-17.32},{3.33,-10},{10,0}}, color={0,0,255}), @@ -7058,8 +7056,7 @@ This package contains space phasor transformation blocks for use in controllers: -20},{-13.33,-17.32},{-6.67,-10},{0,0}}, color={0,0,255}), Line(points={{-90,0},{-83.33,10},{-76.67,17.32},{-70,20},{-63.33, 17.32},{-56.67,10},{-50,0},{-43.33,-10},{-36.67,-17.32},{-30, - -20},{-23.33,-17.32},{-16.67,-10},{-10,0}}, color={0,0,255}), - + -20},{-23.33,-17.32},{-16.67,-10},{-10,0}}, color={0,0,255}), Line(points={{-70,0},{-63.33,10},{-56.67,17.32},{-50,20},{-43.33, 17.32},{-36.67,10},{-30,0},{-23.33,-10},{-16.67,-17.32},{-10, -20},{-3.33,-17.32},{3.33,-10},{10,0}}, color={0,0,255}), @@ -7642,7 +7639,7 @@ Partial model for induction machine models {100,100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ - 100,100}}), graphics={Line(points={{-50,100},{-20,100},{-20,70}}, + 100,100}}), graphics={Line(points={{-50,100},{-20,100},{-20,70}}, color={0,0,255}), Line(points={{50,100},{20,100},{20,70}}, color={0,0,255})})); equation @@ -7697,7 +7694,7 @@ Partial model for DC machine models. {100,100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ - 100,100}}), graphics={Line(points={{-50,100},{-20,100},{-20,70}}, + 100,100}}), graphics={Line(points={{-50,100},{-20,100},{-20,70}}, color={0,0,255}), Line(points={{50,100},{20,100},{20,70}}, color={0,0,255})})); Modelica.Electrical.Analog.Interfaces.PositivePin pin_ap diff --git a/Modelica/Math/package.mo b/Modelica/Math/package.mo index f90e88a68e..dd1a9130a5 100644 --- a/Modelica/Math/package.mo +++ b/Modelica/Math/package.mo @@ -5492,7 +5492,7 @@ function log "Natural (base e) logarithm (u shall be > 0)" fillPattern=FillPattern.Solid), 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}}, + {-47,38.1},{-31.8,48.1},{-10.1,58},{22.1,68},{68.7,78.1},{80,80}}, color={0,0,0}), Text( extent={{-6,-24},{66,-72}}, @@ -5582,7 +5582,7 @@ function log10 "Base 10 logarithm (u shall be > 0)" fillPattern=FillPattern.Solid), 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}}, + {-47,38.1},{-31.8,48.1},{-10.1,58},{22.1,68},{68.7,78.1},{80,80}}, color={0,0,0}), Text( extent={{-30,-22},{60,-70}}, diff --git a/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringDamperSystem.mo b/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringDamperSystem.mo index 3f46b81417..9bacca7b32 100644 --- a/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringDamperSystem.mo +++ b/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringDamperSystem.mo @@ -64,7 +64,7 @@ ALT=\"model Examples.Elementary.SpringDamperSystem\"> origin={50,-50}, extent={{-10,10},{10,-10}}, rotation=270))); - Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic p2( + Modelica.Mechanics.MultiBody.Joints.Prismatic p2(useAxisFlange=true, n={0,-1,0}, animation=animation, boxWidth=0.05, diff --git a/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringMassSystem.mo b/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringMassSystem.mo index 8c178e280e..8b4c680b07 100644 --- a/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringMassSystem.mo +++ b/Modelica/Mechanics/MultiBody/Examples/Elementary/SpringMassSystem.mo @@ -21,9 +21,9 @@ can be utilized: ")); - - model DoubleRamp "Ramp going up and down" + + model DoubleRamp "Ramp going up and down" extends Modelica.Blocks.Interfaces.SO; parameter Real offset(start=1) "Offset of ramps"; - parameter Modelica.SIunits.Time startTime(start=0.2) + parameter Modelica.SIunits.Time startTime(start=0.2) "StartTime of 1st ramp"; - parameter Modelica.SIunits.Time interval(start=0.2) + parameter Modelica.SIunits.Time interval(start=0.2) "Interval between end of 1st and beginning of 2nd ramp"; parameter Real height_1(start=-1) "Height of ramp" annotation(Dialog(group="Ramp 1")); - parameter Modelica.SIunits.Time duration_1(min=Modelica.Constants.small, start=0.2) + parameter Modelica.SIunits.Time duration_1(min=Modelica.Constants.small, start=0.2) "Duration of ramp" annotation(Dialog(group="Ramp 1")); parameter Real height_2(start=1) "Height of ramp" annotation(Dialog(group="Ramp 2")); - parameter Modelica.SIunits.Time duration_2(min=Modelica.Constants.small, start=0.2) + parameter Modelica.SIunits.Time duration_2(min=Modelica.Constants.small, start=0.2) "Duration of ramp" annotation(Dialog(group="Ramp 2")); annotation ( @@ -1373,7 +1372,7 @@ Block generating the sum of two ramps. color={0,0,0}, fillColor={0,0,0}, fillPattern=FillPattern.Solid)})); - + Modelica.Blocks.Math.Add add annotation (Placement(transformation( extent={{10,-10},{30,10}}, rotation=0))); Modelica.Blocks.Sources.Ramp ramp1( @@ -1390,7 +1389,7 @@ Block generating the sum of two ramps. final offset=0) annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}, rotation=0))); - equation + equation connect(ramp1.y, add.u1) annotation (Line(points={{-9,20},{0,20},{0,6}, {8,6}}, color={0,0,127})); connect(ramp2.y, add.u2) annotation (Line(points={{-9,-20},{0,-20},{0, @@ -1400,8 +1399,8 @@ Block generating the sum of two ramps. end DoubleRamp; end Utilities; end Examples; - - package Components "Basic components (pipes, valves)" + + package Components "Basic components (pipes, valves)" extends Modelica.Icons.Library2; annotation (Documentation(info=" This package contains components: @@ -1453,23 +1452,23 @@ and the accompanying disclaimer "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ Polygon( - points={{-56,10},{-56,-90},{-6,-40},{44,10},{44,-90},{-56,10}}, - lineColor={0,0,255}, - fillColor={0,128,255}, - fillPattern=FillPattern.Solid), + points={{-56,10},{-56,-90},{-6,-40},{44,10},{44,-90},{-56,10}}, + lineColor={0,0,255}, + fillColor={0,128,255}, + fillPattern=FillPattern.Solid), Polygon( - points={{-16,10},{4,10},{-6,-10},{-16,10}}, - lineColor={0,0,127}, - fillColor={0,0,127}, - fillPattern=FillPattern.Solid), + points={{-16,10},{4,10},{-6,-10},{-16,10}}, + lineColor={0,0,127}, + fillColor={0,0,127}, + fillPattern=FillPattern.Solid), Line( - points={{-6,-10},{-6,-40},{-6,-38}}, - color={0,0,127}, - fillColor={0,0,255}, + points={{-6,-10},{-6,-40},{-6,-38}}, + color={0,0,127}, + fillColor={0,0,255}, fillPattern=FillPattern.Solid)})); - - model IsolatedPipe "Pipe without heat exchange" - + + model IsolatedPipe "Pipe without heat exchange" + annotation (Documentation(info=" Pipe without heat exchange.
Thermodynamic equations are defined by Partials.TwoPortMass(Q_flow = 0).
@@ -1487,18 +1486,18 @@ leads to neglection of temperature transient cv*m*der(T). 100,100}}), graphics)); extends Interfaces.Partials.TwoPort(final tapT=1); extends Interfaces.Partials.SimpleFriction; - parameter Modelica.SIunits.Length h_g(start=0) + parameter Modelica.SIunits.Length h_g(start=0) "Geodetic height (heigth difference from flowPort_a to flowPort_b)"; - equation + equation // coupling with FrictionModel volumeFlow = V_flow; dp = pressureDrop + medium.rho*Modelica.Constants.g_n*h_g; // no energy exchange with medium Q_flow = Q_friction; end IsolatedPipe; - - model HeatedPipe "Pipe with heat exchange" - + + model HeatedPipe "Pipe with heat exchange" + annotation (Documentation(info=" Pipe with heat exchange.
Thermodynamic equations are defined by Partials.TwoPort.
@@ -1524,15 +1523,15 @@ temperature rise defined by storing heat in medium's mass. Diagram(coordinateSystem(preserveAspectRatio= false, extent={{-100,-100},{100,100}}), graphics)); - + extends Interfaces.Partials.TwoPort; extends Interfaces.Partials.SimpleFriction; - parameter Modelica.SIunits.Length h_g(start=0) + parameter Modelica.SIunits.Length h_g(start=0) "Geodetic height (heigth difference from flowPort_a to flowPort_b)"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort annotation (Placement(transformation(extent={{-10,-110},{10,-90}}, rotation=0))); - equation + equation // coupling with FrictionModel volumeFlow = V_flow; dp = pressureDrop + medium.rho*Modelica.Constants.g_n*h_g; @@ -1541,9 +1540,9 @@ temperature rise defined by storing heat in medium's mass. // defines heatPort's temperature heatPort.T = T_q; end HeatedPipe; - - model Valve "Simple valve" - + + model Valve "Simple valve" + annotation (Documentation(info=" Simple controlled valve.
Standard characteristic Kv=f (y) is given at standard conditions (dp0, rho0),
@@ -1581,44 +1580,44 @@ Flow resistance under real conditions is calculated by
false, extent={{-100,-100},{100,100}}), graphics)); extends Interfaces.Partials.TwoPort(m(start=0), final tapT=1); - parameter Boolean LinearCharacteristic(start=true) + parameter Boolean LinearCharacteristic(start=true) "Type of characteristic" - annotation(Dialog(group="Standard characteristic"), choices(choice=true "Linear", choice=false + annotation(Dialog(group="Standard characteristic"), choices(choice=true "Linear", choice=false "Exponential")); parameter Real y1(min=small, start=1) "Max. valve opening" annotation(Dialog(group="Standard characteristic")); - parameter Modelica.SIunits.VolumeFlowRate Kv1(min=small, start=1) + parameter Modelica.SIunits.VolumeFlowRate Kv1(min=small, start=1) "Max. flow @ y = y1" annotation(Dialog(group="Standard characteristic")); - parameter Real kv0(min=small,max=1-small, start=0.01) + parameter Real kv0(min=small,max=1-small, start=0.01) "Leakage flow / max.flow @ y = 0" annotation(Dialog(group="Standard characteristic")); parameter Modelica.SIunits.Pressure dp0(start=1) "Standard pressure drop" annotation(Dialog(group="Standard characteristic")); - parameter Modelica.SIunits.Density rho0(start=10) + parameter Modelica.SIunits.Density rho0(start=10) "Standard medium's density" annotation(Dialog(group="Standard characteristic")); - parameter Real frictionLoss(min=0, max=1, start=0) + parameter Real frictionLoss(min=0, max=1, start=0) "Part of friction losses fed to medium"; - protected + protected constant Modelica.SIunits.VolumeFlowRate unitVolumeFlowRate = 1; constant Real small = Modelica.Constants.small; constant Modelica.SIunits.VolumeFlowRate smallVolumeFlowRate = eps*unitVolumeFlowRate; constant Real eps = Modelica.Constants.eps; Real yLim = max(min(y,y1),0) "Limited valve opening"; Modelica.SIunits.VolumeFlowRate Kv "Standard flow rate"; - public + public Modelica.Blocks.Interfaces.RealInput y annotation (Placement(transformation( origin={0,90}, extent={{-10,-10},{10,10}}, rotation=270))); - initial algorithm + initial algorithm assert(y1>small, "Valve characteristic: y1 has to be > 0 !"); assert(Kv1>smallVolumeFlowRate, "Valve characteristic: Kv1 has to be > 0 !"); assert(kv0>small, "Valve characteristic: kv0 has to be > 0 !"); assert(kv0<1-eps, "Valve characteristic: kv0 has to be < 1 !"); - equation + equation // evaluate standard characteristic Kv/Kv1 = if LinearCharacteristic then (kv0 + (1-kv0)*yLim/y1) else kv0*exp(ln(1/kv0)*yLim/y1); // pressure drop under real conditions @@ -1627,9 +1626,8 @@ Flow resistance under real conditions is calculated by
Q_flow = frictionLoss*V_flow*dp; end Valve; end Components; - - - package Media "Medium properties" + + package Media "Medium properties" extends Modelica.Icons.Library2; annotation (Documentation(info=" This package contains definitions of medium properties.
@@ -1671,40 +1669,40 @@ and the accompanying disclaimer "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ Rectangle( - extent={{-80,8},{60,-88}}, - lineColor={0,0,127}, - fillColor={85,170,255}, - fillPattern=FillPattern.Solid), + extent={{-80,8},{60,-88}}, + lineColor={0,0,127}, + fillColor={85,170,255}, + fillPattern=FillPattern.Solid), Line( - points={{-10,8},{-10,-88},{-10,-88}}, - color={0,0,127}, - fillPattern=FillPattern.Solid), + points={{-10,8},{-10,-88},{-10,-88}}, + color={0,0,127}, + fillPattern=FillPattern.Solid), Line( - points={{-80,-24},{60,-24}}, - color={0,0,127}, - fillPattern=FillPattern.Solid), + points={{-80,-24},{60,-24}}, + color={0,0,127}, + fillPattern=FillPattern.Solid), Line( - points={{-80,-56},{60,-56}}, - color={0,0,127}, + points={{-80,-56},{60,-56}}, + color={0,0,127}, fillPattern=FillPattern.Solid)})); - - record Medium "Record containing media properties" + + record Medium "Record containing media properties" extends Modelica.Icons.Record; parameter Modelica.SIunits.Density rho = 1 "Density"; - parameter Modelica.SIunits.SpecificHeatCapacity cp = 1 + parameter Modelica.SIunits.SpecificHeatCapacity cp = 1 "Specific heat capacity at constant pressure"; - parameter Modelica.SIunits.SpecificHeatCapacity cv = 1 + parameter Modelica.SIunits.SpecificHeatCapacity cv = 1 "Specific heat capacity at constant volume"; - parameter Modelica.SIunits.ThermalConductivity lamda = 1 + parameter Modelica.SIunits.ThermalConductivity lamda = 1 "Thermal conductivity"; - parameter Modelica.SIunits.KinematicViscosity nue = 1 + parameter Modelica.SIunits.KinematicViscosity nue = 1 "kinematic viscosity"; annotation (Documentation(info=" Record containing (constant) medium properties. ")); end Medium; - - record Air_30degC "Medium: properties of air at 30 degC" + + record Air_30degC "Medium: properties of air at 30 degC" extends Medium( rho=1.149, cp=1007, @@ -1715,8 +1713,8 @@ Record containing (constant) medium properties. Medium: properties of air at 30 degC ")); end Air_30degC; - - record Air_70degC "Medium: properties of air at 70 degC" + + record Air_70degC "Medium: properties of air at 70 degC" extends Medium( rho=1.015, cp=1010, @@ -1727,8 +1725,8 @@ Medium: properties of air at 30 degC Medium: properties of air at 70 degC ")); end Air_70degC; - - record Water "Medium: properties of water" + + record Water "Medium: properties of water" extends Medium( rho=995.6, cp=4177, @@ -1740,8 +1738,8 @@ Medium: properties of water ")); end Water; end Media; - - package Sources "Ideal fluid sources, e.g., ambient, volume flow" + + package Sources "Ideal fluid sources, e.g., ambient, volume flow" extends Modelica.Icons.Library2; annotation (Documentation(info=" This package contains different types of sources: @@ -1793,9 +1791,9 @@ and the accompanying disclaimer 100}}), graphics={Ellipse(extent={{-60,10},{40,-90}}, lineColor={ 255,0,0}), Polygon(points={{-40,0},{-40,-80},{38,-50},{38,-30}, {-40,0}}, lineColor={0,0,255})})); - - model Ambient "Ambient with constant properties" - + + model Ambient "Ambient with constant properties" + annotation (Documentation(info=" (Infinite) ambient with constant pressure and temperature.
Thermodynamic equations are defined by Partials.Ambient. @@ -1803,23 +1801,23 @@ Thermodynamic equations are defined by Partials.Ambient. -100},{100,100}}), graphics), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 100,100}}), graphics={Text( - extent={{20,80},{80,20}}, - lineColor={0,0,0}, + extent={{20,80},{80,20}}, + lineColor={0,0,0}, textString="p"), Text( - extent={{20,-20},{80,-80}}, - lineColor={0,0,0}, + extent={{20,-20},{80,-80}}, + lineColor={0,0,0}, textString="T")})); extends Interfaces.Partials.Ambient; - parameter Boolean usePressureInput=false + parameter Boolean usePressureInput=false "enable / disable pressure input" annotation(Evaluate=true); - parameter Modelica.SIunits.Pressure constantAmbientPressure(start=0) + parameter Modelica.SIunits.Pressure constantAmbientPressure(start=0) "Ambient pressure" annotation(Dialog(enable=not usePressureInput)); - parameter Boolean useTemperatureInput=false + parameter Boolean useTemperatureInput=false "enable / disable temperature input" annotation(Evaluate=true); - parameter Modelica.SIunits.Temperature constantAmbientTemperature(start=293.15, displayUnit="degC") + parameter Modelica.SIunits.Temperature constantAmbientTemperature(start=293.15, displayUnit="degC") "Ambient temperature" annotation(Dialog(enable=not useTemperatureInput)); Modelica.Blocks.Interfaces.RealInput ambientPressure if usePressureInput @@ -1828,7 +1826,7 @@ Thermodynamic equations are defined by Partials.Ambient. Modelica.Blocks.Interfaces.RealInput ambientTemperature if useTemperatureInput annotation (Placement(transformation(extent={{110,-60},{90,-80}}, rotation=0))); - protected + protected Modelica.Blocks.Sources.Constant constPressure(final k= constantAmbientPressure) if not usePressureInput annotation (Placement(transformation(extent={{100,40},{80,60}}))); @@ -1839,7 +1837,7 @@ Thermodynamic equations are defined by Partials.Ambient. annotation (Placement(transformation(extent={{100,-60},{80,-40}}))); Modelica.Blocks.Interfaces.RealInput TAmbient annotation (Placement(transformation(extent={{62,-62},{58,-58}}))); - equation + equation flowPort.p = pAmbient; T = TAmbient; connect(ambientPressure, pAmbient) annotation (Line( @@ -1859,9 +1857,9 @@ Thermodynamic equations are defined by Partials.Ambient. color={0,0,127}, smooth=Smooth.None)); end Ambient; - - model AbsolutePressure "Defines absolute pressure level" - + + model AbsolutePressure "Defines absolute pressure level" + annotation (Documentation(info=" AbsolutePressure to define pressure level of a closed cooling cycle. Coolant's mass flow, temperature and enthalpy flow are not affected.
@@ -1870,14 +1868,14 @@ Coolant's mass flow, temperature and enthalpy flow are not affected.
graphics), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{ 100,100}}), graphics={Text( - extent={{-150,150},{150,90}}, - lineColor={0,0,255}, + extent={{-150,150},{150,90}}, + lineColor={0,0,255}, textString="%name"), Ellipse( - extent={{-90,90},{90,-90}}, - lineColor={255,0,0}, - fillColor={255,255,255}, + extent={{-90,90},{90,-90}}, + lineColor={255,0,0}, + fillColor={255,255,255}, fillPattern=FillPattern.Solid)})); - parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() + parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() "medium" annotation(choicesAllMatching=true); parameter Modelica.SIunits.Pressure p(start=0) "Pressure ground"; @@ -1889,15 +1887,15 @@ Coolant's mass flow, temperature and enthalpy flow are not affected.
Interfaces.FlowPort_a flowPort(final medium=medium) annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - equation + equation // defining pressure flowPort.p = p; // no energy exchange; no mass flow by default flowPort.H_flow = 0; end AbsolutePressure; - - model VolumeFlow "Enforces constant volume flow" - + + model VolumeFlow "Enforces constant volume flow" + annotation (Documentation(info=" Fan resp. pump with constant volume flow rate. Pressure increase is the response of the whole system. Coolant's temperature and enthalpy flow are not affected.
@@ -1907,31 +1905,31 @@ Thermodynamic equations are defined by Partials.TwoPort. "), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={ Ellipse( - extent={{-90,90},{90,-90}}, - lineColor={255,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), + extent={{-90,90},{90,-90}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text( - extent={{-150,-90},{150,-150}}, - lineColor={0,0,255}, - textString="%name"), + extent={{-150,-90},{150,-150}}, + lineColor={0,0,255}, + textString="%name"), Polygon( - points={{-60,68},{90,10},{90,-10},{-60,-68},{-60,68}}, - lineColor={255,0,0}, - fillColor={0,0,255}, - fillPattern=FillPattern.Solid), + points={{-60,68},{90,10},{90,-10},{-60,-68},{-60,68}}, + lineColor={255,0,0}, + fillColor={0,0,255}, + fillPattern=FillPattern.Solid), Text( - extent={{-40,20},{0,-20}}, - lineColor={0,0,0}, + extent={{-40,20},{0,-20}}, + lineColor={0,0,0}, textString="V")}), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100}, {100,100}}), graphics)); extends Interfaces.Partials.TwoPort(final tapT=1); - parameter Boolean useVolumeFlowInput=false + parameter Boolean useVolumeFlowInput=false "enable / disable volume flow input" annotation(Evaluate=true); - parameter Modelica.SIunits.VolumeFlowRate constantVolumeFlow(start=1) + parameter Modelica.SIunits.VolumeFlowRate constantVolumeFlow(start=1) "Volume flow rate" annotation(Dialog(enable=not useVolumeFlowInput)); Modelica.Blocks.Interfaces.RealInput volumeFlow if useVolumeFlowInput @@ -1939,7 +1937,7 @@ Thermodynamic equations are defined by Partials.TwoPort. origin={0,100}, extent={{-10,-10},{10,10}}, rotation=270))); - protected + protected Modelica.Blocks.Sources.Constant constVolumeFlow(final k=constantVolumeFlow) if not useVolumeFlowInput annotation (Placement(transformation(extent={{10,-10},{-10,10}}, @@ -1950,7 +1948,7 @@ Thermodynamic equations are defined by Partials.TwoPort. extent={{-2,-2},{2,2}}, rotation=270, origin={0,60}))); - equation + equation Q_flow = 0; V_flow = internalVolumeFlow; connect(volumeFlow, internalVolumeFlow) annotation (Line( @@ -1962,9 +1960,9 @@ Thermodynamic equations are defined by Partials.TwoPort. color={0,0,127}, smooth=Smooth.None)); end VolumeFlow; - - model PressureIncrease "Enforces constant pressure increase" - + + model PressureIncrease "Enforces constant pressure increase" + annotation (Documentation(info=" Fan resp. pump with constant pressure increase. Mass resp. volume flow is the response of the whole system. Coolant's temperature and enthalpy flow are not affected.
@@ -1975,31 +1973,31 @@ Thermodynamic equations are defined by Partials.TwoPort. Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={ Ellipse( - extent={{-90,90},{90,-90}}, - lineColor={255,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), + extent={{-90,90},{90,-90}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text( - extent={{-150,-90},{150,-150}}, - lineColor={0,0,255}, - textString="%name"), + extent={{-150,-90},{150,-150}}, + lineColor={0,0,255}, + textString="%name"), Polygon( - points={{-60,68},{90,10},{90,-10},{-60,-68},{-60,68}}, - lineColor={0,0,255}, - fillColor={255,0,0}, - fillPattern=FillPattern.Solid), + points={{-60,68},{90,10},{90,-10},{-60,-68},{-60,68}}, + lineColor={0,0,255}, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid), Text( - extent={{-40,20},{0,-20}}, - lineColor={0,0,0}, + extent={{-40,20},{0,-20}}, + lineColor={0,0,0}, textString="dp")}), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100}, {100,100}}), graphics)); extends Interfaces.Partials.TwoPort(final tapT=1); - parameter Boolean usePressureIncreaseInput=false + parameter Boolean usePressureIncreaseInput=false "enable / disable pressure increase input" annotation(Evaluate=true); - parameter Modelica.SIunits.Pressure constantPressureIncrease(start=1) + parameter Modelica.SIunits.Pressure constantPressureIncrease(start=1) "Pressure increase" annotation(Dialog(enable=not usePressureIncreaseInput)); Modelica.Blocks.Interfaces.RealInput pressureIncrease if usePressureIncreaseInput @@ -2007,7 +2005,7 @@ Thermodynamic equations are defined by Partials.TwoPort. origin={0,100}, extent={{-10,-10},{10,10}}, rotation=270))); - protected + protected Modelica.Blocks.Sources.Constant constPressureIncrease(final k= constantPressureIncrease) if not usePressureIncreaseInput annotation (Placement(transformation(extent={{10,-10},{-10,10}}, @@ -2019,7 +2017,7 @@ Thermodynamic equations are defined by Partials.TwoPort. extent={{-2,-2},{2,2}}, rotation=270, origin={0,60}))); - equation + equation Q_flow = 0; dp = -internalPressureIncrease; connect(pressureIncrease, internalPressureIncrease) @@ -2033,9 +2031,9 @@ Thermodynamic equations are defined by Partials.TwoPort. color={0,0,127}, smooth=Smooth.None)); end PressureIncrease; - - model IdealPump "Model of an ideal pump" - + + model IdealPump "Model of an ideal pump" + annotation (Documentation(info=" Simple fan resp. pump where characteristic is dependent on shaft's speed,
torque * speed = pressure increase * volume flow (without losses)
@@ -2053,46 +2051,46 @@ Thermodynamic equations are defined by Partials.TwoPort. "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100}, {100,100}}), graphics={ Ellipse( - extent={{-90,90},{90,-90}}, - lineColor={255,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), + extent={{-90,90},{90,-90}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text( - extent={{-150,150},{150,90}}, - lineColor={0,0,255}, - textString="%name"), + extent={{-150,150},{150,90}}, + lineColor={0,0,255}, + textString="%name"), Rectangle( - extent={{-10,-40},{10,-100}}, - lineColor={0,0,0}, - fillPattern=FillPattern.VerticalCylinder, - fillColor={175,175,175}), + extent={{-10,-40},{10,-100}}, + lineColor={0,0,0}, + fillPattern=FillPattern.VerticalCylinder, + fillColor={175,175,175}), Polygon( - points={{-60,68},{90,10},{90,-10},{-60,-68},{-60,68}}, - lineColor={0,0,0}, - fillPattern=FillPattern.HorizontalCylinder, + points={{-60,68},{90,10},{90,-10},{-60,-68},{-60,68}}, + lineColor={0,0,0}, + fillPattern=FillPattern.HorizontalCylinder, fillColor={0,0,255})}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics)); extends Interfaces.Partials.TwoPort(final tapT=1); - parameter Modelica.SIunits.AngularVelocity wNominal(start=1, displayUnit="1/min") + parameter Modelica.SIunits.AngularVelocity wNominal(start=1, displayUnit="1/min") "Nominal speed" annotation(Dialog(group="Pump characteristic")); - parameter Modelica.SIunits.Pressure dp0(start=2) + parameter Modelica.SIunits.Pressure dp0(start=2) "Max. pressure increase @ V_flow=0" annotation(Dialog(group="Pump characteristic")); - parameter Modelica.SIunits.VolumeFlowRate V_flow0(start=2) + parameter Modelica.SIunits.VolumeFlowRate V_flow0(start=2) "Max. volume flow rate @ dp=0" annotation(Dialog(group="Pump characteristic")); Modelica.SIunits.AngularVelocity w=der(flange_a.phi) "Speed"; - protected + protected Modelica.SIunits.Pressure dp1; Modelica.SIunits.VolumeFlowRate V_flow1; - public + public Modelica.Mechanics.Rotational.Interfaces.Flange_a flange_a annotation (Placement(transformation(extent={{-10,-110},{10,-90}}, rotation=0))); - equation + equation // pump characteristic dp1 = dp0*sign(w/wNominal)*(w/wNominal)^2; V_flow1 = V_flow0*(w/wNominal); @@ -2108,7 +2106,7 @@ Thermodynamic equations are defined by Partials.TwoPort. end IdealPump; end Sources; - package Sensors "Ideal sensors to measure port properties" + package Sensors "Ideal sensors to measure port properties" extends Modelica.Icons.Library2; annotation (Documentation(info=" This package contains sensors: @@ -2161,44 +2159,44 @@ and the accompanying disclaimer "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ Ellipse( - extent={{-60,10},{40,-90}}, - lineColor={0,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), + extent={{-60,10},{40,-90}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Line( - points={{-10,7},{-10,-10}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{-10,7},{-10,-10}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{-50,-16},{-36,-25}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{-50,-16},{-36,-25}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{30,-15},{16,-25}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{30,-15},{16,-25}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{-35,0},{-25,-14}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{-35,0},{-25,-14}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{15,0},{5,-14}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{15,0},{5,-14}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Ellipse( - extent={{-15,-35},{-5,-45}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Line(points={{-10,-40},{-6,-26}}, color={0,0,0}), + extent={{-15,-35},{-5,-45}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Line(points={{-10,-40},{-6,-26}}, color={0,0,0}), Polygon( - points={{-12,-24},{-0.5,-27},{2,1.5},{-12,-24}}, - lineColor={0,0,0}, - fillColor={0,0,0}, + points={{-12,-24},{-0.5,-27},{2,1.5},{-12,-24}}, + lineColor={0,0,0}, + fillColor={0,0,0}, fillPattern=FillPattern.Solid)})); - - model PressureSensor "Absolute pressure sensor" - + + model PressureSensor "Absolute pressure sensor" + annotation (Documentation(info=" pSensor measures the absolute pressure.
Thermodynamic equations are defined by Partials.AbsoluteSensor. @@ -2206,7 +2204,7 @@ Thermodynamic equations are defined by Partials.AbsoluteSensor. -100},{100,100}}), graphics)); extends Interfaces.Partials.AbsoluteSensor; - equation + equation y = flowPort.p; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2215,9 +2213,9 @@ Thermodynamic equations are defined by Partials.AbsoluteSensor. textString="p")}), Diagram); end PressureSensor; - - model TemperatureSensor "Absolute temperature sensor" - + + model TemperatureSensor "Absolute temperature sensor" + annotation (Documentation(info=" TSensor measures the absolute temperature (Kelvin).
Thermodynamic equations are defined by Partials.AbsoluteSensor. @@ -2225,7 +2223,7 @@ Thermodynamic equations are defined by Partials.AbsoluteSensor. -100},{100,100}}), graphics)); extends Interfaces.Partials.AbsoluteSensor; - equation + equation medium.cp*y = flowPort.h; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2233,9 +2231,9 @@ Thermodynamic equations are defined by Partials.AbsoluteSensor. lineColor={0,0,255}, textString="T")})); end TemperatureSensor; - - model RelPressureSensor "Pressure difference sensor" - + + model RelPressureSensor "Pressure difference sensor" + annotation (Documentation(info=" dpSensor measures the pressure drop between flowPort_a and flowPort_b.
Thermodynamic equations are defined by Partials.RelativeSensor. @@ -2243,7 +2241,7 @@ Thermodynamic equations are defined by Partials.RelativeSensor. -100},{100,100}}), graphics)); extends Interfaces.Partials.RelativeSensor; - equation + equation y = flowPort_a.p - flowPort_b.p; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2251,9 +2249,9 @@ Thermodynamic equations are defined by Partials.RelativeSensor. lineColor={0,0,255}, textString="dp")})); end RelPressureSensor; - - model RelTemperatureSensor "Temperature difference sensor" - + + model RelTemperatureSensor "Temperature difference sensor" + annotation (Documentation(info=" dTSensor measures the temperature difference between flowPort_a and flowPort_b.
Thermodynamic equations are defined by Partials.RelativeSensor.
@@ -2264,7 +2262,7 @@ Outlet temperature is defined by variable T of the corresponding component. -100},{100,100}}), graphics)); extends Interfaces.Partials.RelativeSensor; - equation + equation medium.cp*y = flowPort_a.h - flowPort_b.h; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2272,9 +2270,9 @@ Outlet temperature is defined by variable T of the corresponding component. lineColor={0,0,255}, textString="dT")})); end RelTemperatureSensor; - - model MassFlowSensor "Mass flow sensor" - + + model MassFlowSensor "Mass flow sensor" + annotation (Documentation(info=" m_flowSensor measures the mass flow rate.
Thermodynamic equations are defined by Partials.FlowSensor. @@ -2282,7 +2280,7 @@ Thermodynamic equations are defined by Partials.FlowSensor. -100},{100,100}}), graphics)); extends Interfaces.Partials.FlowSensor; - equation + equation y = V_flow*medium.rho; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2290,9 +2288,9 @@ Thermodynamic equations are defined by Partials.FlowSensor. lineColor={0,0,255}, textString="m")})); end MassFlowSensor; - - model VolumeFlowSensor "Volume flow sensor" - + + model VolumeFlowSensor "Volume flow sensor" + annotation (Documentation(info=" V_flowSensor measures the volume flow rate.
Thermodynamic equations are defined by Partials.FlowSensor. @@ -2300,7 +2298,7 @@ Thermodynamic equations are defined by Partials.FlowSensor. -100},{100,100}}), graphics)); extends Interfaces.Partials.FlowSensor; - equation + equation y = V_flow; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2308,9 +2306,9 @@ Thermodynamic equations are defined by Partials.FlowSensor. lineColor={0,0,255}, textString="V")})); end VolumeFlowSensor; - - model EnthalpyFlowSensor "Enthapy flow sensor" - + + model EnthalpyFlowSensor "Enthapy flow sensor" + annotation (Documentation(info=" H_flowSensor measures the enthalpy flow rate.
Thermodynamic equations are defined by Partials.FlowSensor. @@ -2318,7 +2316,7 @@ Thermodynamic equations are defined by Partials.FlowSensor. -100,-100},{100,100}}), graphics)); extends Interfaces.Partials.FlowSensor; - equation + equation y = flowPort_a.H_flow; annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Text( @@ -2327,8 +2325,8 @@ Thermodynamic equations are defined by Partials.FlowSensor. textString="H")})); end EnthalpyFlowSensor; end Sensors; - - package Interfaces "Connectors and partial models" + + package Interfaces "Connectors and partial models" extends Modelica.Icons.Library2; annotation (Documentation(info=" This package contains connectors and partial models: @@ -2383,15 +2381,15 @@ and the accompanying disclaimer "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, - 100}}), graphics={Rectangle(extent={{-60,10},{40,-90}}, lineColor - ={255,0,0}), Ellipse( - extent={{-58,8},{38,-88}}, - lineColor={0,0,255}, - fillColor={0,0,255}, + 100}}), graphics={Rectangle(extent={{-60,10},{40,-90}}, lineColor= + {255,0,0}), Ellipse( + extent={{-58,8},{38,-88}}, + lineColor={0,0,255}, + fillColor={0,0,255}, fillPattern=FillPattern.Solid)})); - - connector FlowPort "conector flow port" - + + connector FlowPort "conector flow port" + annotation (Documentation(info=" Basic definition of the connector.
Variables: @@ -2409,70 +2407,70 @@ If ports with different media are connected, the simulation is asserted due to t Modelica.SIunits.SpecificEnthalpy h; flow Modelica.SIunits.EnthalpyFlowRate H_flow; end FlowPort; - - connector FlowPort_a "Filled flow port (used upstream)" - + + connector FlowPort_a "Filled flow port (used upstream)" + annotation (Documentation(info=" Same as FlowPort, but icon allows to differentiate direction of flow. "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={Rectangle( - extent={{-100,100},{100,-100}}, - lineColor={255,0,0}, - fillColor={255,255,255}, + extent={{-100,100},{100,-100}}, + lineColor={255,0,0}, + fillColor={255,255,255}, fillPattern=FillPattern.Solid), Ellipse( - extent={{-98,98},{98,-98}}, - lineColor={0,0,255}, - fillColor={0,0,255}, + extent={{-98,98},{98,-98}}, + lineColor={0,0,255}, + fillColor={0,0,255}, fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem( - preserveAspectRatio=true, extent={{-100,-100},{100,100}}), + preserveAspectRatio=true, extent={{-100,-100},{100,100}}), graphics={ Rectangle( - extent={{-50,50},{50,-50}}, - lineColor={255,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), + extent={{-50,50},{50,-50}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Ellipse( - extent={{-48,48},{48,-48}}, - lineColor={0,0,255}, - fillColor={0,0,255}, - fillPattern=FillPattern.Solid), + extent={{-48,48},{48,-48}}, + lineColor={0,0,255}, + fillColor={0,0,255}, + fillPattern=FillPattern.Solid), Text( - extent={{-100,110},{100,50}}, - lineColor={0,0,255}, + extent={{-100,110},{100,50}}, + lineColor={0,0,255}, textString="%name")})); extends FlowPort; end FlowPort_a; - - connector FlowPort_b "Hollow flow port (used downstream)" - + + connector FlowPort_b "Hollow flow port (used downstream)" + annotation (Documentation(info=" Same as FlowPort, but icon allows to differentiate direction of flow. "), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={Rectangle( - extent={{-100,100},{100,-100}}, - lineColor={255,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), Ellipse(extent={{-98,98},{98,-98}}, + extent={{-100,100},{100,-100}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Ellipse(extent={{-98,98},{98,-98}}, lineColor={0,0,255})}), Diagram(coordinateSystem( - preserveAspectRatio=true, extent={{-100,-100},{100,100}}), + preserveAspectRatio=true, extent={{-100,-100},{100,100}}), graphics={ Rectangle( - extent={{-50,50},{50,-50}}, - lineColor={255,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), - Ellipse(extent={{-48,48},{48,-48}}, lineColor={0,0,255}), + extent={{-50,50},{50,-50}}, + lineColor={255,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Ellipse(extent={{-48,48},{48,-48}}, lineColor={0,0,255}), Text( - extent={{-100,110},{100,50}}, - lineColor={0,0,255}, + extent={{-100,110},{100,50}}, + lineColor={0,0,255}, textString="%name")})); extends FlowPort; end FlowPort_b; - - package Partials "Partial models" + + package Partials "Partial models" extends Modelica.Icons.Library; annotation (Documentation(info=" This package contains partial models, defining in a very compact way the basic thermodynamic equations used by the different components.
@@ -2527,9 +2525,9 @@ and the accompanying disclaimer ")); - - partial model SimpleFriction "Simple friction model" - + + partial model SimpleFriction "Simple friction model" + annotation (Documentation(info=" Definition of relationship between pressure drop and volume flow rate:
-V_flowLaminar < VolumeFlow < +V_flowLaminar: laminar i.e. linear dependency of pressure drop on volume flow.
@@ -2574,34 +2572,34 @@ See also sketch at diagram layer. extent={{30,60},{60,40}}, lineColor={0,0,255}, textString="dp ~ V_flow²")})); - parameter Modelica.SIunits.VolumeFlowRate V_flowLaminar(min=Modelica.Constants.small, start=0.1) + parameter Modelica.SIunits.VolumeFlowRate V_flowLaminar(min=Modelica.Constants.small, start=0.1) "Laminar volume flow" annotation(Dialog(group="Simple Friction")); - parameter Modelica.SIunits.Pressure dpLaminar(start=0.1) + parameter Modelica.SIunits.Pressure dpLaminar(start=0.1) "Laminar pressure drop" annotation(Dialog(group="Simple Friction")); - parameter Modelica.SIunits.VolumeFlowRate V_flowNominal(start=1) + parameter Modelica.SIunits.VolumeFlowRate V_flowNominal(start=1) "Nominal volume flow" annotation(Dialog(group="Simple Friction")); - parameter Modelica.SIunits.Pressure dpNominal(start=1) + parameter Modelica.SIunits.Pressure dpNominal(start=1) "Nominal pressure drop" annotation(Dialog(group="Simple Friction")); - parameter Real frictionLoss(min=0, max=1) = 0 + parameter Real frictionLoss(min=0, max=1) = 0 "Part of friction losses fed to medium" annotation(Dialog(group="Simple Friction")); Modelica.SIunits.Pressure pressureDrop; Modelica.SIunits.VolumeFlowRate volumeFlow; Modelica.SIunits.Power Q_friction; - protected + protected parameter Modelica.SIunits.Pressure dpNomMin=dpLaminar/V_flowLaminar*V_flowNominal; parameter Real k(final unit="Pa.s2/m6", fixed=false); - initial algorithm + initial algorithm assert(V_flowNominal>V_flowLaminar, "SimpleFriction: V_flowNominal has to be > V_flowLaminar!"); assert(dpNominal>=dpNomMin, "SimpleFriction: dpNominal has to be > dpLaminar/V_flowLaminar*V_flowNominal!"); k:=(dpNominal - dpNomMin)/(V_flowNominal - V_flowLaminar)^2; - equation + equation if volumeFlow > +V_flowLaminar then pressureDrop = +dpLaminar/V_flowLaminar*volumeFlow + k*(volumeFlow - V_flowLaminar)^2; elseif volumeFlow < -V_flowLaminar then @@ -2611,9 +2609,9 @@ See also sketch at diagram layer. end if; Q_friction = frictionLoss*volumeFlow*pressureDrop; end SimpleFriction; - - partial model TwoPort "Partial model of two port" - + + partial model TwoPort "Partial model of two port" + annotation (Documentation(info=" Partial model with two flowPorts.
Possible heat exchange with the ambient is defined by Q_flow; setting this = 0 means no energy exchange.
@@ -2622,41 +2620,41 @@ leads to neglection of temperature transient cv*m*der(T).
Mixing rule is applied.
Parameter 0 < tapT < 1 defines temperature of heatPort between medium's inlet and outlet temperature. ")); - parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() + parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() "Medium in the component" annotation(choicesAllMatching=true); parameter Modelica.SIunits.Mass m(start=1) "Mass of medium"; - parameter Modelica.SIunits.Temperature T0(start=293.15, displayUnit="degC") + parameter Modelica.SIunits.Temperature T0(start=293.15, displayUnit="degC") "Initial temperature of medium" annotation(Dialog(enable=m>Modelica.Constants.small)); - parameter Real tapT(final min=0, final max=1)=1 + parameter Real tapT(final min=0, final max=1)=1 "Defines temperature of heatPort between inlet and outlet temperature"; - Modelica.SIunits.Pressure dp=flowPort_a.p - flowPort_b.p + Modelica.SIunits.Pressure dp=flowPort_a.p - flowPort_b.p "Pressure drop a->b"; - Modelica.SIunits.VolumeFlowRate V_flow=flowPort_a.m_flow/medium.rho + Modelica.SIunits.VolumeFlowRate V_flow=flowPort_a.m_flow/medium.rho "Volume flow a->b"; Modelica.SIunits.HeatFlowRate Q_flow "Heat exchange with ambient"; - output Modelica.SIunits.Temperature T(start=T0) + output Modelica.SIunits.Temperature T(start=T0) "Outlet temperature of medium"; - output Modelica.SIunits.Temperature T_a=flowPort_a.h/medium.cp + output Modelica.SIunits.Temperature T_a=flowPort_a.h/medium.cp "Temperature at flowPort_a"; - output Modelica.SIunits.Temperature T_b=flowPort_b.h/medium.cp + output Modelica.SIunits.Temperature T_b=flowPort_b.h/medium.cp "Temperature at flowPort_b"; - output Modelica.SIunits.TemperatureDifference dT=if noEvent(V_flow>=0) then T-T_a else T_b-T + output Modelica.SIunits.TemperatureDifference dT=if noEvent(V_flow>=0) then T-T_a else T_b-T "Temperature increase of coolant in flow direction"; - protected - Modelica.SIunits.SpecificEnthalpy h = medium.cp*T + protected + Modelica.SIunits.SpecificEnthalpy h = medium.cp*T "Medium's specific enthalpy"; - Modelica.SIunits.Temperature T_q = T - noEvent(sign(V_flow))*(1 - tapT)*dT + Modelica.SIunits.Temperature T_q = T - noEvent(sign(V_flow))*(1 - tapT)*dT "Temperature relevant for heat exchange with ambient"; - public + public Interfaces.FlowPort_a flowPort_a(final medium=medium) annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); Interfaces.FlowPort_b flowPort_b(final medium=medium) annotation (Placement(transformation(extent={{90,-10},{110,10}}, rotation=0))); - equation + equation // mass balance flowPort_a.m_flow + flowPort_b.m_flow = 0; // energy balance @@ -2670,47 +2668,47 @@ Parameter 0 < tapT < 1 defines temperature of heatPort between medium's in flowPort_a.H_flow = semiLinear(flowPort_a.m_flow,flowPort_a.h,h); flowPort_b.H_flow = semiLinear(flowPort_b.m_flow,flowPort_b.h,h); end TwoPort; - - partial model Ambient "Partial model of ambient" - + + partial model Ambient "Partial model of ambient" + annotation (Documentation(info="

Partial model of (Infinite) ambient, defines pressure and temperature.

"), Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100}, {100,100}}), graphics={Ellipse( - extent={{-90,90},{90,-90}}, - lineColor={255,0,0}, - fillColor={0,0,255}, + extent={{-90,90},{90,-90}}, + lineColor={255,0,0}, + fillColor={0,0,255}, fillPattern=FillPattern.Solid), Text( - extent={{-150,150},{150,90}}, - lineColor={0,0,255}, + extent={{-150,150},{150,90}}, + lineColor={0,0,255}, textString="%name")})); - parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() + parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() "Ambient medium" annotation(choicesAllMatching=true); output Modelica.SIunits.Temperature T "Outlet temperature of medium"; - output Modelica.SIunits.Temperature T_port=flowPort.h/medium.cp + output Modelica.SIunits.Temperature T_port=flowPort.h/medium.cp "Temperature at flowPort_a"; - protected + protected Modelica.SIunits.SpecificEnthalpy h = medium.cp*T; - public + public Interfaces.FlowPort_a flowPort(final medium=medium) annotation (Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0))); - equation + equation // massflow -> ambient: mixing rule // massflow <- ambient: energy flow defined by ambient's temperature flowPort.H_flow = semiLinear(flowPort.m_flow,flowPort.h,h); end Ambient; - - partial model AbsoluteSensor "Partial model of absolute sensor" - + + partial model AbsoluteSensor "Partial model of absolute sensor" + annotation (Documentation(info=" Partial model for an absolute sensor (pressure/temperature).
Pressure, mass flow, temperature and enthalpy flow of medium are not affected. ")); - parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() + parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() "Sensor's medium" annotation(choicesAllMatching=true); Interfaces.FlowPort_a flowPort(final medium=medium) @@ -2751,20 +2749,20 @@ Pressure, mass flow, temperature and enthalpy flow of medium are not affected. Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics)); - equation + equation // no mass exchange flowPort.m_flow = 0; // no energy exchange flowPort.H_flow = 0; end AbsoluteSensor; - - partial model RelativeSensor "Partial model of relative sensor" - + + partial model RelativeSensor "Partial model of relative sensor" + annotation (Documentation(info=" Partial model for a relative sensor (pressure drop/temperature difference).
Pressure, mass flow, temperature and enthalpy flow of medium are not affected. ")); - parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() + parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium() "Sensor's medium" annotation(choicesAllMatching=true); Interfaces.FlowPort_a flowPort_a(final medium=medium) @@ -2811,7 +2809,7 @@ Pressure, mass flow, temperature and enthalpy flow of medium are not affected. Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics)); - equation + equation // no mass exchange flowPort_a.m_flow = 0; flowPort_b.m_flow = 0; @@ -2819,9 +2817,9 @@ Pressure, mass flow, temperature and enthalpy flow of medium are not affected. flowPort_a.H_flow = 0; flowPort_b.H_flow = 0; end RelativeSensor; - - partial model FlowSensor "Partial model of flow sensor" - + + partial model FlowSensor "Partial model of flow sensor" + annotation (Documentation(info=" Partial model for a flow sensor (mass flow/heat flow).
Pressure, mass flow, temperature and enthalpy flow of medium are not affected, but mixing rule is applied. @@ -2865,7 +2863,7 @@ Pressure, mass flow, temperature and enthalpy flow of medium are not affected, b Diagram(coordinateSystem(preserveAspectRatio= false, extent={{-100,-100},{100,100}}), graphics)); - equation + equation // no pressure drop dp = 0; // no energy exchange diff --git a/Modelica/Thermal/HeatTransfer.mo b/Modelica/Thermal/HeatTransfer.mo index 3e6123105b..fe8d16bc7c 100644 --- a/Modelica/Thermal/HeatTransfer.mo +++ b/Modelica/Thermal/HeatTransfer.mo @@ -1,8 +1,8 @@ within Modelica.Thermal; -package HeatTransfer - "Library of 1-dimensional heat transfer with lumped elements" +package HeatTransfer + "Library of 1-dimensional heat transfer with lumped elements" import Modelica.SIunits.Conversions.*; extends Modelica.Icons.Library2; annotation ( @@ -12,48 +12,48 @@ package HeatTransfer 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}}, - lineColor={128,128,128}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), + {-40,-20},{-42,-13},{-47,-7},{-54,-5},{-54,-6}}, + lineColor={128,128,128}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), 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}}, - lineColor={0,0,0}, - fillColor={160,160,164}, - fillPattern=FillPattern.Solid), + {-75,-15},{-75,-15}}, + lineColor={0,0,0}, + fillColor={160,160,164}, + fillPattern=FillPattern.Solid), 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}}, - lineColor={160,160,164}, - fillColor={192,192,192}, - fillPattern=FillPattern.Solid), + 51,-13},{46,-7},{39,-5},{39,-6}}, + lineColor={160,160,164}, + fillColor={192,192,192}, + fillPattern=FillPattern.Solid), 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}}, - lineColor={0,0,0}, - fillColor={160,160,164}, - fillPattern=FillPattern.Solid), + 18,-15}}, + lineColor={0,0,0}, + fillColor={160,160,164}, + fillPattern=FillPattern.Solid), Polygon( - points={{-9,-23},{-9,-10},{18,-17},{-9,-23}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{-9,-23},{-9,-10},{18,-17},{-9,-23}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{-41,-17},{-9,-17}}, - color={191,0,0}, - thickness=2), + points={{-41,-17},{-9,-17}}, + color={191,0,0}, + thickness=2), Line( - points={{-17,-40},{15,-40}}, - color={191,0,0}, - thickness=2), + points={{-17,-40},{15,-40}}, + color={191,0,0}, + thickness=2), Polygon( - points={{-17,-46},{-17,-34},{-40,-40},{-17,-46}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + points={{-17,-46},{-17,-34},{-40,-40},{-17,-46}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -160,13 +160,13 @@ Modelica in file \"Modelica/package.mo\". componentes moved to sub-packages ")); - package Examples - "Example models to demonstrate the usage of package Modelica.Thermal.HeatTransfer" + package Examples + "Example models to demonstrate the usage of package Modelica.Thermal.HeatTransfer" extends Modelica.Icons.Library2; - - model TwoMasses "Simple conduction demo" + + model TwoMasses "Simple conduction demo" extends Modelica.Icons.Example; - parameter Modelica.SIunits.Temperature T_final_K(fixed=false) + parameter Modelica.SIunits.Temperature T_final_K(fixed=false) "Projected final temperature"; HeatTransfer.Components.HeatCapacitor mass1( C=15, T(start=373.15, fixed=true)) @@ -200,7 +200,7 @@ Tsensor1.T, Tsensor2.T, T_final_degC transformation(extent={{-60,-80},{-20,-40}}, rotation=0))); HeatTransfer.Celsius.TemperatureSensor Tsensor2 annotation (Placement( transformation(extent={{60,-80},{20,-40}}, rotation=0))); - equation + equation connect(mass1.port, conduction.port_a) annotation (Line(points={{-70,20}, {-70,10},{-30,10}}, color={191,0,0})); connect(conduction.port_b, mass2.port) annotation (Line(points={{30,10},{ @@ -209,17 +209,17 @@ Tsensor1.T, Tsensor2.T, T_final_degC -60},{-60,-60}}, color={191,0,0})); connect(mass2.port, Tsensor2.port) annotation (Line(points={{70,20},{70, -60},{60,-60}}, color={191,0,0})); - initial equation + initial equation T_final_K = (mass1.T*mass1.C + mass2.T*mass2.C)/(mass1.C + mass2.C); end TwoMasses; - - model ControlledTemperature "Control temperature of a resistor" + + model ControlledTemperature "Control temperature of a resistor" extends Modelica.Icons.Example; - parameter Modelica.SIunits.Temperature TAmb(displayUnit="degC") = 293.15 + parameter Modelica.SIunits.Temperature TAmb(displayUnit="degC") = 293.15 "Ambient Temperature"; - parameter Modelica.SIunits.TemperatureDifference TDif = 2 + parameter Modelica.SIunits.TemperatureDifference TDif = 2 "Error in Temperature"; - output Modelica.SIunits.Temperature TRes(displayUnit="degC") = heatingResistor.heatPort.T + output Modelica.SIunits.Temperature TRes(displayUnit="degC") = heatingResistor.heatPort.T "Resulting Temperature"; annotation (Documentation(info="

@@ -288,7 +288,7 @@ An approppriate simulating time would be 10 seconds. Modelica.Blocks.Logical.Not logicalNot annotation (Placement(transformation( extent={{-30,-20},{-50,0}}, rotation=0))); - equation + equation connect(constantVoltage.n, heatingResistor.n) annotation (Line(points={{-90,-60}, {-30,-60}}, color={0,0,255})); connect(constantVoltage.n, ground.p) annotation (Line(points={{-90,-60}, @@ -316,10 +316,10 @@ An approppriate simulating time would be 10 seconds. annotation (Line(points={{-51,-10}, {-60,-10},{-60,-33}}, color={255,0,255})); end ControlledTemperature; - - model Motor "Second order thermal model of a motor" + + model Motor "Second order thermal model of a motor" extends Modelica.Icons.Example; - parameter Modelica.SIunits.Temperature TAmb(displayUnit="degC") = 293.15 + parameter Modelica.SIunits.Temperature TAmb(displayUnit="degC") = 293.15 "Ambient temperature"; annotation (Documentation(info="

@@ -354,7 +354,7 @@ Simulate for 7200 s; plot Twinding.T and Tcore.T. Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics)); - + Modelica.Blocks.Sources.CombiTimeTable lossTable(extrapolation=Modelica. Blocks.Types.Extrapolation.Periodic, table=[0,100,500; 360,100,500; 360,1000,500; 600,1000,500]) @@ -410,7 +410,7 @@ Simulate for 7200 s; plot Twinding.T and Tcore.T. origin={80,-10}, extent={{-10,-10},{10,10}}, rotation=180))); - equation + equation connect(windingLosses.port, winding.port) annotation (Line(points={{-80, 0},{-80,-20}}, color={191,0,0})); connect(coreLosses.port, core.port) annotation (Line(points={{ @@ -441,55 +441,54 @@ Simulate for 7200 s; plot Twinding.T and Tcore.T. 127})); end Motor; annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics={Ellipse(extent={{-60,10},{40,-90}}, + -100},{100,100}}), graphics={Ellipse(extent={{-60,10},{40,-90}}, lineColor={135,135,135}), Polygon( - points={{-30,-12},{-30,-68},{28,-40},{-30,-12}}, - lineColor={135,135,135}, - fillColor={135,135,135}, + points={{-30,-12},{-30,-68},{28,-40},{-30,-12}}, + lineColor={135,135,135}, + fillColor={135,135,135}, fillPattern=FillPattern.Solid)}), Documentation(info=" ")); end Examples; - - - package Components "Lumped thermal components" + + package Components "Lumped thermal components" extends Modelica.Icons.Library2; - + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={ Rectangle( - extent={{-100,18},{-70,-100}}, - lineColor={0,0,0}, - fillColor={192,192,192}, - fillPattern=FillPattern.Backward), - Line(points={{-44,16},{-44,-100}}, color={0,127,255}), - Line(points={{-4,16},{-4,-100}}, color={0,127,255}), - Line(points={{30,18},{30,-100}}, color={0,127,255}), - Line(points={{66,18},{66,-100}}, color={0,127,255}), - Line(points={{66,-100},{76,-80}}, color={0,127,255}), - Line(points={{66,-100},{56,-80}}, color={0,127,255}), - Line(points={{30,-100},{40,-80}}, color={0,127,255}), - Line(points={{30,-100},{20,-80}}, color={0,127,255}), - Line(points={{-4,-100},{6,-80}}, color={0,127,255}), - Line(points={{-4,-100},{-14,-80}}, color={0,127,255}), - Line(points={{-44,-100},{-34,-80}}, color={0,127,255}), - Line(points={{-44,-100},{-54,-80}}, color={0,127,255}), - Line(points={{-70,-60},{66,-60}}, color={191,0,0}), - Line(points={{46,-70},{66,-60}}, color={191,0,0}), - Line(points={{46,-50},{66,-60}}, color={191,0,0}), - Line(points={{46,-30},{66,-20}}, color={191,0,0}), - Line(points={{46,-10},{66,-20}}, color={191,0,0}), + extent={{-100,18},{-70,-100}}, + lineColor={0,0,0}, + fillColor={192,192,192}, + fillPattern=FillPattern.Backward), + Line(points={{-44,16},{-44,-100}}, color={0,127,255}), + Line(points={{-4,16},{-4,-100}}, color={0,127,255}), + Line(points={{30,18},{30,-100}}, color={0,127,255}), + Line(points={{66,18},{66,-100}}, color={0,127,255}), + Line(points={{66,-100},{76,-80}}, color={0,127,255}), + Line(points={{66,-100},{56,-80}}, color={0,127,255}), + Line(points={{30,-100},{40,-80}}, color={0,127,255}), + Line(points={{30,-100},{20,-80}}, color={0,127,255}), + Line(points={{-4,-100},{6,-80}}, color={0,127,255}), + Line(points={{-4,-100},{-14,-80}}, color={0,127,255}), + Line(points={{-44,-100},{-34,-80}}, color={0,127,255}), + Line(points={{-44,-100},{-54,-80}}, color={0,127,255}), + Line(points={{-70,-60},{66,-60}}, color={191,0,0}), + Line(points={{46,-70},{66,-60}}, color={191,0,0}), + Line(points={{46,-50},{66,-60}}, color={191,0,0}), + Line(points={{46,-30},{66,-20}}, color={191,0,0}), + Line(points={{46,-10},{66,-20}}, color={191,0,0}), Line(points={{-70,-20},{66,-20}}, color={191,0,0})}), Documentation( info=" ")); - model HeatCapacitor "Lumped thermal element storing heat" - parameter Modelica.SIunits.HeatCapacity C + model HeatCapacitor "Lumped thermal element storing heat" + parameter Modelica.SIunits.HeatCapacity C "Heat capacity of element (= cp*m)"; - Modelica.SIunits.Temperature T(start=293.15, displayUnit="degC") + Modelica.SIunits.Temperature T(start=293.15, displayUnit="degC") "Temperature of element"; - Modelica.SIunits.TemperatureSlope der_T(start=0) + Modelica.SIunits.TemperatureSlope der_T(start=0) "Time derivative of temperature (= der(T))"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -611,18 +610,18 @@ compute C: origin={0,-100}, extent={{-10,-10},{10,10}}, rotation=90))); - equation + equation T = port.T; der_T = der(T); C*der(T) = port.Q_flow; end HeatCapacitor; - - model ThermalConductor - "Lumped thermal element transporting heat without storing it" + + model ThermalConductor + "Lumped thermal element transporting heat without storing it" extends Interfaces.Element1D; - parameter Modelica.SIunits.ThermalConductance G + parameter Modelica.SIunits.ThermalConductance G "Constant thermal conductance of material"; - + annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ @@ -712,11 +711,11 @@ e.g., with one of the following equations: ")); - equation + equation Q_flow = G*dT; end ThermalConductor; - - model Convection "Lumped thermal element for heat convection" + + model Convection "Lumped thermal element for heat convection" Modelica.SIunits.HeatFlowRate Q_flow "Heat flow rate from solid -> fluid"; Modelica.SIunits.TemperatureDifference dT "= solid.T - fluid.T"; annotation ( @@ -850,7 +849,7 @@ McGraw-Hill, 1997, p.270): Line(points={{56,-10},{76,-20}}, color={191,0,0}), Line(points={{56,10},{76,20}}, color={191,0,0}), Line(points={{56,30},{76,20}}, color={191,0,0})))); - Modelica.Blocks.Interfaces.RealInput Gc + Modelica.Blocks.Interfaces.RealInput Gc "Signal representing the convective thermal conductance in [W/K]" annotation (Placement(transformation( origin={0,100}, @@ -860,16 +859,16 @@ McGraw-Hill, 1997, p.270): -110,-10},{-90,10}}, rotation=0))); Interfaces.HeatPort_b fluid annotation (Placement(transformation(extent={{ 90,-10},{110,10}}, rotation=0))); - equation + equation dT = solid.T - fluid.T; solid.Q_flow = Q_flow; fluid.Q_flow = -Q_flow; Q_flow = Gc*dT; end Convection; - - model BodyRadiation "Lumped thermal element for radiation heat transfer" + + model BodyRadiation "Lumped thermal element for radiation heat transfer" extends Interfaces.Element1D; - parameter Real Gr(unit="m2") + parameter Real Gr(unit="m2") "Net radiation conductance between two surfaces (see docu)"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -1010,73 +1009,73 @@ place from the inner to the outer cylinder): Line(points={{-40,30},{40,30}}, color={191,0,0}), Line(points={{30,24},{40,30}}, color={191,0,0}), Line(points={{30,36},{40,30}}, color={191,0,0})))); - equation + equation Q_flow = Gr*Modelica.Constants.sigma*(port_a.T^4 - port_b.T^4); end BodyRadiation; end Components; - - package Sources "Thermal sources" + + package Sources "Thermal sources" extends Modelica.Icons.Library2; - + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={ Line( - points={{-100,-20},{36,-20}}, - color={191,0,0}, - thickness=2), + points={{-100,-20},{36,-20}}, + color={191,0,0}, + thickness=2), Line( - points={{-100,-60},{38,-60}}, - color={191,0,0}, - thickness=2), + points={{-100,-60},{38,-60}}, + color={191,0,0}, + thickness=2), Polygon( - points={{30,-80},{30,-40},{60,-60},{30,-80}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{30,-80},{30,-40},{60,-60},{30,-80}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Polygon( - points={{30,-40},{30,0},{60,-20},{30,-40}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{30,-40},{30,0},{60,-20},{30,-40}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Rectangle( - extent={{60,0},{80,-80}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + extent={{60,0},{80,-80}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Documentation(info=" ")); - model FixedTemperature "Fixed temperature boundary condition in Kelvin" - + model FixedTemperature "Fixed temperature boundary condition in Kelvin" + parameter Modelica.SIunits.Temperature T "Fixed temperature at port"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ Text( - extent={{-121,162},{119,102}}, - textString="%name", - lineColor={0,0,255}), + extent={{-121,162},{119,102}}, + textString="%name", + lineColor={0,0,255}), Text( - extent={{-121,-105},{119,-151}}, - lineColor={0,0,0}, - textString="T=%T"), + extent={{-121,-105},{119,-151}}, + lineColor={0,0,0}, + textString="T=%T"), Rectangle( - extent={{-100,100},{100,-100}}, - lineColor={0,0,0}, - pattern=LinePattern.None, - fillColor={159,159,223}, - fillPattern=FillPattern.Backward), - Text( - extent={{0,0},{-100,-100}}, - lineColor={0,0,0}, - textString="K"), + extent={{-100,100},{100,-100}}, + lineColor={0,0,0}, + pattern=LinePattern.None, + fillColor={159,159,223}, + fillPattern=FillPattern.Backward), + Text( + extent={{0,0},{-100,-100}}, + lineColor={0,0,0}, + textString="K"), Line( - points={{-52,0},{56,0}}, - color={191,0,0}, - thickness=2), + points={{-52,0},{56,0}}, + color={191,0,0}, + thickness=2), Polygon( - points={{50,-20},{50,20},{90,0},{50,-20}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + points={{50,-20},{50,20},{90,0},{50,-20}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -1107,38 +1106,38 @@ i.e., it defines a fixed temperature as a boundary condition. fillPattern=FillPattern.Solid)))); Interfaces.HeatPort_b port annotation (Placement(transformation(extent={{90, -10},{110,10}}, rotation=0))); - equation + equation port.T = T; end FixedTemperature; - - model PrescribedTemperature - "Variable temperature boundary condition in Kelvin" - + + model PrescribedTemperature + "Variable temperature boundary condition in Kelvin" + annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ Rectangle( - extent={{-100,100},{100,-100}}, - lineColor={0,0,0}, - pattern=LinePattern.None, - fillColor={159,159,223}, - fillPattern=FillPattern.Backward), + extent={{-100,100},{100,-100}}, + lineColor={0,0,0}, + pattern=LinePattern.None, + fillColor={159,159,223}, + fillPattern=FillPattern.Backward), Line( - points={{-102,0},{64,0}}, - color={191,0,0}, - thickness=2), + points={{-102,0},{64,0}}, + color={191,0,0}, + thickness=2), Text( - extent={{0,0},{-100,-100}}, - lineColor={0,0,0}, - textString="K"), + extent={{0,0},{-100,-100}}, + lineColor={0,0,0}, + textString="K"), Text( - extent={{-125,162},{115,102}}, - textString="%name", - lineColor={0,0,255}), + extent={{-125,162},{115,102}}, + textString="%name", + lineColor={0,0,255}), Polygon( - points={{50,-20},{50,20},{90,0},{50,-20}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + points={{50,-20},{50,20},{90,0},{50,-20}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Documentation(info="

@@ -1174,50 +1173,50 @@ as required to keep the temperature at the specified value. -10},{110,10}}, rotation=0))); Modelica.Blocks.Interfaces.RealInput T annotation (Placement(transformation( extent={{-140,-20},{-100,20}}, rotation=0))); - equation + equation port.T = T; end PrescribedTemperature; - - model FixedHeatFlow "Fixed heat flow boundary condition" - parameter Modelica.SIunits.HeatFlowRate Q_flow + + model FixedHeatFlow "Fixed heat flow boundary condition" + parameter Modelica.SIunits.HeatFlowRate Q_flow "Fixed heat flow rate at port"; - parameter Modelica.SIunits.Temperature T_ref=293.15 + parameter Modelica.SIunits.Temperature T_ref=293.15 "Reference temperature"; - parameter Modelica.SIunits.LinearTemperatureCoefficient alpha=0 + parameter Modelica.SIunits.LinearTemperatureCoefficient alpha=0 "Temperature coefficient of heat flow rate"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ Text( - extent={{-134,120},{132,60}}, - textString="%name", - lineColor={0,0,255}), + extent={{-134,120},{132,60}}, + textString="%name", + lineColor={0,0,255}), Text( - extent={{-137,-52},{133,-100}}, - lineColor={0,0,0}, - textString="Q_flow=%Q_flow"), + extent={{-137,-52},{133,-100}}, + lineColor={0,0,0}, + textString="Q_flow=%Q_flow"), Line( - points={{-100,-20},{48,-20}}, - color={191,0,0}, - thickness=2), + points={{-100,-20},{48,-20}}, + color={191,0,0}, + thickness=2), Line( - points={{-100,20},{46,20}}, - color={191,0,0}, - thickness=2), + points={{-100,20},{46,20}}, + color={191,0,0}, + thickness=2), Polygon( - points={{40,0},{40,40},{70,20},{40,0}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{40,0},{40,40},{70,20},{40,0}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Polygon( - points={{40,-40},{40,0},{70,-20},{40,-40}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{40,-40},{40,0},{70,-20},{40,-40}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Rectangle( - extent={{70,40},{90,-40}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + extent={{70,40},{90,-40}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={ @@ -1259,52 +1258,52 @@ in order to simulate temperature dependent losses (which are given an reference ")); Interfaces.HeatPort_b port annotation (Placement(transformation(extent={{90, -10},{110,10}}, rotation=0))); - equation + equation port.Q_flow = -Q_flow*(1 + alpha*(port.T - T_ref)); end FixedHeatFlow; - - model PrescribedHeatFlow "Prescribed heat flow boundary condition" - parameter Modelica.SIunits.Temperature T_ref=293.15 + + model PrescribedHeatFlow "Prescribed heat flow boundary condition" + parameter Modelica.SIunits.Temperature T_ref=293.15 "Reference temperature"; - parameter Modelica.SIunits.LinearTemperatureCoefficient alpha=0 + parameter Modelica.SIunits.LinearTemperatureCoefficient alpha=0 "Temperature coefficient of heat flow rate"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ Line( - points={{-60,-20},{40,-20}}, - color={191,0,0}, - thickness=2), + points={{-60,-20},{40,-20}}, + color={191,0,0}, + thickness=2), Line( - points={{-60,20},{40,20}}, - color={191,0,0}, - thickness=2), + points={{-60,20},{40,20}}, + color={191,0,0}, + thickness=2), Line( - points={{-80,0},{-60,-20}}, - color={191,0,0}, - thickness=2), + points={{-80,0},{-60,-20}}, + color={191,0,0}, + thickness=2), Line( - points={{-80,0},{-60,20}}, - color={191,0,0}, - thickness=2), + points={{-80,0},{-60,20}}, + color={191,0,0}, + thickness=2), Polygon( - points={{40,0},{40,40},{70,20},{40,0}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{40,0},{40,40},{70,20},{40,0}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Polygon( - points={{40,-40},{40,0},{70,-20},{40,-40}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + points={{40,-40},{40,0},{70,-20},{40,-40}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Rectangle( - extent={{70,40},{90,-40}}, - lineColor={191,0,0}, - fillColor={191,0,0}, - fillPattern=FillPattern.Solid), + extent={{70,40},{90,-40}}, + lineColor={191,0,0}, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), Text( - extent={{-134,120},{132,60}}, - textString="%name", + extent={{-134,120},{132,60}}, + textString="%name", lineColor={0,0,255})}), Documentation(info="

@@ -1354,56 +1353,56 @@ in order to simulate temperature dependent losses (which are given an reference rotation=180))); Interfaces.HeatPort_b port annotation (Placement(transformation(extent={{90, -10},{110,10}}, rotation=0))); - equation + equation port.Q_flow = -Q_flow*(1 + alpha*(port.T - T_ref)); end PrescribedHeatFlow; end Sources; - package Sensors "Thermal sensors" + package Sensors "Thermal sensors" extends Modelica.Icons.Library2; - + annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={ Ellipse( - extent={{-60,10},{40,-90}}, - lineColor={0,0,0}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), + extent={{-60,10},{40,-90}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Line( - points={{-50,-16},{-36,-25}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{-50,-16},{-36,-25}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{-35,0},{-25,-14}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{-35,0},{-25,-14}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{-10,7},{-10,-10}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{-10,7},{-10,-10}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{15,0},{5,-14}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{15,0},{5,-14}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Line( - points={{30,-15},{16,-25}}, - color={0,0,0}, - fillPattern=FillPattern.Solid), + points={{30,-15},{16,-25}}, + color={0,0,0}, + fillPattern=FillPattern.Solid), Ellipse( - extent={{-15,-35},{-5,-45}}, - lineColor={0,0,0}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Line(points={{-10,-40},{-6,-26}}, color={0,0,0}), + extent={{-15,-35},{-5,-45}}, + lineColor={0,0,0}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Line(points={{-10,-40},{-6,-26}}, color={0,0,0}), Polygon( - points={{-12,-24},{-0.5,-27},{2,1.5},{-12,-24}}, - lineColor={0,0,0}, - fillColor={0,0,0}, + points={{-12,-24},{-0.5,-27},{2,1.5},{-12,-24}}, + lineColor={0,0,0}, + fillColor={0,0,0}, fillPattern=FillPattern.Solid)}), Documentation(info=" ")); - model TemperatureSensor "Absolute temperature sensor in Kelvin" - + model TemperatureSensor "Absolute temperature sensor in Kelvin" + annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics( @@ -1494,12 +1493,12 @@ sensor model. transformation(extent={{90,-10},{110,10}}, rotation=0))); Interfaces.HeatPort_a port annotation (Placement(transformation(extent={{ -110,-10},{-90,10}}, rotation=0))); - equation + equation T = port.T; port.Q_flow = 0; end TemperatureSensor; - - model RelTemperatureSensor "Relative Temperature sensor" + + model RelTemperatureSensor "Relative Temperature sensor" extends Modelica.Icons.TranslationalSensor; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -1542,15 +1541,15 @@ the two ports of this component and is provided as output signal in Kelvin. origin={0,-90}, extent={{10,-10},{-10,10}}, rotation=90))); - equation + equation T_rel = port_a.T - port_b.T; 0 = port_a.Q_flow; 0 = port_b.Q_flow; end RelTemperatureSensor; - - model HeatFlowSensor "Heat flow rate sensor" + + model HeatFlowSensor "Heat flow rate sensor" extends Modelica.Icons.RotationalSensor; - Modelica.Blocks.Interfaces.RealOutput Q_flow + Modelica.Blocks.Interfaces.RealOutput Q_flow "Heat flow from port_a to port_b" annotation (Placement( transformation( origin={0,-100}, @@ -1591,19 +1590,18 @@ to port_b. -110,-10},{-90,10}}, rotation=0))); Interfaces.HeatPort_b port_b annotation (Placement(transformation(extent={{ 90,-10},{110,10}}, rotation=0))); - equation + equation port_a.T = port_b.T; port_a.Q_flow + port_b.Q_flow = 0; Q_flow = port_a.Q_flow; end HeatFlowSensor; end Sensors; - - - package Celsius "Components with Celsius input and/or output" - + + package Celsius "Components with Celsius input and/or output" + extends Modelica.Icons.Library2; - - model ToKelvin "Conversion block from °Celsius to Kelvin" + + model ToKelvin "Conversion block from °Celsius to Kelvin" annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={ @@ -1660,11 +1658,11 @@ and provide is as output signal. Modelica.Blocks.Interfaces.RealOutput Kelvin annotation (Placement(transformation(extent={{100,-10},{120,10}}, rotation=0))); - equation + equation Kelvin = from_degC(Celsius); end ToKelvin; - - model FromKelvin "Conversion from Kelvin to °Celsius" + + model FromKelvin "Conversion from Kelvin to °Celsius" annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ @@ -1721,13 +1719,13 @@ and provides is as output signal. Modelica.Blocks.Interfaces.RealOutput Celsius annotation (Placement(transformation(extent={{100,-10},{120,10}}, rotation=0))); - equation + equation Celsius = to_degC(Kelvin); end FromKelvin; - - model FixedTemperature - "Fixed temperature boundary condition in degree Celsius" - parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degC T + + model FixedTemperature + "Fixed temperature boundary condition in degree Celsius" + parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degC T "Fixed Temperature at the port"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -1788,13 +1786,13 @@ i.e., it defines a fixed temperature as a boundary condition. fillPattern=FillPattern.Solid)))); Interfaces.HeatPort_b port annotation (Placement(transformation(extent={{ 90,-10},{110,10}}, rotation=0))); - equation + equation port.T = from_degC(T); end FixedTemperature; - - model PrescribedTemperature - "Variable temperature boundary condition in °Celsius" - + + model PrescribedTemperature + "Variable temperature boundary condition in °Celsius" + annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ @@ -1859,10 +1857,10 @@ as required to keep the temperature at the specified value. 90,-10},{110,10}}, rotation=0))); Modelica.Blocks.Interfaces.RealInput T annotation (Placement( transformation(extent={{-140,-20},{-100,20}}, rotation=0))); - equation + equation port.T = from_degC(T); end PrescribedTemperature; - + annotation (Documentation(info="

The components of this package are provided for the convenience of @@ -1883,11 +1881,11 @@ Example: "), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={Text( - extent={{38,10},{-62,-90}}, - lineColor={0,0,0}, + extent={{38,10},{-62,-90}}, + lineColor={0,0,0}, textString="°C")})); - model TemperatureSensor "Absolute temperature sensor in °Celsius" - + model TemperatureSensor "Absolute temperature sensor in °Celsius" + annotation ( Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={ @@ -1978,17 +1976,17 @@ sensor model. transformation(extent={{90,-10},{110,10}}, rotation=0))); Interfaces.HeatPort_a port annotation (Placement(transformation(extent={{ -110,-10},{-90,10}}, rotation=0))); - equation + equation T = to_degC(port.T); port.Q_flow = 0; end TemperatureSensor; end Celsius; - - package Fahrenheit "Components with Fahrenheit input and/or output" - + + package Fahrenheit "Components with Fahrenheit input and/or output" + extends Modelica.Icons.Library2; - - model ToKelvin "Conversion block from °Fahrenheit to Kelvin" + + model ToKelvin "Conversion block from °Fahrenheit to Kelvin" annotation ( Diagram(graphics={ Ellipse( @@ -2043,11 +2041,11 @@ and provides is as output signal. Modelica.Blocks.Interfaces.RealOutput Kelvin annotation (Placement(transformation(extent={{100,-10},{120,10}}, rotation=0))); - equation + equation Kelvin = from_degF(Fahrenheit); end ToKelvin; - - model FromKelvin "Conversion from Kelvin to °Fahrenheit" + + model FromKelvin "Conversion from Kelvin to °Fahrenheit" parameter Integer n=1 "Number of inputs (= number of outputs)"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -2104,13 +2102,13 @@ and provides them as output signals. Modelica.Blocks.Interfaces.RealOutput Fahrenheit annotation (Placement(transformation(extent={{100,-10},{120,10}}, rotation= 0))); - equation + equation Fahrenheit = to_degF(Kelvin); end FromKelvin; - - model FixedTemperature - "Fixed temperature boundary condition in °Fahrenheit" - parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degF T + + model FixedTemperature + "Fixed temperature boundary condition in °Fahrenheit" + parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degF T "Fixed Temperature at the port"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -2171,13 +2169,13 @@ i.e., it defines a fixed temperature as a boundary condition. fillPattern=FillPattern.Solid)))); Interfaces.HeatPort_b port annotation (Placement(transformation(extent={{ 90,-10},{110,10}}, rotation=0))); - equation + equation port.T = from_degF(T); end FixedTemperature; - - model PrescribedTemperature - "Variable temperature boundary condition in °Fahrenheit" - + + model PrescribedTemperature + "Variable temperature boundary condition in °Fahrenheit" + annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ @@ -2242,10 +2240,10 @@ as required to keep the temperature at the specified value. Modelica.Blocks.Interfaces.RealInput T annotation (Placement(transformation(extent={{-140,-20},{-100,20}}, rotation=0))); - equation + equation port.T = from_degF(T); end PrescribedTemperature; - + annotation (Documentation(info="

The components of this package are provided for the convenience of @@ -2266,11 +2264,11 @@ Example: "), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={Text( - extent={{40,10},{-60,-90}}, - lineColor={0,0,0}, + extent={{40,10},{-60,-90}}, + lineColor={0,0,0}, textString="°F")})); - model TemperatureSensor "Absolute temperature sensor in °Fahrenheit" - + model TemperatureSensor "Absolute temperature sensor in °Fahrenheit" + annotation ( Diagram(graphics={ Ellipse( @@ -2360,17 +2358,17 @@ sensor model. transformation(extent={{90,-10},{110,10}}, rotation=0))); Interfaces.HeatPort_a port annotation (Placement(transformation(extent={{ -110,-10},{-90,10}}, rotation=0))); - equation + equation T = to_degF(port.T); port.Q_flow = 0; end TemperatureSensor; end Fahrenheit; - - package Rankine "Components with Rankine input and/or output" - + + package Rankine "Components with Rankine input and/or output" + extends Modelica.Icons.Library2; - - model ToKelvin "Conversion block from °Rankine to Kelvin" + + model ToKelvin "Conversion block from °Rankine to Kelvin" parameter Integer n=1 "Number of inputs (= number of outputs)"; annotation ( Diagram(graphics={ @@ -2427,11 +2425,11 @@ and provides them as output signals. Modelica.Blocks.Interfaces.RealOutput Kelvin annotation (Placement(transformation(extent={{100,-10},{120,10}}, rotation=0))); - equation + equation Kelvin = from_degRk(Rankine); end ToKelvin; - - model FromKelvin "Conversion from Kelvin to °Rankine" + + model FromKelvin "Conversion from Kelvin to °Rankine" parameter Integer n=1 "Number of inputs (= number of outputs)"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -2488,13 +2486,13 @@ and provides them as output signals. Modelica.Blocks.Interfaces.RealOutput Rankine annotation (Placement(transformation(extent={{100,-10},{120,10}}, rotation=0))); - equation + equation Rankine = to_degRk(Kelvin); end FromKelvin; - - model FixedTemperature "Fixed temperature boundary condition in °Rankine" - - parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degRk T + + model FixedTemperature "Fixed temperature boundary condition in °Rankine" + + parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degRk T "Fixed Temperature at the port"; annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ @@ -2555,13 +2553,13 @@ This model defines a fixed temperature T at its port in degree Rankine, fillPattern=FillPattern.Solid)))); Interfaces.HeatPort_b port annotation (Placement(transformation(extent={{ 90,-10},{110,10}}, rotation=0))); - equation + equation port.T = from_degRk(T); end FixedTemperature; - - model PrescribedTemperature - "Variable temperature boundary condition in °Rankine" - + + model PrescribedTemperature + "Variable temperature boundary condition in °Rankine" + annotation ( Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={ @@ -2626,7 +2624,7 @@ as required to keep the temperature at the specified value. Modelica.Blocks.Interfaces.RealInput T annotation (Placement(transformation(extent={{-140,-20},{-100,20}}, rotation=0))); - equation + equation port.T = from_degRk(T); end PrescribedTemperature; annotation (Documentation(info=" @@ -2649,11 +2647,11 @@ Example: "), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 100}}), graphics={Text( - extent={{40,10},{-60,-90}}, - lineColor={0,0,0}, + extent={{40,10},{-60,-90}}, + lineColor={0,0,0}, textString="°Rk")})); - model TemperatureSensor "Absolute temperature sensor in °Rankine" - + model TemperatureSensor "Absolute temperature sensor in °Rankine" + annotation ( Diagram(graphics={ Ellipse( @@ -2743,30 +2741,30 @@ sensor model. transformation(extent={{90,-10},{110,10}}, rotation=0))); Interfaces.HeatPort_a port annotation (Placement(transformation(extent={{ -110,-10},{-90,10}}, rotation=0))); - equation + equation T = to_degRk(port.T); port.Q_flow = 0; end TemperatureSensor; end Rankine; - package Interfaces "Connectors and partial models" - + package Interfaces "Connectors and partial models" + extends Modelica.Icons.Library2; - - partial connector HeatPort "Thermal port for 1-dim. heat transfer" + + partial connector HeatPort "Thermal port for 1-dim. heat transfer" Modelica.SIunits.Temperature T "Port temperature"; - flow Modelica.SIunits.HeatFlowRate Q_flow + flow Modelica.SIunits.HeatFlowRate Q_flow "Heat flow rate (positive if flowing from outside into the component)"; annotation (Documentation(info=" ")); end HeatPort; - - connector HeatPort_a - "Thermal port for 1-dim. heat transfer (filled rectangular icon)" - + + connector HeatPort_a + "Thermal port for 1-dim. heat transfer (filled rectangular icon)" + extends HeatPort; - + annotation(defaultComponentName = "port_a", Documentation(info="

This connector is used for 1-dimensional heat flow between components. @@ -2784,26 +2782,26 @@ class.

icon layout.

"), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={Rectangle( - extent={{-100,100},{100,-100}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + extent={{-100,100},{100,-100}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={Rectangle( - extent={{-50,50},{50,-50}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + extent={{-50,50},{50,-50}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid), Text( - extent={{-120,120},{100,60}}, - lineColor={191,0,0}, + extent={{-120,120},{100,60}}, + lineColor={191,0,0}, textString="%name")})); end HeatPort_a; - - connector HeatPort_b - "Thermal port for 1-dim. heat transfer (unfilled rectangular icon)" - + + connector HeatPort_b + "Thermal port for 1-dim. heat transfer (unfilled rectangular icon)" + extends HeatPort; - + annotation(defaultComponentName = "port_b", Documentation(info="

This connector is used for 1-dimensional heat flow between components. @@ -2821,28 +2819,28 @@ class.

icon layout.

"), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics={Rectangle( - extent={{-50,50},{50,-50}}, - lineColor={191,0,0}, - fillColor={255,255,255}, + extent={{-50,50},{50,-50}}, + lineColor={191,0,0}, + fillColor={255,255,255}, fillPattern=FillPattern.Solid), Text( - extent={{-100,120},{120,60}}, - lineColor={191,0,0}, + extent={{-100,120},{120,60}}, + lineColor={191,0,0}, textString="%name")}), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 100,100}}), graphics={Rectangle( - extent={{-100,100},{100,-100}}, - lineColor={191,0,0}, - fillColor={255,255,255}, + extent={{-100,100},{100,-100}}, + lineColor={191,0,0}, + fillColor={255,255,255}, fillPattern=FillPattern.Solid)})); end HeatPort_b; - - partial model Element1D - "Partial heat transfer element with two HeatPort connectors that does not store energy" - - Modelica.SIunits.HeatFlowRate Q_flow + + partial model Element1D + "Partial heat transfer element with two HeatPort connectors that does not store energy" + + Modelica.SIunits.HeatFlowRate Q_flow "Heat flow rate from port_a -> port_b"; Modelica.SIunits.TemperatureDifference dT "port_a.T - port_b.T"; - public + public HeatPort_a port_a annotation (Placement(transformation(extent={{-110,-10}, {-90,10}}, rotation=0))); HeatPort_b port_b annotation (Placement(transformation(extent={{90,-10},{ @@ -2866,16 +2864,16 @@ constitutive equations for many types of heat transfer components. Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, {100,100}}), graphics)); - equation + equation dT = port_a.T - port_b.T; port_a.Q_flow = Q_flow; port_b.Q_flow = -Q_flow; end Element1D; annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}}), graphics={Rectangle( - extent={{-60,10},{40,-90}}, - lineColor={191,0,0}, - fillColor={191,0,0}, + extent={{-60,10},{40,-90}}, + lineColor={191,0,0}, + fillColor={191,0,0}, fillPattern=FillPattern.Solid)}), Documentation(info=" diff --git a/Modelica/Utilities/package.mo b/Modelica/Utilities/package.mo index c206c61551..0026601731 100644 --- a/Modelica/Utilities/package.mo +++ b/Modelica/Utilities/package.mo @@ -213,6 +213,7 @@ end UsersGuide; // Temporarily removed "protected" since this gives warning in the // newest Dymola release // protected + package Internal "Internal package as interface to the operating system" extends Modelica.Icons.Library; annotation (