Applied Numerical Engineering Assignment
Water reservoir problem
Water is discharged from a reservoir through a long pipe as shown in the figure.
By neglecting the change in the level of the reservoir, the transient velocity of the water flowing from the pipe, v(t) can be expressed as:
v(t)/√(2gh) = tanh((t/2L)√(2gh))
where h is the height of the fluid in the reservoir, L is the length of the pipe, g is the acceleration due to gravity, and t is the time elapsed from the beginning of the flow.
Find the value of h necessary for achieving a velocity of v=(x+2) m/sec at time t = 3 sec when L = 5m and g = 9.81 m/sec2.
Hint: Create arrays for LHS function and RHS function with respect to h. The solution lies in the intersection of the two functions. You MUST include your m-files and printing output.