Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How can I type up a program for this in MatLab? I recently replaced my hot water tank and needed to drain it through the

How can I type up a program for this in MatLab?image text in transcribed

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 before I started so I knew how much homework I could grade while waiting "h(t) H,0 Velocity, v(t) Initial water level = h. Water level at time, t = h(t) Tap Exit X-sectional area, A If you drain a tank of water through a tap at the bottom, the flow is given by Bernoulli's equation, and if we make lots of assumptions (the tank isn't really 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: Vtap = 29 - h (t) 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 ratio of the velocities is the ratio of the cross-sectional areas. 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: le=-29 )h(t). (Egn 1) Assuming the tank is a cylinder, and Dis constant, this is a separable equation, and has the solution h(t) = (-VI )t + vhol (Egn 2) Note that h(t=0) = h0 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 D = D(h), Let's represent D(h) as a half of a sine wave that gives D = DO for h = h0 (top of the tank), increases like sin(h) to a maximum at the middle of the tank (h=h0/2) of 1.1*DO and then decreases back to D=DO for h=0 (bottom of tank). Write out the function that does this. Since I'm impatient, I'm not going to wait until the tank is completely empty. Once there's only 5cm of water left, I can move the tank out of the basement. If the tank is DO=1 m in diameter at the top and bottom, h0=2 m tall, and the tap has a diameter of d=2cm, how long will it take the tank to drain to h=5cm? (Be careful with units!)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions

Question

(Women/men) are more likely than (women/men) to die by suicide.

Answered: 1 week ago

Question

Explain strong and weak atoms with examples.

Answered: 1 week ago

Question

Explain the alkaline nature of aqueous solution of making soda.

Answered: 1 week ago

Question

Comment on the pH value of lattice solutions of salts.

Answered: 1 week ago

Question

Organize and support your main points

Answered: 1 week ago

Question

Move smoothly from point to point

Answered: 1 week ago

Question

Outlining Your Speech?

Answered: 1 week ago