import math
# Variables
D = 0.15 # cm
S = 0.25 # cm
N = 50. # r.p.m
Hs = 5. # m
Hd = 15 # m
ns = .6
deltaD = 0.75
w = 9810.
# Calculations
suction = w*math.pi*D**2*Hs/(4*ns)
delivery = (w*math.pi*D**2*Hd)/(4*deltaD)
p_required = ((suction+delivery)*S*N)/(1000*60)
# Results
print "Power required by the pump : %.4f kW"%p_required
# note : book answer is wrong.
import math
# Variables
D = 0.18
s = 0.36
Hs = 3.
Hd = 45.
N = 50.
n = 0.85
# Calculations
a = math.pi*D*D/4
Q = (2*a*s*N)/60
g = 9.81
w = g*1000
P = w*Q*(Hs+Hd)/(n*1000)
# Results
print "power in kw required to drive the pump : %.3f"%P
import math
# Variables
D = 0.15
s = 0.3
Hs = 3.
Hd = 30.
n = 0.8
a = math.pi*D*D/4
N = 60./60
w = 9810.
Q = 0.62/60
# Calculations
Qth = (2*a*s*N)
slip = (Qth-Q)/Qth
power = (w*Qth*(Hs+Hd))/(1000*n)
# Results
print "power in Kw required to drive the pump : %.2f kW \
\npercentage slip : %.3f %%"%(round(power,2),round((slip*100),2))
import math
# Variables
D = 0.15 #mm
s = 0.3 #mm
N = 50./60 #r.p.m
H = 25. #m, height
Qact = 0.0042 #liter/s
Ld = 22. #m long
d = 0.1 #mm
# Calculations
a = math.pi*D*D/4
Qth = a*s*N
w = 9810
power = w*Qth*H/1000
slip = (Qth-Qact)/Qth
W = 2*math.pi*N
a1 = math.pi*d*d/4
g = 9.81
Had = (Ld*a*W*W*s)/(g*a1*2)
# Results
print "theoritical discharge : %.8f m**3/s \
\ntheoritical power : %.5f kW \
\npercentage slip : %.2f %% \
\nacceleration head : %.2f m"%(Qth,round(power,5),round((slip*100),2),round(Had,2))
import math
# Variables
s = 0.15 #m, strok length
Ls = 7. #7 pipe
ds = 0.075 #cylinder
N = 75./60
Hs = 2.5 #m, water level
z = 16./9
f = 0.01
W = 2*math.pi*N
g = 9.81
# Calculations
Has = Ls*z*W*W*ds/g
H = Hs+Has
H1 = Has-Hs
Hfs = (4*f*Ls/(ds*2*g))*((z*W*ds)**2)
H2 = Hfs+Hs
# Results
print "pressure head:beginning of suction stroke : %.4f m \
\nend of the suction stroke : %.4f m \
\nmiddle of the suction stroke : %.4f m"%(round(H,4),round(H1,4),round(H2,4))
import math
# Variables
D = 0.08 #m diameter
s = 0.15 #m stroke
Hs = 3. # water for sump
ds = 0.03 #diameter
g = 9.81
Ls = 4.5
p = 78.86*(1000) #kN/m**2
w = 9810.
W = 2*math.pi/60
# Calculations
z = (D/ds)**2
Hsep = p/w
Habs = 10.3-Hsep
Has = Hsep-Hs
N = ((Has*g*2)/(z*W*W*s*Ls))**0.5
# Results
print "maximium speed in rpm at which may run without separation",round(N,2),"r.p.m"
# note : rounding off error
import math
# Variables
Hs = 5.
Ls = 10.
D = 0.15 #m diameter
d = 0.1
N = 30./60
s = 0.15 #m delivery head
g = 9.81
W = 2*math.pi*N
w = 9810.
ha = 10.3
# Calculations
z = (D/d)**2
H = (Ls*z*W*W*s/g)
Ph = Hs+H
Phabs = ha-Ph
f = 0.01
Hfs = (4*f*Ls/(d*2*g))*((z*W*s)**2)
H1 = Hs+Hfs
H1abs = ha-H1
H2 = Hs-H
H2abs = ha-H2
Hd = 15.
Ld = 25.
H11 = (Ld*z*W*W*s/g)
H12 = H11+Hd
H12abs = ha+H12
Hfd = (4*f*Ld/(d*2*g))*((z*W*s)**2)
H22 = Hd+Hfd
H22abs = ha+H22
H3 = Hd-H11
H3abs = ha+H3
a = 3.142*D*D/4
Q = a*s*2*N
power = (w*Q*(Hs+Hd+(0.6666*Hfs)+Hfd*0.6666))/1000
# Results
print "pressure head at middle and end of suction stroke",round(H1abs,4),round(H2abs,4)
print "pressure head at beginning,middle,end of suction stroke",round(H12abs,4),round(H22abs,3),round(H3abs,4)
print "power in Kw required to drive the pump",round(power,3)
# note : rounding off error.