Pipes and Cisterns

0

Pipes and Cisterns: Complete Beginner Guide with Examples

Pipes and Cisterns studies how water enters or leaves a tank over time. A pipe that adds water is called an inlet. A pipe, tap or leak that removes water is called an outlet. The speed at which water enters or leaves is called the rate of flow.

Imagine an empty bucket under a tap. If the tap fills the bucket in 4 minutes, it fills one-fourth of the bucket each minute. If a small hole also removes one-twelfth of the bucket each minute, the bucket does not gain one-fourth. It gains only the water that remains after the loss.

This one idea connects the entire topic. We will first understand a full tank, one-hour work and rate. We will then combine inlets and outlets, handle partly filled tanks, use litres per minute, find hidden leaks, and finally work through pipes that open and close at different times.

Pipes, tanks and one-hour rate
1 / 6

Pipes, tanks and one-hour rate

Basics: Tank, Inlet, Outlet and Rate

A cistern is simply a tank used to hold water. It may be empty, partly full or completely full. Its real capacity could be 500 litres, 2,000 litres or any other amount.

An inlet adds water. An outlet removes water. A leak behaves like a small outlet because it also takes water away. These directions matter because filling increases the water inside the tank, while emptying decreases it.

Rate tells us how much of the tank changes in one unit of time. The unit may be tank per hour, fraction of a tank per minute, or litres per minute. We must keep the time units the same before combining rates.

For example, a rate of 16 tank per hour means that one-sixth of the full capacity enters every hour. A rate of 40 litres per minute means that 40 actual litres enter every minute.

Why We Can Treat a Full Tank as 1

We often know how long a pipe takes to fill a tank without knowing the tank's capacity in litres. We can still work correctly by calling the full tank 1 complete tank.

Think of a chocolate bar divided into equal pieces. We do not need to know its weight to say that one piece out of four is one-fourth of the bar. In the same way, one-fourth of a tank means one of four equal parts of its full capacity.

Calling the tank 1 lets every pipe rate become a fraction of the same whole. This is useful only when all pipes refer to the same tank. If two tanks have different sizes, one full tank in the first place may not represent the same amount of water as one full tank in the second place.

In this topic, work means the fraction or amount of the tank that is filled or emptied. The three basic quantities are connected by:

Work=Rate×Time

From the same relationship, we get:

Rate=WorkTime

and

Time=WorkRate

These are not three unrelated formulas. If the same amount enters every hour, multiplication adds that amount repeatedly. Division works backward to find either the amount added per hour or the number of hours needed.

Example: A pipe fills one complete tank in 12 hours. Find its one-hour filling rate.

What we know: The work is 1 full tank. The time is 12 hours.

What we are finding: We need the fraction filled in one hour.

Why this method applies: Rate means work completed in one unit of time. We therefore divide the full work by the total time.

Slow solution: The 12 hours can be seen as 12 equal time boxes. Since the rate stays constant, each box receives an equal part of the tank. Dividing one complete tank into 12 equal parts gives:

Rate=112tank per hour

Meaning of the answer: Every hour, the pipe adds one of the 12 equal parts needed to make the tank full.

From Full-Tank Time to One-Hour Rate

If an inlet fills a full tank in a hours, its filling rate is:

1atank per hour

If an outlet empties a full tank in b hours, the size of its emptying rate is:

1btank per hour

The fraction itself tells us the speed. A larger one-hour fraction means a faster pipe. For example, 18 is larger than 112, so a pipe that fills in 8 hours is faster than one that fills in 12 hours.

Time and rate therefore move in opposite directions. A faster rate needs less time, while a slower rate needs more time.

Adding Filling Rates

When two or more inlets work at the same time, all of them add water. Their rates are added because their one-hour contributions enter the tank together.

Example: Pipe A fills a tank in 12 hours, and Pipe B fills the same tank in 18 hours. Find their combined filling time.

What we know: A's rate is 112 tank per hour. B's rate is 118 tank per hour.

What we are finding: We need the time for both inlets to fill one complete tank.

Why this method applies: Both pipes add water during the same hour. Their rates describe parts of the same tank in the same time unit, so the fractions can be added.

Slow solution: First add the one-hour work:

112+118

The least common denominator of 12 and 18 is 36:

112=336,118=236

Therefore:

Combined rate=336+236=536

