Skip to content

Commit

Permalink
Merge pull request #34 from fvanderlinden/master
Browse files Browse the repository at this point in the history
Updated Annotations for GUI
  • Loading branch information
Franciscus van der Linden committed Jun 26, 2014
2 parents b9f6f2e + a80958d commit cce523c
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 61 deletions.
4 changes: 2 additions & 2 deletions PlanarMechanics/GearComponents/Examples/package.mo
@@ -1,8 +1,8 @@
within PlanarMechanics.GearComponents;
package Examples
package Examples
extends Modelica.Icons.ExamplesPackage;


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>"));
"<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 Examples;
41 changes: 24 additions & 17 deletions PlanarMechanics/GearComponents/RigidNoLossExternal.mo
Expand Up @@ -8,33 +8,33 @@ model RigidNoLossExternal "External rigid gear gonnection model"
parameter SI.Distance r_b=1 "radius of Gear B";

parameter Boolean animate = true "= true, if animation shall be enabled" annotation(Evaluate=true, HideResult=true);
parameter SI.Angle StartAngle_a = 0 "Start Angle of gear B" annotation (Dialog(
HideResult=true,tab="Animation",
parameter SI.Angle StartAngle_a = 0 "Start Angle of gear B" annotation ( HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));
parameter SI.Angle StartAngle_b = 0 "Start Angle of gear B" annotation (Dialog(
HideResult=true,tab="Animation",
group="if animation = true",
enable=animate));
parameter Integer Tooth_a(min=1) = 20 "Number of Tooth" annotation (Dialog(
HideResult=true,
parameter Integer Tooth_a(min=1) = 20 "Number of Tooth" annotation ( HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));
parameter Real RGB_a[3]={195,0,0} "Color (RGB values)" annotation (Dialog(
HideResult=true,

parameter Real RGB_a[3]={195,0,0} "Color (RGB values)" annotation (HideResult=true,Dialog(
colorSelector=true,
tab="Animation",
group="if animation = true",
enable=animate));
parameter Real RGB_b[3]={0,0,195} "Color (RGB values)" annotation (Dialog(
HideResult=true,

parameter Real RGB_b[3]={0,0,195} "Color (RGB values)" annotation ( HideResult=true,Dialog(
colorSelector=true,
tab="Animation",
group="if animation = true",
enable=animate));
parameter SI.Distance z_offset=0 "z-distane offset for simulation" annotation (Dialog(
HideResult=true,tab="Animation",

parameter SI.Distance z_offset=0 "z-distane offset for simulation" annotation ( HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));

Expand Down Expand Up @@ -219,6 +219,7 @@ equation
47.6059},{24.5443,47.9909},{26.559,43.6734},{26.9421,41.7643},{
29.9832,41.8761},{30.2251,43.8082},{31.9173,48.2619},{34.6414,
48.0765},{35.7144,43.4344},{35.6922,41.4874}},
smooth=Smooth.None,
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None),
Expand Down Expand Up @@ -267,28 +268,34 @@ equation
-47.8875,25.9962},{-47.2592,23.6526},{-44.1521,23.8756},{-43.865,
26.2849},{-42.8073,29.0581},{-42.0308,30.2359},{-39.75,30.0005},{
-39.2305,28.6889},{-38.7618,25.758},{-38.973,23.3409}},
smooth=Smooth.None,
fillColor={255,160,160},
fillPattern=FillPattern.Solid,
lineThickness=0.5,
pattern=LinePattern.None),
Line(
points={{-100,0},{-44,0}},
color={0,0,0},
smooth=Smooth.None,
thickness=1),
Line(
points={{30,0},{100,0}},
thickness=1)}), 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>",
color={0,0,0},
smooth=Smooth.None,
thickness=1)}), Icon(graphics),
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>In this model an ideal gear connection is modelled. It is based on the paper from van der Linden , <a href=\"http://dx.doi.org/10.3384/ecp12076303\">Modelling of Elastic Gearboxes Using a Generalized Gear Contact Model</a>. However, no gear elasticity is modelled.</p>
<p>The planar model of an external gear wheel is used to build complex gear models. A <a href=\"http://dx.doi.org/10.3384/ecp12076681\">planar library</a> is used to create the constraints of the gearwheels. An example can be found in <a href=\"modelica://Actuator.Mechanical.Planar.Examples.SpurGear\">here</a>.</p>
<p>Using different parts from the planar library, it is possible to build complex gear systems. However, especially since no elasticity is included, kinematic loops can lead to complications and should be handled with care.</p>
<p>Using different parts from the planar library, it is possible to build complex gear systems. However, especially since no elasticity is included, kinematic loops can lead to complications and should be handled with care. </p>
<p>This model is suitable for: </p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Kinematic analysis of gear systems and gear-like systems.</p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modelling of multiple gear stage models with clutches.</p>
<p><b>Literature</b></p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Kinematic analysis of gear systems and gear-like systems. </p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modelling of multiple gear stage models with clutches. </p>
<p><b>Literature</b> </p>
<ol>
<li>van der Linden, F., Modelling of Elastic Gearboxes Using a Generalized Gear Contact Model, <i>Proceedings of the 9th International MODELICA Conference, Linkoping University Electronic Press, </i><b>2012</b>, 303-310 </li>
</ol>
<p><br>The planar connectors are in progress of being standardized (work in progress at dlr).</p>
<p><br>The planar connectors are in progress of beiing standardized (work in progress at dlr).</p>
</html>"));
end RigidNoLossExternal;
45 changes: 26 additions & 19 deletions PlanarMechanics/GearComponents/RigidNoLossInternal.mo
Expand Up @@ -9,32 +9,32 @@ extends
parameter SI.Distance r_b=1 "radius of Gear B";

