Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,20 @@ object to <strong>false</strong> to switch off animation of all components.
<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/DoublePendulum.png\"
alt=\"model Examples.Elementary.DoublePendulum\">
</blockquote>
</html>"));
</html>",
figures = {
Figure(
title = "End point position",
identifier = "42aee",
preferred = true,
plots = {
Plot(
curves = {
Curve(x = boxBody2.frame_b.r_0[1], y = boxBody2.frame_b.r_0[2], legend = "End point position of pendulum in the x and y plane")
}
)
}
)
}
));
end DoublePendulum;
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,38 @@ In this example, it is simply done by <code>revolute2.phi.start&nbsp;=&nbsp;Mode
<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/DoublePendulumInitTip.png\">
</blockquote>
</html>"));
</html>",
figures = {
Figure(
title = "Initial conditions",
identifier = "78253",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = boxBody2.frame_b.r_0[1], legend = "Position of end point of pendulum along the x axis"),
Curve(y = boxBody2.frame_b.r_0[2], legend = "Position of end point of pendulum along the y axis")
}
),
Plot(
curves = {
Curve(y = der(boxBody2.r_0[1]), legend = "Velocity of end point of pendulum along the x axis"),
Curve(y = der(boxBody2.r_0[2]), legend = "Velocity of end point of pendulum along the y axis")
}
)
}
),
Figure(
title = "End point position",
identifier = "dc6f6",
plots = {
Plot(
curves = {
Curve(x = boxBody2.frame_b.r_0[1], y = boxBody2.frame_b.r_0[2], legend = "End point position of pendulum in the x and y plane")
}
)
}
)
}
));
end DoublePendulumInitTip;
25 changes: 24 additions & 1 deletion Modelica/Mechanics/MultiBody/Examples/Elementary/FreeBody.mo
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,28 @@ This example demonstrates:

<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/FreeBody.png\"
alt=\"model Examples.Elementary.FreeBody\">
</html>"));
</html>",
figures = {
Figure(
title = "Body position and spring forces",
identifier = "a2b4a",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = body.body.frame_a.r_0[1], legend = "Body position along x axis"),
Curve(y = body.body.frame_a.r_0[2], legend = "Body position along y axis"),
Curve(y = body.body.frame_a.r_0[3], legend = "Body position along z axis")
}
),
Plot(
curves = {
Curve(y = spring1.spring.f, legend = "Force from left spring"),
Curve(y = spring2.spring.f, legend = "Force from right spring")
}
)
}
)
}
));
end FreeBody;
33 changes: 32 additions & 1 deletion Modelica/Mechanics/MultiBody/Examples/Elementary/HeatLosses.mo
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,36 @@ a convection element to the environment. The total heat flow generated by the
elements of this multi-body system and transported to the environment
is present in variable convection.fluid.
</p>
</html>"));
</html>",
figures = {
Figure(
title = "Heat losses",
identifier = "de1ad",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = body1.r_0[2], legend = "Elongation of body1"),
Curve(y = body2.r_0[2], legend = "Elongation of body2"),
Curve(y = body3.r_0[2], legend = "Elongation of body3")
}
),
Plot(
curves = {
Curve(y = damper1.f, legend = "Force from damper1 connected to body1"),
Curve(y = springDamper.f, legend = "Force from springDamper connected to body2"),
Curve(y = springDamperSeries.f, legend = "Force from springDamperSeries connected to body3")
}
),
Plot(
curves = {
Curve(y = damper1.heatPort.Q_flow, legend = "Heat flow from damper1 connected to body1"),
Curve(y = springDamper.heatPort.Q_flow, legend = "Heat flow from springDamper connected to body2"),
Curve(y = springDamperSeries.heatPort.Q_flow, legend = "Heat flow from springDamperSeries connected to body3")
}
)
}
)
}
));
end HeatLosses;
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,36 @@ An animation of this simulation is shown in the figure below.

<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/InitSpringConstant.png\"
alt=\"model Examples.Elementary.InitSpringConstant\">
</html>"), experiment(StopTime=1.01));
</html>",
figures = {
Figure(
title = "Forces and initial conditions",
identifier = "83624",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = body.body.frame_a.f[2], legend = "Force from gravity on body")
},
x = Axis(min = 0, max = 1.2)
),
Plot(
curves = {
Curve(y = spring.c, legend = "Calculated spring constant"),
Curve(y = spring.spring.f, legend = "Force from spring on end point of the body")
},
x = Axis(min = 0, max = 1.2)
),
Plot(
curves = {
Curve(y = rev.phi, legend = "Angle of the revolute joint (set to 0 at initialization)"),
Curve(y = rev.w, legend = "Angular velocity of the revolute joint (set to 0 at initialization)"),
Curve(y = rev.a, legend = "Angular acceleration of the revolute joint (set to 0 at initialization)")
},
x = Axis(min = 0, max = 1.2)
)
}
)
}
), experiment(StopTime=1.01));
end InitSpringConstant;
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,29 @@ side in the back is the animation with the JointUPS component.
<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/LineForceWithTwoMasses2.png\">
</blockquote>
</html>"));
</html>",
figures = {
Figure(
title = "Difference in cut forces",
identifier = "beedd",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = body_f_diff[1], legend = "Difference in cut-forces in bodyBox1 and bodyBox2 along x axis"),
Curve(y = body_f_diff[2], legend = "Difference in cut-forces in bodyBox1 and bodyBox2 along y axis"),
Curve(y = body_f_diff[3], legend = "Difference in cut-forces in bodyBox1 and bodyBox2 along z axis")
}
),
Plot(
curves = {
Curve(y = rod_f_diff[1], legend = "Difference of cut-forces in rod1 and rod3 along x axis"),
Curve(y = rod_f_diff[2], legend = "Difference of cut-forces in rod1 and rod3 along y axis"),
Curve(y = rod_f_diff[3], legend = "Difference of cut-forces in rod1 and rod3 along z axis")
}
)
}
)
}
));
end LineForceWithTwoMasses;
22 changes: 21 additions & 1 deletion Modelica/Mechanics/MultiBody/Examples/Elementary/Pendulum.mo
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,25 @@ assembled system.
<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/Pendulum.png\"
alt=\"model Examples.Elementary.Pendulum\">
</blockquote>
</html>"));
</html>",
figures = {
Figure(
title = "Pendulum angle",
identifier = "88bdb",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = rev.phi, legend = "Angle of pendulum")
}
),
Plot(
curves = {
Curve(y = damper.tau, legend = "Torque applied to revolute joint from damper")
}
)
}
)
}
));
end Pendulum;
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,33 @@ and a point fixed in the world frame:

