Experiment No 2
Velocity and Acceleration Analysis of Slider Crank Mechanism
Aim: Write a Computer Program for Velocity and Acceleration
Analysis of Slider Crank Mechanism.
Software Used: MATLAB R20
Code:
r=input ('Enter radius of crank in mm=');
ang=input ('Enter the crank angle in Degree =');
l=input('Enter the length of connecting rod in mm=');
n=l/r;
N=input('Enter the speed of the crank in RPM=');
j=sind(ang);
j2=sind(2*ang);
k=cosd(ang);
k2=cosd(2*ang);
w=(2*pi*N)/60;
x=r*(((j*j)/2)+(1-k));
v=r*w*((j2/2)+j);
a=r*w*w*((k2/2)+k);
fprintf('Displacement of Piston is %f mm\n ',x);
fprintf('Velocity of Piston is %f mm/s\n',v);
fprintf('Acceleration of Piston is %f mm/s^2\n',a);
Output:
r=input ('Enter radius of crank in mm=');
ang=input ('Enter the crank angle in Degree =');
l=input('Enter the length of connecting rod in mm=');
n=l/r;
N=input('Enter the speed of the crank in RPM=');
j=sind(ang);
j2=sind(2*ang);
k=cosd(ang);
k2=cosd(2*ang);
w=(2*pi*N)/60;
x=r*(((j*j)/2)+(1-k));
v=r*w*((j2/2)+j);
a=r*w*w*((k2/2)+k);
fprintf('Displacement of Piston is %f mm\n ',x);
fprintf('Velocity of Piston is %f mm/s\n',v);
fprintf('Acceleration of Piston is %f mm/s^2\n',a);
Enter radius of crank in mm=180
Enter the crank angle in Degree =40
Enter the length of connecting rod in mm=720
Enter the speed of the crank in RPM=300
Displacement of Piston is 79.297832 mm
Velocity of Piston is 6419.356620 mm/s
Acceleration of Piston is 151514.550297 mm/s^2