import math
#initialisation of variables
sg = 0.7
v = 0.05 #poise
g = 32.2 #ft/sec**2
w = 62.4 #lbs/ft**3
#CALCULATIONS
u = v*30.5/(g*453.6)
v1 = v/sg
d = w*v1/g
v = u/d
#RESULTS
print 'viscocity = %.6f slug/t sec '%(u)
print ' kinematic viscocity = %.4f cm**2/ sec '%(v1)
print ' kinematic viscocity = %.6f ft**2/ sec '%(v)
# rounding off error
import math
#initialisation of variables
d = 0.5 #in
V = 1. #ft/sec
l = 200. #ft
T = 5. #degrees
g = 32.2 #f/sec**2
#CALCULATIONS
i = 0.04*V**2*12*4/(g*d)
gf = i*l
#RESULTS
print 'loss of head = %.1f ft '%(gf)
import math
#initialisation of variables
g = 32.2 #ft/sec**2
T = 25. #C
dp =8. #lbs/in**2
t = 0.005 #in
w = 3. #in
l = 1. #ft
#CALCULATIONS
ut = (0.0179*30.5/(g*453.6))/(1+0.03368*T+0.000221*T**2)
Ql = dp*144*(t/12)**3*3600*6.24/(12*ut*4)
#RESULTS
print 'Discharge = %.2f gallons per hour '%(Ql)
#ANSWER GIVEN IN THE TEXTBOOK IS WRONG
import math
#initialisation of variables
v = 1.25 #poise
d = 3. #in
l = 6. #in
t = 0.002 #in
w = 40. #R.P.M
g = 32.2 #ft/sec**2
#CALCULATIONS
u = v*30.5/(453.6*g)
T = u*math.pi**2*(d/12)**3*w*(l/12)/(120*t/12)
hp = T*2*math.pi*w/33000
#RESULTS
print 'Horse-power lost in velocit = %.4f '%(hp)
import math
#initialisation of variables
w = 750. #R.P.M
t = 0.02 #in
r1 = 9. #in
r2 = 5. #in
u = 0.003 #slug/ft sec
#CALCULATIONS
T = u*math.pi*(2*math.pi*w/60)*((r1/24)**4-(r2/24)**4)*2*math.pi*w/(2*t/12*33000)
#RESULTS
print 'horse power required to overcome = %.1f hp'%(T)