Problem5: (ME3400 Enginccring Dynamics) Construction of functions and use of num
ID: 2073566 • Letter: P
Question
Problem5: (ME3400 Enginccring Dynamics) Construction of functions and use of numcrical solvers to solve engincering problems Consider the slider crank mechanism (commonly found in an engine crank shaft and piston assembly). The position of the point P is denoted by s(t). From gcometry, we have where is the angle between the bar on the right and the horizontal. For this problem, we have t,0.2 m and t2-0.4 m. 200 mm The two angles are related by the law of sines Differentiating equation (I) with respect to time gives the velocity of the point P ds dt dt dt From equation (2), the angular velocities are related by dt do dt a) Suppose2 rad/s (constant), determine the velocity of P when -1 rad b) Suppose o -2rad/s (constanD, plot the velocuy of P for 0.5s 0515 rad dt Critical thinking: This is a typical engineering problem that involves several cquations. A simple approach is to just code the formulas. A more robust approach is to write separate functions. Start with eqn. (3), which defines the velocity of the pin. The velocity depends on the parameters I , and 2 , and the independent variable U (note that the angle depends on t: see eqn. (2). Write a function that detines the velocty of the pin. This tunction calls separate functions that detine the angular speeds dajdt and dojdtExplanation / Answer
I have written 4 matlab code to solve this problem.
Note: Don't copy bold written letters in matlab
1st function- To call d(alpha)/dt
In code om2 is d(alpha)/dt, om1 is d(theta)/dt, th1 is theta and a1 is alpha
function [ om2 ] = avelocity( l1,l2,om1,th1 )
%UNTITLED4 Summary of this function goes here
% Detailed explanation goes here
a1=asin(l1*sin(th1)/l2);
om2=(l1*cos(th1)*om1)/(l2*cos(a1));
end
2nd code is the function for Vp
function [ vp ] = velpin( l1,l2,th1,om1 )
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
a1=asin(l1*sin(th1)/l2);
[ om2 ] = avelocity( l1,l2,om1,th1 );
vp=-l1*sin(th1)*om1 - l2*sin(a1)*om2;
end
3rd code is the solution of part (a)
clc
clear all
close all
l1=0.2;
l2=0.4;
om1=2;
th1=1;
[ om2 ] = avelocity( l1,l2,om1,th1 );
[ vp ] = velpin( l1,l2,th1,om1 );
4th code os solution of part (b)
clc
clear all
close all
l1=0.2;
l2=0.4;
om1=2;
th1=0.5:0.1:1.5;
[ om2 ] = avelocity( l1,l2,om1,th1 );
[ vp ] = velpin( l1,l2,th1,om1 );
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.