Problem 28 - 180 degrees, and one between 180 degrees and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercise #6 Consider the piston and crank arrangement shown below. x angle Connecting rod Crank Distance “x” depends upon the crank angle, the length of the crank, and the length of the connecting rod. Write a C++ function that, given the crank angle (in degrees) and the two lengths, computes and returns “x”. Note that the required formula is not given. You should be able to work it out yourself. Have your function return -1 if it is given unreasonable inputs. The geometry requires that the connecting rod must be at least as long as the crank. In practice, it must be considerably longer. Assume that rod lengths less than twice the crank length are unreasonable. Once you’ve got the first function written, tested, and debugged, write a function that, given “x” and the two lengths, computes and returns the crank angle (in degrees). For most legitimate values of “x”, there will be two possible solutions (one between 0 and
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 180 degrees, and one between 180 degrees and 360 degrees). Have your function pick the answer between 0 and 180 degrees, and have it return -1 if it is given unreasonable inputs. Dont waste any time trying to find a formula for the angle. Just in case it isnt obvious, this is your bisection search exercise. The angle returned by your function must be with 0.001 degrees of the correct value. Combine your two functions with an appropriately modified version of the main program from the pulleys example. Optional Extra (for keeners): Assuming that the crankshaft is rotating at a uniform speed (angle = omega * t), find the maximum piston speed. Note that differentiating the formula for piston position gives the formula for piston velocity, and that differentiating again gives the formula for piston acceleration. The peak velocity occurs when the acceleration is zero....
View Full Document

This note was uploaded on 02/27/2010 for the course ENG ECOR taught by Professor N/a during the Spring '10 term at Carleton CA.

Ask a homework question - tutors are online