Modeling 
Draining Cylinders 
with ODEs

1. A Single Draining Cylinder

Derivation of a Model (Single Cylinder)

h = height of liquid in cylinder measured in centimeters
v = velocity of liquid column exiting drain in cm/sec
R = radius of cylinder in centimeters
r = radius of drain hole in cerntimeters
g = constant of gravitational acceleration in centimeters/(sec^2)
ρ = density of liquid in kg/(cm^3)
(Subscript[h, 0]) = initial height in centimeters

A Geometric Relation; Conservation of Volume

h'[t] π (R^2) = -v[t] π (r^2)

Torricelli's  Law; Conservation of Energy

M g h[t]  =  (1/2) M v[t]^2 2

Cancelling the mass terms,

v[t]  =  (Sqrt[2 g h[t]]).

Substituting for v in the geometric relation,

h'[
        t]  =  - (Sqrt[2 g]) (r^2/R^2) (Sqrt[h])[t]

Solution of the ODE:

Set alpha_0 = Sqrt[2 g] (r^2/R^2).

h'[t]/(Sqrt[h])[t] =  -(Subscript[α, 0])
h[0] = (Subscript[h, 0])

2 Sqrt[h[t]]  =  -alpha_ 0 t  +  
        2 Sqrt[h_  0]

h[t] = ((Sqrt[(Subscript[h, 0])]) - (Subscript[α, 0]) t/2)^2

Comparison to Experiment I

Scratch

.129*2.54/2
2.41*2.54/2

0.16383

3.0607

.16^2/.2

0.128

old r .2, old R 3.02

Physical Values

h0 = 36 ;  g = 9.8 (100);  r = ( .129) (2.54)/2;  
    R = (2.41) (2.54)/2;

alpha0  =  Sqrt[2 g] ( r^2/R^2)

h[t_] = (Sqrt[h0] - alpha0 t/2)^2;

A = Plot[h[t], {t, 0, 2 Sqrt[h0]/alpha0}]

hsteps  =  h0/10;

Bold = 
      ListPlot[{{0, h0}, {5.08, 9 h0/10}, {10.28, 8 h0/10}, {15.88, 
            7 h0/10}, {22.1, 6 h0/10}, {28.66, 5 h0/10}, {35.69, 
            4 h0/10}, {44.01, 3 h0/10}, {53.72, 2 h0/10}, {66.12, 
            h0/10}, {87.46, 0}}, 
        PlotStyle -> AbsolutePointSize[6]]

B = 
      ListPlot[{{0, h0}, {4.9, 9 h0/10}, {9.96, 8 h0/10}, {15.54, 
            7 h0/10}, {21.38, 6 h0/10}, {27.78, 5 h0/10}, {34.74, 
            4 h0/10}, {42.48, 3 h0/10}, {52.86, 2 h0/10}, {64.98, 
            h0/10}, {86.80, 0}}, 
        PlotStyle -> AbsolutePointSize[6]]

Show[A, B]

Discussion of Results

One observes that in Torricelli's Conservation equation, there is most certainly some transfer of potential energy into kinetic energy inside the cylinder.  The liquid near the drain is in motion.  
    
This suggests that the right side should be slightly larger.  We attempt to compensate by keeping the same kinetic energy term by multiplying by a larger constant.  This results in essentially the same model with a slightly smaller alpha.

data = {{0, h0}, {5.08, 9 h0/10}, {10.28, 8 h0/10}, {15.88, 
            7 h0/10}, {22.1, 6 h0/10}, {28.66, 5 h0/10}, {35.69, 
            4 h0/10}, {44.01, 3 h0/10}, {53.72, 2 h0/10}, {66.12, 
            h0/10}, {87.46, 0}};

data2 = Sqrt[data]

data2[[All, 2]];

rootdata = 
      Transpose[{data[[All, 1]], data2[[All, 2]]}]

newalpha = FindFit[rootdata, Sqrt[h0] - a x/2, {a}, x]

alpha  =  a /. newalpha;

k[t_] = (Sqrt[h0] - alpha t/2)^2;

CC = Plot[k[t], {t, 0, 2 Sqrt[h0]/alpha}]

Show[B, CC]

2. Draining Cylinders in Series