Outlet Limit: water depth and flow rate
Show older comments
- To help prevent downstream flooding, the City of Portland may require draining stormwater into a stream at a controlled rate.
The city of Portland's hydraulic design handbook describes how to properly size a small outlet to limit flow to a specific flow rate: A=(0.9)*((QH)/(sqrt(64.4H^(3/2))))
- Write a MATLAB program (an M-file) called outlet_areathat finds the area of this outlet, and accepts water depth (H) and flow rate (Q) as input arguments, in that order.
For example, your program might operate as such:
>> outlet_area(1.4,3.27)
ans = 0.39891
- Engineers using your program told you that most of the outlets are round, and so another program that calculated the diameter would be more useful.
Write another M-file called outlet_diameter that accepts water depth (H) and flow rate (Q) as input. It will work much the same way as your outlet_areaprogram but will output diameter instead of area.
A=(piD^2)/(4)
2 Comments
James Tursa
on 9 Feb 2021
What have you done so far? What specific problems are you having with your code?
Asuna Rayleigh
on 9 Feb 2021
Answers (1)
James Tursa
on 9 Feb 2021
Edited: James Tursa
on 9 Feb 2021
You are being asked to write a function that takes H and Q as inputs, and outputs the diameter D. So the function outline would be:
function D = outlet_diameter(H, Q)
D = _____;
end
You need to fill in the D part above. You could start by calling your output_area function:
A = outlet_area(H,Q);
Or you could just hard code the same area expression that you used in your outlet_area function to determine A.
Then for the D part, just solve this expression A=(piD^2)/(4) for D and code that up and you are done.
Categories
Find more on Simscape Fluids in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!