#Variable declaration:
NPS = 2 #Nominal pipe size (inch)
SN = 40 #Schedule number
#Calculation:
#From Table 6.2, we obtain that the inside diameter of steel pipe is ID = 2.067 in.
ID = 2.067
#Result:
print "The inside diameter of steel pipe is :",ID," in."
#Variable declaration:
NPS = 3 #Nominal pipe size (inch)
SN = 40 #Schedule number
#Calculation:
#From Table 6.2, we obtain that the inside diameter of steel pipe is ID = 3.068 in, outside diameter OD = 3.5 in, wal thickness WT = 0.216 in, and pipe weight PW = 7.58 lb/ft.
ID = 3.068
OD = 3.5
WT = 0.216
PW = 7.58
#Result:
print "The inside diameter of steel pipe is :",ID," in"
print "The outside diameter of steel pipe is :",OD," in"
print "The wall thickness of steel pipe is :",WT," in"
print "The weight of steel pipe is :",PW," lb/ft."
#Variable declaration:
ID = 0.957 #Inside diameter of pipe (in)
OD = 1.315 #Outside diameter of pipe (in)
WT = 0.179 #Wall thickness of pipe (in)
PW = 2.17 #Weight of pipe (lb/ft)
#Calculation:
#From Table 6.2, it indicates that the steel pipe is 1 inch schedule 80.
NSP = 1
SN = 80
#Result:
print "The nominal size of the pipe is :",NSP," in."
print "The schedule number of the pipe is:",SN,"."
#Variable declaration:
S = 3/4 #Tube size (in)
BWG = 16 #Birmingham Wire Gauge number (gauge)
#calculation:
#From table 6.3, we get:
ID = 0.620 #Internal diameter of tube (in)
WT = 0.065 #Wall thickness of tube (in)
OD = ID+2*WT #Outside diameter of tube (in)
EA = 0.1963 #External area per foot (ft)
#Result:
print "The inside diameter is :",ID," in"
print "The wall thickness is :",WT," in"
print "The outside diamater is :",OD," in"
print "The external area per foot per foot :",EA," ft."
#Variable declaration:
a = 1 #Length of cross-section (m)
b = 0.25 #Width of cross-section (m)
v = 1*10**-5 #Kinematic viscosity of air (m^2/s)
Re = 2300.0 #Reynolds Number
cm = 100 #Cenitmeters in a meter
#Calculation:
Dh = 2*a*b/(a+b) #Hydraulic diameter of duct (m)
V = Re*v/Dh*cm #Maximum air velocity (cm/s)
#Result:
print "The maximum air velocity before the flow becomes turbulent is :",round(V,1)," cm/s."
#Variable declaration:
q = 0.486 #Flow rate of fluid (ft^3/s)
D = 2.0/12.0 #Diameter of tube in feet (ft)
pi = 3.14 #Value of pi
p = 70.0 #Density of fluid (lb/ft^3)
u = 0.1806 #Viscosity of fluid (lb/ft)
#Calculation:
V = 4*q/pi/D**2 #Flow velocity (ft/s)
Re = D*V*p/u #Reynolds Number
#Result:
if(Re<2100):
print "The flow is laminar."
elif(Re>2100):
print "The flow is turbulant."
#Variable declaration:
#From example 6.12, we have:
D = 2.0/12.0 #Diameter of pipe in feet (ft)
Re = 1440.0 #Reynolds number
#Calculation:
Lc = 0.05*D*Re #Length of pipe (ft)
#Result:
print "The pipe length to ensure a fully developed flow is:",Lc," ft."
print "This is an abnormally long calming length for a pipe (or tube) in a heat exchanger."
#Variable declaration:
u = 6.72*10**-4 #Viscosity of water (lb/ft.s)
p = 62.4 #Density of water (lb/ft^3)
#For laminar flow:
Re = 2100.0 #Reynolds number
#From table 6.2, we have:
D = 2.067/12.0 #Inside diameter of pipe (ft)
#Calculation:
V = Re*u/D/p #Average velocity of water flowing (ft/s)
#Result:
print "The average velocity of water flowing is:",round(V,2)," ft/s."