This means the two pipes fill 536 of the tank every hour. To find how many hours are needed for one complete tank, divide work by rate:

Time=1536=365=7.2hours

The decimal part is 0.2 hour. Since one hour has 60 minutes:

0.2×60=12minutes

If the minutes also contain a decimal, convert that last decimal into seconds. For example, 5.625 hours gives 0.625×60=37.5 minutes. This is 37 minutes and another 0.5×60=30 seconds, so the complete time is 5 hours 37 minutes 30 seconds.

Meaning of the answer: Working together, the pipes fill the tank in 7 hours 12 minutes.

Identical Pipes

Identical pipes have equal rates. If one pipe fills a tank in T hours, then n identical pipes fill it in Tn hours, provided they all work together for the whole time.

Example: Each of two identical pipes fills a tank in 14 hours. Together, their rate is:

114+114=214=17

They fill one-seventh of the tank per hour, so the full tank takes 7 hours. The time is halved because the total rate is doubled.

Subtracting an Outlet or Leak

An inlet adds water, while an outlet removes it. When they work at the same time, the water that remains after one hour is called the net change.

We use a simple sign rule:

  • filling rate is positive;
  • emptying rate is negative.

Therefore:

Net rate=total filling rate−total emptying rate

Example: An inlet fills a tank in 10 hours, while an outlet empties a full tank in 15 hours. Both are opened with the tank empty. Find the filling time.

What we know: The inlet adds 110 tank per hour. The outlet removes 115 tank per hour.

What we are finding: We need the time for the water level to rise from empty to full.

Why this method applies: The two flows act in opposite directions. We subtract the outlet rate from the inlet rate to find the water actually kept in the tank.

Slow solution: Write the net rate:

110−115=330−230=130

Only one-thirtieth of the tank remains after each hour. The time for one full tank is:

1130=30hours

Meaning of the answer: The inlet is stronger than the outlet, so the tank does fill, but it takes 30 hours because much of the incoming water is continuously removed.

When the Tank Fills, Stays Unchanged or Empties

The sign of the net rate tells us the direction of the water level.

  • If filling rate is greater than emptying rate, the net rate is positive and the water level rises.
  • If both rates are equal, the net rate is zero and the water level does not change.
  • If emptying rate is greater than filling rate, the net rate is negative and the water level falls.

An empty tank cannot become full when the net rate is zero or negative. This check should happen before dividing by the net rate.

For example, an inlet that fills in 12 hours has rate 112. An outlet that empties in 8 hours has rate 18. Since 18 is larger, the outlet removes water faster than the inlet adds it. Starting from a partly filled tank, the water level will go down, not up.

More Than Two Pipes

The same sign rule works with any number of pipes. Add every inlet and subtract every outlet.

Example: Two inlets fill a tank in 10 hours and 15 hours. One outlet empties it in 30 hours. Find the time when all three are open.

What we know: The rates are 110, 115 and 130 tank per hour.

What we are finding: We need the time for one complete tank.

Why this method applies: The two inlets move water inward, while the outlet moves water outward.

Slow solution: Combine the signed rates:

110+115−130=3+2−130=430=215

The tank gains 215 every hour. Therefore:

Time=1215=152=7.5hours

Half an hour is 30 minutes.

Meaning of the answer: All three pipes together fill the tank in 7 hours 30 minutes.

Filling or Emptying Only Part of a Tank

A pipe does not always work on one complete tank. The required work may be one-half, three-fourths or any other fraction.

The basic rule remains:

Time=required fractionrate

When one pipe works at a constant rate, filling a fraction p of the tank takes the same fraction p of its full-tank time.

Example: A pipe fills a full tank in 14 hours. Find the time for half the tank.

What we know: The full-tank time is 14 hours, and the required work is 12 tank.

What we are finding: We need the time for only half of the full work.

Why this method applies: The rate is constant. Half as much work takes half as much time.

Slow solution: The pipe's rate is 114 tank per hour. Therefore:

Time=12114=12×14=7hours

Meaning of the answer: The pipe needs 7 hours to fill half of the tank.

Starting with a Partly Filled Tank

When the tank already contains water, the full tank is still 1, but the required work is smaller.

If the initial filled fraction is p, the empty fraction is:

1−p

Find this remaining part before using any pipe rate.

Example: A tank is already one-fourth full. A pipe fills the full tank in 12 hours. Find the remaining filling time.