<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/PendulumWithSpringDamper.png\"
alt=\"model Examples.Elementary.PendulumWithSpringDamper\">
</html>"));
</html>",
figures = {
Figure(
title = "End point position",
identifier = "11319",
preferred = true,
plots = {
Plot(
curves = {
Curve(x = body1.r_0[1], y = body1.r_0[2], legend = "Pendulum end point position in the x-y plane")
}
)
}
),
Figure(
title = "Spring and damper",
identifier = "3fbed",
plots = {
Plot(
curves = {
Curve(y = spring1.spring.f, legend = "Force from spring affecting the elongation of the prismatic joint, depending on displacement"),
Curve(y = prismatic.s, legend = "Elongation of the prismatic joint"),
Curve(y = damper1.f, legend = "Force from damper affecting the prismatic joint depending on the elongation velocity")
}
)
}
)
}
));
end PendulumWithSpringDamper;
18 changes: 17 additions & 1 deletion Modelica/Mechanics/MultiBody/Examples/Elementary/PointGravity.mo
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,21 @@ point gravity field.

<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/PointGravity.png\"
alt=\"model Examples.Elementary.PointGravity\">
</html>"));
</html>",
figures = {
Figure(
title = "Body positions",
identifier = "7bb2a",
preferred = true,
plots = {
Plot(
curves = {
Curve(x = body1.r_0[1], y = body1.r_0[2]),
Curve(x = body2.r_0[1], y = body2.r_0[2])
}
)
}
)
}
));
end PointGravity;
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,27 @@ a default value, when the physical system does not provide the equations.
</p>

<div><img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Examples/Elementary/PointGravityWithPointMasses.png\"></div>
</html>"));
</html>",
figures = {
Figure(
title = "Body positions",
identifier = "681b4",
preferred = true,
plots = {
Plot(
curves = {
Curve(x = body1.r_0[1], y = body1.r_0[2], legend = "Position of body1 in the x-y plane"),
Curve(x = body2.r_0[1], y = body2.r_0[2], legend = "Position of body2 in the x-y plane")
}
),
Plot(
curves = {
Curve(x = body3.r_0[1], y = body3.r_0[2], legend = "Position of body3 in the x-y plane"),
Curve(x = body4.r_0[1], y = body4.r_0[2], legend = "Position of body4 in the x-y plane")
}
)
}
)
}
));
end PointGravityWithPointMasses;
34 changes: 33 additions & 1 deletion Modelica/Mechanics/MultiBody/Examples/Elementary/RollingWheel.mo
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,37 @@ model RollingWheel
Demonstrates how a single wheel is rolling on ground
(starting with an initial velocity).
</p>
</html>"));
</html>",
figures = {
Figure(
title = "Wheel position from above",
identifier = "d1c70",
preferred = true,
plots = {
Plot(
curves = {
Curve(x = wheel1.x, y = wheel1.y, legend = "Wheel position from above, in the x-y plane")
}
)
}
),
Figure(
title = "Wheel forces",
identifier = "134a8",
plots = {
Plot(
curves = {
Curve(y = wheel1.rollingWheel.f_n, legend = "Normal force acting on wheel")
}
),
Plot(
curves = {
Curve(y = wheel1.rollingWheel.f_lat, legend = "Contact force on wheel in lateral direction"),
Curve(y = wheel1.rollingWheel.f_long, legend = "Contact force on wheel in longitudinal direction")
}
)
}
)
}
));
end RollingWheel;
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,34 @@ equation
Demonstrates how a RollingWheelSet (two wheels rigidly coupled together) is rolling
on ground when driven by some external torques.
</p>
</html>"));
</html>",
figures = {
Figure(
title = "Torques and forces",
identifier = "80032",
preferred = true,
plots = {
Plot(
curves = {
Curve(y = torque1.tau, legend = "Torque on wheel1"),
Curve(y = torque2.tau, legend = "Torque on wheel2"),
Curve(y = wheelSet.wheelSetJoint.support.tau, legend = "Total torque on wheels")
}
),
Plot(
curves = {
Curve(y = wheelSet.wheelSetJoint.rolling1.f_lat, legend = "Lateral force on wheel1"),
Curve(y = wheelSet.wheelSetJoint.rolling1.f_long, legend = "Longitudinal force on wheel1")
}
),
Plot(
curves = {
Curve(y = wheelSet.wheelSetJoint.rolling2.f_lat, legend = "Lateral force on wheel2"),
Curve(y = wheelSet.wheelSetJoint.rolling2.f_long, legend = "Longitudinal force on wheel2")
}
)
}
)
}
));
end RollingWheelSetDriving;
Loading
Loading