sec5.1.mws

Classical Mechanics with Maple

Section 5.1: The Analytic Method Using the Lagrangian Equations

Dr. Harald Kammerer
maple@jademountain.de

Initialisation

> restart;

> libname:="C:/mylib/m6dynlib","C:/mylib/m6dynfig",libname:

> with(linalg):with(plots):with(plottools):with(dynamics);with(figures_chapter_5);

Warning, the protected names norm and trace have been redefined and unprotected

Warning, the name changecoords has been redefined

Warning, the name arrow has been redefined

[LAGRANGE, MI, gravitational_energy, impact, kineti...

[Fig_5_1, Fig_5_10, Fig_5_11, Fig_5_2, Fig_5_3, Fig...

5.1: The Analytic Method

Up to now we have considered mass particles, systems of mass particles and rigid bodies. Now we consider systems of rigid bodies. Now we consider different methods to get the equation of motion for rigid bodies and systems of them. Here we compare two usual methods to get these equations.

5.1.1 Review of the Synthetic Method

The synthetic method is well known in mechanics. To get the equation which describes a mechanical model, one cuts all connection between the single parts of the system and all supports and considers the equilibrium of the free bodies. We have done this for the case of single rigid bodies in section 4.2.4. We don't need the details at this point. Repeat example: cuboid and cylinder on a slope for details. Later in this section we consider some additional examples.

5.1.2 Introduction to the Analytic Method

For clarity we derive the following relations only for systems of mass particles. Then we needn't consider rotations. The results for the case of rigid bodies are analogous. As in section 4.1.1 the considered mass particles are held together by boundaries. Their postition vectors are the vectors r[i] , i =1, 2, .. n . The situation is shown in Fig. 1.

> display(Fig_5_1()[1],scaling=constrained,axes=none,title="Figure 1");

[Maple Plot]

The resultant force acting on the particle i should be denoted as F[i] (notice that this is a vector). For the mass particle the we know from Newton's second law

F[i]-m*a[i] = 0

where a[i] is the acceleration of the particle: a[i] := diff(r[i],`$`(t,2)) . Now we define an virtual displacement delta*r[i] for every mass particle. The conditions for this virtual displacements are that they are small and with the boundaries of the system compatible, but apart from that without restrictions. The multiplication of the equation with delta*r[i] and addition of all equations yiels the principle of d'Alembert

sum((F[i]-m[i]*a[i])*delta*r[i],i = 1 .. n) = 0

In a prior section we had defined active and passive forces. We know that passive forces which are caused by a boundary are always orthogonal to the boundary. And because the virtual displacements have to be compatible to the boundaries of the system they don't do work. So we needn't regard them here.

To describe the position of a mass particle in the three dimensional space we need three coordinates. In general we need 3n conditions to describe the position of all n particles. The boundaries between the individual particles cause the number of degrees of freedom f of the total system to be less than 3n . Consequently we need 3*n-f boundary conditions to describe the system. The Lagrangian coordinates q[i] , i=1..f are the coordinates which belong to the f degrees of freedom. Between them and the position vectors r[i] there are transformation conditions r[i] = r[i] ( q[1] ,.., q[f] ) which we assume to be known. In general, these conditions can be dependent on velocity and time. But in these course we don't consider this case.

Example 1

In Fig. 2 there are two connected cuboids. We define the x,y -coordinate system, which we use to define the position vectors for both bodies. Additionally we define the coordinate s starting from the origin of the x,y -coordinate system, as shown in Fig. 2.

> display(Fig_5_2(),scaling=constrained,axes=none,title="Figure 2");

[Maple Plot]

The total system has two bodies and 1 degree of freedom. The coordinate s is the Lagrangian coordinate. So we need 3*n-f = 5 boundary conditions. Because we have a planar system we can assume that z[1] = 0 and z[2] = 0 . The x -coordinate from the position of the cuboid 1 is x[1] = -L-D+s . Its y -coordinate is y[1] = 0 . The position of the cuboid 2 has the x -coordinate x[2] = s*cos(alpha) and the y -coordinate y[2] = -s*sin(alpha) . In the initial position which is shown in Fig. 2 there is s[0] = D/2 . So we get the equations of transformation

> r[1] := vector(3,[-L-D+s, 0, 0])

r[1] := vector([-L-D+s, 0, 0])

for the cuboid 1 and

> r[2] := vector(3,[s*cos(alpha), -s*sin(alpha), 0])

r[2] := vector([s*cos(alpha), -s*sin(alpha), 0])

for the cuboid 2 .

Now we use the formula of Taylor to write for the virtual displacement

delta*r[i] := sum(diff(r[i],q[k])*delta*q[k],k = 1 ...

With this we get for the equation above

sum(F[i]-m*a[i],i = 1 .. n)*sum(diff(r[i],q[k])*del...

Some rearranging yields

sum(sum(F[i]*diff(r[i],q[i])-m[i]*a[i]*diff(r[i],q[...

The virtual displacements can be choosen freely. So we can set every delta*r[k] to zero except one of them, for example delta*r[1] . Remember that F[i] , r[i] and a[i] are vectors. Write the resulting equation with use of coordinates we get

sum(F[x[i]]*diff(x[i],q[1])+F[y[i]]*diff(y[i],q[1])...

where we use the notation diff(x[i],`$`(t,2)) = a[x[i]] , diff(y[i],`$`(t,2)) = a[y[i]] and diff(z[i],`$`(t,2)) = a[z[i]] .

We need some additional relations. But we don't prove these relations here.

1:

a[x[i]]*diff(x[i],q[1]) = diff(v[x[i]]*diff(x[i],q[...

with v[x[i]] = diff(x[i],t) .

2:

diff(x[i],q[1]) = diff(v[x[i]],v[q[1]])

with v[q[1]] = diff(q[1],t) .

3:

diff(diff(x[i],q[1]),t) = diff(v[x[i]],q[1])

With use of 2 and 3 we get for 1:

a[x[i]]*diff(x[i],q[1]) = diff(v[x[i]]*diff(v[x[i]]...

a[x[i]]*diff(x[i],q[1]) = diff(diff(v[x[i]]^2/2,v[q...

The congruent results we get for y and z . Using these results yields

sum(m[i]*(diff(diff((v[x[i]]^2+v[y[i]]^2+v[z[i]]^2)...

The term

T = sum(m[i]*(v[x[i]]^2+v[y[i]]^2+v[z[i]]^2),i = 1 ...

is the total kinetic energy of the system of mass particles. But consider that the position vectors r[i] must be expressed as functions of the Lagrnge coordinates q[1] .. q[f] .

The same precedure can be used for the virtual displacements delta*q[2] .. delta*q[f] . Altogether we get f relations

diff(diff(T,v[q[k]]),t)-diff(T,q[k]) = Q[k] ; k = 1 .. f

We call them the Lagrangian equations . The right side of the equations

Q[k] = sum(F[x[i]]*diff(x[i],q[k])+F[y[i]]*diff(y[i...

Q[k] = sum(F[i]*diff(r[i],q[k]),i = 1 .. n)

(notice that F[i] and r[i] in the last relations are vectors) are called generalized forces .

We have mentioned that F[i] is the resultant of all acting forces on particle i without consideration of the passive forces. So we have

F[i] = F[i,conservative]+F[i,nonconservative]

with the definition from section 3.2 for conservative and non-conservative forces. For the conservative forces we have with the total potential V

F[x[i,cons]] = -diff(V,x[i]), F[y[i,cons]] = -diff(...

Use these relation in the equation above we get

Q[k,conservative] = -sum(diff(V,x[i])*diff(x[i],q[k...

Q[k,conservative] = -diff(V,q[k])

So we get the Lagrangian equations in the following form:

diff(diff(T,v[q[k]]),t)-diff(T,q[k])+diff(V,q[k]) =... , k = 1 .. f

where v[q[k]] = diff(q[k],t) .The Q[k,nc] are the generalized forces, which follows from Q[k] = sum(F[i]*diff(r[i],q[k]),i = 1 .. n) when only the non-conservative forces F[i,nonconservative] are considered.

At last we point out that the Lagrangian equations are also valid for rigid bodies and systems of them when in the kinetic energy the part of the rotations is taken into account. It is not necessary to derive this fact in detail. We will see this in the following continuation of the example above.

Example 1 (continuation)

For clarity we don't use the prepared functions. The total kinetic energy of the system is given by

> T:=m[1]*(v[x[1]]**2+v[y[1]]**2+v[z[1]]**2)/2+m[2]*(v[x[2]]**2+v[y[2]]**2+v[z[2]]**2)/2;

T := 1/2*m[1]*(v[x[1]]^2+v[y[1]]^2+v[z[1]]^2)+1/2*m...

From the transformation equations above we know

> evalm(r[1]);

vector([-L-D+s, 0, 0])

> evalm(r[2]);

vector([s*cos(alpha), -s*sin(alpha), 0])

For the velocities we get from these the relations

> rel1:=v[x[1]]=v,v[y[1]]=0,v[z[1]]=0;

rel1 := v[x[1]] = v, v[y[1]] = 0, v[z[1]] = 0

> rel2:=v[x[2]]=v*cos(alpha),v[y[2]]=-v*sin(alpha),v[z[2]]=0;

rel2 := v[x[2]] = v*cos(alpha), v[y[2]] = -v*sin(al...

with v = diff(s,t) .

and for the kinetic energy we get

> Ts:=subs({rel1,rel2},T);

Ts := 1/2*m[1]*v^2+1/2*m[2]*(v^2*cos(alpha)^2+v^2*s...

> Ts:=simplify(Ts,trig);

Ts := 1/2*v^2*(m[1]+m[2])

In this example we assume that there is no friction. Then there are only conservative forces. We have only the potential of gravity. The total potential is given by

> V:=m[1]*g*y[1]+m[2]*g*y[2];

V := m[1]*g*y[1]+m[2]*g*y[2]

And by use of the transformation equation it follows

> Vs:=subs({y[1]=r[1][2],y[2]=r[2][2]},V);

Vs := -m[2]*g*s*sin(alpha)

Here we see that it is usually possible to formulate the relations for the kinetic energy and the potential direct by use of the Lagrangian coordinates.

Because we have only one degree of freedom, the Lagrangian equation is here

diff(diff(Ts,v[s]),t)-diff(Ts,s)+diff(Vs,s) = 0

The necessary derivatives are

> L1:=diff(Ts,v);

L1 := v*(m[1]+m[2])

> L2:=diff(Ts,s);

L2 := 0

> L3:=diff(Vs,s);

L3 := -m[2]*g*sin(alpha)

At last we need the derivative of L1 with respect to time. With a := diff(v,t) we get

> L1a:=a*(m[1]+m[2]);

L1a := a*(m[1]+m[2])

Altogether this yields

> EOMa:=L1a-L2+L3=0;

EOMa := a*(m[1]+m[2])-m[2]*g*sin(alpha) = 0

or with some rewriting

> EOM:=subs({a=diff(s(t),t$2),s=s(t)},EOMa);

EOM := diff(s(t),`$`(t,2))*(m[1]+m[2])-m[2]*g*sin(a...

>

In the next section we consider two more examples to illustrate the difference between the synthetic and the analytic method.