What we know: The filled part is 14. The pipe's rate is 112 tank per hour.

What we are finding: We need the time for the empty part of the tank.

Why this method applies: The pipe does not need to fill the water already present.

Slow solution: First find the remaining work:

1−14=34

Now divide this work by the pipe's rate:

Time=34112=34×12=9hours

Meaning of the answer: The pipe needs 9 more hours because only three-fourths of the tank is empty.

Finding the Fraction or Percentage Filled After Some Time

When the rate and time are known, multiply them:

Filled fraction=net rate×time

To turn a fraction into a percentage, multiply it by 100.

Example: A tap fills a tank in 10 hours. Find the percentage filled in 4 hours.

What we know: The rate is 110 tank per hour, and the time is 4 hours.

What we are finding: We need the filled fraction and then its percentage form.

Why this method applies: The tap adds the same one-hour amount four times.

Slow solution: Multiply rate by time:

110×4=410=25

Now convert 25 into a percentage:

25×100=40%

Meaning of the answer: Four hours fills 40% of the tank, so 60% remains empty.

Working with Litres per Minute

When the capacity is known in litres, we can use actual water amounts instead of treating the tank as 1.

The same work-rate-time relationship becomes:

Water amount=flow rate×time

An inlet has a positive litre rate. An outlet has a negative litre rate. Rates can be combined only when they use the same unit, such as litres per minute.

Example: A pipe delivers 75 litres per minute and fills a tank in 32 minutes. Find the tank's capacity.

What we know: Every minute adds 75 litres, and the pipe runs for 32 minutes.

What we are finding: We need the total litres added during those 32 minutes.

Why this method applies: The same 75-litre amount is added once per minute.

Slow solution: Multiply the amount added in one minute by the number of minutes:

Capacity=75×32=2400litres

Meaning of the answer: A full tank holds 2,400 litres.

Net Flow in Litres

The inlet-outlet sign rule is unchanged when rates are in litres.

Example: An inlet adds 40 litres per minute, an outlet removes 25 litres per minute, and the tank holds 1,800 litres. Find the filling time from empty.

What we know: The inward flow is 40 litres per minute. The outward flow is 25 litres per minute.

What we are finding: We need the minutes required for 1,800 litres to remain in the tank.

Why this method applies: Only the difference between incoming and outgoing water stays inside.

Slow solution: Find the net flow:

40−25=15litres per minute

Now divide the capacity by the amount kept each minute:

Time=180015=120minutes

Since 60 minutes make one hour, 120 minutes equals 2 hours.

Meaning of the answer: The tank fills in 120 minutes, or 2 hours.

Two or More Outlets Emptying Together

When several outlets work together, all of them remove water. Their emptying rates are added in size because their effects act in the same direction.

Example: Two outlets empty a full tank in 12 hours and 20 hours. The tank is only three-fifths full. Find the emptying time.

What we know: The outlet rates are 112 and 120 tank per hour. The water present is 35 tank.

What we are finding: We need the time to remove the water currently inside.

Why this method applies: Both outlets remove water at the same time, so their emptying rates add.

Slow solution: First find the combined emptying rate:

112+120=5+360=860=215

Now divide the water present by the rate:

Time=35215=35×152=92=4.5hours

Meaning of the answer: The two outlets remove the existing water in 4 hours 30 minutes.

Finding a Hidden Leak from Slower Filling

A leak can be found by comparing the inlet's normal rate with the slower net rate observed when the leak is present.

Leak rate=inlet rate−net filling rate

Example: A pipe fills a tank in 8 hours without a leak, but the same tank takes 10 hours when a leak is open. Find the leak's emptying time.

What we know: The inlet rate is 18. The actual net rate with the leak is 110.

What we are finding: We need the rate of water removed by the leak and the time it would take to empty a full tank alone.

Why this method applies: The difference between what the inlet adds and what remains must be the amount lost through the leak.

Slow solution: Subtract the net rate from the inlet rate:

Leak rate=18−110=5−440=140

The leak removes one-fortieth of the tank each hour. Its full-tank emptying time is:

1140=40hours

Meaning of the answer: The leak alone would empty the full tank in 40 hours.

Finding One Pipe from a Combined Rate

If two inlets work together, their combined rate contains both individual rates. When the combined rate and one pipe's rate are known, subtract the known rate.

Unknown rate=combined rate−known rate

