Sub topic 3
Net filling and emptying time
This chapter assumes you can work with fractions and reciprocals, and that you know the relation work = rate × time. A tank that one pipe fills in 6 hours gets 1/6 of its volume per hour.
Net filling and emptying time
An inlet pipe adds water, and an outlet pipe removes it. When both run together, the net rate is the inlet rate minus the outlet rate. Take the reciprocal of the net rate to get the time.
Suppose an inlet fills a tank in 8 hours and an outlet empties it in 24 hours. The net rate is 1/8 - 1/24 = 2/24 = 1/12 per hour, so the tank fills in 12 hours.
Leaks and delayed filling
A leak is an outlet that you do not control. It works the same way as an outlet pipe, so its rate is negative in the net-rate sum. If the leak is faster than the inlet, the net rate is negative and the tank never fills.
Pipes opened or closed at different times
When a pipe opens partway through, first find the work done before the change. Then find the rate of the combined pipes for the remaining work.
Pipe A fills a tank in 10 hours and pipe B fills it in 15 hours. A runs alone for 2 hours, then B joins. The work done in 2 hours is 2/10 = 1/5. The remaining 4/5 takes (4/5) ÷ (1/10 + 1/15) = (4/5) ÷ (1/6) = 24/5 = 4.8 hours. The total is 6.8 hours.
from fractions import Fraction
a = Fraction(1, 10) # A fills the tank in 10 hours
b = Fraction(1, 15) # B fills the tank in 15 hours
done_alone = 2 * a # A runs alone for 2 hours
remaining = 1 - done_alone # work left for both pipes
total_hours = 2 + remaining / (a + b)
print(float(total_hours)) # 6.8Shortcuts, traps and sanity checks
Use these checks before you accept an answer:
- A net fill time must be longer than the fill time of the inlet alone, and shorter than the outlet's emptying time alone when a leak is present.
- A net rate of zero or below means the tank never fills.
- If a pipe opens late, the answer must be longer than the time for the other pipes alone.
Exercise
Exercise
An inlet fills a tank in 6 hours and a leak empties it in 3 hours. Does the tank ever fill?
Show answer
No. The net rate is 1/6 - 1/3 = -1/6 per hour, so the water level falls and the tank never fills.