Double-Pendulum Dynamics: Created in COMSOL Multiphysics 6.0
Double-Pendulum Dynamics: Created in COMSOL Multiphysics 6.0
Double-Pendulum Dynamics
This model is licensed under the COMSOL Software License Agreement 6.0.
All trademarks are the property of their respective owners. See www.comsol.com/trademarks.
Introduction
This tutorial model shows the modeling of a double pendulum using the Multibody
Dynamics interface in COMSOL Multiphysics. The example begins with the creation of a
simple hinge joint and then extends the model with several nodes available for joints such
as constraints, locking, spring, damper, prescribed motion, and friction.
Model Definition
The model describes the motion of a double pendulum under gravity. The double
pendulum system shown in Figure 1 behaves linearly for small angles of rotation, but it
becomes highly nonlinear as the angle of rotation increases, eventually leading to a chaotic
system.
Here, the arms of the double pendulum are connected through a hinge joint. A hinge joint
has one rotational degree of freedom about the joint axis. The remaining degrees of
freedom of both components defining the joint are constrained to have the same values at
the center of the joint.
The complete example is divided into six parts in order to illustrate the available
functionality on the joint node and related subnodes.
2 | DOUBLE-PENDULUM DYNAMICS
A new study is added for each of the cases to provide more clarity. This also helps in storing
all the model settings, which is needed when recomputing the solution in the solved
model.
The details of each case along with the results and modeling instructions are given at a later
point in this document.
3 | DOUBLE-PENDULUM DYNAMICS
In this case, the arms of the pendulum are modeled as flexible elements. Hence, the
stresses generated in the components can be evaluated while computing the system’s
dynamics.
4 | DOUBLE-PENDULUM DYNAMICS
Figure 3: Reaction forces at the hinge joint (Case-1).
Both arms are modeled as flexible parts. The deformation, as well as the stresses generated
in the components, is significant during and after the activation of the constraint
condition.
5 | DOUBLE-PENDULUM DYNAMICS
Figure 4: Relative rotation of the arms at the hinge joint (Case-2).
6 | DOUBLE-PENDULUM DYNAMICS
Figure 5 shows the reaction moments at the joint when using a constraint condition. The
joint allows the arms to rotate about the y-axis, hence the reaction moment should be zero
in this direction. However, when the constraint condition is active, the same joint restricts
this motion and hence, a high reaction moment in the y direction can be seen. After the
constraint condition has stopped the relative motion, the pendulum tries to rotate about
other two axes due to its unsymmetrical geometry. Therefore, nonzero moments in these
directions are also visible.
Figure 6 shows the variation of different forms of energy in the system when using a
constraint condition. Before the constraint condition becomes active, potential energy is
converted into kinetic energy and the strain energy is negligible. During the period when
the constraint condition is active, the relative velocity goes to zero before changing sign.
In this period, all kinetic energy is transformed into strain energy. When the constraint
condition is no longer in action, the strain energy is converted back into kinetic energy.
Structural waves persist in the components due to their flexible nature, therefore a nonzero
strain energy can be seen.
7 | DOUBLE-PENDULUM DYNAMICS
Model Definition: Case-3 (Locking on Joint)
The top surface of the upper arm is constrained such that it cannot translate but is free to
rotate about the y-axis. A lock condition is added at 45° relative rotation between both
the arms of the pendulum. The whole system is placed in the gravitational field and the
dynamics of the system is analyzed. Both the arms of the pendulum are modeled as flexible
elements.
Figure 8 shows the reaction moments at the joint when a lock condition is used. The joint
initially allows the arms to rotate relative to each other about the y-axis so that the reaction
moment should be zero in this direction. However, after applying the lock condition, the
same joint restricts this motion so that a high reaction moment in the y direction can be
seen. After the lock condition is active, the pendulum also tries to rotate about the other
8 | DOUBLE-PENDULUM DYNAMICS
two axes because of its unsymmetrical geometry. Therefore, nonzero moments in these
directions are also visible.
9 | DOUBLE-PENDULUM DYNAMICS
so that the fluctuation in the relative rotation decreases and the arms tend to the
equilibrium position.
10 | DOUBLE-PENDULUM DYNAMICS
Figure 10 shows the variation of different forms of energy in the system when a spring and
damper are added to the joint. Initially, the potential energy is converted into kinetic
energy. After some time, the spring and damper effects will however dominate. The
damper dissipates energy and thus the kinetic energy is reduced to almost zero. As the
energy dissipated in the damper is proportional to the velocity, it tends to a constant value.
The energy stored in the spring is slowly converted into potential energy and vice-versa.
Figure 11: Relative angular velocity of the arms at the hinge joint (Case-5).
Figure 11 shows the relative angular velocity between the arms when prescribed for the
given duration. The velocity is prescribed until 1 s, and hence, it increases to it’s maximum
value in this time interval. After that, due to the inertia of the components and without
11 | DOUBLE-PENDULUM DYNAMICS
any losses, the velocity is maintained to the maximum value for the rest of the simulation.
The relative rotation between the arms is shown in Figure 12. It is clear from this plot that
before 1 s, the rotation increases quadratically with time, after which time it increases
linearly.
Figure 12: Relative rotation of the arms at the hinge joint (Case-5).
12 | DOUBLE-PENDULUM DYNAMICS
Results and Discussion
Figure 13: Relative rotation of the arms at the hinge joint (Case-6).
Figure 13 shows the relative rotation between the arms. The decay in the magnitude of
relative rotation due to the frictional losses at the hinge joint, can be seen.
The time variation of the friction moment is shown in Figure 14. The average value of
friction moment is governed by the gravity load acting on both the arms and the
fluctuations in friction moment are governed by the inertial forces in both the arms. A fast
variation in the friction moment can be seen when the direction of motion is getting
reversed. This mimics the behavior of Coulomb’s friction law, but the friction moment is
not fully discontinuous as it would be in Coulomb’s friction law.
Figure 15 shows the variation of different forms of energy in the system when frictional
losses are added to the joint. The increasing frictional energy loss can be seen in the plot.
13 | DOUBLE-PENDULUM DYNAMICS
Figure 14: Friction moment profile at the hinge joint (Case-6).
14 | DOUBLE-PENDULUM DYNAMICS
Modeling Instructions (Basic Hinge Joint)
From the File menu, choose New.
NEW
In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select Physics tree, select Structural Mechanics>Multibody Dynamics (mbd).
3 Click Add.
4 Click Study.
5 In the Select Study tree, select General Studies>Time Dependent.
6 Click Done.
GEOMETRY 1
If you do not want to build the geometry step by step, you can load it from the stored
model: In the Model Builder window, under Component 1 (comp1) right-click Geometry 1
and choose Insert Sequence. Browse to the model’s Application Libraries folder and
double-click the file double_pendulum.mph. You can then continue to the Definitions
section below.
Block 1 (blk1)
1 In the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Depth text field, type 0.5.
4 In the Height text field, type 10.
Cylinder 1 (cyl1)
1 In the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type 0.3.
4 In the Height text field, type 0.5.
5 Locate the Position section. In the x text field, type 0.5.
6 In the z text field, type 9.5.
15 | DOUBLE-PENDULUM DYNAMICS
7 Locate the Axis section. From the Axis type list, choose y-axis.
Difference 1 (dif1)
1 In the Geometry toolbar, click Booleans and Partitions and choose Difference.
2 Select the object blk1 only.
3 In the Settings window for Difference, locate the Difference section.
4 Find the Objects to subtract subsection. Click to select the Activate Selection toggle
button.
5 Select the object cyl1 only.
Cylinder 2 (cyl2)
1 In the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type 0.3.
4 In the Height text field, type 1.25.
5 Locate the Position section. In the x text field, type 0.5.
6 In the y text field, type -0.75.
7 In the z text field, type 0.5.
8 Locate the Axis section. From the Axis type list, choose y-axis.
Copy 1 (copy1)
1 In the Geometry toolbar, click Transforms and choose Copy.
2 Select the object cyl2 only.
Block 2 (blk2)
1 In the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Width text field, type 10.
4 In the Depth text field, type 0.5.
5 Locate the Position section. In the y text field, type -0.625.
Difference 2 (dif2)
1 In the Geometry toolbar, click Booleans and Partitions and choose Difference.
2 Select the object blk2 only.
3 In the Settings window for Difference, locate the Difference section.
16 | DOUBLE-PENDULUM DYNAMICS
4 Find the Objects to subtract subsection. Click to select the Activate Selection toggle
button.
5 Select the object copy1 only.
Union 1 (uni1)
1 In the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Select the objects cyl2 and dif1 only.
3 In the Settings window for Union, locate the Union section.
4 Clear the Keep interior boundaries check box.
DEFINITIONS
Integration 1 (intop1)
1 In the Definitions toolbar, click Nonlocal Couplings and choose Integration.
2 Click in the Graphics window and then press Ctrl+A to select both domains.
Variables 1
1 In the Definitions toolbar, click Local Variables.
2 In the Settings window for Variables, locate the Variables section.
3 In the table, enter the following settings:
ADD MATERIAL
1 In the Home toolbar, click Add Material to open the Add Material window.
2 Go to the Add Material window.
3 In the tree, select Built-in>Structural steel.
4 Click Add to Component in the window toolbar.
5 In the Home toolbar, click Add Material to close the Add Material window.
17 | DOUBLE-PENDULUM DYNAMICS
MULTIBODY DYNAMICS (MBD)
Gravity 1
1 In the Model Builder window, under Component 1 (comp1) right-click
Multibody Dynamics (mbd) and choose Volume Forces>Gravity.
2 Click in the Graphics window and then press Ctrl+A to select both domains.
Attachment 1
1 In the Physics toolbar, click Boundaries and choose Attachment.
2 Select Boundaries 19, 20, 24, and 25 only.
Hinge Joint 1
1 In the Physics toolbar, click Global and choose Hinge Joint.
2 In the Settings window for Hinge Joint, locate the Attachment Selection section.
3 From the Source list, choose Fixed.
4 From the Destination list, choose Attachment 1.
5 Locate the Axis of Joint section. Specify the e0 vector as
0 x
1 y
0 z
6 Locate the Joint Forces and Moments section. From the list, choose Do not compute.
Attachment 2
1 In the Physics toolbar, click Boundaries and choose Attachment.
2 Select Boundaries 16, 17, 22, and 23 only.
As second attachment, select the interior boundaries of the hole in the outer bar.
Attachment 3
1 In the Physics toolbar, click Boundaries and choose Attachment.
2 Select Boundaries 6–9 only.
Hinge Joint 2
1 In the Physics toolbar, click Global and choose Hinge Joint.
2 In the Settings window for Hinge Joint, locate the Attachment Selection section.
3 From the Source list, choose Attachment 2.
18 | DOUBLE-PENDULUM DYNAMICS
4 From the Destination list, choose Attachment 3.
5 Locate the Axis of Joint section. Specify the e0 vector as
0 x
1 y
0 z
STUDY 1
RESULTS
Displacement (mbd)
The two default plots show the displacement and velocity profile in the arms of the double
pendulum. The stresses can also be visualized by changing the expression in the first plot.
Add the point trajectories in the Displacement plot to visualize the direction of the motion
of each arm.
Point Trajectories 1
1 In the Displacement (mbd) toolbar, click More Plots and choose Point Trajectories.
2 Select Points 14 and 21 only.
3 In the Settings window for Point Trajectories, locate the Coloring and Style section.
4 Find the Line style subsection. From the Type list, choose Tube.
Color Expression 1
1 Right-click Point Trajectories 1 and choose Color Expression.
2 In the Settings window for Color Expression, locate the Expression section.
3 In the Expression text field, type t.
4 Locate the Coloring and Style section. Clear the Color legend check box.
5 Click the Go to Default View button in the Graphics toolbar.
19 | DOUBLE-PENDULUM DYNAMICS
Use the following instructions to reproduce Figure 2:
Relative rotation
1 In the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, type Relative rotation in the Label text
field.
Global 1
1 Right-click Relative rotation and choose Global.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>
Multibody Dynamics>Hinge joints>Hinge Joint 2>mbd.hgj2.th - Relative rotation - rad.
3 Locate the y-Axis Data section. In the table, enter the following settings:
4 Click to expand the Title section. From the Title type list, choose None.
5 Click to expand the Legends section. Clear the Show legends check box.
6 Click to expand the Coloring and Style section. In the Width text field, type 2.
7 In the Relative rotation toolbar, click Plot.
To generate the joint forces plot given in Figure 3, follow the instructions below:
Joint forces
1 In the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, type Joint forces in the Label text field.
Global 1
1 Right-click Joint forces and choose Global.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>
Multibody Dynamics>Hinge joints>Hinge Joint 2>Joint force - N>mbd.hgj2.Fx - Joint force,
x component.
3 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Hinge joints>Hinge Joint 2>
Joint force - N>mbd.hgj2.Fy - Joint force, y component.
20 | DOUBLE-PENDULUM DYNAMICS
4 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Hinge joints>Hinge Joint 2>
Joint force - N>mbd.hgj2.Fz - Joint force, z component.
5 Locate the Title section. From the Title type list, choose None.
6 Locate the Coloring and Style section. In the Width text field, type 2.
7 Find the Line markers subsection. From the Marker list, choose Cycle.
Joint forces
1 In the Model Builder window, click Joint forces.
2 In the Settings window for 1D Plot Group, locate the Plot Settings section.
3 Select the y-axis label check box.
4 In the associated text field, type Joint forces (N).
5 Locate the Legend section. From the Position list, choose Upper left.
6 In the Joint forces toolbar, click Plot.
Joint forces in the joint’s local coordinate system can also be plotted by doing similar steps.
Hinge Joint 2
1 In the Model Builder window, under Component 1 (comp1)>Multibody Dynamics (mbd)
click Hinge Joint 2.
2 In the Settings window for Hinge Joint, locate the Center of Joint section.
3 From the list, choose User defined.
4 Specify the Xc vector as
0.5 x
0 y
0.5 z
5 Locate the Axis of Joint section. From the list, choose From selected coordinate system.
21 | DOUBLE-PENDULUM DYNAMICS
6 From the Axis to use list, choose 2.
Constraints 1
1 In the Physics toolbar, click Attributes and choose Constraints.
2 In the Settings window for Constraints, locate the Rotational Constraints section.
3 In the θmax text field, type pi/4.
The relative motion between the source and destination in the first hinge joint should be
set to zero.
Hinge Joint 1
In the Model Builder window, under Component 1 (comp1)>Multibody Dynamics (mbd) click
Hinge Joint 1.
Prescribed Motion 1
In the Physics toolbar, click Attributes and choose Prescribed Motion.
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
4 Click Add Study in the window toolbar.
5 In the Home toolbar, click Add Study to close the Add Study window.
STUDY 2
Duplicate the plots generated in the first case to reproduce the results shown in Figure 4
and Figure 5:
22 | DOUBLE-PENDULUM DYNAMICS
RESULTS
Global 1
1 In the Model Builder window, expand the Joint moments: Constraints node, then click
Global 1.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>
Multibody Dynamics>Hinge joints>Hinge Joint 2>Joint moment - N·m>mbd.hgj2.Mx -
Joint moment, x component.
3 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Hinge joints>Hinge Joint 2>
Joint moment - N·m>mbd.hgj2.My - Joint moment, y component.
4 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Hinge joints>Hinge Joint 2>
Joint moment - N·m>mbd.hgj2.Mz - Joint moment, z component.
23 | DOUBLE-PENDULUM DYNAMICS
5 In the Joint moments: Constraints toolbar, click Plot.
Energy: Constraints
1 Right-click Joint moments: Constraints and choose Duplicate.
2 In the Settings window for 1D Plot Group, type Energy: Constraints in the Label text
field.
Global 1
1 In the Model Builder window, expand the Energy: Constraints node, then click Global 1.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>Definitions>
Variables>Wp - Potential energy - J.
3 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Global>mbd.Wk_tot -
Total kinetic energy - J.
4 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Global>mbd.Ws_tot -
Total elastic strain energy - J.
Energy: Constraints
1 In the Model Builder window, click Energy: Constraints.
2 In the Settings window for 1D Plot Group, locate the Legend section.
3 From the Position list, choose Upper left.
4 Locate the Plot Settings section. In the y-axis label text field, type Energy (J).
5 In the Energy: Constraints toolbar, click Plot.
Hinge Joint 2
1 In the Model Builder window, under Component 1 (comp1)>Multibody Dynamics (mbd)
click Hinge Joint 2.
2 In the Settings window for Hinge Joint, locate the Axis of Joint section.
3 From the list, choose Select a parallel edge.
24 | DOUBLE-PENDULUM DYNAMICS
Joint Axis 1
1 In the Model Builder window, click Joint Axis 1.
2 Select Edge 33 only.
Hinge Joint 2
1 In the Model Builder window, click Hinge Joint 2.
2 In the Settings window for Hinge Joint, locate the Center of Joint section.
3 From the list, choose Centroid of selected entities.
4 From the Entity level list, choose Edge.
Hinge Joint 2
In the Model Builder window, click Hinge Joint 2.
Locking 1
1 In the Physics toolbar, click Attributes and choose Locking.
2 In the Settings window for Locking, locate the Rotational Locking section.
3 In the θmax text field, type pi/4.
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
4 Click Add Study in the window toolbar.
5 In the Home toolbar, click Add Study to close the Add Study window.
STUDY 3
25 | DOUBLE-PENDULUM DYNAMICS
4 In the tree, select Component 1 (Comp1)>Multibody Dynamics (Mbd)>Hinge Joint 1>
Prescribed Motion 1 and Component 1 (Comp1)>Multibody Dynamics (Mbd)>
Hinge Joint 2>Constraints 1.
5 Right-click and choose Disable.
6 In the Model Builder window, click Study 3.
7 In the Settings window for Study, type Study: Locking in the Label text field.
8 Locate the Study Settings section. Clear the Generate default plots check box.
Solution 3 (sol3)
1 In the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 3 (sol3) node, then click Time-
Dependent Solver 1.
3 In the Settings window for Time-Dependent Solver, click to expand the Time Stepping
section.
4 From the Steps taken by solver list, choose Intermediate.
5 In the Model Builder window, expand the Study: Locking>Solver Configurations>
Solution 3 (sol3)>Time-Dependent Solver 1 node, then click Fully Coupled 1.
6 In the Settings window for Fully Coupled, click to expand the Method and Termination
section.
7 From the Nonlinear method list, choose Automatic (Newton).
8 In the Study toolbar, click Compute.
To generate the relative rotation plot shown in Figure 7, follow the instruction belows:
RESULTS
To generate a plot for joint moments shown in Figure 8, follow the instructions below:
26 | DOUBLE-PENDULUM DYNAMICS
2 In the Settings window for 1D Plot Group, type Joint moments: Locking in the Label
text field.
3 Locate the Data section. From the Dataset list, choose Study: Locking/Solution 3 (sol3).
4 In the Joint moments: Locking toolbar, click Plot.
Rigid Domain 1
1 In the Physics toolbar, click Domains and choose Rigid Domain.
2 Select Domain 2 only.
Use the Rigid Domain’s subnode to prescribe or constrain its motion.
Fixed Constraint 1
In the Physics toolbar, click Attributes and choose Fixed Constraint.
Rigid Domain 2
1 In the Physics toolbar, click Domains and choose Rigid Domain.
2 Select Domain 1 only.
Hinge Joint 3
1 In the Physics toolbar, click Global and choose Hinge Joint.
2 In the Settings window for Hinge Joint, locate the Attachment Selection section.
3 From the Source list, choose Rigid Domain 1.
4 From the Destination list, choose Rigid Domain 2.
5 Locate the Center of Joint section. From the list, choose User defined.
6 Specify the Xc vector as
0.5 x
0 y
0.5 z
27 | DOUBLE-PENDULUM DYNAMICS
7 Locate the Axis of Joint section. Specify the e0 vector as
0 x
1 y
0 z
Energy: Damper
1 In the Physics toolbar, click Global and choose Global Equations.
2 In the Settings window for Global Equations, type Energy: Damper in the Label text
field.
3 Locate the Global Equations section. In the table, enter the following settings:
28 | DOUBLE-PENDULUM DYNAMICS
11 In the Physical Quantity dialog box, type power in the text field.
12 Click Filter.
13 In the tree, select General>Power (W).
14 Click OK.
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
4 Click Add Study in the window toolbar.
5 In the Home toolbar, click Add Study to close the Add Study window.
STUDY 4
Follow the instructions to generate the relative rotation plot shown in Figure 9:
29 | DOUBLE-PENDULUM DYNAMICS
RESULTS
Relative rotation 1
In the Model Builder window, right-click Relative rotation and choose Duplicate.
Global 1
1 In the Model Builder window, expand the Relative rotation: Spring-Damper node, then
click Global 1.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>
Multibody Dynamics>Hinge joints>Hinge Joint 3>comp1.mbd.hgj3.th - Relative rotation -
rad.
3 Locate the y-Axis Data section. In the table, enter the following settings:
The energy plot in Figure 10 can be generated by following the steps below:
Energy: Spring-Damper
1 In the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, type Energy: Spring-Damper in the Label
text field.
3 Locate the Data section. From the Dataset list, choose Study: Spring-Damper/
Solution 4 (sol4).
30 | DOUBLE-PENDULUM DYNAMICS
Global 1
1 Right-click Energy: Spring-Damper and choose Global.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>Definitions>
Variables>Wp - Potential energy - J.
3 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Global>mbd.Wk_tot -
Total kinetic energy - J.
4 Locate the y-Axis Data section. In the table, enter the following settings:
5 Locate the Title section. From the Title type list, choose None.
6 Locate the Coloring and Style section. In the Width text field, type 2.
7 Find the Line markers subsection. From the Marker list, choose Cycle.
Energy: Spring-Damper
1 In the Model Builder window, click Energy: Spring-Damper.
2 In the Settings window for 1D Plot Group, locate the Plot Settings section.
3 Select the y-axis label check box.
4 In the associated text field, type Energy (J).
5 In the Energy: Spring-Damper toolbar, click Plot.
6 Locate the Axis section. Select the Manual axis limits check box.
7 In the y maximum text field, type 1e6.
8 In the Energy: Spring-Damper toolbar, click Plot.
Hinge Joint 3
In the Model Builder window, under Component 1 (comp1)>Multibody Dynamics (mbd) click
Hinge Joint 3.
31 | DOUBLE-PENDULUM DYNAMICS
Prescribed Motion 1
1 In the Physics toolbar, click Attributes and choose Prescribed Motion.
2 In the Settings window for Prescribed Motion, locate the Prescribed Rotational Motion
section.
3 From the Prescribed motion through list, choose Angular velocity.
4 In the ωp text field, type t.
5 From the Activation condition list, choose Conditionally active.
6 In the iθp text field, type t>1.
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
4 Click Add Study in the window toolbar.
5 In the Home toolbar, click Add Study to close the Add Study window.
STUDY 5
32 | DOUBLE-PENDULUM DYNAMICS
8 Locate the Study Settings section. Clear the Generate default plots check box.
9 In the Home toolbar, click Compute.
Follow these instructions to generate the relative velocity (Figure 11) and the relative
rotation (Figure 12) plots:
RESULTS
3 Locate the Data section. From the Dataset list, choose Study: Prescribed motion/
Solution 5 (sol5).
Global 1
1 In the Model Builder window, expand the Relative velocity: Prescribed motion node, then
click Global 1.
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>
Multibody Dynamics>Hinge joints>Hinge Joint 3>mbd.hgj3.th_t -
Relative angular velocity - rad/s.
3 Locate the y-Axis Data section. In the table, enter the following settings:
33 | DOUBLE-PENDULUM DYNAMICS
Modeling Instructions (Friction on Joint)
Hinge Joint 3
Compute joint forces to evaluate normal force in the friction node.
Friction 1
1 In the Physics toolbar, click Attributes and choose Friction.
2 In the Settings window for Friction, locate the Friction section.
3 In the μ text field, type 0.6.
4 In the r text field, type 0.3.
Energy: Friction
1 In the Model Builder window, right-click Energy: Damper and choose Duplicate.
2 In the Settings window for Global Equations, type Energy: Friction in the Label text
field.
3 Locate the Global Equations section. In the table, enter the following settings:
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>
Time Dependent.
4 Click Add Study in the window toolbar.
5 In the Home toolbar, click Add Study to close the Add Study window.
34 | DOUBLE-PENDULUM DYNAMICS
STUDY 6
Solution 6 (sol6)
1 In the Study toolbar, click Show Default Solver.
2 In the Model Builder window, expand the Solution 6 (sol6) node.
3 In the Model Builder window, expand the Study: Friction>Solver Configurations>
Solution 6 (sol6)>Dependent Variables 1 node, then click
Energy loss due to friction (comp1.ODE1).
4 In the Settings window for State, locate the Scaling section.
5 From the Method list, choose Manual.
6 In the Scale text field, type 1e6.
7 In the Study toolbar, click Compute.
Follow the instructions below to generate the relative rotation and friction moment plots
shown in Figure 13 and Figure 14 respectively:
35 | DOUBLE-PENDULUM DYNAMICS
RESULTS
Friction moment
1 Right-click Relative rotation: Friction and choose Duplicate.
2 In the Settings window for 1D Plot Group, type Friction moment in the Label text field.
Global 1
1 In the Model Builder window, expand the Friction moment node, then click Global 1.
2 In the Settings window for Global, locate the y-Axis Data section.
3 In the table, enter the following settings:
Friction moment
1 In the Model Builder window, click Friction moment.
2 In the Friction moment toolbar, click Plot.
The energy plot in Figure 15 can be generated by following the steps below:
Energy: Friction
1 In the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, type Energy: Friction in the Label text
field.
3 Locate the Data section. From the Dataset list, choose Study: Friction/Solution 6 (sol6).
4 From the Time selection list, choose Interpolated.
5 In the Times (s) text field, type range(0,0.2,10).
Global 1
1 Right-click Energy: Friction and choose Global.
36 | DOUBLE-PENDULUM DYNAMICS
2 In the Settings window for Global, click Replace Expression in the upper-right corner of
the y-Axis Data section. From the menu, choose Component 1 (comp1)>Definitions>
Variables>Wp - Potential energy - J.
3 Click Add Expression in the upper-right corner of the y-Axis Data section. From the
menu, choose Component 1 (comp1)>Multibody Dynamics>Global>mbd.Wk_tot -
Total kinetic energy - J.
4 Locate the y-Axis Data section. In the table, enter the following settings:
5 Locate the Title section. From the Title type list, choose None.
6 Locate the Coloring and Style section. In the Width text field, type 2.
7 Find the Line markers subsection. From the Marker list, choose Cycle.
Energy: Friction
1 In the Model Builder window, click Energy: Friction.
2 In the Settings window for 1D Plot Group, locate the Plot Settings section.
3 Select the y-axis label check box.
4 In the associated text field, type Energy (J).
5 In the Energy: Friction toolbar, click Plot.
6 Locate the Axis section. Select the Manual axis limits check box.
7 In the y maximum text field, type 3e6.
8 In the Energy: Friction toolbar, click Plot.
You can also generate an animation of the double pendulum. Follow the steps given below
to generate the animation for Case-1:
Animation 1
1 In the Results toolbar, click Animation and choose Player.
2 In the Settings window for Animation, locate the Frames section.
3 In the Number of frames text field, type 50.
4 Click the Play button in the Graphics toolbar.
The analyses are now finished. If you want to store this model and re-use it later, you need
to disable the nodes in all the studies which are added at a later stage.
37 | DOUBLE-PENDULUM DYNAMICS
STUDY: PRESCRIBED MOTION
STUDY: SPRING-DAMPER
STUDY: LOCKING
38 | DOUBLE-PENDULUM DYNAMICS
STUDY: CONSTRAINTS
STUDY: BASIC
39 | DOUBLE-PENDULUM DYNAMICS
40 | DOUBLE-PENDULUM DYNAMICS