Consider the leaking bucket example from the lecture notes T
Consider the leaking bucket example from the lecture notes. The derivation for the governing equation assumed a proportional relationship between the fluid exit velocity and the height of the water (i.e.,=Kh(t)). Another common assumption of this relationship (called the Toricelli model) assumes the relationship to be Q_ out = K squareroot of h(t). Using a built-in MATLAB solver, solve both differential equations below and plot the height of the water for 120 seconds where A = 30 in: and K = 1.4. A dh_ Tor/dt + K squareroot of h_ Tor(t) = 0 A dh_ Prop/dt + K h_ Prop(t) = 0
Solution
Matlab Code
% y1(t) and y2(t) are solutions of equation 1 and 2 respectively
syms y2(t) y1(t)
y2(t) = dsolve(diff(y2,t) == -1.4*y2/30)
y1(t) = dsolve(diff(y1,t) == -1.4*sqrt(y1)/30)
Output
y2(t) =
C2*exp(-(7*t)/150)
y1(t) =
(C5 - (7*t)/150)^2/4
No initial conditions were provided in the question hence cannot plot the results, use th initial water height to determine C2 and C5 and then you can plot.
