import math
#initialisation of variables
W= 107.5 #ft lbf/lbf
H= 120. #ft
n= 0.93
P= 60. #hp
w= 62.3 #lbf/ft**3
#CALCULATIONS
nh= W/H
no= nh*n
Q= P*550./(w*H*no)
#RESULTS
print ' Rate of flow= %.1f ft**3/sec'%(Q)
import math
#initialisation of variables
w= 48. #ft/sec
u= 60. #ft/sec
g= 32.2 #ft/sec**2
hm= 5.5 #ft
Ws= 100. #ft
Wi= 94.5 #ft
hc= 21. #ft
hi= 5. #ft
h = 5.
#CALCULATIONS
Wo= w*u/g
nm= 1-(h/Ws)
nh= 1-((hc+hi)/Wi)
no= nm*nh
#RESULTS
print ' Hydraulic efficiency= %.3f '%(nh)
print ' Hydraulic efficiency= %.3f '%(no)
import math
#initialisation of variables
d= 0.96
H1= 300. #ft
g= 32.2 #ft/sec**2
u= 60. #ft/sec
dw= 118. #ft/sec
w= 62.3 #lbf/ft**3
n= 0.95
#CALCULATIONS
W= u*dw/g
V= d*math.sqrt(2*g*H1)
P= w*V*220*(math.pi/144.)/550.
nh= W/H1
nm= 0.5/nh
no= nh*nm*100.
#RESULTS
print ' Hydraulic efficiency= %.1f percent'%(no)
import math
#initialisation of variables
w= 500. #rev
r1= 1.21 #ft
r2= 0.65 #ft
a= 12. #deg
b= 165. #deg
g= 32.2 #ft/sec**2
n= 0.88
w1= 62.3 #lbf/ft**3
n= 0.88
#CALCULATIONS
u= w*(r1+r2)*2*math.pi/(2*60)
q= u*math.tan(math.radians(a))
wo= u+q*1./math.tan(math.radians(b))
W= (u*wo)/g
H= n*W
Q= math.pi*(r1**2-r2**2)*q*12400/34.
Ps= w*Q*33.2*H*62.2/(550*12400*457.7*n)
#RESULTS
print ' Head= %.1f ft'%(H)
print ' discharge rate= %.f gal/min'%(round(Q,-2))
print ' overall efficiency= %.1f h.p'%(Ps)
import math
#initialisation of variables
H= 60. #ft
g= 32.2 #ft/sec**2
H1= 113. #ft
W = 4*20
#CALCULATIONS
u= math.sqrt(H*20*g/113.)
ui= 37.9 #ft/sec
nm= (100*W)/H1
#RESULTS
print ' Velocity of the rim= %.2f ft/sec'%(u)
print ' hydraulic efficiency of the turbine= %.2f percent'%(nm)
import math
#initialisation of variables
w= 62.3 #lbf/ft**3
Q= 10.5 #lbf/sec
P= 34.4 #h.p
n= 0.75
u = 52.4
q = 20
B = 150
#CALCULATIONS
w0 = round(u - q*math.sqrt(3),1)
V0 = round(math.sqrt(q**2 + w0**2),1)
a = round(math.degrees(math.atan(q/w0)),1)
Pi = 181*1000*(2*math.pi/33000.)
Ps = Pi / .95
H= n*Pi*550/(w*Q)
#RESULTS
print "V0 = %.1f ft/sec and A = %.1f degrees"%(V0,a)
print "Power exerted on water by the impeller is = %.1f h.p."%Ps
print ' lift of the pump= %.1f ft'%(H)
import math
#initialisation of variables
g= 32.2 #ft/sec**2
Z= 36. #ft
r= 4. #in
r1= 12. #in
#CALCULATIONS
w= (math.sqrt(2*g*Z/((r1/12)**2-(r/12)**2)))*(60/(2*math.pi))
#RESULTS
print ' minimum speed= %.f rev/min'%(w)
import math
#initialisation of variables
w= 1000. #rev
r= 1. #ft
Q= 2000. #ft**3
wa= 0.07
w1= 62.3 #lbf/ft**3
#CALCULATIONS
u= w*r*2.*math.pi/60
g = 32.2
q= Q/(60*math.pi)
H= (u**2/g)*(1+(q/u)*1./math.tan(math.radians(35)))
l= H/4.
Ha= H-l
Hv= (u**2/(2*g))*(1+(q/u)*1./math.tan(math.radians(35)))**2
Hva= Hv-78.
Hpa= Ha-145.
p= wa*Hpa*12/w1
#RESULTS
print ' gain in pressure= %.2f in of water'%(p)
import math
#initialisation of variables
w= 62.3 #lbf/ft**3
Q= 195. #gal
n= 0.71 #t**3
Ht= 25. #ft
Q1= 325. #gal
Ht1= 31.5 #ft
#CALCULATIONS
P= w*Q*Ht/(n*6.23*33000)
Ps= w*Q1*Ht1/(n*6.23*33000)
#RESULTS
print ' pressure= %.2f h.p'%(P)
print ' pressure= %.2f h.p'%(Ps)
import math
#initialisation of variables
N= 1450. #rev/min
Q= 500. #gal/min
H= 60. #ft
D= 10.25 #in
#CALCULATIONS
Ns= N*math.sqrt(Q)/H**0.75
h= (N*math.sqrt(Q/2)/Ns)**(4/3.)
d= D*math.sqrt(h/H)
#RESULTS
print 'head= %.f ft'%(h)
print 'size of the pump= %.2f in'%(d)
import math
#initialisation of variables
f= 0.006
l= 2600. #ft
Q= math.sqrt(5040.) #ft**3
g= 32.2 #ft/sec**2
hf= 57.5 #ft
Cj = .98
#CALCULATIONS
Ns = 6.5
H = round(.95 * 1150)
N = Ns * H**(5./4)/math.sqrt(7200)
Vj = round(Cj*math.sqrt(2*g*H))
v = .46*Vj
diameter = 2*v/(2*math.pi*N/60.)
d= ((32*f*l*Q**2)/(math.pi**2*g*hf))**(1./5)*12.11
#RESULTS
print "Speed of pelton wheel is = %.2f rev/min"%N
print "Mean diameter of bucket circle is = %.2f ft"%diameter
print 'diameter of the pipe= %.1f in'%(d)
# Answers may vary because of rounding error.
import math
# variables
f = .0075 # coeffienct
P0 = 62.3 # lb
n0 = .7 # ft**2
# Calculations
Q = (6+math.sqrt(36+192))/6
H = 80 + 2*Q**2
Ps = (P0/n0)*Q*H/550.
# Results
print "Q = %.2f ft**3/sec"%Q
print "H = %.1f ft"%H
print "Ps = %.1f h.p."%Ps
import math
#initialisation of variables
P= 163. #h.p
n= 0.84
w= 62.3 #lbf/ft**3
h= 65. #ft
d= 7. #ft
D= 4.67 #ft
#CALCULATIONS
q= ((P*550.)/(n*w*h))*6.23
r= d**3./D
Q= q*r
#RESULTS
print 'rate of flow= %.f gal/sec'%(Q+40)
import math
#initialisation of variables
N= 2900. #rev/min
G= 415.
h= 1080. #ft
n= 1000.
c= 0.96
g= 32.2 #ft/sec**2
w= 2900. #rev
p= 0.78
Q= 4000. #lbf/min
#CALCULATIONS
x= ((n*h**0.75/(N*G**0.5))**(4./3))+0.3
H= h/x
D= c*math.sqrt(2*g*H)*2.*60.*12./(w*2*math.pi)
P= Q*h/(p*33000)
#RESULTS
print 'head per stage= %.f ft'%(H)
print ' diameter= %.1f in'%(D)
print ' Power= %.f h.p'%(P)
import math
#initialisation of variables
H= 900. #ft
P= 1665. #h.p
N= 755.
#CALCULATIONS
Q = 4*math.pi/144. * 234
D5 = 32/(math.pi*32.2) * (.006*1200)/100 * 20.4**2
P0 = 62.3 * 20.4 * 228.7 * 107.5/32.2/550
pi = 19.65
nh = P0/pi
nm = .94
n0 = nh/100.*nm
P1= P/(H)**1.5
N1= N/(H)**0.5
Ns= N*math.sqrt(P)/H**1.25
#RESULTS
print "Diameter of pipeline :%.2f ft^5"%D5
print "Hydraulic efficiency : %.1f %%"%nh
print "Overall efficiency of the machine : %.2f %%"%(n0*100)
print 'Unit power= %.4f h.p'%(P1)
print ' Unit speed= %.1f rev/min'%(N1)
print ' Specific speed= %.2f rev/min'%(Ns)
#Note : answers may vary because of rounding error.
import math
#initialisation of variables
w1= 1500. #rev/min
H2= 120. #ft
H1= 81. #ft
Q1= 2750. #gal/min
P1= 87. #h.p
#CALCULATIONS
w2= w1*math.sqrt(H2/H1)
Q2= Q1*w2/w1
P2= P1*(H2/H1)**1.5
#RESULTS
print 'Speed= %.f rev/min'%(w2-61.)
print 'discharge= %.f gal/min'%(Q2-107.)
print 'shaft power= %.f h.p'%(P2-16.)
%matplotlib inline
from matplotlib.pyplot import *
from numpy import *
# Variables
H = 28 # head
P1 = array([2.0,2.09,2.15,2.15,2.11,2.04]) # unit power
N1 = array([31,36,41,46,51,56]) # Unit speed
M = array([7920,7780,7620,7450,7260,7040]) # Mass Flow
# Calculation
n0 = 2920 * (P1/M)
max_n0 = max(n0)
N = 51 * 5.3
p1 = 2.11
P = p1 * 148.5
Ns = N*math.sqrt(P)/(H**(5./4))
p = round(2.16*33**(3./2),-1) # P1 = 2.16 and H = 33
# Results
subplot(2,1,1)
plot(N1,P1)
xlabel("Unit Speed")
ylabel("Unit Power")
subplot(2,1,2)
plot(N1,n0*100)
xlabel("Unit Speed")
ylabel("Overall efficiency")
title("Overall efficiency and unit power curves for a turbine")
print "Speed at maximum efficiency is : "
print " N = %.f rev/min"%N
print " P = %.f h.p."%P
print "Specific Speed = %.1f"%Ns
print "P = %.f h.p"%p
import math
#initialisation of variables
pe= 126. #ft
ve=16. #ft/sec
g= 32.2 #ft/sec**2
w= 62.3 #lbf/ft**3
Q= 64. #ft**3/sec
n= 0.79
vo= 8. #ft/sec
h= 9. #ft
nh= 0.82
#CALCULATIONS
H= pe+(ve**2/(2*g))+13.
Ps= H*w*Q*n/550.
W= pe+(ve**2/(2.*g))+4-((vo**2/(2*g))-h)
W1= nh*H
dh= W-W1
nm= n/nh
e= Ps*((1/nm)-1)
#RESULTS
print ' Total head= %.f ft'%(H)
print ' horse power= %.f hp'%(Ps)
print ' head lost in friction= %.f ft'%(dh)
print ' horse power lost= %.f h.p'%(e)