A variation of a ‘leaky bucket’ problem

ordinary differential equations

I'm looking at a 'leaky bucket' problem with a few differences, the system is set up as follows:

  1. the tank has a practically unlimited capacity
  2. water is added with a known flow rate
  3. periodically the drain valve is adjusted so that all of the water is drained over say 10 seconds
  4. we are interested to know how much water is contained at time $t$

To give a concrete example, lets assume the water is added with a rate of 10L per second, every 4 seconds the drain is adjusted. When the drain is adjusted it is adjusted to $\frac{1}{10}$ of current volume of water.

Initially I started with the following diff. eq. $dV=I-\frac{1}{10}V$ where $V$ stands for volume and $I$ is the incoming flow rate in L per sec. The issue is that in this equation the drain is constant with respect to volume, whereas in the actual problem the drain is adjusted periodically and in between those events the water is draining with a set flow rate.

I have a feeling it involves using a $\sin$ function to model the period, but I'm not certain as to how to go about it.

Best Answer

Say volume of water at $t = 0$ is $V_0$.

Volume of water at time $t = 4n$ where $n \in 0, \mathbb{Z+}$ is then given by

$\displaystyle V_{4n} = \bigg(\frac{3}{5}\bigg)^n V_0 + 10I \bigg(1 - \bigg(\frac{3}{5}\bigg)^n \bigg)$

And volume of water at time $4n+t$ is given by,

$\displaystyle V_{4n+t} = V_{4n} \bigg(1 - \frac{t}{10}\bigg) + I \, t$ where $0 \leq t \leq 4$

Here is how the expression comes (wherever I write $t$, it is $0 \leq t \leq 4$) -

$V_t = V_0 - \frac{V_0}{10}t + I \, t$

$V_4 = V_0 - \frac{4V_0}{10} + 4I = \frac{3}{5}V_0 + 4I$

$\displaystyle V_{4+t} = V_4 - \frac{V_4}{10}t + I \, t$

i.e. $\displaystyle V_{4+t} = \frac{3}{5}V_0 + 4I - \frac{t}{10}(\frac{3}{5}V_0 + 4I) + I \, t$

i.e. $\displaystyle V_{4+t} = \frac{3}{5}V_0 (1 - \frac{t}{10})+ (4 + \frac{3t}{5})I$

$\therefore \displaystyle V_{8} = (\frac{3}{5})^2 V_0+ 4(1 + \frac{3}{5})I$

Similarly, $\displaystyle V_{12} = (\frac{3}{5})^3 V_0 + 4(1 + \frac{3}{5} + (\frac{3}{5})^2)I$

At $t = 4n$, the geometric series $\, 1 + \frac{3}{5} + ... + (\frac{3}{5})^{n-1} = \displaystyle \frac{1 - (\frac{3}{5})^{n}}{1 - \frac{3}{5}} = \frac{5}{2} (1 - (\frac{3}{5})^{n})$

And this leads to expression at time $4n$ and $4n + t$.

Related Question