# Leaky Buckets: Volume in a system of 2+ buckets that can be empty

What is the volume of water in each bucket in a system of leaky buckets with the following conditions:

1. There are $N$ buckets with $W_i(t)$ volume of water.
2. A bucket has infinite capacity, but a finite amount of water bounded at zero: $\infty \geq W_i(t) \geq 0$.
3. There is a "source" bucket which flows into other buckets, but other buckets do not flow into it. Every non-source bucket flows into every other non-source bucket.
4. With enough volume, each bucket has a constant outflow rate, $v_i$ (units of $W/t$), of water flowing out and being equally distributed into the other buckets. You can imagine that each bucket has a pump attached to it trying to pump at a fixed rate through $N-1$ or $N-2$ pipes for the source and non-source buckets, respectively.
The attached figure illustrates a system with $N=3$ buckets.

What are the formulae for $W_i(t)$?

This is a relatively simple problem apart from the constraint that $W_i(t) \geq 0$, since this puts a continuity-breaking constraint on the flow rate, and I'm very rusty.
• You say "a finite amount of water", but then " ∞ ≥ W_i " where "equal" is possible - can we assume that that was a typo and you meant " > " rather than " ≥ " here? Also, can you confirm that the source bucket (which isn't refilled) is empty after time W_0(0) / v_0, or does it remain (magically) always full? Actually, is v_i = 0 allowed or can we assume v_i > 0 for all i (including 0)?

• It's fine to assume the capacity is finite (i.e. W_i can never be infinity), but I dont want the total filled volume of water (W_i) to have an upper limit in my project. You can assume the source bucket remains empty after emptying and has no inflow rate, though in practice I will "fill" it back up iteratively. v_i = 0 is allowed and should be the case when W_i = 0

• wait - of course there is no outflow when W_i = 0 but otherwise the v_i are constants, yes? They don't change over time.

• That's right!

• Here's my answer (already posted yesterday evening...) I hope you're not deceived, I don't think there's a much more elegant way to compute the solution other than step by step determine which bucket will become empty next until no more will become empty. Please tell me if you want something to be better clarified. (I think the google sheet also gives a good idea of the process, you should have a look at that and make a copy to modify at wish.)

Answers can only be viewed under the following conditions:
1. The questioner was satisfied with and accepted the answer, or
2. The answer was evaluated as being 100% correct by the judge.