Week 8

Many coupled oscillators

This week, we focused on making the transition from a small number of degrees of freedom (usually 2) to a large number of degrees of freedom.  The outcome of making this transition will be the emergence of the wave equation.  The purpose of this code will be to study this transition.  We will model the string with masses attached, and change the number of degrees of freedom while holding the total mass of the string fixed, and keeping the total length fixed.  As the number of degrees of freedom becomes large, wave like behavior emerges.

We start by creating tables where each element of the table corresponds to the motion of a given mass (labeled by the integer p), and we plug in the normal mode solutions (labeled by integer n).

We consider a string with total mass M=.01 kg and total length L=1 m, and a tension T=1 N.

M=.01;L=1;T=1;

Now we write out the quantities of merit - ω0 depends on the type of string, its length, and the tension in it, and the number of degrees of freedom.

ω0[NN_]=Sqrt[T/M/L*NN*(NN+1)];

The amplitudes of oscillation of the different degrees of freedom while in the n’th normal mode are given by:

A[p_,n_,NN_,CC_]=CC Sin[p n π/(NN+1)];

In turn, the frequencies of the n’th normal mode are given by

ω[n_,NN_]=2 ω0[NN] Sin[n π/2/(NN+1)];

Now we can create a table whose every element corresponds to the normal mode oscillation of one of the degrees of freedom:

NorMode[n_,NN_,CC_,t_]:=Table[{p,A[p,n,NN,CC]Cos[ω[n,NN] t]},{p,0,NN+1}];

NorMode[1,2,1,t]

?Animate

NOR[n_,NN_,CC_]:=Animate[ListPlot[NorMode[n,NN,CC,t],Joined->True,PlotMarkers->{Automatic,Large},PlotRange->{-1,1}],{t,0,5 2π/ω[n,NN]},AnimationRate->1/100(5*2π/ω[n,NN]),RefreshRate->500,AnimationRepetitions->1]

MatrixForm[{{NOR[1,1,1],NOR[1,2,1],NOR[1,3,1]},{NOR[2,2,1],NOR[2,3,1],NOR[2,4,1]},{NOR[3,3,1],NOR[3,4,1],NOR[3,5,1]}}]

{NOR[1,100,1],NOR[2,100,1],NOR[3,100,1],NOR[4,100,1]}