statement to execute the for loop if condition 1 is satisfied. The given conditions are as follows: a) Condition 1 = d < D (if true, for loop will be executed) b) Else = input is invalid! d must less than D. 3. Break the for loop when condition 1 is false. Then your program will stop. 4. Compute the h, Q, V, and v values using a function.
5. Plot the h, Q, V, and v on the same axis. 6. Set up suitable legend, title, axis-label, and line colour in your graph. PLEASE WRITE YOUR SOURCE CODE IN M-FILE AND SUBMIT IT THROUGH E-LEARNING. THE SUBMISSION DATE IS 13/7/2022 D d Figure 1: Water Tank
EMT101: PROJECT 3: MATLAB: DRAINING A TANK (100%) A vertical cylindrical tank with a height hm and a diameter D m is filled with water as depicted in Figure 1. The bottom of the tank has a circular drain. When a drain is open, water can flow out of it. According to Torricelli's law, the volumetric flow rate is Ca√2gh(t) nd² Q(t) and the volume of water is described as = π7 (2) ²h(t) V(t) = πt and the water outlet velocity when draining a tank can be calculated as v(t) = √2gh(t) where Ca is the coefficient of discharge, h m is the height of the water in the tank, d m is the diameter of the circular drain and g is the gravitational acceleration. Assume the tank is initially filled with water to a height of h(0) = H. Then the time t s required for the tank to empty can be calculated from 0.5 t = (-))*(-) ³³ (√H - √™) where H initial height of the water and hf is the final height of the water. If h(t) is the height of water in the tank for t≥ 0, then Torricelli's law implies h(t) =(√H - t/K)² where K = ((()*5. Consider Câ=1, g = 9.8 m/s² and hf = 0 m, calculate the volumetric flow, volume of water, water outlet velocity, and height of the water in the tank t seconds after the drain is opened and until it is empty. Write a MATLAB program to calculate and visualise the h, Q, V, and v in the t intervals. Your program should have the following: 1. Request the user input for the initial height of the water, diameter of the circular drain and diameter of the tank. 2. Use the if else EMT101: PROJECT 3: MATLAB: DRAINING A TANK (100%) A vertical cylindrical tank with a height hm and a diameter D m is fil
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am