search

# Class myphysicslab.sims.pendulum.ReactionPendulumApp

Provided By myphysicslab.sims.pendulum.ReactionPendulumApp myphysicslab.lab.util.AbstractSubject myphysicslab.lab.util.Observermyphysicslab.lab.util.Printablemyphysicslab.lab.util.Subject

ReactionPendulumApp displays the reaction forces pendulum simulation ReactionPendulumSim and compares it to the classic pendulum simulation PendulumSim which is shown alongside. The simultaneous simulations show that the two pendulums are equivalent in their motion. This also confirms that the calculation for equivalent arm length (see below) is correct.

Something to notice is that the reaction force diverges more from the stick vector as the size of disk increases. This is because a smaller disk is closer to the ideal of a point mass in the classic pendulum simulation.

## Keep Parameters Synchronized

We keep the parameters for gravity, mass and length of pendulum synchronized between the two simulations (though length is slightly different, see below).

The damping model is different for the two simulations so we don't try to synchronize the damping; we just leave both simulations with zero damping.

## Length of Equivalent Classic Pendulum

To match the motion of the two simulations, the lengths are slightly different. The ReactionPendulumSim simulation models the pendulum as a rigid disc with mass distributed evenly. The classic ideal PendulumSim models the pendulum as a point mass at the end of a massless rod.

We want to find the length of the simple ideal pendulum that is equivalent to the rigid body disk pendulum.

Rotation of a solid cylinder of radius r about its cylinder axis has rotational inertia

I = m r^2 / 2


Use parallel axis theorem, where the CM (center of mass) is at distance h from the pivot point, to get rotational inertia of:

I = m r^2 / 2 + m h^2


Use rotational analog of Newton's second law of motion about a fixed axis which is

I \theta'' = sum of torques


Here the only torque is from gravity at the CM:

I \theta'' = -h m g sin(\theta)


expand this using the value for I found above

\theta'' =  -h m g sin(\theta) / (m r^2 / 2 + m h^2)
= -h g sin(\theta) / (r^2/2 + h^2)


what would be the equivalent length of a simple point mass pendulum? Let

R = the length of that equivalent simple pendulum
I = m R^2


then we have

I \theta'' = - m g R sin (\theta)
\theta'' = - g sin (\theta) / R


equating the two we get

h / (r^2/2 + h^2) = 1 / R
R = (r^2/2 + h^2) / h
= h + r^2 / (2 h)


So the equivalent ideal pendulum is longer: R > h

## Another Way to Calculate Equivalent Length

Here's another way to calculate equivalent classic ideal pendulum length. Suppose we have rotational inertia about the pivot point (not about the CM) is I, and length to the CM is h.

I \theta'' = -h m g sin(\theta)
\theta'' = -h m g sin(\theta) / I


What would be the equivalent length R of an ideal (point mass) pendulum? For ideal pendulum, as above:

\theta'' = - g sin (\theta) / R


Equating these gives:

1 / R = h m / I
R = I / (m h)


If we put in the value for I above:

R = (m r^2 / 2 + m h^2) / (m h)
= h + r^2 / (2 h)


which is the same as the previous answer.

## App Setup

Creates instance objects such as the simulation and display objects; defines regular expressions for easy Terminal scripting of these objects using short names instead of fully qualified property names.

The constructor takes an argument that specifies the names of the HTML elementId's to look for in the HTML document; these elements are where the user interface of the simulation is created. This allows for having two separate simulation apps running concurrently on a single page.

No global variables are created other than two root global variables: the myphysicslab global holds all of the myPhysicsLab classes; and a global variable is created for this application instance. This application global is created outside of this file in the HTML where the constructor is called. The name of that global variable holding the application is passed to defineNames() method so that short-names in scripts can be properly expanded.

### new ReactionPendulumApp( elem_ids )

Parameters
 elem_ids {container: string, div_graph: string, div_terminal: string, div_time_graph: string, graph_controls: string, images_dir: string, label_terminal: string, show_sim: string, show_terminal: string, sim_applet: string, sim_controls: string, tab_list: string, term_input: string, term_output: string, time_graph_controls: string} specifies the names of the HTML elementId's to look for in the HTML document; these elements are where the user interface of the simulation is created.