Oscillations

Description

Mathematica is used to solve the equations of motion for three masses attached to each other and a surrounding box by elastic springs.  The simultaneous equations describing relative motion of each mass are numerically solved and results are shown in animation.

By: Stephen Kaufmann
Institute of Mechanics
Swiss Federal Institute of Technology.Zurich

System

Animation of Solutions

Equal Masses

Animate[1]

To view this animation, select the graphics and double-click it.

Implementation

Formulation

Matrices

m = DiagonalMatrix[{m1, m1, m2, m2, m3, m3}]

c = f*
	{{1/2, 0, -1/4, -Sqrt[3]/4, -1/4, Sqrt[3]/4},
	{0, 5/2, -Sqrt[3]/4, -3/4, Sqrt[3]/4, -3/4},
	{-1/4, -Sqrt[3]/4, 9/4, Sqrt[3]/4, -1, 0},
	{-Sqrt[3]/4, -3/4, Sqrt[3]/4, 7/4, 0, 0},
	{-1/4, Sqrt[3]/4, -1, 0, 9/4, -Sqrt[3]/4},
	{Sqrt[3]/4, -3/4, 0, 0, -Sqrt[3]/4, 7/4}} //N;

MatrixForm[N[c, 2]]

Values

numerical = {f -> 1., m1 -> 1., m2 ->1., m3 -> 1.}

Eigenvectors

eigenVectors = N[Eigenvectors[Inverse[m].c /. numerical], 
                 2] // Chop

Graphics

Masses

Code

Needs[ "Graphics'Colors'"]
masses := {m1, m2, m3} /. numerical
equilibrium = {{1/2, Sqrt[3]/2}, {0, 0}, {1, 0}}

springPoints = {{1/2, Sqrt[3]/2 + 1}, {-1, 0}, {0, -1}, 
				{1, -1}, {2, 0}}

original := Graphics[{Magenta, Thread[Circle[equilibrium, 
						.1 masses]]}]

Show[original, AspectRatio -> Automatic]

Lines and Boxes

Code

originalLines = Graphics[{Dashing[{.05, .05}], Magenta,
	Line[{springPoints[[1]], equilibrium[[1]]}],
	Line[{springPoints[[2]], equilibrium[[2]], 
		  springPoints[[3]]}],
	Line[{springPoints[[4]], equilibrium[[3]], 
		  springPoints[[5]]}],
	Line[Append[equilibrium, equilibrium[[1]]]]}]
	
box = Graphics[{Blue, Thickness[.02], Line[{{-1, -1}, 
 				{2, -1}, {2, Sqrt[3]/2 + 1}, 
 				{-1, Sqrt[3]/2 + 1}, {-1, -1}}]}]

Show[originalLines, box, original, AspectRatio -> 
		Automatic]

Displacement Lines

Code

displacement[i_] :={{eigenVectors[[i, 1]],
					 eigenVectors[[i, 2]]},
					{eigenVectors[[i, 3]],
					 eigenVectors[[i, 4]]},
					{eigenVectors[[i, 5]], 
					 eigenVectors[[i, 6]]} }

normalPoints[mode_, factor_] := 
	equilibrium + factor displacement[mode]/5
	
normal[mode_, factor_] := 
	Graphics[{Blue, 
		Thread[Circle[normalPoints[mode, factor], 
		.1 masses]]}]

normalLines[mode_, factor_] := 
	Graphics[ {Blue,
				Line[{springPoints[[1]], 
				 normalPoints[mode, factor][[1]]}],
				Line[{springPoints[[2]],
				 normalPoints[mode, factor][[2]], 
				      springPoints[[3]]}],
				Line[{springPoints[[4]],
				 normalPoints[mode, factor][[3]], 
					  springPoints[[5]]}],
				Line[Append[normalPoints[mode, factor],
							normalPoints[mode, factor]
							 [[1]] ] ]}]

Show[box, normal[6, 1], normalLines[6, 1], original,
 originalLines,AspectRatio -> Automatic]

Animations

Code

Animate[mode_] := 
	Do[	Show[	box, 
						original, originalLines, 
						normal[mode, Sin[t] // N], 
						normalLines[mode, Sin[t] // N], 
						AspectRatio -> Automatic], 
			{t, 0, 2Pi- Pi/10, Pi/10}]

Equal Masses

Animate[1]

You can try other natural frequencies by generating these animations:

Animate[2]

Animate[3]

Animate[4]

Animate[5]

Animate[6]

Unequal Masses

Eigenvectors

numerical = {f -> 1., m1 -> 1.0, m2 ->1.0, m3 -> 2.0}

eigenVectors = N[Eigenvectors[Inverse[m].c /. numerical], 2] // Chop

Animate[1]

You can also try other natural resonances below.

Animate[2]

Animate[3]

Animate[4]

Animate[5]

Animate[6]