Which Tank Will Fill Up First?

CFD Simulation Solves 12 Tanks Puzzle

We thought we'd have a little fun and use our CFD techniques to solve this "genius" meme we've seen on the internet that we think holds more interest than meets the eye. 

Taking note of the blockages preventing flow into "D" and "H", it seems intuitive that the "correct" answer is "F", right?  Not-so-fast. The problem is actually ill-posed, which is just just a nerdy way of saying that there is not enough information to answer with certainty.

The rates at which fluid flows into and out of each container depend upon the fluid levels throughout the system, the spigot flow rate and the physical properties of the fluid containers and pipes. Such details are missing from the problem statement.

What’s more is that even if we had these details, the problem does not lend itself to paper calculations. To solve it would involve setting up a system of ordinary differential equations (one per tank) according to mass and momentum conservation and then analyzing the system response through state-space analysis and Laplace transforms. Instead, such complex systems are usually tackled with either Experimental Fluid Dynamics (EFD) or Computational Fluid Dynamics (CFD).

Experimental Fluid Dynamics requires maintaining geometric and dynamic similitude. For practical purposes, similitude is challenging or impossible to maintain in some EFD models, making qualitative or quantitative predictions based upon experimental models difficult.

In the case of traditional CFD, the system is discretized on a spatial grid of control volumes at which mass and momentum conservation are enforced according to specified boundary conditions, and the resulting fluxes are solved iteratively via numerical analysis until mass and momentum balances are below specified tolerances.

A relatively new approach to fluid simulation is through the so-called Lattice Boltzmann Method (LBM). The LBM models the fluid consisting of fictive particles where such particles perform consecutive propagation and collision processes over a discrete lattice mesh. The basis for LBM is the Boltzmann equation describing the behavior of a gas modeled at mesoscopic scale reduced to its hydrodynamic limit. Here we have used the XFlow LBM simulation software.

The first solution presented below is for water flow from a faucet at a rate of 1.5 kg/s and a temperature of 22° C, typical of a standard exterior water faucet flow. All pipes are assumed to be nominal 3/4″, and container sizes have been scaled from the puzzle diagram.

Looks like intuition holds true for water under these conditions and the “correct” answer is container F.

The simulation shown next is setup in exactly the same manner as the first, except the fluid modeled is now ethylene glycol, which has a higher viscosity and lower surface tension than water.

And so we see, our intuition is incorrect in this case and the “correct” answer is now container L.

We’ve learned two things:

  1. Fluid systems require precise definition if predictions are to be made with certainty.
  2. Fluid dynamicists probably shouldn’t be the target audience for such puzzles, as we may take them too literally.

Find more of our fluid simulation animations on our Vimeo page.

Stewart Bible3 Comments