Wiggling Cantilevers

1. Introduction and Instructions

In this computational lab you will investigate the behavior of an oscillating system (a cantilever used as a biosensor) in the presence of air friction or drag. Section 2 is a description of Mathematica  tools used in this lab. In Section 3 you will use those tools to explore the behavior of the solutions of the equations of motion of the vibrating cantilever biosensor. Include a purpose, proofs, figures, and a discussion in your report.

2. Mathematica Notebooks and Commands

Mathematica  documents are known as notebooks and are used to manage your work session.  Each notebook in turn consists of several "cells" containing different parts of the session. Below you should see several subsection titles for the different parts of this exercise. To open any section or cell place the pointer over the small box located at the bottom of the bracket immediately to the right of each section title. You should see the pointer change shape. When this occurs double-click the mouse by pressing down momentarily on the mouse button twice in succession and then releasing. Now open section 2.1 and follow the instructions there.

2.1 Mathematical Syntax and Test Functions

The lines below display definitions of the functions from your assignment that you are to plot in their Mathematica  format. Please note several things. The software interprets a blank space or the character "*" as multiplication (each character is used randomly in the definitions below). Notice the need for the trailing underscore, "x_", when defining the function and the use of ":=". To actually define these functions in Mathematica  place the pointer anywhere in the cell (note cell bracket on the right) and click by pressing down briefly on the mouse button. The editing cursor should now appear and will be located somewhere within the cell. Now  press "Enter" (not "Return") on the keyboard. Notice how the bracket of the cell changes shape. This means Mathematica   is executing the commands you have given it. When it is done the bracket will return to its original shape. Now open section 2.2 and follow the instructions there.

y1[x_] := A0*Cos[w*t]*Sin[k*x + B0]
y2[x_] := A0*Tanh[k*(x - c*t)]
y3[x_] := A0*Exp[-0.02*(x + c*t)^2]*Cos[k*(x + c*t)]

2.2 Plotting Commands

The lines below show the commands needed to plot multiple functions on the same graph. Define two different functions using sine and cosine functions with your own choices for the parameters of each function. Next plot each function separately and combine both plots into a single graph. This combination enables you to more clearly compare the functions. Some sample commands are below. To make your work more readable and easier to debug define your parameters symbolically with illustrative names. The examples below display these features along with other options to make the plot complete.

(* define parameters for two plots A and B. *)
(* A *)
ampA = 1.0
kA = 5.0
funcA[x_] := ampA*Cos[kA*x]
(* B *)
ampB = 0.7
kB = 4.0
offsetB = 0.2
funcB[x_] := ampB*Sin[kB*x + offsetB]

(* first plot *)
plot1 = Plot[funcA[x],{x,0,6},PlotRange->{{0,5},{-1.1,1.1}},
	Frame->True,
	FrameLabel->{"Time","Position",γ < Subscript[ω, 0],""},
	PlotStyle->{Red,Thickness[0.01]},
	AspectRatio->0.8,
	BaseStyle->FontSize->20,
	FrameStyle->Black,
	FrameTicks->Automatic,
	Ticks->Automatic,
	ImageSize->72*6.5
]
(* second plot *)
plot2 = Plot[funcB[x],{x,0,6},PlotRange->{{0,5},{-1.1,1.1}},
	Frame->True,
	FrameLabel->{"Time","Position",γ < Subscript[ω, 0],""},
	PlotStyle->{Blue,Thickness[0.01]},
	AspectRatio->0.8,
	BaseStyle->FontSize->20,
	FrameStyle->Black,
	FrameTicks->Automatic,
	Ticks->Automatic,
	ImageSize->72*6.5
]
(* both plots together *)
Show[plot1,plot2]

2.3 Printing

To print a portion of your work highlight the brackets on the right of the notebook. This is done by placing the pointer over the top bracket first. The pointer will change shape. Now press and hold the mouse button down and drag the pointer through the brackets you want to print. The brackets will be highlighted if this is done correctly. Release the mouse button and go to the "File" menu at the top of the screen. Click and drag down to "Print Selection". Highlight and release the button. You will be presented with a dialog box. Click the “Print” button. Your output will soon appear at the printer.

2.4 Getting Help

Mathematica provides online help. To use it go to the menu bar and click on “Help”. A drop-down menu will appear with a series of choices. The most likely one to help you is “Wolfram Documentation”. Click on it and you will presented with a new window with links to different topics. Perhaps more importantly you can enter a keyword in the search box near the top.

3. The time dependence of the cantilever

We showed in class the equation of motion of the cantilever can be written as

(Subscript[(OverVector[F]), net]) = (Subscript[m, c]) (((d^( 2))y)/(dt^2))(OverHat[j ]) = -(Subscript[k, 0])y(OverHat[j ]) - b(dy/dt)(OverHat[j ])

where (Subscript[m, c]) is the effective mass of the cantilever, (Subscript[k, 0]) is the spring constant and b  is the drag coefficient. Since all of the forces and the motion is in the y direction this problem is effectively a one-dimensional one. We rearranged equation 1 to become

(Overscript[y , ¨]) + 2γ(OverDot[y ])  + (Subscript[ω, 0]^2)y = 0

where γ=b/2(Subscript[m, c]) and (Subscript[ω, 0]^2)= (Subscript[k, 0])/(Subscript[m, c]).

1. The solution to Equation 2 is

y(t) = (Subscript[c, 1]) Exp[(SubPlus[λ])t] + (Subscript[c, 2])Exp[(SubMinus[λ])t]

where

(Subscript[λ, ±])= -γ±Ω      Ω= (Sqrt[(γ^2)-(Subscript[ω, 0]^2)])        γ=(b/(2(Subscript[m, c])))     (Subscript[ω, 0])=(Sqrt[(k/(Subscript[m, c]))])

Consider the initial conditions for the ‘plucked’ cantilever:  y(t=0)=(Subscript[y, 0])= 9 μ m, and (OverDot[y ])=0. Use these initial conditions to obtain expressions for (Subscript[c, 1])and (Subscript[c, 2]) in terms of (Subscript[y, 0]), γ, and Ω. Write out the complete solution for y(t) in terms of  γ, Ω, (Subscript[y, 0]), and t. Pull out any factors common to each term in the solution. What do you expect for the size of the oscillations of the system as time t gets large?

2. Consider two cases for the solution you found above - γ>(Subscript[ω, 0]) and γ<(Subscript[ω, 0]). Recall Ω= (Sqrt[(γ^2)-(Subscript[ω, 0]^2)]).  For γ>(Subscript[ω, 0])  is Ω  real, imaginary, or complex? For the specific case where γ=2.0 (s^(-1))  and  Ω=1.0 (s^(-1))  make a plot of y(t) for 0<t<10 s. Describe the features of the plot. How many oscillations does the system go through? Will this system work as a biosensor?

3. Now examine the situation when γ<(Subscript[ω, 0]). Is Ω  real, imaginary, or complex? Rewrite Ω as Ω= (Sqrt[(γ^2)-(Subscript[ω, 0]^2)]) =iΩ’  where  i=(Sqrt[-1]). What is  Ω’ in terms of γ and (Subscript[ω, 0])? Is it real, imaginary, or complex? Generate the solution y(t) again in terms of γ, Ω’ ,  (Subscript[y, 0]), and t. You should get some factors like (e^(±iΩ't)) in your result. Use the Euler relation to rewrite those imaginary exponentials in terms of sines and cosines.  For the specific case where γ=0.14 (s^(-1))  and  Ω=1.45 (s^(-1))  make a plot of y(t) for 0<t<30 s. How many oscillations does the system go through? Will this system work as a biosensor?