Tuesday, March 29, 2016

Lagrangians Pt. 2: Complex Systems

In an extension of the previous post, Hamilton’s Principle and Lagrangians, the discussed principles can greatly simplify solving for the motion of otherwise complicated, mechanical systems.  If one can determine the time dependent formulas describing the object of interest’s various degrees of freedom, the system’s kinetic energy, potential energy, Lagrangian equation, and Euler-Lagrange equations can be formulated.  By applying the basic concepts established in the previous post, we will determine the motion undergone by two otherwise complicated systems.

Example 1:

Consider a pendulum of length .  On one end, the pendulum is attached to a bob of mass m.  On the other end, the pendulum is attached to a peg on a disk of radius R that rotates with an angular velocity ω.   Determine the equation of motion of the bob.  The system is illustrated in Figure 1.

Figure 1


Solution:


To begin, we formulate time dependent equations representing the x and y coordinates of our bob.  For our system,

and

where φ is a function of time representing the angle from the vertical of the pendulum.  For each of these equations, the first term represents the respective component of the vector from the center of the disk to the peg.  Likewise, the second term represents the respective components of the vector from the peg to the bob.

Next, we can determine the kinetic energy, potential energy, and, subsequently, the Lagrangian of the system.  As discussed in the previous post, the kinetic energy T and potential energy U of the bob are

and

where g is gravity.  Furthermore, since


we determine our Lagrangian to be


Finally, by applying the Euler-Lagrange equation, we determine our system’s equation of motion:

The motion of the system given initial conditions is simulated below.  For this simulation, R = 0.75 m, ℓ=0.75 m, ω=1.0 rad/sec, g=9.8 m/s2, m=1.0 kg, φ(0)=π/4, and φ’(0)=0.



Example 2:

Consider the same system as in example 1, but with an additional pendulum and bob attached to the original bob, see Figure 2.  Determine the equations of motion of the system.
Figure 2

Solution:

As our system now has an additional degree of freedom, we must determine an additional equation of motion.  Applying the same procedure as before, we begin by determining the time dependent equations representing the x and y coordinates of our two masses.  For this system,

and

Next, we determine the kinetic energy, potential energy, Lagrangian, and Euler-Lagrange equations of the system.  As before, the kinetic energy T and potential energy U of the system are

and

After plugging the energies into our Lagrangian equation and setting up Euler-Lagrange equations for both φ and θ, we obtain our equations of motion:

and

The motion of the system given initial conditions is simulated below.  For this simulation: R = 0.75 m, 1=0.5 m, 2=0.5 m, ω=1.0 rad/sec, g=9.8 m/s2, m1=1.0 kg, m2=1.0 kg, θ(0)=π/2, θ’(0)=0, φ(0)=π/4, and φ’(0)=0.


Tuesday, March 1, 2016

Hamilton's Principle and Lagrangians: An Alternative Method to Newtonian Mechanics

Hamilton’s Principle provides an alternate method to Newtonian mechanics when solving problems and determining a system’s equations of motion.  The idea behind this method is to determine the system’s path of motion, otherwise known as its “action”, which minimizes the difference between its kinetic and potential energies.  To do this, we begin by formulating equations defining the kinetic energy T and potential energy U for each degree of freedom of the system.  Next, we formulate our Lagrangian equation L using the relationship


Once our Lagrangian is established, we can apply the Euler-Lagrange equation


to determine our equation of motion with minimized action.  In this equation, xi represents the function with respect to time of one of the system’s degrees of freedom, λ is essentially the force of constraint of our system, and gi is the function establishing our system’s constraint equations.  Solving the resulting system of equations after applying the Euler-Lagrange equation will provide the equation of motion for the system at hand.

Example:
(Ex 7.10 from Classical Dynamics of Particles and Systems by Thornton and Marion)

Consider a particle of mass m starting at rest on top of a smooth, fixed hemisphere of radius a.  Find the force of constraint and determine the angle at which the particle leaves the hemisphere.

Figure 1: This is the system.
Image Credit: Classical Dynamics of Particles and Systems by Thornton and Marion

To begin, we will find the constraint equation.  As the surface of the hemisphere can be described as

our constraint equation is


Next, we must formulate our kinetic and potential energies and establish our Lagrangian equation.  To determine our kinetic energy T, we must consider the kinetic energy of both degrees of freedom: r and θ.  Thus,


The potential energy of the system is dependent on the height of the mass and can be represented by

Thus, our Lagrangian is


Now, to determine our equations of motion with minimized action, we must apply the Euler-Lagrange equation for each degree of freedom.  Applying this process for the r degree of freedom, we see


and

Thus, the Euler-Lagrange equation for r is



Likewise, when applying this process for θ, we see

and
Thus, the Euler-Lagrange equation for θ is


Finally, we can determine our force of constraint by solving this system of equations, including the two Euler-Langrange equations and the equation of constraint, for λ.  This provides us with the relation


As the mass will leave the hemisphere at the angle θ in which the force of constraint λ becomes 0, we determine that the particle will depart at


The approximate point of departure is illustrated on the figure below.

Figure 2:  The red dot represents the particle approximately at the angle of departure from the hemisphere.