20 likes | 95 Views
z. x. (x out of page). (z into page). y. y. Exercise 9. Imagine a beam sticking out of a wall with a weight hanging from the end of it (see diagram below). end view of beam. beam. weight. weight.
E N D
z x (x out of page) (z into page) y y Exercise 9 Imagine a beam sticking out of a wall with a weight hanging from the end of it (see diagram below). end view of beam beam weight weight If the beam is oriented as shown, the weight will cause its end to deflect downwards (in the y direction). There will be no sideways (z direction) deflection. This will also be true if the beam is rotated 90 degrees. For intermediate angles, however, the weight will cause the end of the beam to deflect downwards and sideways. Ø 0 < Ø < 9 0 Ø = 90 Ø = 0 In general, we have z deflection / y deflection = ((Iv - Iw) * (cos Ø sin Ø)) / (Iv cos2 Ø + Iw sin2 Ø) [eqn 1] where Ø is the angle of rotation and Iv and Iw are the moments of interia of the beam about its original vertical and horizontal axes . For the beam drawn, Iv < Iw, and the formula gives negative ratios for angles between 0 and 90. This reflects the fact, for Iv < Iw, z deflections will always be negative (i.e. in the negative z direction).
Suppose that, for some reason, we need to determine the angle at which the deflection ration is greatest (in absolute terms). At this angle, the derivative of the deflection ratio will be zero. Taking the derivative of the expression on the previous page gives: d ratio (Iv – Iw) [(Iv cos2 Ø + Iw sin2 Ø)(cos2 Ø – sin2Ø) – 2 cos2 Ø sin2 Ø (Iw – Iv)] ---------- = -------------------------------------------------------------------------------------------------- d angle (Iv cos2 Ø + Iw sin2 Ø)2 [eqn 2] This will be zero when (Iv cos2 Ø + Iw sin2 Ø)(cos2 Ø – sin2Ø) – 2 cos2 Ø sin2 Ø (Iw – Iv) = 0 [eqn 3] The problem therefore reduces to finding the value of Ø which satisfies this equation. Note that the left side of the equation is equal to Iv at Ø = 0 and is equal to –Iw at Ø = 90. Write a program that outputs 1/ the angle at which the deflection ratio is greatest (in absolute terms) and 2/. the deflection ration at this angle. The angle output must be with 0.01 degrees of the theoretical value. Your program should read in the values of Iv and Iw. As these are moments of inertia, the values must be greater than zero. Use negative or zero values to terminate looping (as usual, your program should allow many values to be investigated in one run). There is no need to require that Iv be less than Iw. Things will work fine if Iv is greater than Iw. The only difference is that, in this case, the deflection ration will always be positive. The special case of Iv = Iw is not of interest because in this case there will never be any sideways deflections (i.e. the ratio is always zero) If the values entered for Iv and Iw are equal, your program should output an appropriate message. If all these words seem much too scary, don’t worry. Most of them are just background. In the final analysis, this assignment boils down to: 1/. use a bisection search to find the Ø which satisfies equation 3 and output this result 2/. plug the Ø found into equation 1 and output the result The sample executable supplied goes a bit beyond you’ve been asked to do in that it outputs a table giving the values of the ratio and its derivative for a selection of angles. You NEED NOT do this, although you are are course welcome to do so. **** Don’t forget that all library C++ functions work in radians. **** P.S. This assignment was inspired by a MAAE 3202 lab. Mechanical students may want to hang onto their code….