Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redefined basic frame connectors according to that of Multibody in Mo…
…delica standard library. Especially: (1) frame_a has darker blau color compared to frame_b; (2) preserveAspectRatio and initialScale=0.16 introduced; (3) Introduced 'Diagram' section; (4) Accordingly, PlanarMechanics.Interfaces.PartialTwoFlanges and a couple of other classes were modified
- Loading branch information
Showing
33 changed files
with
1,548 additions
and
1,485 deletions.
There are no files selected for viewing
32 changes: 13 additions & 19 deletions
32
PlanarMechanics/GearComponents/Examples/Utilities/Interfaces/TwoPlanarConnectorsHeat.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
within PlanarMechanics.GearComponents.Examples.Utilities.Interfaces; | ||
partial model TwoPlanarConnectorsHeat "Planar gear connectors and HeatPort" | ||
extends | ||
Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPortWithoutT; | ||
|
||
public | ||
PlanarMechanics.Interfaces.Frame_a frame_a | ||
annotation (Placement(transformation(extent={{-110,-10},{-90,10}}), | ||
iconTransformation(extent={{-120,-20},{-80,20}}))); | ||
PlanarMechanics.Interfaces.Frame_b frame_b | ||
annotation (Placement(transformation(extent={{90,-10},{110,10}}), | ||
iconTransformation(extent={{80,-20},{120,20}}))); | ||
annotation ( | ||
Documentation(info="<html> | ||
<p>The gear interface partial model is a model that has all the interfaces of each planar gear connection. Each planar gear model should be extended from this base level model.</p> | ||
</html>", revisions="<html> | ||
<p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p> | ||
</html>")); | ||
end TwoPlanarConnectorsHeat; | ||
within PlanarMechanics.GearComponents.Examples.Utilities.Interfaces; | ||
partial model TwoPlanarConnectorsHeat "Planar gear connectors and HeatPort" | ||
extends PlanarMechanics.Interfaces.PartialTwoFlanges; | ||
extends | ||
Modelica.Thermal.HeatTransfer.Interfaces.PartialElementaryConditionalHeatPortWithoutT; | ||
|
||
annotation ( | ||
Documentation(info="<html> | ||
<p>The gear interface partial model is a model that has all the interfaces of each planar gear connection. Each planar gear model should be extended from this base level model.</p> | ||
</html>", revisions="<html> | ||
<p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p> | ||
</html>")); | ||
end TwoPlanarConnectorsHeat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,45 @@ | ||
within PlanarMechanics.Interfaces; | ||
connector Frame_a | ||
"Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque (light blue icon)" | ||
extends Frame; | ||
annotation (Icon(graphics={ | ||
Rectangle( | ||
extent={{-40,100},{40,-100}}, | ||
lineColor={95,95,95}, | ||
fillColor={203,237,255}, | ||
fillPattern=FillPattern.Solid, | ||
lineThickness=0.5), | ||
Line( | ||
points={{-18,0},{22,0}}, | ||
color={95,95,95}), | ||
Line( | ||
points={{0,20},{0,-20}}, | ||
color={95,95,95})}), Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p>Frame_a is a connector, which lies at the origin of the coordinate system attached to it. Cut-force and cut_torque act at the origin of the coordinate system. Normally, this connector is fixed to a mechanical component. The same as <a href=\"modelica://PlanarMechanics.Interfaces.Frame_b\">Frame_b</a>.</p> | ||
</html>")); | ||
end Frame_a; | ||
within PlanarMechanics.Interfaces; | ||
connector Frame_a | ||
"Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque (blue icon)" | ||
extends Frame; | ||
annotation (defaultComponentName="frame_a", | ||
Icon( | ||
coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
initialScale=0.16), | ||
graphics={ | ||
Rectangle( | ||
extent={{-10,10},{10,-10}}, | ||
lineColor={95,95,95}, | ||
lineThickness=0.5), | ||
Rectangle( | ||
extent={{-34,100},{34,-100}}, | ||
lineColor={95,95,95}, | ||
fillColor={70,163,255}, | ||
fillPattern=FillPattern.Solid, | ||
lineThickness=0.5), | ||
Line(points={{-20,0},{20,0}}, color={135,197,255}), | ||
Line(points={{0,20},{0,-20}}, color={135,197,255})}), | ||
Diagram( | ||
coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
initialScale=0.16), | ||
graphics={ | ||
Rectangle( | ||
extent={{-16,50},{16,-50}}, | ||
lineColor={95,95,95}, | ||
fillColor={70,163,255}, | ||
fillPattern=FillPattern.Solid, | ||
lineThickness=0.5), | ||
Line(points={{-12,0},{12,0}}, color={135,197,255}), | ||
Line(points={{0,12},{0,-12}}, color={135,197,255}), | ||
Text( | ||
extent={{-140,-50},{140,-88}}, | ||
lineColor={0,0,0}, | ||
textString="%name")}), | ||
Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p>Frame_a is a connector, which lies at the origin of the coordinate system attached to it. Cut-force and cut_torque act at the origin of the coordinate system. Normally, this connector is fixed to a mechanical component. The same as <a href=\"modelica://PlanarMechanics.Interfaces.Frame_b\">Frame_b</a>.</p> | ||
</html>")); | ||
end Frame_a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,45 @@ | ||
within PlanarMechanics.Interfaces; | ||
connector Frame_b | ||
"Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque (blue icon)" | ||
extends Frame; | ||
annotation (Icon(graphics={ | ||
Rectangle( | ||
extent={{-40,100},{40,-100}}, | ||
lineColor={95,95,95}, | ||
fillColor={85,170,255}, | ||
fillPattern=FillPattern.Solid, | ||
lineThickness=0.5), | ||
Line( | ||
points={{-18,0},{22,0}}, | ||
color={95,95,95}), | ||
Line( | ||
points={{0,20},{0,-20}}, | ||
color={95,95,95})}), Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p>Frame_b is a connector, which lies at the origin of the coordinate system attached to it. Cut-force and cut_torque act at the origin of the coordinate system. Normally, this connector is fixed to a mechanical component. The same as <a href=\"modelica://PlanarMechanics.Interfaces.Frame_a\">Frame_a</a>.</p> | ||
</html>")); | ||
end Frame_b; | ||
within PlanarMechanics.Interfaces; | ||
connector Frame_b | ||
"Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque (light blue icon)" | ||
extends Frame; | ||
annotation (defaultComponentName="frame_b", | ||
Icon( | ||
coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
initialScale=0.16), | ||
graphics={ | ||
Rectangle( | ||
extent={{-10,10},{10,-10}}, | ||
lineColor={95,95,95}, | ||
lineThickness=0.5), | ||
Rectangle( | ||
extent={{-34,100},{34,-100}}, | ||
lineColor={95,95,95}, | ||
fillColor={225,240,255}, | ||
fillPattern=FillPattern.Solid, | ||
lineThickness=0.5), | ||
Line(points={{-20,0},{20,0}}, color={135,197,255}), | ||
Line(points={{0,20},{0,-20}}, color={135,197,255})}), | ||
Diagram( | ||
coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
initialScale=0.16), | ||
graphics={ | ||
Rectangle( | ||
extent={{-16,50},{16,-50}}, | ||
lineColor={95,95,95}, | ||
fillColor={225,240,255}, | ||
fillPattern=FillPattern.Solid, | ||
lineThickness=0.5), | ||
Line(points={{-12,0},{12,0}}, color={135,197,255}), | ||
Line(points={{0,12},{0,-12}}, color={135,197,255}), | ||
Text( | ||
extent={{-140,-50},{140,-88}}, | ||
lineColor={0,0,0}, | ||
textString="%name")}), | ||
Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p>Frame_b is a connector, which lies at the origin of the coordinate system attached to it. Cut-force and cut_torque act at the origin of the coordinate system. Normally, this connector is fixed to a mechanical component. The same as <a href=\"modelica://PlanarMechanics.Interfaces.Frame_a\">Frame_a</a>.</p> | ||
</html>")); | ||
end Frame_b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
within PlanarMechanics.Interfaces; | ||
connector Frame_resolve "Coordinate system fixed to the component used to express in which | ||
coordinate system a vector is resolved (non-filled rectangular icon)" | ||
extends Frame; | ||
|
||
annotation (defaultComponentName="frame_resolve", | ||
Icon(coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
grid={1,1}, | ||
initialScale=0.16), graphics={Rectangle( | ||
extent={{-10,10},{10,-10}}, | ||
lineColor={95,95,95}, | ||
pattern=LinePattern.Dot), Rectangle( | ||
extent={{-30,100},{30,-100}}, | ||
lineColor={95,95,95}, | ||
pattern=LinePattern.Dot, | ||
fillColor={255,255,255}, | ||
fillPattern=FillPattern.Solid)}), | ||
Diagram(coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
grid={1,1}, | ||
initialScale=0.16), graphics={Text( | ||
extent={{-140,-50},{140,-88}}, | ||
textString="%name"), Rectangle( | ||
extent={{-12,40},{12,-40}}, | ||
lineColor={95,95,95}, | ||
pattern=LinePattern.Dot, | ||
fillColor={255,255,255}, | ||
fillPattern=FillPattern.Solid)}), | ||
Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p> | ||
Basic definition of a coordinate system that is fixed to a mechanical | ||
component. In the origin of the coordinate system the cut-force | ||
and the cut-torque is acting. This coordinate system is used to | ||
express in which coordinate system a vector is resolved. | ||
A component that uses a Frame_resolve connector has to set the | ||
cut-force and cut-torque of this frame to zero. When connecting | ||
from a Frame_resolve connector to another frame connector, | ||
by default the connecting line has line style \"dotted\". | ||
This component has a non-filled rectangular icon. | ||
</p> | ||
</html>")); | ||
end Frame_resolve; | ||
within PlanarMechanics.Interfaces; | ||
connector Frame_resolve "Coordinate system fixed to the component used to express in which | ||
coordinate system a vector is resolved (non-filled rectangular icon)" | ||
extends Frame; | ||
|
||
annotation (defaultComponentName="frame_resolve", | ||
Icon(coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
initialScale=0.16), graphics={Rectangle( | ||
extent={{-10,10},{10,-10}}, | ||
lineColor={95,95,95}, | ||
pattern=LinePattern.Dot), Rectangle( | ||
extent={{-34,100},{34,-100}}, | ||
lineColor={95,95,95}, | ||
pattern=LinePattern.Dot, | ||
fillColor={255,255,255}, | ||
fillPattern=FillPattern.Solid), | ||
Line(points={{-20,0},{20,0}}, color={135,197,255}), | ||
Line(points={{0,20},{0,-20}}, color={135,197,255})}), | ||
Diagram(coordinateSystem( | ||
preserveAspectRatio=true, | ||
extent={{-100,-100},{100,100}}, | ||
initialScale=0.16), graphics={Text( | ||
extent={{-140,-50},{140,-88}}, | ||
textString="%name"), Rectangle( | ||
extent={{-14,50},{14,-52}}, | ||
lineColor={95,95,95}, | ||
pattern=LinePattern.Dot, | ||
fillColor={255,255,255}, | ||
fillPattern=FillPattern.Solid), | ||
Line(points={{-12,0},{12,0}}, color={135,197,255}), | ||
Line(points={{0,12},{0,-12}}, color={135,197,255})}), | ||
Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p> | ||
Basic definition of a coordinate system that is fixed to a mechanical | ||
component. In the origin of the coordinate system the cut-force | ||
and the cut-torque is acting. This coordinate system is used to | ||
express in which coordinate system a vector is resolved. | ||
A component that uses a Frame_resolve connector has to set the | ||
cut-force and cut-torque of this frame to zero. When connecting | ||
from a Frame_resolve connector to another frame connector, | ||
by default the connecting line has line style \"dotted\". | ||
This component has a non-filled rectangular icon. | ||
</p> | ||
</html>")); | ||
end Frame_resolve; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
within PlanarMechanics.Interfaces; | ||
partial model PartialTwoFlanges "Partial model with 2 flanges" | ||
|
||
Frame_a frame_a | ||
annotation (Placement(transformation(extent={{-110,-10},{-90,10}}), | ||
iconTransformation(extent={{-120,-20},{-80,20}}))); | ||
Frame_b frame_b | ||
annotation (Placement(transformation(extent={{90,-10},{110,10}}), | ||
iconTransformation(extent={{80,-20},{120,20}}))); | ||
annotation (Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p>This is a partial model with 2 planar flanges. it can be inherited to build up models with 2 planar flanges.</p> | ||
</html>")); | ||
end PartialTwoFlanges; | ||
within PlanarMechanics.Interfaces; | ||
partial model PartialTwoFlanges "Partial model with 2 flanges" | ||
|
||
Frame_a frame_a | ||
"Coordinate system fixed to the component with one cut-force and cut-torque" | ||
annotation (Placement(transformation(extent={{-116,-16},{-84,16}}))); | ||
Frame_b frame_b | ||
"Coordinate system fixed to the component with one cut-force and cut-torque" | ||
annotation (Placement(transformation(extent={{84,-16},{116,16}}))); | ||
|
||
protected | ||
outer PlanarMechanics.PlanarWorld planarWorld "Planar world model"; | ||
|
||
equation | ||
assert(cardinality(frame_a) > 0, | ||
"Connector frame_a of " + getInstanceName() + " is not connected"); | ||
assert(cardinality(frame_b) > 0, | ||
"Connector frame_b of " + getInstanceName() + " is not connected"); | ||
|
||
annotation (Documentation(revisions="<html><p><img src=\"modelica://PlanarMechanics/Resources/Images/dlr_logo.png\"/> <b>Developed 2010-2014 at the DLR Institute of System Dynamics and Control</b></p></html>", info="<html> | ||
<p>This is a partial model with two planar frames. It can be inherited to build up models with 2 planar flanges.</p> | ||
<!-- | ||
This partial model provides two planar frame connectors, access to the world | ||
object and an assert to check that both frame connectors are connected. | ||
Therefore, inherit from this partial model if the two frame connectors are | ||
needed and if the two frame connectors should be connected for a correct model. | ||
--> | ||
</html>"), Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, | ||
-100},{100,100}}), | ||
graphics)); | ||
end PartialTwoFlanges; |
Oops, something went wrong.