Example: Pipes A and B together fill a tank in 8 hours. A alone fills it in 12 hours. Find B's time.

What we know: Their combined rate is 18, and A's rate is 112.

What we are finding: We need B's individual rate and time.

Why this method applies: The combined rate equals A's rate plus B's rate. Removing A's part leaves B's part.

Slow solution: Subtract:

B's rate=18−112=3−224=124

Therefore:

B's time=1124=24hours

Meaning of the answer: B alone fills the tank in 24 hours.

Rate Ratios and Individual Times

A rate ratio compares how much two pipes fill in the same amount of time. If A and B have rate ratio 3:2, we may write their rates as 3x and 2x.

Do not use 3:2 as their time ratio. Time is the inverse of rate. The faster pipe needs less time.

Example: A and B have filling-rate ratio 3:2. Together, they fill a tank in 10 hours. Find B's time alone.

What we know: A's rate is 3x, B's rate is 2x, and their combined rate is 110.

What we are finding: We need the value of B's rate and then its full-tank time.

Why this method applies: The ratio gives only relative sizes. The combined time gives the actual total rate, which lets us find one ratio part.

Slow solution: Add the ratio rates:

3x+2x=5x

This equals the combined rate:

5x=110

Divide both sides by 5:

x=150

B's rate is 2x:

2x=250=125

Therefore, B's time is 25 hours.

Meaning of the answer: The slower pipe B fills one twenty-fifth of the tank each hour and needs 25 hours alone.

Pipes Opening and Closing in Stages

When the set of open pipes changes, the rate also changes. We must divide the timeline into stages. Within one stage, the active pipes stay the same and one net rate applies.

For every stage:

  1. list the pipes that are open;
  2. find the stage's net rate;
  3. multiply by the stage time to find the water change;
  4. update the filled or remaining fraction;
  5. move to the next stage.

Example: A fills a tank in 15 hours, and B fills it in 20 hours. Both work for 4 hours. Then B is closed, and A finishes the tank. Find the total time.

What we know: A's rate is 115, B's rate is 120, and both work for the first 4 hours.

What we are finding: We need the work completed in the first stage, the remaining work, and the total time.

Why this method applies: The first stage has two active pipes. The second stage has only A, so one rate cannot describe the whole timeline.

Slow solution: During the first stage, the combined rate is:

115+120=4+360=760

In 4 hours, they fill:

4×760=2860=715

The remaining part is:

1−715=815

After B closes, A fills 115 each hour. The time for the remaining 815 is:

815115=8hours

Add both stage times:

4+8=12hours

Meaning of the answer: The tank becomes full 12 hours after both pipes were first opened.

An Outlet Opening After the Tank Is Partly Filled

Sometimes an inlet works alone first, and an outlet begins later. The first stage uses only the inlet rate. The next stage uses inlet rate minus outlet rate.

Example: An inlet fills a tank in 8 hours. It works alone until the tank is half full. Then an outlet that empties the full tank in 12 hours is opened. Find the total time.

What we know: The inlet rate is 18, the outlet rate is 112, and the outlet opens at half full.

What we are finding: We need the time before and after the outlet opens.

Why this method applies: The active-pipe set changes when the water reaches one-half.

Slow solution: First, the inlet alone fills 12 tank:

1218=4hours

After the outlet opens, the net rate is:

18−112=124

The remaining work is still 12 tank. Its time is:

12124=12hours

The total time is:

4+12=16hours

Meaning of the answer: The first half takes 4 hours, but the second half takes 12 hours because the outlet slows the filling.

Finding a Leak When the Tank Starts Partly Full

When a tank begins partly full, the observed filling time applies only to the remaining part. We must use that remaining work to find the net rate.

Example: A tank starts one-fourth full. An inlet fills a full tank in 8 hours. With a leak open, the remaining part fills in 9 hours. Find the leak's emptying time.

What we know: The remaining work is 34, the observed time is 9 hours, and the inlet rate is 18.

What we are finding: We need the net rate first and then the leak rate.

Why this method applies: The 9-hour time does not represent one full tank. It represents only the three-fourths that was empty.

Slow solution: Find the net rate from work divided by time:

Net rate=349=336=112

Now subtract the net rate from the inlet rate:

Leak rate=18−112=3−224=124

Therefore, the leak alone empties a full tank in 24 hours.

