Sub topic 9
Pipes and cisterns: inlets and outlets as rates
A cistern is a tank. A pipe that fills it is an inlet. A pipe that drains it is an outlet. This chapter shows that these problems are the same as time and work problems with one change: outlets have negative rates.
This chapter assumes you know fractions and reciprocals, ratio and proportion, the LCM of two or more numbers, and how to solve simple linear equations. It also assumes you have read the earlier chapters on the work, rate and time relation and on adding rates when people work together.
The mapping from workers to pipes
In a work problem, a worker completes a job at some rate. In a pipe problem, a pipe fills or empties a tank at some rate. The tank being full is the job being done.
| Work problem | Pipe problem |
|---|---|
| Job | Fill the whole tank |
| Worker | Pipe |
| Worker's rate | Pipe's rate (tank fraction per hour) |
| Worker who undoes work | Outlet pipe or leak (negative rate) |
The relation stays the same:
- work = rate × time
- rate = 1 / (time to do the whole job alone)
- time = work / rate
For a tank of capacity 1 (the whole tank), a pipe that fills it in t hours has rate +1/t per hour. A pipe that empties it in t hours has rate −1/t per hour.
Setting up a problem
Follow the same four steps each time.
- Decide the total work. Use 1 tank, or use the LCM of the given times to get whole-number rates.
- Write each pipe's rate with a sign: plus for inlets, minus for outlets.
- Add the rates to get the net rate.
- Divide the work by the net rate to get the time.
Worked example with fractions
Pipe A fills a tank in 6 hours. Pipe B fills it in 12 hours. How long do they take together?
- Rate of A = 1/6 tank per hour
- Rate of B = 1/12 tank per hour
- Net rate = 1/6 + 1/12 = 2/12 + 1/12 = 3/12 = 1/4 tank per hour
- Time = 1 ÷ (1/4) = 4 hours
Worked example with the LCM method
Pipe A fills a tank in 12 hours. Pipe B fills it in 18 hours. Pipe C empties it in 36 hours. With all three open, how long does an empty tank take to fill?
Take the tank as LCM(12, 18, 36) = 36 units.
- A: 36 ÷ 12 = +3 units per hour
- B: 36 ÷ 18 = +2 units per hour
- C: 36 ÷ 36 = −1 unit per hour
- Net rate = 3 + 2 − 1 = +4 units per hour
- Time = 36 ÷ 4 = 9 hours
The units are artificial. They are a way to avoid fractions, and the answer in hours does not depend on the chosen total.
Checking the net rate with code
This program works with exact fractions and signed rates. It is a direct translation of the setup steps.
from fractions import Fraction
def time_to_fill(inlet_times, outlet_times):
"""Hours to fill an empty tank. Returns None if it never fills."""
net = sum(Fraction(1, t) for t in inlet_times)
net -= sum(Fraction(1, t) for t in outlet_times)
if net <= 0:
return None
return 1 / net
print(time_to_fill([12, 18], [36])) # 9
print(time_to_fill([6], [10])) # 15
print(time_to_fill([10], [10])) # NoneThe third call shows a case worth remembering. If inflow and outflow are equal, the net rate is zero and the tank never fills.
The sign of the net rate decides what happens
The net rate tells you the outcome before you compute any time.
| Net rate | What happens to an initially empty tank | Column | Column |
|---|---|---|---|
| Positive | It fills. Time to fill = 1 / net rate | ||
| Zero | The level stays constant. It never fills | ||
| Negative | A tank that starts full empties. Time to empty = 1 / \ | net rate\ |
Finding a missing pipe
Often the question gives the net result and asks for one pipe. Rearrange the net rate equation.
Pipes A and B fill a tank in 4 hours together. A alone fills it in 6 hours. How long does B alone take?
- Net rate = 1/4
- Rate of A = 1/6
- Rate of B = 1/4 − 1/6 = 3/12 − 2/12 = 1/12
- B alone takes 12 hours
Now a case with a negative answer. Pipe A fills a tank in 5 hours. With A and a second pipe both open, the tank fills in 8 hours. The second pipe has rate 1/8 − 1/5 = 5/40 − 8/40 = −3/40. The negative sign shows the second pipe is an outlet. It empties a full tank in 40/3 = 13⅓ hours.
Capacity in litres
Some problems give a flow in litres per minute. Then the rate is already an absolute number, and you do not need the "whole tank" idea.
An inlet delivers 20 litres per minute. An outlet removes 12 litres per minute. The tank holds 480 litres. How long does an empty tank take to fill with both open?
- Net rate = 20 − 12 = 8 litres per minute
- Time = 480 ÷ 8 = 60 minutes
You can also be asked for the capacity. If the same two pipes fill an empty tank in 45 minutes, the capacity is 8 × 45 = 360 litres. This is work = rate × time with the unknown on the left.
Partly filled and partly full tanks
The work to be done is not always the whole tank. Use the fraction that actually needs to change.
A tank is one-third full. Inlet A fills a tank in 6 hours. Outlet B empties a tank in 15 hours. How long until the tank is full, with both open?
- Remaining work = 1 − 1/3 = 2/3 of a tank
- Net rate = 1/6 − 1/15 = 5/30 − 2/30 = 3/30 = 1/10 per hour
- Time = (2/3) ÷ (1/10) = 20/3 hours = 6 hours 40 minutes
If the same tank were instead being emptied, the work would be the current content, 1/3, not the remaining 2/3.
Unit conversion
Keep one time unit for all pipes. Mixed units are a common source of wrong answers.
Pipe A fills a tank in 2 hours. Pipe B fills it in 30 minutes. Convert first: A has rate 1/2 per hour and B has rate 2 per hour. Together the rate is 2.5 per hour, so the time is 0.4 hours, which is 24 minutes.
Pipes with different flow rates and a ratio given
Sometimes you are told the ratio of two pipes' speeds, not their times. Speed and time are inversely proportional, as in the efficiency chapter.
Pipe A is twice as fast as pipe B. Together they fill a tank in 8 hours. How long does each take alone?
- Let B's rate be r. Then A's rate is 2r.
- Combined rate = 3r = 1/8, so r = 1/24
- B alone takes 24 hours. A alone takes 12 hours.
A quick check: the combined time, 8 hours, must be less than the faster pipe's solo time, 12 hours. It is.
Common errors
- Adding times instead of rates. If A takes 6 hours and B takes 12 hours, the combined time is not 6 + 12 or 9. Always add the reciprocals.
- Forgetting the sign of an outlet. Adding 1/10 when the pipe drains gives a net rate that is too large and a time that is too short.
- Using the whole tank when it starts partly full. Use only the volume that must change.
- Mixing units. Convert all times to hours or all to minutes before taking reciprocals.
- Ignoring a non-positive net rate. If inflow is not greater than outflow, an empty tank never fills. Check the sign before dividing.
- Misreading "fills in" versus "empties in". A pipe that "empties a full tank in 8 hours" has rate −1/8.
Sanity checks
Three quick checks catch most mistakes.
- With only inlets open, the combined time must be less than the smallest solo time.
- With an outlet added, the filling time must be longer than the time for the inlets alone.
- If you find a pipe's solo time and it turns out negative, you have reversed a subtraction.
Exercise
Pipe A fills a tank in 20 hours and pipe B fills it in 30 hours. Pipe C empties a full tank in 12 hours. With all three open, what happens to an empty tank?
Show answer
Use 60 units as the tank. A is +3 per hour, B is +2 per hour, C is −5 per hour. The net rate is 3 + 2 − 5 = 0, so the water level never changes and the tank never fills.
Exercise
A tank is half full. Inlet P fills a tank in 8 hours and outlet Q empties a tank in 24 hours. How long does it take to fill the rest of the tank with both open?
Show answer
Remaining work is 1/2 tank. Net rate = 1/8 − 1/24 = 3/24 − 1/24 = 2/24 = 1/12 per hour. Time = (1/2) ÷ (1/12) = 6 hours.
Exercise
Two inlets fill a tank in 6 hours together. One of them alone takes 10 hours. An outlet is then added and, with both inlets open, the tank takes 15 hours to fill. How long does the outlet take to empty a full tank?
Show answer
Second inlet rate = 1/6 − 1/10 = 5/30 − 3/30 = 2/30 = 1/15. Net rate with the outlet = 1/15, so the outlet rate is 1/15 − 1/6 = 2/30 − 5/30 = −3/30 = −1/10. The outlet empties a full tank in 10 hours.