parameter Boolean animate = true "= true, if animation shall be enabled" annotation(Evaluate=true, HideResult=true);
parameter SI.Angle StartAngle_a = 0 "Start Angle of gear B" annotation (Dialog(
HideResult=true,tab="Animation",
parameter SI.Angle StartAngle_a = 0 "Start Angle of gear B" annotation ( HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));
parameter SI.Angle StartAngle_b = 0 "Start Angle of gear B" annotation (Dialog(
HideResult=true,tab="Animation",
parameter SI.Angle StartAngle_b = 0 "Start Angle of gear B" annotation (HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));
parameter Integer Tooth_a(min=1) = 20 "Number of Tooth" annotation (Dialog(
HideResult=true,tab="Animation",
parameter Integer Tooth_a(min=1) = 20 "Number of Tooth" annotation ( HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));
parameter Real RGB_a[3]={195,0,0} "Color (RGB values)" annotation (Dialog(
HideResult=true,
parameter Real RGB_a[3]={195,0,0} "Color (RGB values)" annotation ( HideResult=true,Dialog(
colorSelector=true,
tab="Animation",
group="if animation = true",
enable=animate));
parameter Real RGB_b[3]={0,0,195} "Color (RGB values)" annotation (Dialog(
HideResult=true,

parameter Real RGB_b[3]={0,0,195} "Color (RGB values)" annotation (HideResult=true,Dialog(
colorSelector=true,
tab="Animation",
group="if animation = true",
enable=animate));
parameter SI.Distance z_offset=0 "z-distane offset for simulation" annotation (Dialog(
HideResult=true,tab="Animation",

parameter SI.Distance z_offset=0 "z-distane offset for simulation" annotation ( HideResult=true,Dialog(
tab="Animation",
group="if animation = true",
enable=animate));

Expand Down Expand Up @@ -169,6 +169,8 @@ equation
annotation (defaultComponentName="gear",Diagram(graphics={
Line(
points={{38,0},{98,0}},
color={0,0,0},
smooth=Smooth.None,
thickness=1),
Polygon(
points={{8.6901,40.9645},{9.3284,42.8041},{11.9096,46.8087},{14.5357,
Expand Down Expand Up @@ -224,6 +226,7 @@ equation
-8.8881,42.8976},{-8.1588,47.6059},{-5.4557,47.9909},{-3.441,
43.6734},{-3.0579,41.7643},{-0.0168,41.8761},{0.2251,43.8082},{
1.9173,48.2619},{4.6414,48.0765},{5.7144,43.4344},{5.6922,41.4874}},
smooth=Smooth.None,
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None),
Expand Down Expand Up @@ -270,25 +273,29 @@ equation
28.59},{-21.8875,25.9962},{-21.2592,23.6526},{-18.1521,23.8756},{
-17.865,26.2849},{-16.8073,29.0581},{-16.0308,30.2359},{-13.75,
30.0005},{-13.2305,28.6889},{-12.7618,25.758},{-12.973,23.3409}},
smooth=Smooth.None,
fillColor={255,160,160},
fillPattern=FillPattern.Solid,
lineThickness=0.5,
pattern=LinePattern.None),
Line(
points={{-100,0},{-20,0}},
thickness=1)}), 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>",
color={0,0,0},
smooth=Smooth.None,
thickness=1)}), Icon(graphics),
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>In this model an ideal gear connection is modelled. It is based on the paper from van der Linden , <a href=\"http://dx.doi.org/10.3384/ecp12076303\">Modelling of Elastic Gearboxes Using a Generalized Gear Contact Model</a>. However, no gear elasticity is modelled.</p>
<p>The planar model of an internal gear wheel is used to build complex gear models. A <a href=\"http://dx.doi.org/10.3384/ecp12076681\">planar library</a> is used to create the constraints of the gearwheels. An example can be found in <a href=\"modelica://Actuator.Mechanical.Planar.Examples.SpurGear\">here</a>.</p>
<p>Using different parts from the planar library, it is possible to build complex gear systems. However, especially since no elasticity is included, kinematic loops can lead to complications and should be handled with care.</p>
<p>Using different parts from the planar library, it is possible to build complex gear systems. However, especially since no elasticity is included, kinematic loops can lead to complications and should be handled with care. </p>
<p>This model is suitable for: </p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Kinematic analysis of gear systems and gear-like systems.</p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modelling of multiple gear stage models with clutches.</p>
<p><b>Literature</b></p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Kinematic analysis of gear systems and gear-like systems. </p>
<p>&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Modelling of multiple gear stage models with clutches. </p>
<p><b>Literature</b> </p>
<ol>
<li>van der Linden, F., Modelling of Elastic Gearboxes Using a Generalized Gear Contact Model, <i>Proceedings of the 9th International MODELICA Conference, Linkoping University Electronic Press, </i><b>2012</b>, 303-310 </li>
</ol>
<p><br>The planar connectors are in progress of being standardized (work in progress at dlr).</p>
<p><br>The planar connectors are in progress of beiing standardized (work in progress at dlr).</p>
</html>"));
end RigidNoLossInternal;
18 changes: 12 additions & 6 deletions PlanarMechanics/Joints/Prismatic.mo
Expand Up @@ -9,7 +9,7 @@ model Prismatic "A prismatic joint"
outer PlanarWorld planarWorld "planar world model";
parameter Boolean useFlange=false
"= true, if force flange enabled, otherwise implicitly grounded"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
annotation(Evaluate=true, HideResult=true, choices(__Dymola_checkBox=true));
parameter StateSelect stateSelect=StateSelect.default
"Priority to use acceleration as states" annotation(HideResult=true,Dialog(tab="Advanced"));

Expand Down Expand Up @@ -88,23 +88,29 @@ equation
annotation (Icon(graphics={
Text(
extent={{-100,-60},{100,-100}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={85,170,255},
textString="%name"),
Rectangle(
extent={{-100,40},{-20,-40}},
lineColor={0,0,0},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={175,175,175}),
Rectangle(
extent={{-20,-20},{100,20}},
lineColor={0,0,0},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={175,175,175}),
Line(
visible=useFlange,
points={{0,80},{0,20}})}), 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>Direction of the Joint is determined by <b>r[2]</b>, which is a vector pointing from <b>frame_a</b> to <b>frame_b</b>.</p>
<p>By setting <b>useFlange</b> as true, the flange for a force input will be activated. In the &quot;Initialization&quot; block, elongation of the joint <b>s</b>, velocity of elongation <b>v</b> as well as acceleration of elongation <b>a</b> can be initialized.</p>
<p>It can be defined via parameter (in &quot;advanced&quot; tab) <b>stateSelect</b> that the relative distance &quot;s&quot; and its derivative shall be definitely used as states by setting stateSelect=StateSelect.always.</p>
<p>In &quot;Animation&quot; Tab, animation parameters for this model can be set, where <b>zPosition</b> represents the model&#39;s position along the z axis in 3D animation. Some of the values can be preset by an outer PlanarWorld model.</p>
points={{0,80},{0,20}},
color={0,0,0},
smooth=Smooth.None)}),Diagram(graphics),
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>Direction of the Joint is determined by <b>r[2]</b>, which is a vector pointing from <b>frame_a</b> to <b>frame_b</b>. </p>
<p>By setting <b>useFlange</b> as true, the flange for a force input will be activated. In the &QUOT;Initialization&QUOT; block, elongation of the joint <b>s</b>, velocity of elongation <b>v</b> as well as acceleration of elongation <b>a</b> can be initialized.</p>
<p>It can be defined via parameter (in &QUOT;advanced&QUOT; tab) <b>stateSelect</b> that the relative distance &QUOT;s&QUOT; and its derivative shall be definitely used as states by setting stateSelect=StateSelect.always. </p>
<p>In &QUOT;Animation&QUOT; Tab, animation parameters for this model can be set, where <b>zPosition</b> represents the model&apos;s position along the z axis in 3D animation. Some of the values can be preset by an outer PlanarWorld model.</p>
</html>"));
end Prismatic;

0 comments on commit cce523c

Please sign in to comment.