Meaning of the answer: The leak removes one twenty-fourth of the tank every hour.

A Pipe Working for Only Part of Each Hour

A repeating schedule must be studied as one complete cycle. If the same pattern repeats every hour, find the work done during each part of that hour, add the parts, and then repeat the one-hour result.

Example: An inlet fills a tank in 4 hours and stays open continuously. An outlet empties it in 12 hours but opens only during the second half of every hour. Find the fraction filled after 3 complete hours.

What we know: The inlet rate is 14 per hour. The outlet rate is 112 per hour. The outlet works only for 30 minutes of each hour.

What we are finding: We need the net work of one full hourly cycle and then the work of three cycles.

Why this method applies: The first half-hour and second half-hour have different active pipes, but that two-part pattern repeats every hour.

Slow solution: During the first half-hour, only the inlet works. Half an hour is one-half of an hour, so the work is:

14×12=18

During the second half-hour, both pipes work. Their hourly net rate is:

14−112=16

They work together for only half an hour, so the work in that half is:

16×12=112

The total work in one full hour is:

18+112=3+224=524

After 3 complete hours:

3×524=1524=58

Meaning of the answer: The tank is five-eighths full after three complete hourly cycles.

Finding a Full-Tank Time from a Percentage

A percentage can be changed into a fraction of the tank. Then rate equals work divided by time.

Example: An outlet removes 40% of a full tank in 6 hours. Find its full-tank emptying time.

What we know: The work is 40% of a tank, and the time is 6 hours.

What we are finding: We need the one-hour rate and the time for 100%.

Why this method applies: The outlet rate is constant, so the same fraction is removed each hour.

Slow solution: Convert 40% into a fraction:

40%=40100=25

Find the one-hour rate:

Rate=256=115

Now find the time for one full tank:

1115=15hours

Meaning of the answer: At the same rate, the outlet empties the complete tank in 15 hours.

A Reliable Pipes and Cisterns Method

Use this order whenever several pieces of information are connected:

  1. Decide whether to use one full tank or actual litres.
  2. Write the initial filled fraction and the required final fraction.
  3. Convert every full-tank time into a one-hour rate.
  4. Add inlets and subtract outlets or leaks.
  5. Split the timeline whenever a pipe opens, closes or changes its schedule.
  6. Find work done in each stage using rate multiplied by time.
  7. Update the remaining work after every stage.
  8. Divide remaining work by the current net rate.
  9. Add stage times only when the required time is measured from the beginning.
  10. Check the direction of change and convert decimal hours carefully.

Common Mistakes and Why They Are Wrong

Adding an outlet instead of subtracting it

An outlet removes water. Adding it would pretend that removed water stays inside the tank. Use a negative sign for every emptying rate.

Adding full-tank times

Times cannot be added to combine pipes. Rates must be combined. A 10-hour pipe and a 15-hour pipe have rates 110 and 115.

Dividing by a negative or zero net rate

Check the sign first. A zero net rate keeps the water level unchanged. A negative net rate empties the tank, so an empty tank cannot become full under that combination.

Forgetting the water already present

If the tank is one-fourth full, only three-fourths remains. Using 1 as the required work would count the existing water again.

Treating a partial filling time as a full-tank time

If three-fourths of a tank fills in 9 hours, the net rate is 349, not 19.

Using one rate after a pipe opens or closes

The net rate changes when the active pipes change. Split the timeline into stages and calculate each stage separately.

Mixing hours and minutes

A rate per hour cannot be multiplied directly by minutes. Convert minutes to a fraction of an hour, or convert every rate to a per-minute form.

Converting decimal hours incorrectly

0.5 hour is 30 minutes, not 50 minutes. Multiply the decimal part by 60.

Confusing a rate ratio with a time ratio

If rate ratio is 3:2, time ratio is 2:3 for the same work. The faster pipe needs less time.

Formulas and Cheat Sheet

