import math
# Variables
p = 1.2047*0.06243; #[lb/ft**3]
mu = (18.17*10**-6)*(0.6720); #[lb/ft*sec]
v = mu/p;
x = 2.; #[ft]
U = 6.; #[ft/sec]
# Calculation and Results
Nre = (x*U)/v;
print "The Reynolds number is well within the laminar region %.3e Nre"%Nre
del_ = 5*x*(Nre)**(-1./2);
C1 = 0.33206;
Cd = 2.*C1*(Nre)**(-1./2);
L2 = 2.; #[ft]
L1 = 1.; #[ft]
b = 1.;
F = ((2*(C1)*U*b))*((mu*p*U)**(1./2))*(((L2)**(1./2))-((L1)**(1./2)));
gc = 32.174;
F = F/gc;
print " The value of F properly expressed in force units is F = %.3e lbf"%(F);
import math
# Variables
U = 3.; #[m/sec]
x1 = 1.; #[m]
x2 = 2.; #[m]
# Calculations
p = 1./(1.001*10**-3); #[kg/m**3];
mu = 1.*10**-3; #[kg/m*sec]
Nre1 = (x1*U*p)/(mu);
Nre2 = (x2*p*U)/(mu);
tauw = (1./2)*(p*(U**2))*((2*math.log10(Nre1)-0.65)**(-2.3));
B = 1700.;
Cd = (0.455*(math.log10(Nre2))**-2.58)-(B/(Nre2));
Lb = 2.0;
F = (1./2)*(p*(U**2))*(Lb)*(Cd);
Xc = round((5*10**5 * mu)/(U*p),3)
CDlaminar = round(4*.33206*(5*10**5)**(-1./2),5)
Flaminar= round(1./2*(p*U**2)*Xc*CDlaminar,3)
Cd = round(.455*((math.log10(Nre2))**-2.58),6)
Fturbulent1 = round(1./2*(p*U**2)*x2*Cd,2)
Fturbulent2 = round(1./2*(p*U**2)*Xc*.005106,3)
Factual = 1.411 + Fturbulent1 - Fturbulent2
# Results
print " the drag on the plate is F = %f kg*m/sec**2 = %.1f N"%(F,F);
print ' total drag on the plate Factual = %.2f N'%Factual
print " the shear stress is %.f N/m^2"%tauw
# Variables
T = 290.; #[K] - temperature of flowing water
U = 3.; #[m/sec] - free stream velocity
Tfs = 285.; #[K] - temperature of free stream
vr = 10.**-3; #[m**3/kg] - volume per unit mass
p = 1./vr; #[kg/m**3] - density of water at Tfs
mu = 1225.*10**-6; #[N*sec/m**2]
k = 0.590; #[W/m*K]
Npr = 8.70;
# Calculation and Results
# (a) The length of laminar boundary
Nre = 5.*10**5;
xc = (Nre)*(mu/(p*U));
print " a) The length of laminar boundary is xc = %.4f m"%(xc);
# (b) Thickness of the momentum boundary layer and thermal boundary layer
del_ = 5*xc*((Nre)**(-1./2));
del_h = del_*((Npr)**(-1./3));
print " b) The thickness of momentum boundary layer is del_ = %.3e m \n The \
thickness of the hydryodynamic layer is del_h = %.3e m"%(del_,del_h);
# (c) Local heat transfer coefficient
x = 0.2042; #[ft]
hx = ((0.33206*k)/(x))*((Nre)**(1./2))*((Npr)**(1./3));
print " c) The local heat transfer coefficient is h = %.0f W/m**2*K \
= %.0f Btu/hr*ft**2*degF"%(hx,hx*0.17611);
# (d) Mean heat transfer coefficient
hm = 2*hx;
print " d) The mean heat transfer coefficient is h = %.0f W/m**2*K \
= %.0f Btu/hr*ft**2*degF"%(hm,round(hm*0.17611,1));
# Answer may vary because of rounding error.
# Variables
T = 293.15; #[K]
pp = 999.; #[kg/m**3] - density of water
mu = 0.01817*10**-3; #[kg/m*sec] - viscosity of air
p = 1.205; #[kg/m**3] - density of air
d = 5*10**-6; #[m] - particle diameter
g = 9.80; #[m/sec**2]
# Calculations
rp = d/2;
Ut = ((2*g*(rp**2))*(pp-p))/(9*mu);
Nre = (d*Ut*p)/(mu);
Fp = 6*math.pi*mu*rp*Ut;
# Results
print " The drag force is Fp = %.2e N"%(Fp);
# Variables
T = 293.15; #[K]
pp = 999.; #[kg/m**3] - density of water
mu = 0.01817*10**-3; #[kg/m*sec] - viscosity of air
p = 1.205; #[kg/m**3] - density of air
d = 5*10**-6; #[m] - particle diameter
g = 9.80; #[m/sec**2]
# Calculations
rp = d/2;
Ut = ((2*g*(rp**2))*(pp-p))/(9*mu);
Nre = (d*Ut*p)/(mu);
t = ((-2*(rp**2)*pp))/(9*mu)*(math.log(1-0.99));
# Results
print " Time for the drop of water in previous Example from an initial \
velocity of zero to 0.99*Ut is \n t = %.3e sec"%(t);
print " In other words, the drop accelerates almost instantaneously to its terminal velocity"
# Variables
pp = 1.13*10**4; #[kg/m**3] - density of lead particle
p = 1.22; #[kg/m**3] - density of air
g = 9.80; #[m/sec**2] - acceleration due to gravity
d = 2*10**-3; #[m] - diameter of particle
mu = 1.81*10**-5; #[kg/m*sec] - viscosity of air
# Calculations
# let us assume
Cd = 0.44;
Ut = ((4*d*g*(pp-p))/(3*p*Cd))**(1./2);
Nre = (Ut*d*p)/(mu);
# from fig 12,16 value of Cd is
Cd = 0.4;
Ut = ((4*d*g*(pp-p))/(3*p*Cd))**(1./2);
Nre = (Ut*d*p)/(mu);
# Results
# Within the readibility of the chart Cd is unchanged and therefore the above obtained Cd is the final answer
print " The terminal velocity is Ut = %.2f m/sec"%(Ut);
# Variables
distance = 1./12; #[ft]
time = 60.; #[sec]
Ut = distance/time;
mu = 1.68; #[lb/ft*sec] - viscosity
pp = 58.; #[lb/ft**3] - density of sphere
p = 50.; #[lb/ft**3] - density of polymer solution
g = 32.; #[ft/sec] - acceleration due to gravity
# Calculations
rp = ((9*mu)*(Ut)*((2*g)**(-1))*((pp-p)**(-1)))**(1./2);
Nre = (rp*2*Ut*p)/(mu);
# Results
print " The required particle diameter would be about %.2f inch"%(rp*2*12);
print "Nre = %.2e"%Nre
print " This reynolds number is well within the stokes law region ; thus the design is reasonable"
# Variables
T = 842.; #[degF] - temperature
P = 14.6; #[psia] - pressure
p = 0.487; #[kg/m**3] - density of air
mu = 3.431*10**-5; #[kg/m*sec] - viscosity of air
k = 0.05379; #[W/m*K] - thermal conductivity
Npr = 0.7025; #prandtl no.
# Calculation and Results
# (a) static void_ fraction
mcoal = 15.*2000; #[lb] - mass of coal
pcoal = 94.; #[lbm/ft**3] - density of coal
d = 10.; #[ft]
L = 7.; #[ft]
area = ((math.pi*(d**2))/4);
Vcoal = mcoal/pcoal;
Vtotal = area*L;
e = (Vtotal-Vcoal)/(Vtotal);
print "(a) The void_ fraction is E = %.2f"%e
# (b) minimum void_ fraction and bed height
d = 200.; #[um] - particle diameter
Emf = 1-0.356*((math.log10(d))-1);
# this value seems to be a lottle low and therefore 0.58 will be used
Emf = 0.58;
Lmf = ((L)*(1-e))/(1-Emf);
print " b) The bed height is Lmf = %.3f ft"%(Lmf);
# (c) Minimum fluid_ization velocity
P1 = 20.; #[psia]
P2 = 14.696; #[psia]
p1 = (p*P1)/(P2);
# the archimid_es no. is
g = 9.78; #[m/sec**2]
Nar = p1*g*((d*10**-6)**3)*(1506-p1)*((1./(mu)**2));
C1 = 27.2;
C2 = 0.0408;
Nremf = (((C1**2)+C2*Nar)**(1./2))-C1;
Umf = (Nremf*mu)/((d*10**-6)*p1);
print " c) The minimum fluid_ization velocity is Umf = %.4f %% m/sec"%(Umf);
# (d) Minimum pressure
del_tapmf = (1506-p1)*(g)*(1-Emf)*((Lmf*12*2.54)/(100))+p1*g*Lmf;
print " d) The minimum pressure drop for fluid_ization is -del_tapmf = %.3e Pa"%(del_tapmf);
# (e) Particle settling velocity
Cd = 0.44;
Ut = (((8*((d*10**-6)/2)*g)*(1506-p1))/(3*p1*Cd))**(1./2);
Nrep = (Ut*d*10**-6*p1)/(mu);
print "Nrep = %.2f"%Nrep
Ut = ((5.923/18.5)*(((d*10**-6)*p1)/(mu))**(0.6))**(1./(2-0.6))
print " e) The particle settling velocity is Ut = %.5f m/sec"%(Ut);
# (f) Bed to wall heat transfer coefficient
Nrefb = (d*10**-6)*2.5*Umf*p1*(1./mu);
Nnufb = 0.6*Npr*((Nrefb)**(0.3));
hw = Nnufb*(k/(d*10**-6));
print " f) The bed to wall heat transfer coefficient is hw = %.1f W/m**2*K"%(hw);
# Answer may vary because of rounding error.
# Variables
pp = 249.6; #[lb/ft**3] - density of catalyst
p = 58.; #[lb/ft**3] - density of liquid
g = 32.174; #[ft/sec**2]
gc = 32.174;
Lmf = 5.; #[ft] - height of bed
mu = 6.72*10**-3; #[lbm/ft*sec] - viscosity of liquid
dp = 0.0157/12; #[ft] - diameter of particle
emf = 0.45;
# Calculations
del_tapmf = (pp-p)*(g/gc)*(1-emf)*(Lmf);
Nar = (p*g*dp**3)*(pp-p)*(1./(mu)**2);
C1 = 27.2;
C2 = 0.0408;
Nremf = (((C1**2)+C2*Nar)**(1./2))-C1;
Umf = Nremf*(mu/(dp*p));
# Results
print " Minimum fluidization velocity is Umf = %.2e ft/sec"%(Umf);
# Variables
d = 24.*10**-6; #[m] - diameter of wire
T = 415.; #[K] - operating temperature of hot wire anemometer
P = 0.1; #[W] - power consumption
L = 250.*d;
Tair = 385.; #[K] - temperature of air in duct
A = math.pi*d*L;
Tfilm = (T+Tair)/2.;
# properties of air at Tfilm
p = 0.8825; #[kg/m**3]
mu = 2.294*10**-5; #[kg/m*s]
cpf = 1013.; #[J*kg/K]
kf = 0.03305; #[W/m*K]
Npr = 0.703;
# Calculations
h = P/(A*(T-Tair));
Nnu = (h*d)/kf;
def func(x):
return Nnu-0.3-((0.62*(x**(1./2))*(Npr**(1./3)))/((1+((0.4/Npr)**(2./3)))**(1./4)))*((1+((x/(2.82*(10**5)))**(5./8)))**(4./5));
# on solving the above function for x by umath.sing some root solver technique like Newton raphson method , we get
x = 107.7;
# or
Nre = 107.7;
y = func(x);
Um = (Nre*mu)/(d*p);
# Results
print " The velocity is Um = %.1f m/sec = %d ft/sec"%(Um,Um*3.28);
# Variables
dt = 0.75;
St = 1.5*dt;
Sl = 3.*dt;
Lw = 1.; #[m]
N = 12.;
Stotalarea = N*(St/12.)*Lw;
Sminarea = N*((St-dt)/12.)*Lw*0.3048;
# properties of air at 293.15 K
p = 1.204; #[kg/m**3]
mu = 1.818*10**-5; #[kg/m*s]
cp = 1005.; #[J*kg/K];
k = 0.02560; #[J/s*m*K]
Npr = (cp*mu)/k;
U_inf = 7.; #[m/sec]
# Calculations
Umax = U_inf*(St/(St-dt));
w = p*Umax*Sminarea;
C_tubes = 0.05983; #[m**2/m] - circumference of the tubes
N_tubes = 96.;
Atubes = N_tubes*C_tubes*Lw;
Tw = 328.15; #[K]
Tinf = 293.15; #[K]
Tin = 293.15; #[K]
Tout = 293.15; #[K]
u = 100.;
while u>10**-1:
T = (Tin+Tout)/2
Told = Tout;
p = -(0.208*(10**-3))+(353.044/T);
mu = -(9.810*(10**-6))+(1.6347*(10**-6)*(T**(1./2)));
cp = 989.85+(0.05*T);
k = 0.003975+7.378*(10**-5)*T;
Npr = (cp*mu)/k;
dt = 0.75*0.0254;
Gmax = w/Sminarea;
Nre = (dt*Gmax)/mu;
h = 0.27*(k/dt)*(Npr**0.36)*(Nre**0.63);
h = h*0.98;
del_taT = (h*Atubes*(Tw-Tinf))/(w*cp);
Tout = Tin+del_taT;
u = abs(Tout-Told);
T = (Tin+Tout)/2
p = -(0.208*(10**-3))+(353.044/T);
mu = -(9.810*(10**-6))+(1.6347*(10**-6)*(T**(1./2)));
dt = 0.75;
dv = (4*(St*Sl-(math.pi*(dt**2)*(1./4))))/(math.pi*dt)*(0.09010/3.547);
de = dv;
Nre = (dv*24.72)/mu;
dv = dv/(0.09010/3.547);
ftb = 1.92*(Nre**(-0.145));
Zt = Sl;
Ltb = 8*Sl;
del_tap = (ftb*(24.72**2))/(2*p*(dv/Ltb)*((St/dv)**0.4)*((St/Zt)**0.6));
# Results
print " del_tap = %.0f kg/m*s = %.0f N/m**2 = %f psia"%(del_tap,del_tap,round(del_tap*0.1614/1113,5))
print " Exit temperature : %.2f K"%T
# answer may slightly vary because of rounding error.