As depicted in Fig. P2.27, a water tank consists of a cylinder topped by the frustum of

Question:

As depicted in Fig. P2.27, a water tank consists of a cylinder topped by the frustum of a cone. Develop a well structured function in the high-level language or macro language of your choice to compute the volume given the water level h (m) above the tank's bottom. Design the function so that it returns a value of zero for negative h's and the value of the maximum filled volume for h's greater than the tank's maximum depth. Given the following parameters, H1 = 10 m, r1 = 4 m, H2 = 5 m, and r2 = 6.5 m, test your function by using it to compute the volumes and generate a graph of the volume as a function of level from h = - 1 to 16 m.
Н, н
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Numerical Methods for Engineers

ISBN: 978-9352602131

7th edition

Authors: Steven C. Chapra, Raymond P. Canale

Question Posted: