Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. In this problem, develop a MATLAB program to determine the volume of fluid, V, with a variable height h, contained in a feeding trough

image text in transcribedimage text in transcribed

2. In this problem, develop a MATLAB program to determine the volume of fluid, V, with a variable height h, contained in a feeding trough with a geometry depicted in Figure 2.1 below: T H=3 m UI L = 5 m O Side View End View Figure 2.1: III. The radius of the semi-circular base is 0.75 m. Your program should be constructed based on the following tasks in an efficient way: . . Receive only one input variable h. Internally define a feeding trough height H of 3 m, a trough length L of 5 m, and a semi- circular radius R of 0.75 m. check if the input is physically meaningful, i.e. fits within the physical constraints of the feeding trough. If not, return a zero value for the output volume and print a warning message to the user: Error message: Your input fluid level is outside the physical range! T . Return the fluid volume, V for the given fluid level h, in cubic meters, for the two cases: i. Fluid level is in the semi-circular base: sin (20) A- V = R2L[0 2 where is the radians and defined by o = cos -1 1 (1-) ii. Fluid level is in the rectangular top: V = 2RL(h-R) + TR2 L 2 III. . Print out the result in the following format: The total fluid volume is x. xxxXXe+xxx cubic meters at a fluid level of x.xxxe+xxx meters

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