import math
from numpy import *
#initialisation of variables
g= 32.2 #ft/sec**2
u= 3.6*10**-5 #lbf sec/ft**2 viscosity
d= 64. #lbm/ft**2 density
l= 20. #ft long
a= 0.5
#CALCULATIONS
sw= u*g/(a*d)
sw1= u**2*g*l/(2*a*d)
Re=array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])*10**5
Vinf=Re*u*g/(d*a)
Cd= array([1.2, 1.15, 0.94, 0.68, 0.305, 0.31, 0.32, 0.33, 0.34, 0.35])
cdre=Cd*Re**2
D=sw1*cdre
#RESULTS
print 'velocity = %.3e ft/sec'%(sw)
print ' Force = %.3e lbf'%(sw1)
print "V (ft/sec) D(lbf)"
for i in range(len(D)):
print "%6.1f %6d"%(Vinf[i],D[i])
# note : answers are accurate. please check manually.
%matplotlib inline
from numpy import *
from matplotlib.pyplot import *
#initialisation of variables
g= 32.2 #ft/sec**2
u= 3.6*10**-5 #lbf sec/ft**2
d= 64. #lbm/ft**2 density
l= 20. #ft long
a= 0.5
#CALCULATIONS
sw= u*g/(a*d)
sw1= u**2*g*l/(2*a*d)
Re = array([1 ,2, 3, 4, 5, 6, 7, 8, 9, 10])*10**5
Vinf=Re*u*g/(d*a)
Cd = array([1.2, 1.15, 0.94, 0.68, 0.305, 0.31, 0.32, 0.33, 0.34, 0.35])
cdre=Cd*Re**2
D=sw1*cdre
#RESULTS
plot(Vinf,D)
xlabel("Vinf, ft/sec")
ylabel("D, lbf")
suptitle("Streamlinedbody curve")
#data for curves b,c,d is not given
#initialisation of variables
v1= 10. #ft/sec
v2m= 9 #ft/sec wide
a= 1.02
hbyd= 5.95
#CALCULATIONS
ca= (v1/v2m)**2
Cd= hbyd*(ca-1+2-2*ca)+2*a*ca
#RESULTS
print 'Drag coeffcieicnt = %.2f'%(Cd)
#initialisation of variables
A= 320. #ft/**2 area
w= 18000. #lbf weighs
v= 230. #ft/sec normal speed
ad= 0.0765 #lbm/ft**3 density
p= 5. #per cent of the total lift force
c= 0.055
n= 1.75 # total drag
g= 32.2 #ft/sec**2
#CALCULATIONS
CL= 2*w*(1-(p/100))*g/(ad*v**2*A)
D= w*(1-(p/100))*c*n/CL
#RESULTS
print ' lift coefficient = %.2f'%(CL)
print ' Drag force = %.f'%(D)
# note : answer is accurate
import math
#initialisation of variables
bi= 70. #degrees outlet angels
i= 8. #degrees incidence angle
bo= 130. #degrees outlet angels
s= 5. #degrees
vi= 1200. #ft/sec
g= 32.2 #ft/sec**2
a= 0.48
s1= 1.4 #in
b= 5. #in
Cx= 0.06 # co-efficient
#CALCULATIONS
O= bo-s-bi+i
Vo= vi*math.sin(math.radians(bi-i))/math.sin(math.radians(bo-s))
Fy= -a*vi*math.sin(math.radians(bi-i))*(s1/12)*(b/12)*(Vo*math.cos(math.radians(bo-s))-vi*math.cos(math.radians(bi-i)))/g
dp= a*(Vo**2*(1+Cx)-vi**2)/(2*g)
#RESULTS
print 'Fluid deflection angle = %.f degrees'%(O)
print ' Vo = %.f ft/sec'%(Vo)
print ' Force on each blade = %.f lbf'%(Fy)
print ' Pressure difference = %.f lbf/ft**2'%(dp)
# note : answer is accurate. please check.
import math
#initialisation of variables
ari= 62. #degrees
aro= 125. #degrees
vri= 1200. #ft/sec
vro= 1294. #ft/sec
vrr= 550. #ft/sec velocity
#CALCULATIONS
v1= vri*math.sin(math.radians(ari))
v2= vrr+vri*math.cos(math.radians(ari))
vi= math.sqrt(v1**2+v2**2)
ai= round(math.degrees(math.atan(v1/v2)),1)
vo= round(vro*math.sin(math.radians(aro)))
vo1= round(vro*math.cos(math.radians(aro))+vrr)
vo2= round(math.sqrt(vo**2+vo1**2))
ao= math.degrees(math.atan(vo/vo1))+180
#RESULTS
print ' absolute velocity = %.f ft/sec'%(vi)
print ' direction = %.1f degrees'%(ai)
print ' absolute velocity = %.f ft/sec'%(vo2)
print ' direction = %.1f degrees'%(ao)