Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	PlanarMechanics/GearComponents/Examples/PlanetaryGear.mo
	PlanarMechanics/GearComponents/Examples/SpurGear.mo
  • Loading branch information
fvanderlinden committed Jun 26, 2014
2 parents 8931743 + 5f5e575 commit f4c2c3f
Show file tree
Hide file tree
Showing 130 changed files with 1,026 additions and 1,869 deletions.
44 changes: 15 additions & 29 deletions PlanarMechanics/Examples/ControlledCraneCrab.mo
Expand Up @@ -3,7 +3,6 @@ model ControlledCraneCrab
extends Modelica.Icons.Example;

Parts.Body body(
g={0,-9.81},
m=70,
I=0) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
Expand Down Expand Up @@ -54,51 +53,38 @@ equation
connect(fixedTranslation.frame_b, body.frame_a) annotation (Line(
points={{-10,-40},{-10,-45},{-10,-45},{-10,-50},{-10,-60},{-10,-60}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(force.f, PID.y) annotation (Line(
points={{-30,72},{-30,80},{19,80}},
color={0,0,127},
smooth=Smooth.None));
color={0,0,127}));
connect(angleSensor.phi, PID.u) annotation (Line(
points={{41,6.10623e-16},{70,6.10623e-16},{70,80},{42,80}},
color={0,0,127},
smooth=Smooth.None));
points={{41,0},{70,0},{70,80},{42,80}},
color={0,0,127}));

