import math
# Variables
L = 1; #Length of the palte in m
W = 1; #Width of the plate in m
v = 2.5; #Velocity of air in m/s
Re = (5*10**5); #Reynolds number at the transition from laminar to turbulant
p = (0.85*10**-5); #Dynamic vismath.cosity in N.s/m**2
r = 1.12; #Density in kg/m**3
# Calculations
x = (p*Re)/(r*v); #Calculated length in m
# Results
print 'The actual length of the plate is %i m, which is less than %3.2f m'%(L,x)
# Variables
p = 0.8; #Dynamic viscosity in N.s/m**2
k = 0.15; #Thermal conductivity in W/m.K
Tb = 10; #Temperature of bearing in degree C
Ts = 30; #Temperature of the shaft in degree C
C = 0.002; #Clearance between bearig and shaft in m
U = 6; #Velocity in m/s
# Calculations
qb = (((-p*U**2)/(2*C))-((k/C)*(Ts-Tb)))/1000; #Surface heat flux at the bearing in kW/m**2
qs = (((p*U**2)/(2*C))-((k/C)*(Ts-Tb)))/1000; #Surface heat flux at the shaft in kW/m**2
Tmax = Tb+(((p*U**2)/(2*k))*(0.604-0.604**2))+((Ts-Tb)*0.604); #Maximum temperature in degree C occurs when ymax = 0.604L
# Results
print 'Maximum temperature rise is %3.3f degree C \n \
Heat fux to the bearing is %3.1f kW/m**2 \n \
Heat fux to the shaft is %3.1f kW/m**2'%(Tmax,qb,qs)
# Variables
D = 0.02; #I.D of the tube in m
Q = 1.5; #Flow rate in litres per minute
k = (1*10**-6); #kinematic vismath.cosity in m**2/s
# Calculations
um = ((Q/60)*10**-3)/(3.14*(D**2/4)); #Average velocity in m/s
Re = (um*D)/k; #Reynolds number
x = 0.05*D*Re; #Entry length in m
# Results
print 'Re which is %3.0f less than 2300, the flow is laminar. \n \
Entry length is %3.3f m'%(Re,x)
# Variables
L = 3000; #Distance transported in m
D = 0.02; #I.D of the tube in m
Q = 1.5; #Flow rate in litres per minute
k = (1*10**-6); #kinematic vismath.cosity in m**2/s
pw = 1000; #Density of water in kg/m**3
# Calculations
um = ((Q/60)*10**-3)/(3.14*(D**2/4)); #Average velocity in m/s
Re = (um*D)/k; #Reynolds number
x = 0.05*D*Re; #Entry length in m
hL = ((64./Re)*L*um**2)/(2*D*9.81) #Head loss in m
P = (pw*9.81*(3.14/4)*D**2*um*hL); #Power required to maintain this flow rate in W
# Results
print 'Head loss is %3.2f m \n \
Power required to maintain this flow rate is %3.4f W'%(hL,P)
# Variables
L = 100; #Length of rectangular duct in m
A = [0.02,0.025]; #Area of duct in m**2
Tw = 40; #Temperature of water in degree C
v = 0.5; #Velocity of flow in m/s
k = (0.66*10**-6); #kinematic viscosity in m**2/s
p = 995; #Density of water in kg/m**3
# Calculations
P = 2*(A[0]+A[1]); #Perimeter of the duct in m
Dh = (4*(A[0]*A[1]))/P #Hydraulic diameter of the duct in m
Re = (v*Dh)/k; #Reynolds number
f = 0.316*Re**(-0.25); #Friction factor
hL = (f*L*v**2)/(2*Dh*9.81); #Head loss in m
P = (hL*9.81*p)/10**4; #Pressure drop in smooth rectangular duct in 10**4 N/m**2
# Results
print 'Pressure drop in smooth rectangular duct is %3.4f*10**4 N/m**2'%(P)