U=25.0 #ft/sec
p=0 #gage
b=10.0 #ft
t=1.24*(10**-3) #where t=stress*(x**0.5)
a=0.744 #where a=p/(1-((y**2)/4))
p1=-0.893 #lb/(ft**2)
from scipy import integrate
def f(x):
return(2*t*b/(x**0.5))
drag1=integrate.quad(f,0.0,4.0)
print "The drag when plate is parallel to the upstream flow=",drag1[0],"lb"
def f1(y):
return((((a*(1-((y**2)/4))))-p1)*b)
drag2=integrate.quad(f1,-2.0,2.0)
#result
print "The drag when plate is perpendicular to the upstream flow=",drag2[0],"lb"
U=10.0 #ft/sec
Twater=60.0 #degree F
Tglycerin=68.0 #degree F
kviswater=1.21*(10**-5) #(ft**2)/sec
kvisair=1.57*(10**-4) #(ft**2)/sec
kvisglycerin=1.28*(10**-2) #(ft**2)/sec
Re=5*(10**5) #assumption
#calculation
xcrwater=kviswater*Re/U #ft
xcrair=kvisair*Re/U #ft
xcrglycerin=kvisglycerin*Re/U #ft
btwater=5*(kviswater*xcrwater/U)**0.5 #ft where bt=thickness of boundary layer
btair=5*(kvisair*xcrair/U)**0.5 #ft
btglycerin=5*(kvisglycerin*xcrglycerin/U)**0.5 #ft
#result
print "a)WATER"
print "location at which boundary layer becomes turbulent=",round(xcrwater,2),"ft"
print "Thickness of the boundary layer=",round(btwater,5),"ft"
print "b)AIR"
print "location at which boundary layer becomes turbulent=",round(xcrair,2),"ft"
print "Thickness of the boundary layer=",round(btair,3),"ft"
print "c)GLYCERIN"
print "location at which boundary layer becomes turbulent=",round(xcrglycerin,2),"ft"
print "Thickness of the boundary layer=",round(btglycerin,2),"ft"
%matplotlib inline
T=70.0 #degree F
U1=0.0 #ft/sec
U2=30.0 #ft/sec
l=4.0 #ft
b=0.5 #ft
d=1.94
vis=2.04*(10**(-5))
x=d*l/vis
U=10.0 #ft/s U1 < U < U2
#calculation
import math
Re=d*l*U/(vis) #Reynold no.
#but we take Re approximately =3800000
Re_=3.8*10**6
Cd=0.455/((math.log10(Re_))**2.58)-(1700.0/Re_)
D=d*U**2*Cd
print "The Drag is ",round(D,3),"lb"
#Plot
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
U=[0,3,8,20,30]
Df=[0,0.1,0.598,2.4,5]
xlabel("U (ft/s)")
ylabel("Df (lb)")
plt.xlim((0,30))
plt.ylim((0,5))
a=plot(U,Df)
U1=[0,1,1.5,3,5,8,15,30]
Df1=[4,4,3,1.5,1,0.598,0.4,0.3]
ax.annotate('Entire boundary layer laminar', xy=(0.5, 4), xytext=(3,4.2),
arrowprops=dict(facecolor='black', shrink=0.001),
)
xlabel("U (ft/s)")
ylabel("Df (lb)")
plt.xlim((0,30))
plt.ylim((0,5))
a=plot(U1,Df1,linestyle='--')
plt.text(20,2.8,'Df')
plt.text(3,2.5,'Xcf')
show(a)
D=0.1 #mm
sg=2.3
vis=1.12*(10**(-3)) #N*s/(m**2)
#by free body diagram and assuming CD=24/Re
U=(sg-1)*999*9.81*((D/1000)**2)/(18*vis)
#Result
print "The velocity of the particle through still water =",round(U,3),"m/s"
#Plot
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
D=[0,0.01,0.02,0.04,0.06,0.1]
U=[0,0,0.0002,0.001,0.0024,0.00632]
xlabel("D (mm)")
ylabel("U (m/s)")
plt.xlim((0,0.1))
plt.ylim((0,0.007))
ax.plot([0.1], [0.00632], 'o')
ax.annotate('(0.1mm,0.00632m/s)', xy=(0.06,0.006))
a=plot(D,U)
show(a)
D=1.5 #in
CD=0.5
dice=1.84 #slugs/(ft**3) density of ice
dair=2.38*(10**(-3)) #slugs/(ft**3)
U=(4*dice*32.2*(D/12)/(3*dair*CD))**0.5 #ft/sec
#Result
print "The velocity of the updraft needed=",round(U*3600/5275,1),"mph"
Dg=1.69 #in.
Wg=0.0992 #lb
Ug=200 #ft/sec
Dt=1.5 #in.
Wt=0.00551 #lb
Ut=60 #ft/sec
kvis=(1.57*(10**(-4))) #(ft**2)/sec
#Calculation
import math
Reg=Ug*Dg/kvis
Ret=Ut*Dt/kvis
#the corresponding drag coefficients are calculated as
CDgs=0.25 #standard golf ball
CDgsm=0.51 #smooth golf ball
CDt=0.5 #table tennis ball
Dgs=0.5*0.00238*(Ug**2)*math.pi*((Dg/12)**2)*CDgs/4 #lb
Dgsm=0.5*0.00238*(Ug**2)*math.pi*((Dg/12)**2)*CDgsm/4 #lb
Dt=0.5*0.00238*(Ut**2)*math.pi*((Dt/12)**2)*CDt/4 #lb
#the corresponding decelerations are a=D/s=g*D/W
#deceleration relative to g=D/W
decgs=Dgs/Wg
decgsm=Dgsm/Wg
dect=Dt/Wt
#result
print"STANDARD GOLF BALL:"
print "The drag coefficient=",round(Dgs,3),"lb"
print "The deceleration relative to g=",round(decgs,2)
print"SMOOTH GOLF BALL:"
print "The drag coefficient=",round(Dgsm,3),"lb"
print"The deceleration relative to g=",round(decgsm,2)
print"TABLE TENNIS BALL:"
print "The drag coefficient=",round(Dt,3),"lb"
print "The deceleration relative to g=",round(dect,2)
U=88 #fps
Ds=40.0 #ft
Dc=15.0 #ft
b=50#ft
Res=U*Ds/(1.57*(10**(-4)))
Rec=U*Dc/(1.57*(10**(-4)))
#calculation
import math
#from these values of Re drag coefficients are found as
CDs=0.3
CDc=0.7
#by summing moments about the base of the tower
Drs=0.5*0.00238*(U**2)*math.pi*(Ds**2)*CDs/4 #lb
Drc=0.5*0.00238*(U**2)*b*Dc*CDc #lb
M=(Drs*(b+(Ds/2)))+(Drc*(b/2)) #ft*lb
#Result
print "The moment needed to prevent the tower from tripping=",round(M,3),"lb*ft"
U=15 #ft/sec
b=96 #ft
c=7.5 #ft
W=210 #lb
CD=0.046
eff=0.8 #power train efficiency
d=2.38*(10**(-3)) #slugs/(ft**3)
#W=L
CL=2*W/(d*(U**2)*b*c)
D=0.5*d*(U**2)*b*c*CD
P=D*U/(eff*550) #hp
#Result
print "The lift coefficient=",round(CL,3)
print "The power required by the pilot=",round(P,3),"hp"
W=2.45*(10**(-2)) #N
D=3.8*(10**(-2)) #m
U=12 #m/s
#calculation
import math
#W=L
d=1.23 #kg/(m**3)
W=0.5*d*(U**2)*(D**2)*math.pi*CL/4
CL=2*W/(d*(U**2)*math.pi*(D**2)/4)
#using this value of CL, omega*D/(2*U)=x is found as
x=0.9
omega=2*U*x/D #rad/sec
angvel=omega*60/(2*math.pi) #rpm where angvel is angular velocity
#Result
print "The angular velocity=",round(angvel,3),"rpm"