Showing posts with label exam. Show all posts
Showing posts with label exam. Show all posts

Thursday, October 13, 2016

Classical Mechanic - Hamiltonian exercise

Let's try to solve the pendulum equation with the Newton's, Lagrange's and Hamilton's mechanics.

Newton's Mechanics

The K vector shows the direction of the movement of the pendulum. It can be defined as |K| = mgsinα. Consider the displacement of the mass at the end of the pendulum as x. So the vector K remains as:


We know the value of the displacement x and its second derivative as:

If we substitute those values in the precedent equation, and making the approximation of the sinus for small displacements of we get:

Solving this differential equation of order 2, we get:

Lagrange's Mechanics

Here, we must first find the kinetic and potential energies:


With those energies, we can obtain the Lagrangian:

Now we can apply the Lagrange's equation to obtain the motion of the pendulum:
Lagrange's equation




This is the same differential equation as the one get with the Newtonian mechanics.

Hamilton's Mechanics

We start from the Lagrangian, and the generalized momentum:

Now, with the value of the generalized momentum, we can substitute the derivative of α from the Lagrangian and get the Hamiltonian:

If, now, we apply the Hamilton's equations:

Substituting the values of the generalized momentum, we reach to the same differential equation as in the two other cases; with the same final result.

Conclusion

As you've see, the three methods hopefully gave the same result, which confirm that they are a reformulation of the same mechanics. The Newton's mechanics is more simplistic, and for problems with more constraints, you must deal with a system of several equations.
The Lagrangian's mechanics reduce the number of equations to the number of constraints. This is the method with less equations to solve, but you must deal with almost a differential equation of order two.
And the Hamiltonian's mechanics have twice the number of equations than the Lagrangian, but you with easier calculus, as the Hamilton equations does have second degree derivatives.

Classical Mechanic - Hamiltonian exercise

Let's try to solve the pendulum equation with the Newton's, Lagrange's and Hamilton's mechanics.

Newton's Mechanics

The K vector shows the direction of the movement of the pendulum. It can be defined as |K| = mgsinα. Consider the displacement of the mass at the end of the pendulum as x. So the vector K remains as:


We know the value of the displacement x and its second derivative as:

If we substitute those values in the precedent equation, and making the approximation of the sinus for small displacements of we get:

Solving this differential equation of order 2, we get:

Lagrange's Mechanics

Here, we must first find the kinetic and potential energies:


With those energies, we can obtain the Lagrangian:

Now we can apply the Lagrange's equation to obtain the motion of the pendulum:
Lagrange's equation




This is the same differential equation as the one get with the Newtonian mechanics.

Hamilton's Mechanics

We start from the Lagrangian, and the generalized momentum:

Now, with the value of the generalized momentum, we can substitute the derivative of α from the Lagrangian and get the Hamiltonian:

If, now, we apply the Hamilton's equations:

Substituting the values of the generalized momentum, we reach to the same differential equation as in the two other cases; with the same final result.

Conclusion

As you've see, the three methods hopefully gave the same result, which confirm that they are a reformulation of the same mechanics. The Newton's mechanics is more simplistic, and for problems with more constraints, you must deal with a system of several equations.
The Lagrangian's mechanics reduce the number of equations to the number of constraints. This is the method with less equations to solve, but you must deal with almost a differential equation of order two.
And the Hamiltonian's mechanics have twice the number of equations than the Lagrangian, but you with easier calculus, as the Hamilton equations does have second degree derivatives.

Thursday, October 6, 2016

Classical Mechanics - Lagrangian exercise

Let's use the Lagrangian to solve a simple exercise.
Two blocks of equal mass that are connected by a rigid bar of length l move without friction along a given path. The attraction of the earth acts along the negative y-axis. Find the equation for the generalized coordinate α.

 First, let's try to get the relation between the Cartesian coordinates and our generalized coordinate:


To get the Lagrangian, we need the potential and kinetic energies.


And the potential:

Now we can write the Lagrangian as L = T - V:

And the Lagrange equation remains as:

And finally, we get the equation of the system based on the generalized coordinate α:


We can solve the previous differential equation knowing that α is a time dependent variable, or let the equation as this.

As we can see, the Lagrangian help us getting the equation of the system with simple methods. Solving this problem with the Newtonian mechanics could lead to more complicated calculus.


Friday, July 29, 2016

Classical Mechanics - Coriolis Acceleration

The Coriolis acceleration is a phenomena which appears when the reference system where the coordinates are taken is under a rotating acceleration. If the reference system isn't affected by a rotating acceleration, it's an inertial system, otherwise (in this case) it's a non-inertial system. Let's try to see this starting with the Newton's laws:

Newton's law

As I said, our reference system is under a rotating acceleration, so the velocity vector must be adapted (I will use the subscript L to name the "Laboratory system" which is the inertial system, and the subscript M to name the "Moving system" which is the non-inertial system):

Velocity vector on non-inertial system

As we see, the angular velocity of the moving system must be added to the linear velocity of the moving system. Let's derive the previous equation to obtain the acceleration. To do so, I will first introduce the operator D:




And now the derivative can be obtained easily:


Substituting the D operator:

Non-inertial system acceleration

The first term of the result is the linear acceleration. We can see easily that if it were no angular velocity, this will be the unique remaining term; which means that the acceleration has the same value independently of the reference system (in an inertial system). The second term is angular acceleration. The third is the Coriolis acceleration. And the last term is the centripetal acceleration.

Now we can rewrite the Newton's law for a non-inertial system just multiplying the previous equation by the mass:

Non-inertial system Newton's law

If we leave the main force over the particle in the left hand of the equation (and omitting the M subscript):

Equation of mechanics in rotating coordinates

Let's do an exercice to apply the obtained equation.

A river of width D flows on the northern hemisphere at the geographical latitude φ toward the north with a flow velocity v0. By which amount is the right bank higher than the left one?


First of all, let's examine each term of the equation for our case. The force vector will represent the gravitational force. The angular acceleration is zero as our angular velocity is the earth rotation which is constant. And the centripetal acceleration can be omitted, as the r vector is small compared with the radius of the earth (which is present the the gravitational force). This leads us to the simplified equation:

Coriolis effect on earth

Let's now define the force vector, the angular velocity and the linear velocity in the non-inertial system. I will consider the orthonormal basis u'(from north to south coordinate), u'y (from west to east coordinate) and u'z (the up-down coordinate) as the basis on the non-inertial system.


Now we can rewrite the motion of the river equation:



Here, we can appreciate two forces, one downward the earth, and the other to the east. This make a vector which pulls the surface of the water in this direction. With the modulus of this force, and one of its component, we can obtain the angle of this force. This angle, with the width of the river gives us the difference of high between one side to the other of the river.