{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

homework_8v2 (1)

homework_8v2 (1) - Introduction to Computers and...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Computers and Engineering Problem Solving Spring 2005 Problem Set 8: Ship masts, and river flows Due: 12 noon, Session 29 Problem 1: Sailboat masts Wind forces on the mast of a sailboat vary as shown in Figure 1 below. The sail is roughly triangular and is attached to the mast at all points z = 0 to z = 30. The force is lower near the top of the mast because sail area is less. The force is at a maximum in the lower portion of the mast, but goes to zero at the bottom of the mast, which is also the bottom of the sail and also due to boundary effects of the sailboat hull. z= 0 ft z= 30 ft Wind direction Figure 1: Variation of wind force vs. height The total force F on the mast can be represented as: 30 200 z 5 e 2 / 30 F = z dz (1) + z 0 1.00 Spring 2005 1/6 Problem Set 8
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Equation (1) may also be written as: 30 ) F = f ( dz z (2) 0 We can also find the effective height of the net force on the mast as: 30 ) zf ( dz z 0 d = (3) 30 ) f ( dz z 0 Based on the lecture notes and code examples in class, write a program to find F and d . Your code must create objects that implement the MathFunction interface, pass them to general integration methods, etc. For simplicity, there are no user inputs. Solve equations (1) and (3) using rectangular, trapezoidal and Simpson’s rules: 1. Use Integration.rect() as the rectangular method. 2. Use Trapezoid.trapzd() as the trapezoid method. See class Trapezoid from the lecture notes for an example of how to use trapzd() correctly. 3. Use Simpson.qsimp() as the Simpson’s method. Use 2 15 (32,768) intervals for the rectangular and trapezoid methods (set n = 0, 1…, 14 when you call trapzd ). Simpson’s method will use approximately this number of intervals as it finds the integral to a tolerance of 10 -15 , or 14-15 digits of precision. The method qsimp reports the number of recursions n that it uses; the number of intervals is 2 n .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern