Question: Write a matlab program: Question: Suppose the tank is 2 meters tall (H = 2), full to begin with (h=H), 1m in diameter at the
Problem I recently replaced my hot water tank and needed to drain it through the tap on the bottom so I could lift it out of the basement. Naturally, I calculated how long this would take befone I started so I knew how much homework I could grade while waiting. DrainingTank.png If you drain a tank of water through a tap at the bottom, the flow is given by Bernoullis equation, and if we make lots of assumptions (the tank isnt realy tall the tap diameter is a lot smaller than the tank diameter, water has no viscosity), then the velocity of the water coming out the tap is: where h(t) is the depth of the water in the tank as it drains and g is the acceleration due to gravity (9.81 m/s 2). This gives the velocity of the the water leaving the tank through the tap. Clearly, the velocity of the water flowing downward in the tank is slower because the tank has a larger diameter than the tap. Using conservation of mass, one can easily show that the product of velocities and cross-sectional areas is the same for the tank and the tap. Note that the velocity of water in the tank V tank is the same as the rate of change of the water height, dh/dt. So we get Substituting from above, we get the differential equation: Assuming the tank is a cylinder, and D is constant, this is a separable equation, and has the solution Eqn 2) Note that hit-0)-hO is the initial water depth, and h decreases as time increases. This is fine for a perfect cylindrical tank, but the reason I needed to replace the water tank is that it was starting to bulge in the middle so that in Eqn (1). Let's let the tank be H meters tall and model the bulge, Blh)l, as a catenary (coshlthat gives B-0 for h-o (bottom of the tank). increases to a maximum at the middle of the tank h H/2) of B-0.1 DO and then decreases back to B-0 forh-H (top of tank). Create the matlab function that does this. (Hint: Start with B A*(cosh(1)-coshllx/C-0.5) 2cosh(1)-1) and figure out what A and C need to be
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
