mathematics//graph theory//three-tank network
Worked example: balance, Laplacian, capacity, modes and a random walk connected in one computable case. Three open tanks share the same reference level. Pipes exist only between 1 and 2, and between 2 and 3, each with conductance \(1\,\mathrm m^2/\mathrm s\). Linear flow, no pumps, leaks, hydraulic inertia or atmospheric pressure differences.
Worked example: balance, Laplacian, capacity, modes and a random walk connected in one computable case. Three open tanks share the same reference level. Pipes exist only between 1 and 2, and between 2 and 3, each with conductance 1 m2/s1,\mathrm m^2/\mathrm s1m2/s. Linear flow, no pumps, leaks, hydraulic inertia or atmospheric pressure differences.
From mechanism to matrix. With levels hih_ihi in meters, the flows are q12=h1−h2q_{12}=h_1-h_2q12=h1−h2 and q23=h2−h3q_{23}=h_2-h_3q23=h2−h3, numerically in cubic meters per second. The numerical matrices are
W=[010101010],D=diag(1,2,1),L=[1−10−12−10−11].W=\begin{bmatrix}0&1&0\\1&0&1\\0&1&0\end{bmatrix},\quad D=\operatorname{diag}(1,2,1),\quad L=\begin{bmatrix}1&-1&0\\-1&2&-1\\0&-1&1\end{bmatrix}.W=010101010,D=diag(1,2,1),L=1−10−12−10−11.
The graph Laplacian converts levels into net outflows; the capacities convert those flows into level velocities.
Tanks of equal section. For areas ai=1 m2a_i=1,\mathrm m^2ai=1m2 the numerical equation is h˙=−Lh\dot h=-Lhh˙=−Lh in seconds. From h(0)=(3,0,0)T mh(0)=(3,0,0)^{\mathsf T},\mathrm mh(0)=(3,0,0)Tm a total volume of 3 m33,\mathrm m^33m3 is conserved and the final level is 1 m1,\mathrm m1m everywhere. The eigen-patterns, unnormalized, are v1=(1,1,1)Tv_1=(1,1,1)^{\mathsf T}v1=(1,1,1)T, v2=(1,0,−1)Tv_2=(1,0,-1)^{\mathsf T}v2=(1,0,−1)T, v3=(1,−2,1)Tv_3=(1,-2,1)^{\mathsf T}v3=(1,−2,1)T, with rates 000, 111 and 3 s−13,\mathrm s^{-1}3s−1. The solution, with ttt in seconds and heights in meters, is
h(t)=v1+32e−tv2+12e−3tv3.h(t)=v_1+\tfrac32e^{-t}v_2+\tfrac12e^{-3t}v_3.h(t)=v1+23e−tv2+21e−3tv3.
The first mode keeps the common level. The second corrects the difference between the ends. The third corrects a pattern where the middle tank differs from both ends, and it vanishes three times faster than the second.
Same pipes, double central capacity. Now M=diag(1,2,1) m2M=\operatorname{diag}(1,2,1),\mathrm m^2M=diag(1,2,1)m2: neither the topology nor the pipe conductances change, but the dynamics does, h˙=−M−1Lh\dot h=-M^{-1}Lhh˙=−M−1Lh. The initial volume is still 3 m33,\mathrm m^33m3 and the total area is now 4 m24,\mathrm m^24m2, so the final common level is 0.75 m0.75,\mathrm m0.75m. The numerical rates are 000, 111 and 2 s−12,\mathrm s^{-1}2s−1, and one solution is
h(t)=34(1,1,1)T+32e−t(1,0,−1)T+34e−2t(1,−1,1)T.h(t)=\tfrac34(1,1,1)^{\mathsf T}+\tfrac32e^{-t}(1,0,-1)^{\mathsf T}+\tfrac34e^{-2t}(1,-1,1)^{\mathsf T}.h(t)=43(1,1,1)T+23e−t(1,0,−1)T+43e−2t(1,−1,1)T.
The fast mode also changes shape. The spectrum of LLL alone no longer gives the rates: MMM has to be included (nodal capacity).
A walk on the same connectivity. Reading the weights as jump preferences (Markov chain),
P=D−1W=[0101/201/2010].P=D^{-1}W=\begin{bmatrix}0&1&0\\1/2&0&1/2\\0&1&0\end{bmatrix}.P=D−1W=01/2010101/20.
Its stationary distribution is π=(1/4,1/2,1/4)T\pi=(1/4,1/2,1/4)^{\mathsf T}π=(1/4,1/2,1/4)T: not a vector of levels but a distribution of occupation. From p0=(1,0,0)Tp_0=(1,0,0)^{\mathsf T}p0=(1,0,0)T the first step concentrates the probability in the center and the second spreads it to the ends, and the alternation continues. A stationary distribution exists, but this walk is periodic and does not converge from that start. The lazy walk Plazy=(I+P)/2P_{\mathrm{lazy}}=(I+P)/2Plazy=(I+P)/2 keeps π\piπ and removes the periodicity; its eigenvalues are 111, 1/21/21/2 and 000 (spectral gap).
What unites and what separates the readings. The connectivity is shared. The level dynamics uses a physical balance and capacities; the walk uses per-step probabilities. With double central capacity the final volumes are in proportion 1:2:11:2:11:2:1, coinciding with π\piπ here because capacity and degree happen to be proportional in their respective units. It is not a universal identity between volume and probability.
The rates come from the balance equation; the matrices from adjacency and degree; the solution from modes. Values, decompositions and comparisons were built and checked algebraically and numerically for this note.