You may have seen this tank filling puzzle that's gone viral. But have you wondered what happens at a faster flow rate? Someone has tried it out, with a 3D printer. First though, let's look at the original puzzle.

Here it is.

Look closely, as it says.

If that's your answer too, take another close look. Many of the pipes are blocked, The line that blocks off D from C is not a mistake.

To find the real answer - well first, it looks like it's just a drip at a low flow rate from the drawing. So let's assume that..

From A to B to C is straightforward. None of them can fill before the next one.

J is a bit more complex. But as you fill J, as soon as the water rises to the outlet to L it overflows to L. So it can never get any higher. Yes, its level also rises in the outlet tube leading to I, but it can never get high enough to overflow to I.

So it flows to L, which in turn fills F.

So which fills first, L or F?

By the time F is full, L will only be partly full (with the water at the same level for both).

This video shows the idea, an animation by Nick Rossi using a physics engine, Algodoo

It doesn't quite flow like a real fluid, as he says, but it's enough to get the answer and show how it works.

Here is another animation Which will fill first? from THE FLOW... by CorneliaXaos

That answers the question, since it shows a dripping tap at a slow flow rate. But let’s go off on a tangent.

WHAT HAPPENS IF THE WATER IS POURED INTO A AT A FASTER FLOW RATE

If the flow is very fast then obviously A will fill first. However, could any of the others fill up first before F and before A?

It’s’ governed by the Hagen–Poiseuille equation so long as

• the flow is due to a pressure difference.
• the fluid is incompressible and Newtonian (water is, approximately).
• the flow is laminar (not turbulent) - it is with water if it flows slowly through a narrow pipe.
• through a pipe of constant circular cross-section.
• that is substantially longer than its diameter;.
• and there is no acceleration of fluid in the pipe.

All those conditions seem to apply. The pipes are substantially longer than their diameter which is one of the most important requirements. And they are narrow, and the fluid is water.

Under those conditions

• If the outlet is above water, the flow rate is proportional to the height of the head of water above the inlet to the pipe.

If the outlet is below water, it’s proportional to the difference in height between the water above the inlet and the water above the outlet.

The difference in height of the water here is often called the “head” of water.
• It is inversely proportional to the length of the pipe.

Or in short, the flow rate for laminar flow, in a pipe significantly longer than its diameter, is proportional to the pressure difference, and so to the head of water, but it is also inversely proportional to the length of the pipe.

(it also depends on the radius of the pipe and the viscosity of the water but those are the same for all our pipes).

Techy details. The equation is:

There L is the length of the pipe and R is its radius.

Q is the flow rate (what we are looking for).

ΔP is the difference in pressure between the two ends of the pipe, which for water is proportional to the difference in height of the inlet and the outlet.

Finally μ is the dynamic viscosity

All of those are constant (the pipes are all the same radius, and the viscosity is constant) except for L, the length of the pipe, Q which we are interested in and ΔP.

So our equation simplifies to Q = c ΔP / L, where c is a constant which is the same for all the pipes in our example because they are all of the same radius and the viscosity of course is the same.

Double the length of the pipe and you halve the flow rate. Double the head and you double the flow rate.

So now for instance, can L fill at any flow rate?

Its outlet is a very long pipe. Even if L is nearly full of water ,the head of water in F will mean the difference in heads between L and F is quite small even if F is nearly full and L is likewise.

Its inlet is a much shorter pipe. Whether L can fill will depend on whether we can get J to have a high head to increase the flow rate of L's inlet pipe to more than that of its outlet pipe. But, at least at first sight, it would seem that such a high flow rate could mean that one of the other tanks earlier in the chain could fill first

So - it’s quite a finely balanced question, and hard to answer.

A obviously can fill first with a very fast flow rate, just fill it faster than it can empty.

Well we can actually try this out with a real world experiment :).

Prozix has made a 3D printed version of the puzzle. If you have a 3D printer you can download it here and print it out and test it yourself: Answer to the question Which one fill First / water equilibrium system by prozix

I don’t have a 3D printer but he has uploaded some videos.

First this is what happens with a slow flow rate

Note that at 22 seconds in, J nearly fills briefly.

If you look closely, you see that a bubble forms in the outlet from J to L, which makes sense, it’s a downward pipe and air is buoyant. The bubble then gets pushed out into L and then bursts.

This shows the bubble just before it bursts (you can show the video at 1080p from the Settings)

So - if the pipes are very thin - or the flow is just right - that might lead to J filling right there, if you can arrange it to fill before the bubble disperses.

So even at a slow rate we have something anomalous already, though its because of a bubble.

But what happens at faster flow rates? I asked in a comment to the video, and Prozix was interested and answered with a new video

At 28 seconds in, at one of the flow rates, then L and F fill at the same time.

