Use MATLAB code? 6. A piston, connecting rod, and crank for an internal combusti
ID: 669193 • Letter: U
Question
Use MATLAB code?
6. A piston, connecting rod, and crank for an internal combustion engine is shown When combustion occurs, it pushes the piston down causing the connecting rod to turn the crank which causes the crankshaft to rotate, creating power. Plot the distance traveled by the piston, d, as a function of the angle, A. Assume the length of the connecting rod, L1 = 1' and the crank, L2 = 0.5'. This plot can help engineers designing the engine to select appropriate lengths and get desired performance characteristics. Due to symmetry about A, only plot angles from 0 to 180 degree. d = L1 cos(B) + L2cos(A) The angle B can be solved using the law of sines The distance traveled by the piston is expressed as Note: The plot x-axis is A and the y-axis is d.Explanation / Answer
We have the value that L1=1 and L2=0.5 and hence we calculate the value provided from the equation below:-
d=L1cos(b)+L2cos(a)
Matlab code to compute this function:-
d=1*cosd(b)+0.5cosd(a)
%Limiting the value of x-axis and y-axis and line is drawn so that the graph is drawn.
xL = 180;
yL = 100;
line([0 0], yL); %x-axis
line(xL, [0 0]); %y-axis
%Looping into the loop for all the values of 'A' from 1 to 180.
for a=1:180
%Computing the value of b as per the formula provided in the question.
b=asind((0.5*sind(a))/1);
d=(1*cosd(b))+(0.5*cosd(a));
%This program will plot the graph with the corresponding values for 'A' and 'D'
plot(a,b)
end
Note: All the values computed inside the trigonometric function have been given the values in degrees and
the resulted is return on the degrees for the inverse function.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.