Situation Formula or rule Condition
Basic relationship W=RT Rate stays constant during the time used
Find rate R=WT Work and time refer to the same stage
Find time T=WR Net rate must point in the required direction
Inlet fills in a hours R=1a Full tank is treated as 1
Outlet empties in b hours Emptying-rate size =1b Full tank is treated as 1
Net rate Sum of inlet rates minus sum of outlet rates All rates use the same time unit
Two inlets with times a,b Combined time =aba+b Both fill throughout
One inlet time a, one outlet time b Filling time =abb−a Inlet is faster, so b>a
n identical pipes, one-pipe time T Together time =Tn All work together for the full time
Fraction p with one full-tank time T Required time =pT Constant rate and no other pipe
Initially p full Remaining work =1−p Final level is full
Fraction changed in time t Rate =fractiont Constant rate during t
Fraction filled after time t Filled fraction =Rnett Tank does not become full earlier
Percentage filled Filled fraction ×100 Convert the final fraction to percent
Capacity in litres Capacity = flow rate × time One constant flow and matching units
Net flow in litres Inward litres per unit time minus outward litres per unit time All flows use the same unit
Hidden inlet Unknown rate = combined rate minus known inlet rates Combined set contains the unknown inlet
Hidden leak Leak rate = inlet rate minus observed net rate Net water level is rising
Rate ratio m:n, combined time T A time =T(m+n)m, B time =T(m+n)n A:B is a filling-rate ratio
Stage work Wi=RiTi Active pipes stay unchanged inside the stage
Repeating cycle Total work = cycle work × complete cycles The same schedule repeats exactly
Decimal hour to minutes Decimal part ×60 Convert only the fractional hour

Safe Shortcuts

  • For two inlets with full-tank times a and b, use aba+b. This is safe only when both fill the same tank together for the entire time.
  • For one inlet taking a hours and one outlet taking b hours, use abb−a only when the inlet is faster, which means b>a.
  • For n identical filling pipes, divide one-pipe time by n. This works only when all pipes have equal rates and remain open together.
  • When one constant-rate pipe fills only a fraction p, multiply its full-tank time by p.
  • If a tank begins p full, write 1−p immediately. This prevents existing water from being counted as unfinished work.
  • To find an unknown inlet, subtract known inlet rates from the combined rate. To find a leak, subtract the observed net filling rate from the inlet rate.
  • For rate ratio m:n and combined time T, split the combined rate 1T into m+n rate parts before taking reciprocals.
  • For a repeating opening schedule, find the work of one complete cycle first. Multiply only for complete cycles and handle any leftover time separately.

A shortcut is safe only after the flow direction, starting water level, time unit and active pipes are clear. It should shorten correct reasoning, not replace those checks.

Frequently Asked Questions

What are Pipes and Cisterns in simple words?

Pipes and Cisterns is the study of water entering or leaving a tank over time. Inlets add water, while outlets and leaks remove water. Their rates decide how quickly the water level changes.

Why is a full tank treated as 1?

Treating the full tank as 1 lets us work with fractions when the capacity in litres is unknown. A pipe that fills in 8 hours then fills 18 of the tank per hour.

Why are inlet rates added?

Inlets add water in the same direction. If one adds 110 and another adds 115 in an hour, both amounts enter the tank, so the rates are added.

Why is an outlet rate subtracted?

An outlet removes part of the water added by the inlet. Subtraction gives the water that actually remains in the tank after both flows act.

What happens if the outlet is faster than the inlet?

The net rate is negative, so the water level falls. A partly filled tank will empty. An empty tank cannot become full while that combination continues.

How do I find the time for a partly filled tank?

First find the remaining fraction. If the tank is 25 full, then 35 remains. Divide that remaining work by the current net filling rate.

How is a hidden leak found?

Find the inlet's normal rate and the slower net rate observed with the leak. The difference between them is the leak's emptying rate.

Can filling times be added directly?

No. Convert each time into a rate, combine the rates, and then take the reciprocal when one complete tank is required.

When should litres be used instead of fractions?

Use litres when tank capacity and flow are given in litres per minute or litres per hour. Use tank fractions when capacity is not needed or not known. Both models follow work equals rate multiplied by time.

How do opening and closing times change the method?

Every change in the active pipes creates a new stage with a new net rate. Find the water change in one stage, update the remaining fraction, and then continue with the next stage.

Summary

Pipes and Cisterns is built from one simple relationship: work equals rate multiplied by time. A full tank may be called 1, which turns every filling or emptying time into a one-hour fraction.

Add rates that move water in the same direction. Subtract outlets and leaks from inlets. When the tank is partly full, use only the remaining work. When pipes open or close at different times, divide the timeline into stages and update the water level after each stage.

The numbers become reliable when four things are always clear: the direction of every flow, the water already present, the pipes active during each stage, and the unit used for time.