1 / 8100%
Mat275 Lab05
Jianyang Hu
1. From the graph in Fig. L5a answer the following questions.
(a) Which curve represents y = y(t)? How do you know?
The Blue one represents y=y(t), because the initial value of y(t) is 0.1 when x=0. The
initial value of red line is 0. Then we know the blue one is correct.
(b) What is the period of the motion? Answer this question first graphically (by
reading the period from the graph) and then analytically (by finding the period using
ω0).
ω0=sqrt(k/m)=sqrt(4/1)=2,
T=(2*pi)/2=pi
(c) We say that the mass comes to rest if, after a certain time, the position of the mass
remains within an arbitrary small distance from the equilibrium position. Will the
mass ever come to rest? Why?
No, the mass will not come to a rest. We can see the graph is uniform, so
it will keep oscillating.
(d) What is the amplitude of the oscillations for y?
it’s 0.2.
(e) What is the maximum velocity (in magnitude) attained by the mass, and when is it
attained? Make sure you give all the t-values at which the velocity is maximum and
the corresponding maximum value. The t-values can be determined by magnifying the
MATLAB figure using the magnify button , and by using the periodicity of the
velocity function.
The maximum velocity is 0.2 m/s at t=2,4,5.5,and 8.7 seconds.
(f) How does the size of the mass m and the stiffness k of the spring affect the
motion? Support your answer first with a theoretical analysis on how ω0 – and
therefore the period of the oscillation – is related to m and k, and then graphically by
running LAB05ex1.m first with m = 5 and k = 4 and then with m = 1 and k = 16.
Include the corresponding graphs.
By observing the graph, you can see that the period of the m=5 k=4 is greater than
the period of m=1 k=16.
Bigger mass with small k constant will create a loner, but slower, oscillation. The
lighter mass but greater spring
constant creates a faster, shorter, oscillation.
Exercise 2)
Part a)
function Lab5Q2
m = 1;
k = 4;
omega0=sqrt(k/m);
y0=0.1; v0=0;
[t,Y]=ode45(@f,[0,10],[y0,v0],[],omega0);
y=Y(:,1); v=Y(:,2);
figure(1); plot(t,y,'b+',t,v,'ro');
grid on ;
E = .5*m*v.^2 + .5*k*y.^2;
figure(2)
plot(t,E)
legend('Energy')
xlabel('Time')
ylabel('Energy Amount')
ylim([.015,.025])
figure(3)
plot(v,y)
%
function dYdt= f(t,Y,omega0)
y = Y(1); v= Y(2);
dYdt = [v; omega0^2*y];
end
end
We can see y=0.02 is the only line we got, so energy is conserved.
Part (b)
Part(c)
The mass-spring system goes through an un-damped motion, because the curve
doesn’t get close to the origin, caused conserved energy.
Exercise 3
Part a)
function LAB05ex3a
m = 1;
k = 4;
c = 1;
omega0 = sqrt(k/m); p = c/(2*m);
y0 = 0.1; v0 = 0; % initial [t,Y]=ode45(@f,[0,10],[y0,v0],[],omega0,p); %
solves for 0<t<10
y=Y(:,1); v=Y(:,2); % retrieve y, v from Y
figure(1); plot(t,y,'b+-',t,v,'ro-'); % time series for y and v.
grid on
function dYdt= f(t,Y,omega0,p)
y = Y(1); v= Y(2);
dYdt = [v;-2*p*v-omega0^2*y];
Using:
for i=1:length(y)
m(i)=max(abs(y(i:end)));
end
i = find(m<0.01); i = i(1);
disp(['|y|<0.01 for t>t1 with ' num2str(t(i-1)) '<t1<' num2str(t(i))])
% In the function the minimal time t1 will satisfy |y(t)|<0.01 for all t>t1 is:
>> LAB05ex3a
|y|<0.01 for t>t1 with 3.7807<t1<3.8711
Part b)
I t’s pretty easy to see both the maximum velocity attained and the time when it is
attained.
So we got T=0.7148s and v=0.142m/s.
Part c)
The size of c affects the motion by damping it. So we know that the velocity will
decrease as c increases.
c=2
c=4
c=6
c=8
Part d)
The smallest value of c is
c = sqrt(4mk)
c^2 = 4mk
c^2 = 4*1*4
c^2 = 16
c = sqrt(16)
c = 4
Exercise 4
Part a)
function LAB05ex1a
m = 1;
k = 4;
c = 1;
% mass [kg]
% spring constant [N/m]
% friction coefficient [Ns/m]
omega0 = sqrt(k/m); p = c/(2*m);
y0 = 0.1; v0 = 0; % initial conditions
[t,Y]=ode45(@f,[0,10],[y0,v0],[],omega0,p); % solve for 0<t<10
y=Y(:,1); v=Y(:,2);
figure(1); plot(t,y,'b+-',t,v,'ro-');
grid on
E = .5*m*v.^2 + .5*k*y.^2;
figure(2)
plot(t,E)
legend('Energy')
xlabel('Time')
ylabel('Energy Amount')
ylim([.015,.025])
figure(3)
plot(v,y)
%------------------------------------------------------
function dYdt= f(t,Y,omega0,p)
y = Y(1); v= Y(2);
dYdt = [v;-2*p*v-omega0^2*y];
end
end
We can get it goes to 0 and energy is not conserved.
Part b)
E=.5 m v2+.5 k y2
E'=mv v'+ky y'
E'=v
(
−ky −c y'
)
+kvy
E'=v
(
−ky −c y'+ky
)
c=4c=−4
E'=−4'v∨E'=4y'v
Part c)
The curve is a spiral and will ultimately reach the origin at some point in time. It will
continue to oscillate, until it finally stops by the damping constant.
Powered by TCPDF (www.tcpdf.org)
Students also viewed