from __future__ import division
import math
# Initialization of Variable
D = 4 #mm
V = 50 #m/s
l = 0.1 #m
p = 1.23 #kg/m3
mu = 1.79E-5 #Ns/m2
#calculations:
#reynolds number
Re = p*V*(D/1000)/mu
#from table 14.1
e = 0.0015 #mm
#e/D
e_D = e/D
#from chart 14.7
f = 0.028
#pressure drop
dP = f*(l/(D/1000))*(p/2)*V**2/1000
#Results
print "the pressure drop is",round(dP,3),"kPa"
from __future__ import division
import math
# Initialization of Variable
T = 60 #degF
p = 1.94 #slug/ft3
mu = 2.34E-5 #lbf.s/ft2
D = 0.0625 #ft
Q = 0.0267 #ft3/s
Df = 0.0417 #ft
z1 = 0 #ft
z2 = 20 #ft
P2 = 0 #gage
l13 = 15 #ft
l34 = 10 #ft
l45 = 5 #ft
l56 = 10 #ft
l67 = 10 #ft
l78 = 10 #ft
#calculations:
#Area at 1
A1 = math.pi*D**2/4
#fluid vel in pipe
V1 = Q/A1
#reynolds number
Re = p*V1*D/mu
#area at 2
A2 = math.pi*Df**2/4
#velocity of stream exciting from faucet
V2 = Q/A2
r = 62.4 #lbf/ft3
#total length
l = l13 + l34 + l45 + l56 + l67 + l78
#from Moody chart
f = 0.0215
#pressure drop
P1 = (r*z2 + 0.5*p*(V2**2 - V1**2) + p*f*(l/D)*(V1**2/2))/144
#loss coeff
Kl = 4*1.5 + 10 + 2
#entire Pressure drop
P1 = P1 + p*(V1**2/2)*Kl/144
#Results
print "entire pressure drop is", round(P1,1),"Psi"
from __future__ import division
import math
# Initialization of Variable
T = 140 #degF
r = 53.7 #lbf/ft3
p = 1.67 #slug/ft3
mu = 8E-5 #lbf.s/ft2
l = 799 #mile
D = 4 #ft
Q = 117 #ft3/s
V = 9.31 #ft/s
g = 32.2 #ft/s2
#calculations:
#reynolds number
Re = p*V*D/mu
#from fig 14.7
f = 0.0125
#pump head
hp = f*(l/D)*5280*(V**2/(2*g))
#power req
Wpdot = r*Q*hp/550
#Results
print "the power added to the fluid by the pumps that drive this system is", round(Wpdot,0),"hp"
#answer wrong in book
from __future__ import division
import math
# Initialization of Variable
P1_rw = 0.2 #P1/rH2O in inch
V1 = 0
g = 32.2 #ft/s2
l = 20 #ft
D = 4 #in
P2 = 0
rair = 0.0709 #lbf/ft3
vair = 1.79E-4 #ft2/s
rw = 62.4 #lbf/ft2
#calculations:
#loss coeffs
KLent = 0.5 #entrance
KLelb = 1.5 #elbow
KL = KLent + 4*KLelb
#P1
P1 = P1_rw/12*rw
#assumption
f = 0.022
V = ((P1/rair)*2*g/(1 + (l*f/(D/12)) + KL))**0.5
#reynolds number
Re = V*D/(vair*12)
#Area
A = math.pi/4*(D/12)**2
#volumetric flow rate
Q = A*V
#Results
print "Volumetric flow rate is", round(Q,3),"ft3/s"
#answer wrong in book
from __future__ import division
import math
# Initialization of Variable
D = 60 #mm
d = 30 #mm
dP = 4 #kPa
mu = 1.19E-3 #N.s/m2
p = 789 #kg/m3
#calculations:
#area
Ao = math.pi*(d/1000)**2/4
b = d/D
#at this b,
Co = 0.613
#from fig 14.10 and Re at this value of b, we get
#volumetric flow rate
Q = Co*Ao*(2*dP*1000/(p*(1 - b**4)))**0.5
#Results
print "Volumetric flow rate is", round(Q,5),"m3/s"
#answer wrong in book
from __future__ import division
import math
# Initialization of Variable
U = 10 #ft/s
Tw = 60 #degF
Tg = 68 #degF
Rexc = 5E5
vW = 1.21E-5 #ft2/s
vA = 1.57E-4 #ft2/s
vG = 1.28E-2 #ft2/s
#calculations:
#water
Xc_W = vW*Rexc/U
dXc_W = 5*(vW*Xc_W/U)**0.5
#air
Xc_A = vA*Rexc/U
dXc_A = 5*(vA*Xc_A/U)**0.5
#glycerin
Xc_G = vG*Rexc/U
dXc_G = 5*(vG*Xc_G/U)**0.5
#Results
print " Fluid\t\t v(ft2/s)\t\t Xc(ft)\t\t d(Xc)(ft)"
print "a)Water\t\t",vW,"\t\t ",round(Xc_W,3),"\t ", round(dXc_W,5)
print "b)Air\t\t",vA,"\t\t ",round(Xc_A,2),"\t\t ", round(dXc_A,4)
print "c)Glycerin\t",vG,"\t\t\t ",round(Xc_G,0),"\t ", round(dXc_G,2)
from __future__ import division
import math
# Initialization of Variable
l = 8 #ft
b = 4 #ft
U = 80.7 #ft/s
e = 0.003 #ft
p = 0.00238 #slug/ft3
mu = 3.74E-7 #lbf.s/ft2
#calculations:
A = l*b
#reynolds number
Re = p*U*l/mu
#e_D = e/D
e_D = e/l
#from fig 14.14
Cd = 0.0066
#fraction drag
D = 0.5*p*U**2*l*b*Cd
#Results
print "the drag on the top surface of the plywood is", round(D,2),"lbf"
from __future__ import division
import math
# Initialization of Variable
U = 95.3 #ft/s
Cd1940 = 0.55
b1940 = 5.2 #ft
h1940 = 5.1 #ft
Cd2003 = 0.30
b2003 = 5.2 #ft
h2003 = 4.3 #ft
p = 0.00238 #slug/ft3
#calculations:
#Area
A1940 = b1940*h1940
A2003 = b2003*h2003
#Drag
D1940 = 0.5*p*U**2*A1940*Cd1940
D2003 = 0.5*p*U**2*A2003*Cd2003
#Power required
W1940dot = U*D1940/550
W2003dot = U*D2003/550
#Results
print "drag force on 1940 car is",round(D1940,0),"lbf and on 2003 is",round(D2003,1),"lbf"
print "power required to overcome drag force by 1940 car is",round(W1940dot,1),"hp and by 2003 car is",round(W2003dot,1),"hp"
from __future__ import division
import math
# Initialization of Variable
b = 96 #ft
c = 7.5 #ft
W = 210 #lbf
U = 15 #ft/s
d = 0.5 #mi
p = 0.00238 #slug/ft3
#calculations:
#area
A = b*c
#lift coeff
CL = 2*W/(p*U**2*A)
#Results
print "coeff. of lift is",round(CL,2)