import math
#initialisation of variables
d= 2. #in
V= 210. #ft/sec
V1= 50. #ft/sec
g= 32.2 #ft/sec**2
w= 62.4 #lb/ft**3
#CALCULATIONS
M= math.pi*V*w/(4*36*g)
F= M*V
dV= V-V1
M1= math.pi*dV*w/(4*36*g)
F1= M1*dV
W= F1*V1
F2= M*dV
W1= F2*V1
#RESULTS
print 'Force on plate = %.f lb'%(F+1)
print ' Force on plate = %.f lb'%(F1)
print ' Work done/sec = %.f ft-lb/sec'%(W)
print ' Force on plate = %.f lb'%(F2)
print ' Work done/sec = %.f ft-lb/sec'%(round(W1,-3))
#The answer is a bit different due to rounding off error in textbook
import math
#initialisation of variables
v1= 15. #ft/sec
v2= 40. #ft/sec
a= 30. #degrees
b= 150. #degrees
v= 15.27 #ft/sec
g= 32.2 #ft/sec**2
#CALCULATIONS
a1= a-math.degrees(math.sin(v1*math.sin(math.radians(b))/v2))
w= math.cos(math.radians(a1))*v2
vr= v2*math.sin(math.radians(a1))/math.sin(math.radians(a))
v1= math.sqrt(v1**2+vr**2-2*v1*vr*math.cos(math.radians(a)))
r= 180-math.sin(math.radians(a))*vr/v
w1= v*math.cos(math.radians(r))
W= v1*(w-w1)/g
#RESULTS
print 'a = %.2f degrees'%(a1)
print ' w = %.2f ft/sec'%(w)
print ' vr = %.2f ft/sec'%(vr)
print ' v1 = %.2f ft/sec'%(v1)
print ' w = %.2f ft/sec'%(w)
print ' Work done per pound = %.2f ft-lb/lb'%(W)
# Note : Answers are different because of rounding off error.
import math
#initialisation of variables
d= 0.5 #in
a= 165. #degrees
W= 7.35 #lb
W1= 500. #lb
t= 148. #sec
g= 32.2 #ft/sec**2
w= 62.3 #lb/ft**3
#CALCULATIONS
Q= W1/(t*w)
v= Q*16*144/math.pi
dv= v*(1-math.cos(math.radians(a)))
F= dv*W1/(t*g)
r= W/F
k= (1-(W*t*g/(W1*v)))/math.cos(math.radians(a))
#RESULTS
print 'k = %.3f '%(k)
import math
#initialisation of variables
t= 0.25 #in
a= 30. #degrees
w= 480. #lb/ft**3
h= 2. #in
d= 0.5 #in
l= 6. #in
w1= 62.4 #lb/ft**3
g= 32.2 #ft/sec**2
#CALCULATIONS
W= t*l**2*w/1728
M= w1*math.pi*d**2*math.cos(math.radians(a))/(g*4*144)
v= math.sqrt(W*(l/2)*math.sin(math.radians(a))/(M*2*(1./math.cos(math.radians(a)))))
#RESULTS
print 'Velocity of jet = %.1f ft/sec'%(v)
import math
#initialisation of variables
V= 90. #ft/sec
a= 30. #degrees
u= 45. #ft/sec
#CALCULATIONS
w= V*math.cos(math.radians(a))
f= math.sqrt(V**2-w**2)
tanb= (math.atan(math.radians(f/(w-u))))
b = math.degrees(math.tan(tanb))
b = math.degrees(math.atan(b))
V1= math.sqrt(f**2+(u-f*1./math.tan(math.radians(b)))**2)
#RESULTS
print "B = %.2f degrees"%b
print 'absolute velocity of water at the exit = %.1f ft/sec'%(V1)
# rounding off error
import math
#initialisation of variables
u= 734. #ft/sec
v= 2000. #ft/sec
g= 32.2 #ft/sec**2
da= 0.019 #kg/m**3
#CALCULATIONS
W= g*v/(v-u)
A= W/(u*da)
#RESULTS
print 'Weight of the air = %.1f lb/sec'%(W)
print ' Area of inlet = %.2f ft**2'%(A)