Chapter 6:Tank drainage and variable head flow

Example 6.1,Page 143

In [10]:
#variable decleration
from math import pi
import math
Q =5000.0/3600/24; #m^3 per second
C_d =0.6;
r =0.01/2; # m
g =9.8; #m/ s ^2
H =0.2; # m


#calculation
a_o = pi *r**2;
n=Q/C_d/ a_o / math.sqrt (2*g*H);

#result
print"The number of orifices required are ",round (n)
The number of orifices required are  621.0

Example 6.2,Page 145

In [1]:
#variable decleration
from math import pi
import math
x =0.86; # m
g =9.8; # m/ s
y =0.96; # m
H =0.2; # m

#calculation
v_act =x* math.sqrt (g /2/ y);
v= math.sqrt (2* g*H);
Cv= v_act /v;

#result
print "The coeff. of velocity for the orifices found to be ",round(Cv,3)
The coeff. of velocity for the orifices found to be  0.981

Example 6.3,Page 147

In [14]:
#variable declaration
from math import pi
import math
Vt =1; # m^3
d_t =1; # m
C_d =0.6;
d_o =0.02; # m
g =9.8; # m/ s ^2


#calculation
a_o = pi *( d_o ) **2/4;
A= pi *( d_t ) **2/4;
H1 =4* Vt/ pi /( d_t) **2;
t=A/C_d/ a_o * math.sqrt (2* H1/g);

#results
print" Total drainage is found to take (s) ",round(t,2)
 Total drainage is found to take (s)  2124.49586383

Example 6.4,Page 149

In [16]:
#variable declaration
from math import pi
import math
C_d =0.6;
d_o =0.05; #m
g =9.81; # m/ s ^ 2 ;
R =2; 
H1 =1.5; 

#calculation
a_o = pi *d_o **2/4;
t= pi /C_d/ a_o*(1.333* R*H1 **(1.5) -0.4* H1 **(2.5))/math.sqrt(2*g);

#results
print"The time to drain the tank is found to be (s)",round(t,3);
The time to drain the tank is found to be (s) 2285.001

Example 6.6,Page 153

In [4]:
#variable declaration
import math
Cd =0.62;
a =0.01;# m^2
g =9.81; # m/ s ^2
H =0.3; #m
A1 =4*2; # m^2
H1 =0.300; # m
H2 =0.100; # m
A2 =2*2; # m^2

#calculation
Q=Cd*a* math.sqrt (2* g*H);
t =2* A1 *( math.sqrt(H1) -math.sqrt(H2) )/( Cd*a* math.sqrt (2*g) *(1+ A1/A2));

#results
print "The rate of flow(m^3/s) =",round(Q,3)
print "The time taken to reduce the difference in levels to 10 cm is (s) ", round(t,3)
The rate of flow(m^3/s) = 0.01504
The time taken to reduce the difference in levels to 10 cm is (s)  44.957

Example 6.8,Page 157

In [5]:
#variable declaration
import math
Qs =0.4; #m^3/ s
H1 =1.5; # m
Q =0.2; #m^3/ s
H2 =0.5; # m
l =15; # m
b =10; #m
e=2.69;

#calculation
A=l*b;
k=Qs*H1 **( -0.5) ;
t=-2*A/k**2*(Q*math.log((Q-k*math.sqrt( H2))/(Q-k*math.sqrt(H1)),e)+k*(math.sqrt(H2)-math.sqrt(H1)));
#result
print "The time reqd. for the level in the tank to fall to 1 m is(s) ",round(t,3)
The time reqd. for the level in the tank to fall to 1 m is(s)  1536.35

Example 6.9,Page 159

In [6]:
#variable declaration
from math import pi
import numpy as np
import numpy 
import math
Cd =0.62;
d =0.05;
a_o = pi *d **2/4;
g =9.81; #m/ s ^2

#calculation
k=Cd*a_o* math.sqrt (2*g);
# We have g o t two s imultaneous equations
#Q_k  0 . 6 5 ^ ( 1 / 2 ) =0.1/90A
# Q_k  1 . 2 2 5 ^ ( 1 / 2 ) =0.05/120A

M=np.array([[1,-0.1/90],[1,-0.05/120]]);
N=np.array([[k *math.sqrt(0.65)] ,[k *math.sqrt(1.225)]]);
X=np.linalg.solve(M,N)
Q=X[0][0];
A=X[1][0];
print "The Area of the tank(m^2) =",round(A,3)
print " Flow rate(m^3/s) =",round(Q,3)
The Area of the tank(m^2) = 2.334
 Flow rate(m^3/s) = 0.007

Example 6.10,Page 161

In [17]:
from math import pi
from numpy import matrix
from numpy import linalg
import math
H1 =1.5; # m
V =0.75; # m^3
d1 =1.2; # m
u =0.08; # Ns/m^2
L =3; # m
rho =1100; # kg /m^3
g =9.81; # m/ s ^2
d =0.025; # m
e=2.71;

#calculation
a= pi*d **2/4;
A= pi*d1 **2/4;
H2=H1 -(V/A);
round(H2,2);
t= -32*u*L*A/(a*rho*g*d **2) *math.log(H2/H1,e);

#result
print"Time taken(s) =",round(t,3);
Time taken(s) = 1535.7565254
In [ ]: