Chapter 20: Pressure Transient Theory and Surge Control¶

Example 20.3, Page 692¶

In [2]:
from __future__ import division
import math

#Initializing  the  variables
c  =  1250;
Dt  =  0.02;
Dv  =  0.5;
rho  =  1000;
v  =0.5;

#Calculations
cDt  =  c*Dt;
Dp  =  rho*c*Dv;
DOv_DOt  =  Dv/Dt;
vDOv_DOt  =  v*Dv/cDt;
DOp_DOt  =  Dp/Dt;
vDOp_DOx  =  v*Dp/cDt;
Error  =  [vDOv_DOt*100/DOv_DOt  ,vDOp_DOx*100/DOp_DOt];
print "The percentage errors are :",Error,"\nThese are very small hence can be neglected"

The percentage errors are : [0.04, 0.04]
These are very small hence can be neglected


Example 20.5, Page 705¶

In [3]:
from __future__ import division
import math

#Initializing  the  variables
f  =  0;
Atunnel  =  1.227;
Ashaft  =  12.57;
Q  =2;
L  =  200;
g  =  9.81;

#Calculations
Zmax  =  (Q/Ashaft)*(Ashaft*L/(Atunnel*g))**0.5;
T  =  2*math.pi*(Ashaft*L/(Atunnel*g))**0.5;

print "Peak water level        (m) :",round(Zmax,3)
print "Mass Oscillation Period (s) :",round(T,1)

Peak water level        (m) : 2.299
Mass Oscillation Period (s) : 90.8