Dynamics With MatLab
Dynamics With MatLab
Center
Final
for
USL
Professor: Fernando Jimenez Motte
Group members:
Omar Palacios
Diego Guevara
Valeria Laynes
Alejandra Yanovich
-2014Introduction
Global
Project
Education
In the present report, four classic dynamics problems were given so that these
can be solved engineering students creativity. The given problems lack of a direct
numerical solution. In other words, there is not one numerical unique answer for each
problem. In fact, there are several numerical answers for each of the problems. Here is
where the challenge presents itself, in the approach to the solution part. In order to
solve these problems correctly, it is necessary to define implicit solutions. An implicit
solution is stated at the end of each of the problems, after having made the required
scientific analysis.
In this task, the scientific analysis consists of a dynamic study of each case. For
every problem in this report, we have made kinematics and kinetic analysis, depending
on the nature of each individual problem. We were also aided by some necessary
mathematical tools, such as, geometry, trigonometry, and linear algebra. First of all, a
general analysis of the problem was developed, using free body diagrams and other
diagrams needed. Then, we performed an analysis of all the variables and parameters
in the problem defining an adequate coordinate frame, which particularly depended on
the problem; after that, our proposed approach to the problem was to use a
computational engine to show the results by simulation. We chose MATLAB in order to
perform the simulations for the problems; we obtained a series of data, to analyze later,
for each run in the program. Finally, we suggested some optimizations of the problems
by evaluating different scenarios of them.
I.
1. Solution:
Interpretation of the problem: The slider crank is moving in a clockwise
direction with an angular velocity of 1500 rev/min. So, we want to know the
Free Body Diagram of the Block
F
velocity of A depending on the change of the angle .
Coordinate System
Fg
For this problem, we are going to use the Relative Velocity to find
VA .
V A =
V B
VB
A
VB
is the
we can use the formula of the tangential velocity, using the angular velocity
and the position vector of
r B .
V T =
V B =
Br B
rad
50 (k )
sec .
is
1500
rev
min
We got
Cross Product ( V t )
i
j
k
0
0
50 =
5 cos 5 sin
0
V B =
V T =[250 sin()]i+[250 cos()] j
Now, it is missing
VB
A
V B =
B x r B
A
As we cannot find
r B
A
and
VA
sin + cos =1 .
5
14
=
sin sin
Law of Sines:
25 sin
=sin 2
196
cos 2=1sin 2
cos= 1
25 sin 2
196
Substituting
r A =[14 1
cos
in the
25sin 2
5 cos ]i
196
r B
A
( 5 sin ( ) ) j +(14 1
25 sin
)i
( 5 sin ( ) ) j+(14 1
196
V B = B (k ) x
A
Cross Product (
VB
A
[14 1
25 sin 2
)i
196
Now,
, give us as a result
and r A .
25 sin 2
5 cos] i
196
i
0
j
0
k
B
A
14 1
25 sin 2
( 5 sin ( ) )
196
Putting together
25 sin 2
= ( 5 sin ( ) ) B i+[14 1
] B j
196
A
A
V B V B
A
25 sin
the picture, the velocity of A is only moving in the x-axis (unit vector
V A =
V B
VB
A
i ).
in the y-axis.
[[
[ 250 cos ( ) ] j
14 1
[[
[ 250 cos ( ) ]= 14 1
B=
A
] ]
25 sin 2
B j=0
196
A
] ]
25 sin 2
B
196
A
[ 250 cos ( ) ]
14 1
25 sin
196
V A . But as the
problem is asking me for the speed of A; therefore, I only use the magnitude.
V A =[250 sin( )]i+[5 sin()](W B )i
A
250 sin 1+
5 cos
14 1
25 sin
196
inc h
s
2. MATLAB SIMULATION:
clear; clc; close all
t = 0: 0.01: 2*pi;
Va = (250.*pi.*sin(t)).*((1+(5.*sin(t)).*(250.*pi.*cos(t)))/(14.*(sqrt(1(25.*sin(t).*sin(t)/196)))));
plot(t,Va)
grid on
title('Problem 1')
ylabel('Va')
xlabel('T')
0=250 sin 1+
5 cos
14 1
25 sin
196
inc h
s
3. What If Conditions
1500
rev
min
is
500
rev
min ?
50 rad
the system is connected. For this, if the slider is moving slower, the whole
system is affected.
In addition, in the simulation the velocity at first is showing that is going
to the right (returning) and when is going to the left the velocity is higher.
50 ^
VT=
(k ) x [ (5 sin ) j( 5 cos ) i ] inch
3
sec
Cross product (
VT=
5 sin 5 cos
V T =
VB )
k
50 = 250 sin i^ + 250 cos ^j
3
3
3
0
] [
25 sin
V B = B ( k^ ) x ( 5 sin ) j+14 1
i
196
A
A
Cross Product (
V B=
A
i
0
VB
A
)
j
0
k
B
A
25 sin 2
14 1
196
( 5 sin ) j
=5 sin B i+14 1
A
25 sin 2
B j
196
A
250
250
25 sin 2
V A=
sin i+
cos j+ 5 sin B i14 1
B j
3
3
196
A
A
VA
Because the
250
25 sin 2
cos ^j 14 1
B j=0
3
196
A
=14 1
25 sin 2
B
196
A
250
cos
3
B=
A
250
cos
3
14 1
25sin 2
196
250
V A=
sin +5 sin
3
[ ]
250
cos
3
14 1
25sin 2
196
((250/3).*pi.*sin(t)).*(((5.*sin(t)).*(250.*pi/3.*cos(t)))/(14.*(sqrt(1(25.*sin(t).*sin(t)/196)))));
plot(t,Va)
grid on
title('Problem 1 What if 1')
ylabel('Va')
xlabel('T')
Z
Coordinate
System
B(t)
Y
Osculating Plane
T(t)
N(t)
First,
we
need
to
derive
the
following
expression
)
+4
V (t) y =
( t+ 2 ) cos t+ sin t ^
j
5+t ( 1+ 4 ) +4 2
V (t) z=
2
k^
2
5+t ( 1+4 )+4
For the normal unit vectors, we need to find the derivatives of the tangential
unit vectors:
V ' (t) x =
i
3 /2
2( (1+ 4 ) t+ 4 2+5)
( 1+ 4 ) t +4 2 +5
t
sint +(t +2 ) cos
(1+ 4 )
2 cos t (t+2 )(sin t)
V ' (t ) y =
( 1+ 4 ) t +4 2 +5
'
V ( t ) V ( t )
V (t )V ' ( t)
B ( t )=
[ V ( t ) V ' ( t ) ] V ( t )
[V ( t ) V ' ( t )] V (t)
N ( t )=
Furthermore, we can derive the equations for the curvature and the torsion:
V ( t ) 3 Curvature
V ( t ) V ' ( t )
k=
[ V (t ) V ' ( t ) ] 2 Torsion
V (t)( V ' ( t ) V '' (t ) )
=
the
bigger.
of
planes
we
% Generate points on the osculating plane and the rectifying plane along the
curve.
w=arclen/100; Rn=R+w*N; Rb=R+w*B;
X=[Rn(1,:);R(1,:);Rb(1,:)];
Y=[Rn(2,:);R(2,:);Rb(2,:)];
Z=[Rn(3,:);R(3,:);Rb(3,:)];
% Draw the surface
v=cubrange([X(:),Y(:),Z(:)]); hold off; clf; close;
surf(X,Y,Z,X); axis(v); xlabel('X axis');
ylabel('Y axis'); zlabel('Z axis');
title(['Spiral Showing Osculating and ','Rectifying Planes']); grid on; drawnow;
figure(gcf);
Cubrange:
function range=cubrange(xyz,ovrsiz)
if nargin==1, ovrsiz=1; end
pmin=min(xyz); pmax=max(xyz); pm=(pmin+pmax)/2;
pd=max(ovrsiz/2*(pmax-pmin));
if length(pmin)==2
range=pm([1,1,2,2])+pd*[-1,1,-1,1];
else
range=pm([1 1 2 2 3 3])+pd*[-1,1,-1,1,-1,1];
end
crvprp3d:
function [T,N,B,kap,tau]=crvprp3d(R1,R2,R3)
nr1=sqrt(dot(R1,R1)); T=R1./nr1(ones(3,1),:);
R12=cross(R1,R2); nr12=sqrt(dot(R12,R12));
B=R12./nr12(ones(3,1),:); N=cross(B,T);
kap=nr12./nr1.^3;
if nargin==3, tau=dot(B,R3)./nr12;
else tau=[]; end
at
40
rev/min
with
1. Solution:
Coordina
that angle is
because of simple
r 0=600 cos ( )+ 100=300 2+100
4
|H|=rmV sin
is 1 (
|H|=r 2 m
2
Substituting the moment of inertia ( I =r m )
|H|=I
Continuing with the problem, it is stated that the force F makes the base
collar go up, reducing the angle.
Before going into this part, lets recall the principle of angular momentum,
which says that if no external torque is applied to on the system, the angular
momentum is conserved.
Torque being
=
dH d r
dp
= p+ r
dt dt
dt
=r F
In other words, the angular momentum is conserved within the system. This
being said, we can now regard to the moment of inertia and the angular
velocity. If H is going to be the same at any point in the rotations of our 2
spheres, we can say that if I goes up,
will go up.
Because there are two spheres in the problem, to calculate the full angular
momentum we must multiply the formula by two, that is:
2 H =2 mr 2 =2m r 02 0
And if we need to find the angular velocity at any moment in the rotation, we
leave that variable alone:
=
r 02 0
r2
terms of the angle, but we have that by just replacing the values for the
initial radius, the initial angular velocity, and the current radius:
4
)
3
=
rad /sec
2
( 100+600 cos )
2
(100+300 2)(
2. MATLAB SIMULATION:
clear; clc; close all
t = 0: 0.01: pi/2;
w = (((300*sqrt(2))+100)*((4*pi)/3))./((100+(600*cos(t/2))).^2);
plot(t,w,'k')
grid on
title('Problem 3')
xlabel('T')
ylabel('W')
3. What-if conditions:
What
if
the
mass
of
the
spheres
double?
Then, the angular moment and the moment of inertia will increase,
while the angular velocity would stay the same. If the spheres were
rotating slowly with 5 kg at a big radius, they will rotate at the same
rate with 10kg with the same radius. Lets compare these two cases
numerically:
/6
Suppose the radius is 100+600 cos 2
will make the collar to be up high, and thus, the radius will be big
enough for our purposes). Then, the angular velocities would be both
approximately 0.004755 rad/sec.
But the angular moment would be:
For 10-kg spheres
2
6
I =(100+ 600 cos
) ( 10 )=4617957 kg . m 2
2
( )
2
6
2
I =(100+ 600 cos
) ( 5 )=2308978 kg . m
2
( )
m = 0:1:15;
i=
((100+(600*(cos((pi/6)/2)))).^2)*m;
H = 2*(i*0.004065);
plot(m,H,'k')
grid on
title('Problem 3 What if 1')
xlabel('Mass of the balss')
ylabel('H')
b = 2:1:10;
i = ((100+(600*(cos((pi/6)/2)))).^2)*5;
H = b*(i*0.004065);
plot(b,H,'k')
grid on
title('Problem 3 What if 2')
xlabel('Number of balls')
ylabel('H')
IV.
Work
and
Energy
1. Solution:
of
will change because of the work done by the spring. Due to the spring,
and
24
contact =sin1
18
Before
the
18
=48.6 =0.8481 rad
24
bar
engages
the
spring:
48.6
no
1
1
T =E k + E r= m v 2 + I
2
2
Er
is the bodys
T=
1 40
1 1 40 2 2
( 2 cos )2 +
4 =( 2.4846 cos2 +0.8282 ) 2=0.8282(3 cos2 +1) 2
2 32.2
2 12 32.2
(1cos )
( 3 cos 2 +1 )
48.6 90
No
matter
what
angle
Fr
means
that
the
spring
will
be
3
2
3
2
=1.099
3
80 ( cos 1 ) 180 2 sin
2
( 3 cos2 +1 )
2. MATLAB SIMULATION:
a = 0:0.001:0.8481;
b = 0.8481:0.001:pi/2;
omega_a = 9.8283*((1-cos(a))./
(3*cos(a).^2+1)).^(1/2);
omega_b = 1.099*((80*(1-cos(b))180*(2*sin(b)-3/2).^2)./
(3*(cos(b)).^2+1)).^(1/2);
plot(a*180/pi, omega_a, b*180/pi,
omega_b)
xlabel('theta (degrees)')
ylabel('omega')
a = 0:0.001:0.8481;
b = 0.8481:0.001:pi/2;
omega_a = 9.8283*((1-cos(a))./
(3*cos(a).^2+1)).^(1/2);
omega_b = 1.099*((80*(1-cos(b))180*(2*sin(b)-3/2).^2)./
(3*(cos(b)).^2+1)).^(1/2);
vA_a = 2*omega_a.*cos(a);
vA_b = 2*omega_b.*cos(b);
vB_a = 2*omega_a.*sin(a);
vB_b = 2*omega_b.*sin(b);
plot(a*180/pi, vA_a, b*180/pi, vA_b,
a*180/pi, vB_a, b*180/pi, vB_b)
xlabel('theta (degrees)')
ylabel('velocity (ft/sec)')
3. What If Conditions
What if there was no spring?
Then angular velocity will be, for
=9.8283
(1cos )
( 3 cos 2 +1 )
0 90 :
a = 0:0.001:pi/2;
omega_a
=
9.8283*((1cos(a))./
(3*cos(a).^2+1)).^(1/2);
vA_a = 2*omega_a.*cos(a);
vB_a = 2*omega_a.*sin(a);
plot(a*180/pi,
vA_a,
a*180/pi, vB_a)
xlabel('theta (degrees)')
ylabel('velocity (ft/sec)')
What if the stiffness doubles?
(1cos )
( 3 cos 2 +1 )
=1.099
3
80 ( cos 1 ) 360 2 sin
2
( 3 cos2 +1 )
a = 0:0.001:0.8481
b = 0.8481:0.001:pi/2;
omega_a = 9.8283*((1-cos(a))./
(3*cos(a).^2+1)).^(1/2);
omega_b = 1.099*((80*(1-cos(b))360*(2*sin(b)-3/2).^2)./
(3*(cos(b)).^2+1)).^(1/2);
vA_a = 2*omega_a.*cos(a);
vA_b = 2*omega_b.*cos(b);
vB_a = 2*omega_a.*sin(a);
vB_b = 2*omega_b.*sin(b);
plot(a*180/pi, vA_a, b*180/pi, vA_b,
a*180/pi, vB_a, b*180/pi, vB_b)
xlabel('theta (degrees)')
ylabel('velocity (ft/sec)')
(1cos )
( 3 cos 2 +1 )
but angular velocity for the rest of the interval will change.
1
1
18 2
3
V e = k x 2= 15 12 2sin
=90 2sin
2
2
12
2
=1.099
) (
3
80 ( cos 1 ) 90 2 sin
2
( 3 cos 2 +1 )
a = 0:0.001:0.8481;
b = 0.8481:0.001:pi/2;
omega_a = 9.8283*((1-cos(a))./
(3*cos(a).^2+1)).^(1/2);
omega_b = 1.099*((80*(1cos(b))-90*(2*sin(b)-3/2).^2)./
(3*(cos(b)).^2+1)).^(1/2);
vA_a = 2*omega_a.*cos(a);
vA_b = 2*omega_b.*cos(b);
vB_a = 2*omega_a.*sin(a);
vB_b = 2*omega_b.*sin(b);
plot(a*180/pi, vA_a, b*180/pi,
vA_b, a*180/pi, vB_a, b*180/pi,
vB_b)
xlabel('theta (degrees)')
ylabel('velocity (ft/sec)')