Question: Question 2 [ 6 5 marks ] The pressure vessel of the Figune Q 2 - a wil be used to store some pressurized fluid

Question 2[65 marks]
The pressure vessel of the Figune Q2-a wil be used to store some pressurized fluid and should be manufactured using the minimum arnount of material possible, while holding a fotal volume V. The amount of material used is proportional to the surface area of the vessel, while the inner radius of the vessel should be equin to one third of the outer radius r1=r3
Figure Q2-a. Pressure vessel dimensionsy
b)[15 marks] The function should receive the following input arguments:
and return the total surface area. Use the tests below to verify the correctness of the derived expression.
In ] # YOUR COOE HERE
raise NotImplementedError ()
In ]: #Rwn this cell to test your answers for question 2-b)
from unit_tests 1 mport vesselareatest
vesselareatest (vesselarea)
In []:
c)[10 marks]
Write a program that evaluates the surface area of the vessel for different values of the radius r and angle O, storing the values that result in the minimum for O all angles between 0** and 75 at 1** intervals. The following variable names should be used to store the above quantities.
Name Description
rvalues List containing all values tested for tho radius:
theravalues List containing all values tosted ror une angle in degreas.
areapin Minimum surface of the vessel.
Forin Radius of the vesseil resuitung to the minimum surtace area.
thetarin Angle resulting to the minimum surface area.
ratse NotImpdementedError()
import in Limpy as np
impont meth
If inalues. not in istobas (x) :
raise Valweenror'('rvalues 1 s not defined')
assert type (rvalues) is ilet, "rvalues should be a Iisk?
if "chetavalue:: not in B Lobal ):
raise ValueError('thetavaluef is not defined")
If areanin. not in BrobaI=() :
raise ValueEror' (areahin' is not defined')
 Question 2[65 marks] The pressure vessel of the Figune Q2-a wil

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!