Here, it all makes sense up to J. J can’t fill (apart from that possibility due to the bubble) at this stage because the pipe from C to J has only a tiny head above its inlet. It’s outlet is about twice as long as its inlet, perhaps more.

Aside: If C was nearly full, J would start to fill, and if we could have the level of water stay below the outlet into L while J fills, then C with its shorter pipe could continue to fill J even when it is nearly full. But as it is now, there is no chance of J filling.

So that makes sense. But how can F fill at the same time as L? That's more mysterious.

The pipe from L to F is three times the length of the pipe from J to L. Meanwhile, in the situation shown here, the head from J to L is about double the head from L to F.

So by the Hagen Pousseville equation again, the flow rate from L to F should be about two thirds of the flow rate from J to L in this situation where J is half full and both L and F are almost full.

So you expect L to fill faster than F.

So, I don’t think they can get into this situation at all, with a steady flow into L. There must be something going on that doesn’t fit our assumptions of laminar flow, or something else such as a bubble forming.

Let’s look at what lead up to this. If you look at the video, L fills faster than F to start with, keeping nearly the same head from L to F as from J to L.

L is clearly filling faster than F and is on track to beat it. There is no sign of any bubbles in the inlet to L.

But then a little while later you get this (25 seconds in)

Now F is filling faster than J. Something has happened to reduce the flow rate into L, which then permits the two levels between L and F to equalize.

But the head going into L hasn’t changed. Also the input pipe to L is full and there are no bubbles. I think the only possible answer is turbulence.

You can see waves forming in J so maybe that means there’s a bit of turbulence impeding the flow from J to L, especially since the water level for J is exactly at the level for the outlet to L. What are your thoughts?

This is what happened with a moderately fast flow rate:

Here is the video starting at that point.

All of A, B, C, J, L and F are just about full. B, L and F started to overflow first and I think L just about beat the other two though it was almost simultaneous. In this frame you can see L just about to overflow and the other two though they have the water raised above the level of the top, haven’t yet actually started to flow down the side.

So how do we understand that as a possible state in terms of the flow rates? Back to our diagram again

With A, B, C, J, L and F all filled, then A to B to C to J all have the same length of pipe and same head (height difference of the water in the tanks above inlet and outlet) so have the same flow rate. J to L has around 2.5 times the head of C to J, and the pipe is around 2.5 times the length, so the flow out of J is about the same as the flow into it, and the difference in head between the top of J and the outlet to I is small. From L to F, the difference in head is about the same as for C to J (which we already know is about the same as the flow from J to L) but the pipe is far longer, so L shouldn’t be able to empty as fast as it fills, and the water flows out of J faster than it flows out of L, so L should fill before J.

So if the flow rate is high enough for J to fill like this, L should fill before J and F doesn’t get a look in.

So how could it happen? Well it could be the bubble from J to L, slows down the flow out of J so that J fills first before L.

As for F filling, how did that happen? Let’s look at it again:

The head from J to L is far higher than from L to F and the pipe is shorter, so the flow into L should be a lot more than the flow out of L to F. So it seems impossible for F to fill like this. It's not the bubble - the two tanks fill up reasonably steadily at the same rate. You can watch the video at quarter speed to check. Click the Settings icon in the lower-right corner, then click the Speed selector.

Perhaps at this flow rate, its the double kink in the pipe from J to L causing more turbulence and so slowing down the input to L? What do you think? That could also help explain why J fills at this flow rate, if the pipe from J to L, has a slower flow rate than you’d expect from its length and head. What do you think? Do say in the comments.

Even K can fill, though it is pretty hard to do. This is with a very strong flow into A, and several of the others have been overflowing for some time. They have turned off the inlet pipe at this point.

Amusingly, in the real world, E ends up half full too after some time of running it at a high flow rate with the water overflowing from A.

Here is the complete video

That’s just a start. There are many other things to trySo far the only confirmed alternatives to F are A (obviously) and L (pretty sure it wins at the moderate flow rate).

• Varying flow rate. Can you get, J, say, to fill first or even K by turning the flow rate up and down at critical points during the filling process? This could cause bubbles to form, as well as adjust the heads of the various tanks.
• What happens if you scale the whole model up, or scale it down to a very small size? Scaling it down could make the flow rates out of some of the pipes very slow. It could also mean that bubbles like the one from J to L take a long time to disperse too. Scaling up could lead to more possibility of turbulent flow through the pipes.
• Try adding sugar for viscosity
• What if it is really hot, and you use a slow flow rate so that the water evaporates quickly?
• What if it is really cold so that the water freezes? That would seem to be a way to fill even B first, if the water freezes by the time it gets to B to C but remains unfrozen as far as the flow from A to B.

NOTE

If you see anything in this to correct, however small or important it is, please either suggest an edit for my answer or say in a comment. Thanks!

Originally published on Quora as my answer to "Which Tank Will Fill up First?"