connect(fixed.frame_a, prismatic.frame_a) annotation (Line(
points={{-60,30},{-40,30}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(prismatic.frame_b, body1.frame_a) annotation (Line(
points={{-20,30},{-5.55112e-16,30}},
points={{-20,30},{0,30}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(prismatic.flange_a, force.flange) annotation (Line(
points={{-30,39},{-30,50}},
color={0,127,0},
smooth=Smooth.None));
color={0,127,0}));
connect(prismatic.frame_b, revolute.frame_a) annotation (Line(
points={{-20,30},{-10,30},{-10,10}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(revolute.frame_b, fixedTranslation.frame_a) annotation (Line(
points={{-10,-10},{-10,-20}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(revolute.flange_a, angleSensor.flange) annotation (Line(
points={{5.55112e-16,-1.33731e-15},{10,-1.33731e-15},{10,6.10623e-16},{20,
6.10623e-16}},
color={0,0,0},
smooth=Smooth.None));
annotation (Diagram(graphics),
experiment(StopTime=3),
__Dymola_experimentSetupOutput,
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><h4><font color=\"#008000\">A controlled crane crab. </font></h4></p>
points={{0,0},{10,0},{10,0},{20,0}}));
annotation (experiment(StopTime=3),
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>
<h4><font color=\"#008000\">A controlled crane crab.</font></h4>
<p>A simple PID (actually PD) controlles the pendulum into upright position.</p>
<p><br/><img src=\"modelica://PlanarMechanics/Resources/Images/ControlledCraneCrab_1.png\"/></p>
<p><img src=\"modelica://PlanarMechanics/Resources/Images/ControlledCraneCrab_2.png\"/></p>
Expand All @@ -113,7 +99,7 @@ equation
</html>",
revisions="<html>
<p>(c) Copyright by Dirk Zimmer</p>
<p>The library was creates and is owned by Dr. Dirk Zimmer. </p>
<p>The library was created and is owned by Dr. Dirk Zimmer.</p>
<p>dirk.zimmer@dlr.de</p>
</html>"));
end ControlledCraneCrab;
14 changes: 5 additions & 9 deletions PlanarMechanics/Examples/CounterSpin.mo
Expand Up @@ -3,7 +3,6 @@ model CounterSpin
extends Modelica.Icons.Example;

Parts.Body body(
g={0,-9.81},
m=0.01,
I=0.0005,
animate=false,
Expand All @@ -30,13 +29,10 @@ equation
connect(body.frame_a, slipBasedRolling1.frame_a) annotation (Line(
points={{0,0},{20,0}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
annotation (Diagram(graphics),
experiment(StopTime=3),
__Dymola_experimentSetupOutput,
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><h4><font color=\"#008000\">Wheel with counter-spin and dry-friction law.</font></h4></p>
thickness=0.5));
annotation (experiment(StopTime=3),
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>
<h4><font color=\"#008000\">Wheel with counter-spin and dry-friction law.</font></h4>
<p><img src=\"modelica://PlanarMechanics/Resources/Images/CounterSpin_1.png\"/></p>
<p><img src=\"modelica://PlanarMechanics/Resources/Images/CounterSpin_2.png\"/></p>
<p><br/><br/>The model contains a large local stiffness before 2s</p>
Expand All @@ -50,7 +46,7 @@ equation
</html>",
revisions="<html>
<p>(c) Copyright by Dirk Zimmer</p>
<p>The library was creates and is owned by Dr. Dirk Zimmer. </p>
<p>The library was created and is owned by Dr. Dirk Zimmer.</p>
<p>dirk.zimmer@dlr.de</p>
</html>"));
end CounterSpin;
43 changes: 15 additions & 28 deletions PlanarMechanics/Examples/CraneCrab.mo
Expand Up @@ -4,7 +4,6 @@ model CraneCrab

Parts.Body body(
I=0.1,
g={0,-9.81},
m=0.5) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=270,
Expand All @@ -20,8 +19,7 @@ model CraneCrab
origin={-70,50})));
Parts.Body body1(
m=1,
I=0.1,
g={0,-9.81})
I=0.1)
annotation (Placement(transformation(extent={{0,40},{20,60}})));
inner PlanarWorld planarWorld
annotation (Placement(transformation(extent={{-80,0},{-60,20}})));
Expand All @@ -48,43 +46,32 @@ equation
connect(fixedTranslation.frame_b, body.frame_a) annotation (Line(
points={{-10,-20},{-10,-40}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(revolute1.frame_a, body1.frame_a) annotation (Line(
points={{-10,32},{-10,50},{-5.55112e-16,50}},
points={{-10,32},{-10,50},{0,50}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(revolute1.frame_b, fixedTranslation.frame_a) annotation (Line(
points={{-10,12},{-10,5.55112e-016}},
points={{-10,12},{-10,0}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(fixed.frame_a, prismatic1.frame_a) annotation (Line(
points={{-60,50},{-40,50}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(prismatic1.frame_b, body1.frame_a) annotation (Line(
points={{-20,50},{-5.55112e-016,50}},
points={{-20,50},{0,50}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(damper1.flange_a, fixed1.flange) annotation (Line(
points={{-50,80},{-66,80}},
color={0,127,0},
smooth=Smooth.None));
color={0,127,0}));
connect(damper1.flange_b, prismatic1.flange_a) annotation (Line(
points={{-30,80},{-30,59}},
color={0,127,0},
smooth=Smooth.None));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}),
graphics),
experiment(StopTime=10),
__Dymola_experimentSetupOutput,
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><h4><font color=\"#008000\">A damped crane crab </font></h4></p>
color={0,127,0}));
annotation (experiment(StopTime=10),
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>
<h4><font color=\"#008000\">A damped crane crab </font></h4>
<p><img src=\"modelica://PlanarMechanics/Resources/Images/CraneCrab_1.png\"/></p>
<p><br/><img src=\"modelica://PlanarMechanics/Resources/Images/CraneCrab_2.png\"/></p>
<p><br/>SELECTED&nbsp;CONTINUOUS&nbsp;TIME&nbsp;STATES</p>
Expand All @@ -95,7 +82,7 @@ equation
</html>",
revisions="<html>
<p>(c) Copyright by Dirk Zimmer</p>
<p>The library was creates and is owned by Dr. Dirk Zimmer. </p>
<p>The library was created and is owned by Dr. Dirk Zimmer.</p>
<p>dirk.zimmer@dlr.de</p>
</html>"));
end CraneCrab;
41 changes: 14 additions & 27 deletions PlanarMechanics/Examples/DoublePendulum.mo
Expand Up @@ -4,8 +4,7 @@ model DoublePendulum

Parts.Body body(
m=1,
I=0.1,
g={0,-9.81})
I=0.1)
annotation (Placement(transformation(extent={{20,60},{40,80}})));
Parts.FixedTranslation fixedTranslation(r={1,0})
annotation (Placement(transformation(extent={{-20,60},{0,80}})));
Expand All @@ -14,7 +13,6 @@ model DoublePendulum
rotation=180,
origin={-90,70})));
Parts.Body body1(
g={0,-9.81},
m=0.2,
I=0.01)
annotation (Placement(transformation(extent={{60,20},{80,40}})));
Expand All @@ -30,43 +28,33 @@ model DoublePendulum
annotation (Placement(transformation(extent={{-18,20},{2,40}})));
equation
connect(fixedTranslation.frame_b, body.frame_a) annotation (Line(
points={{5.55112e-16,70},{20,70}},
points={{0,70},{20,70}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(fixedTranslation1.frame_b, body1.frame_a)
annotation (Line(
points={{40,30},{60,30}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(fixed.frame_a, revolute.frame_a) annotation (Line(
points={{-80,70},{-60,70}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(revolute.frame_b, fixedTranslation.frame_a) annotation (Line(
points={{-40,70},{-20,70}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(revolute1.frame_b, fixedTranslation1.frame_a) annotation (Line(
points={{2,30},{20,30}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
thickness=0.5));
connect(fixedTranslation.frame_b, revolute1.frame_a) annotation (Line(
points={{5.55112e-16,70},{5.55112e-16,50},{-36,50},{-36,30},{-18,30}},
points={{0,70},{0,50},{-36,50},{-36,30},{-18,30}},
color={95,95,95},
thickness=0.5,
smooth=Smooth.None));
annotation (Diagram(coordinateSystem(extent={{-100,-100},{100,100}},
preserveAspectRatio=true),
graphics),
experiment(StopTime=10),
__Dymola_experimentSetupOutput,
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><h4><font color=\"#008000\">A double pendulum.</font></h4></p>
thickness=0.5));
annotation (experiment(StopTime=10),
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>
<h4><font color=\"#008000\">A double pendulum.</font></h4>
<p><br/>Beware this is a chaotic system. However, the chatoic part should start after 10s.</p>
<p><br/><img src=\"modelica://PlanarMechanics/Resources/Images/DoublePendulum_1.png\"/></p>
<p><img src=\"modelica://PlanarMechanics/Resources/Images/DoublePendulum_2.png\"/></p>
Expand All @@ -78,8 +66,7 @@ equation
</html>",
revisions="<html>
<p>(c) Copyright by Dirk Zimmer</p>
<p>The library was creates and is owned by Dr. Dirk Zimmer. </p>
<p>The library was created and is owned by Dr. Dirk Zimmer.</p>
<p>dirk.zimmer@dlr.de</p>
</html>"),
Icon(coordinateSystem(extent={{-100,-100},{100,100}})));
</html>"));
end DoublePendulum;
14 changes: 5 additions & 9 deletions PlanarMechanics/Examples/FreeBody.mo
Expand Up @@ -2,9 +2,7 @@ within PlanarMechanics.Examples;
model FreeBody "AcceleratingBody"
extends Modelica.Icons.Example;

inner PlanarWorld planarWorld(g={0,-9.81},
animateGravity=true,
enableAnimation=true)
inner PlanarWorld planarWorld
annotation (Placement(transformation(extent={{-28,-10},{-8,10}})));
Parts.Body body(m=1, I=0.1,
animate=true,
Expand All @@ -16,19 +14,17 @@ model FreeBody "AcceleratingBody"
annotation (Placement(transformation(extent={{10,-10},{30,10}})));
annotation (
experiment(StopTime=3),
__Dymola_experimentSetupOutput,
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>",
info="<html>
<p><h4><font color=\"#008000\">A simple free falling body.</font></h4></p>
<h4><font color=\"#008000\">A simple free falling body.</font></h4>
<p><br/>The gravity is defined in the planarWorld component</p>
<p><br/><img src=\"modelica://PlanarMechanics/Resources/Images/FreeBody_1.png\"/></p>
<p><br/>The&nbsp;DAE&nbsp;has&nbsp;73&nbsp;scalar&nbsp;unknowns&nbsp;and&nbsp;73&nbsp;scalar&nbsp;equations.</p>
</html>",
revisions="<html>
<p>(c) Copyright by Dirk Zimmer</p>
<p>The library was creates and is owned by Dr. Dirk Zimmer. </p>
<p>The library was created and is owned by Dr. Dirk Zimmer.</p>
<p>dirk.zimmer@dlr.de</p>
</html>"),
Diagram(graphics));
</html>"));
end FreeBody;

0 comments on commit f4c2c3f

Please sign in to comment.