dynamics with matlab

41
Dynamics Final Project Center for Global Education USL Professor: Fernando Jimenez Motte Group members: Omar Palacios Diego Guevara Valeria Laynes Alejandra Yanovich

Upload: diego-andrew-g-r

Post on 06-Sep-2015

274 views

Category:

Documents


4 download

DESCRIPTION

Exercises worked with MATLab

TRANSCRIPT

Dynamics Final Project Center for Global Education USL

Professor: Fernando Jimenez MotteGroup members:Omar PalaciosDiego GuevaraValeria LaynesAlejandra Yanovich

-2014-Introduction

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. Slider Crank/Relative Velocity

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 velocity of A depending on the change of the angle .F

Free Body Diagram of the Block

Coordinate System

Fg

For this problem, we are going to use the Relative Velocity to find .

As you can appreciate in the picture, you can notice that is the tangential velocity because B is moving in a curvilinear motion. Therefore, we can use the formula of the tangential velocity, using the angular velocity and the position vector of .

From the problem, we know that is but we are going to change the value to its equivalent . Now, we need to find . For this, we are going to decompose the right triangle BOC (C is forming the angle 90)

YB

O

XC

We got Replacing the known data:

Cross Product ()

Now, it is missing

As we cannot find and straightforward, we need to do several operations using the triangle ABO. First, we need to find . If you notice, you have two angles, but remember that you need to have the in function of theta. For this, the angle can be found in terms of by using the law of sines, and the .

Law of Sines:

Substituting in the , give us as a result Now, we notice that we already have and. = - =

Now, ]Cross Product () Putting together

The only value that is missing is the magnitude of .However, if you see the picture, the velocity of A is only moving in the x-axis (unit vector ). Therefore, in the equation , we cannot have any vector moving in the y-axis.

Finally, we have all the variables that we need to find . But as the problem is asking me for the speed of A; therefore, I only use the magnitude. 2. MATLAB SIMULATION: clear; clc; close allt = 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 ontitle('Problem 1') ylabel('Va')xlabel('T')

Taking the derivative of:

And putting it equal to 0, we find the maximum velocity for, which is 838.796875 in/s.

3. What If Conditions What if the angular velocity is less, instead of is ?If the angular velocity is less, the velocity of A wouldnt change. The reason is because the slider is moving with an angular velocity of , and as all the points A, B, O are moving simultaneously, all 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.

Cross product ( )

Cross Product ()

Because the is moving in the x-axis

SIMULATION: 1 WHAT-IF CONDITIONclear; clc; close allt = 0: 0.01: 2*pi;Va = ((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 ontitle('Problem 1 What if 1')ylabel('Va')xlabel('T')

II. CURVILINEAR MOTION, NORMAL AND TANGENT PLANE, BINORMAL AND THE OSCULATING PLANE 1. SolutionZxY

Coordinate System

B(t)T(t)N(t)Osculating Plane

First, we need to derive the following expressionBy doing it, we get the expression for the tangential velocity in terms of t:

Next, we need to find the tangential unit vectors. But to do so, we need the magnitude of the velocity:

Now, we can find the tangential unit vector by dividing by the magnitude:

For the normal unit vectors, we need to find the derivatives of the tangential unit vectors:

From now on, we ca find the parametric equations for T (t), B (t) and N (t):

Furthermore, we can derive the equations for the curvature and the torsion:

After doing this we do not need to do the calculations by hand because it is too much. So, we use Matlab to do the calculation and get the following graphic:

2. What-if conditions: What if we change the parameters to h=4 and k=2.

We can see that the graph looks pretty much the same, but it is bigger.

What if we change the numbers of planes that we want to see?Before we use 101 point to show the osculating and rectifying plane, but now we are going to use 300 point to have more planes in the graph.3. MATLAB SIMULATION: Aspiral:function [R,T,N,B,kap,tau,arclen]=aspiral(r0,k,h,t)if nargin==0 k=1; h=2; r0=2*pi; t=linspace(2*pi,8*pi,101);end% Evaluate R, R'(t), R''(t) and R'''(t) for the spiralt=t(:)'; s=sin(t); c=cos(t); kc=k*c; ks=k*s;rk=r0+k*t; rks=rk.*s; rkc=rk.*c; n=length(t);R=[rkc;rks;h*t]; R1=[kc-rks;ks+rkc;h*ones(1,n)];R2=[-2*ks-rkc;2*kc-rks;zeros(1,n)];R3=[-3*kc+rks;-3*ks-rkc;zeros(1,n)];% Obtain geometrical properties [T,N,B,kap,tau]=crvprp3d(R1,R2,R3);arclen=sum(sqrt(sum((R(:,2:n)-R(:,1:n-1)).^2)));% 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 surfacev=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; endpmin=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

III Angular Impulse/MomentumThe assembly of two 5-kg spheres is rotating freely about the vertical axis at 40 rev/min with = 90 . The force F that maintains the given position is increased to raise the base collar and reduce the angle from 90 to an arbitrary angle. Determine the new angular velocity and plot it as a function of for 0<