Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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')
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions