Ans a)Matlab code to plot the different piston speeds
syms pistonSpeed(N,L,r,theta)
pistonSpeed(N,L,r,theta) = (r*((2*pi*N)/60))*(sin(theta)+(sin(2*theta)/(2*sqrt((L^2/r^2)-sin(theta^2)))
fplot(pistonSpeed(500,110,3.5,theta),[0 2*pi])
xlabel('Crank angle (rad)')
ylabel('pistonspeed(mm/s)')
hold on
fplot(pistonSpeed(2000,110,3.5,theta),[0 2*pi])
hold on
fplot(pistonSpeed(5000,110,3.5,theta),[0 2*pi])
hold off
Ans b)Matlab code to plot the piston speed at different crank radius
syms pistonSpeed(r,L,N,theta)
pistonSpeed(r,L,N,theta) = (r*((2*pi*N)/60))*(sin(theta)+(sin(2*theta)/(2*sqrt((L^2/r^2)-sin(theta^2)))
fplot(pistonSpeed(3,110,5000,theta),[0 2*pi])
hold on
fplot(pistonSpeed(4,110,5000,theta),[0 2*pi])
hold on
fplot(pistonSpeed(5,110,5000,theta),[0 2*pi])
hold off
Ans c)Matlab code to determine crank angle at which piston speed
is max
syms pistonSpeed(r,L,N,theta)
pistonSpeed(r,L,N,theta) = (r*((2*pi*N)/60))*(sin(theta)+(sin(2*theta)/(2*sqrt((L^2/r^2)-sin(theta^2)))
fplot(max(pistonSpeed(3,110,5000,theta)),[0 2*pi])