Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The 2nd picture is the original question that problem 3 is based on. Write your own MATLAB script to calculate the depth of y from
The 2nd picture is the original question that problem 3 is based on.
Write your own MATLAB script to calculate the depth of y from Problem 1 above. This script will first ask the users to input the numerical value for area, constant flow rate, initial time, final time, time increment, and initial depth. This script should include a for-loop and a function called "deriy" that will calculate the derivative of the depth with respect to time (dy/dt). This function will take input of depth, constant flow rate, area, and time and give output of the calculation of the derivative. Test your script on the following test cases. Input Area (m) Constant flow rate (m/d) Initial time (d) Final time (d) Time increment (d) Initial depth (m) Final depth (m) Test Case #1 1250 450 0 10 2 0 1.7060 Test Case #2 1250 450 0 10 1 0 1.4819 Test Case #3 1250 450 0 10 0.5 0 1.4945 Test Case #4 1250 450 0 10 0.25 0 1.51871 Output The figure given below is a storage tank that contains a liquid at depth y where y =0 when the tank is half full. Liquid is withdrawn at a constant flow rate Q to meet demands. The contents are resupplied at a sinusoidal rate 3Q sin (D). The equation "Change = increases - decreases" can be written for this system as d(Ay) = 3Q sin(t) - Q dt (Change in volume) - (inflow) - (outflow) or, since the surface area A is constant Q oby - 3% sin? (0) - -3 dc Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started